Method and apparatus for generating model, method and apparatus for recognizing information

US11210608B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11210608-B2
Application numberUS-201916424109-A
CountryUS
Kind codeB2
Filing dateMay 28, 2019
Priority dateMay 29, 2018
Publication dateDec 28, 2021
Grant dateDec 28, 2021

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A method and apparatus for generating a model, and a method and apparatus for recognizing information are provided. An implementation of the method for generating a model includes: acquiring a to-be-converted model, a topology description of the to-be-converted model, and device information of a target device; converting, based on the topology description and the device information, parameters and operators of the to-be-converted model to obtain a converted model applicable to the target device; and generating a deep learning prediction model based on the converted model. This embodiment enables the conversion of an existing model to a deep learning prediction model that can be applied to a target device.

First claim

Opening claim text (preview).

What is claimed is: 1. A method for generating a model, the method comprising: acquiring a to-be-converted model, a topology description of the to-be-converted model, and device information of a target device; converting parameters and operators of the to-be-converted model to obtain a converted model applicable to the target device based on the topology description and the device information; and generating a model for deep learning prediction based on the converted model, wherein the generating comprises: in response to detecting a model compression command, performing a compression operation indicated by the model compression command on the converted model to obtain a compressed model, and using the compressed model as the deep learning prediction model, wherein the model compression command is generated in response to a preset model compression option being selected, and the model compression option comprises at least one of: a first model compression option for reducing precision of the parameters, a second model compression option for merging or pruning layers in the converted model, or a third model compression option for pruning the parameters of the converted model; and providing a software development kit corresponding to the target device to a user, wherein the software development kit is used for providing a model prediction interface associated with the deep learning prediction model. 2. The method according to claim 1 , wherein the method further comprises: generating an application corresponding to the target device, the application being integrated with the model for deep learning prediction. 3. The method according to claim 1 , further comprising: determining a current prediction mode, in response to receiving to-be-recognized information associated with the model for deep learning prediction, wherein the prediction mode comprises an offline prediction mode for indicating to perform predictions locally on the target device, and the target device is a device containing the model for deep learning prediction; and recognizing the to-be-recognized information by using the model for deep learning prediction, in response to determining that the offline prediction mode is currently in use. 4. The method according to claim 3 , wherein the prediction mode further comprises a hybrid mode for indicating to select an online prediction or an offline prediction based on a network condition; and the method further comprises: determining whether the target device is currently in communication connection with a cloud server, in response to determining that the hybrid mode is currently in use; and recognizing the to-be-recognized information by using the model for deep learning prediction, in response to determining that the target device is not currently in communication connection with the cloud server. 5. The method according to claim 3 , wherein before recognizing the to-be-recognized information by using the model for deep learning prediction, the method further comprises: determining, based on preset device information of the target device, whether the target device comprises a heterogeneous computing chip associated with a computing acceleration command, in response to detecting the computing acceleration command, wherein the computing acceleration command is generated in response to that a preset computing acceleration option is selected, and the computing acceleration option comprises at least one of: a first computing acceleration option for indicating to invoke a network processor for accelerating computing, a second computing acceleration option for indicating to invoke a graphics processor for accelerating computing, or a third computing acceleration option for indicating to invoke a field programmable gate array for accelerating computing; and scheduling an operation of a layer associated with the heterogeneous computing chip in the model for deep learning prediction onto the heterogeneous computing chip for executing, in response to determining that the target device comprises the heterogeneous computing chip. 6. An apparatus for generating a model, the apparatus comprising: at least one processor; and a memory storing instructions, the instructions when executed by the at least one processor, cause the at least one processor to perform operations, the operations comprising: acquiring a to-be-converted model, a topology description of the to-be-converted model, and device information of a target device; converting parameters and operators of the to-be-converted model to obtain a converted model applicable to the target device, based on the topology description and the device information; and generating a model for deep learning prediction based on the converted model, wherein the generating comprises: in response to detecting a model compression command, performing a compression operation indicated by the model compression command on the converted model to obtain a compressed model, and using the compressed model as the deep learning prediction model, wherein the model compression command is generated in response to a preset model compression option being selected, and the model compression option comprises at least one of: a first model compression option for reducing precision of the parameters, a second model compression option for merging or pruning layers in the converted model, or a third model compression option for pruning the parameters of the converted model; and providing a software development kit corresponding to the target device to a user, wherein the software development kit is used for providing a model prediction interface associated with the deep learning prediction model. 7. The apparatus according to claim 6 , wherein the operations further comprise: generating an application corresponding to the target device, the application being integrated with the model for deep learning prediction. 8. The apparatus according to claim 6 , wherein the operations further comprise: determining a current prediction mode, in response to receiving to-be-recognized information associated with the model for deep learning prediction, the prediction mode comprises an offline prediction mode for indicating to perform predictions locally on the target device, and the target device being a device containing the model for deep learning prediction; and recognizing the to-be-recognized information using the model for deep learning prediction, in response to determining that the offline prediction mode is currently in use. 9. The apparatus according to claim 8 , wherein the prediction mode further comprises a hybrid mode for selecting an online prediction or an offline prediction based on a network condition; and the operations further comprise: determining whether the target device is currently in communication connection with a cloud server, in response to determining that the hybrid mode is currently in use; and recognizing the to-be-recognized information by using the model for deep learning prediction, in response to determining that the target device is not currently in communication connection with the cloud server. 10. The apparatus according to claim 8 , wherein the operations further comprise: determining, based on preset device information of the target device, whether the target device comprises a heterogeneous computing chip associated with a computing acceleration command, in response to detecting the computing acceleration command, wherein the computing acceleration command is generated in response to a preset computing acceleration option being selected, and the computing acceleration option comprises at least one of: a first computing acceleration option for indicating

Assignees

Inventors

Classifications

  • G06F18/214Primary

    Generating training patterns; Bootstrap methods, e.g. bagging or boosting · CPC title

  • G06N20/00Primary

    Machine learning · CPC title

  • H04L67/303Primary

    Terminal profiles · CPC title

  • involving the movement of software or configuration parameters  (network booting or remote initial program loading [RIPL] G06F9/4416) · CPC title

  • using electronic means · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US11210608B2 cover?
A method and apparatus for generating a model, and a method and apparatus for recognizing information are provided. An implementation of the method for generating a model includes: acquiring a to-be-converted model, a topology description of the to-be-converted model, and device information of a target device; converting, based on the topology description and the device information, parameters …
Who is the assignee on this patent?
Beijing Baidu Netcom Sci & Tech Co Ltd
What technology area does this patent fall under?
Primary CPC classification G06F18/214. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Dec 28 2021 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 5 related publications on this page (citations in our corpus or others sharing the same primary CPC).