End intelligent model management method and device and storage medium
By generating unique model identification information, the terminal can download and manage multiple structural models from the server, solving the problem of only one structural model in the existing technology, and realizing the management and reasoning acceleration of multi-business models.
Patent Information
- Application Number
- CN202411334592.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-01-07
AI Technical Summary
The existing technology cannot realize multi-scenario heterogeneous model management, and the terminal can only manage one structural model, which cannot meet the needs of different structural models.
By generating unique model identification information, including the business, engine type and model version to which the model belongs, the terminal downloads and manages multiple structural models from the server based on this information, and supports model version upgrade and return.
It realizes the management of multiple structural models, improves the ability to manage end intelligent models, and supports the classification, issuance, storage, version management and inference acceleration of multi-business models.
Smart Images

Figure CN119271218A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a terminal intelligent model management method, device and storage medium. Background Art
[0002] On-Device AI refers to running algorithm models directly on terminal devices, including but not limited to mobile phones and other smart devices. This technology enables complex calculations and data processing to be performed locally on the device without relying on cloud computing services. Currently, more and more scenarios require the use of on-device intelligence to improve user experience, and the demand for on-device intelligence models has also expanded from conventional CPU algorithm models to algorithm models with different structures. However, in related technologies, the terminal downloads the model from the cloud server to the local to implement on-device intelligence, which often fails to achieve multi-scenario heterogeneous model management. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a terminal intelligent model management method, device and storage medium, which can support the management of multiple structural models and improve the terminal intelligent model management capabilities. The specific scheme is as follows: In a first aspect, the present application discloses a terminal intelligent model management method, which is applied to a terminal, comprising: Obtain the model identification information sent by the server; the model identification information is specific and unique, and the model identification information includes the model business, extension fields, engine type and model version of the corresponding algorithm model; Based on the model identification information and according to local needs, determining whether the algorithm model corresponding to the model identification information is a target model to be downloaded; If it is a target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model sent by the server is received so as to perform computing tasks using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-built model identification information and the model.
[0004] Optionally, obtaining the model identification information sent by the server includes: Sending a model information acquisition request to the server, so that the server sends corresponding model identification information according to the model information acquisition request; Or, obtain the model identification information sent by the server for the updated model.
[0005] Optionally, judging whether the algorithm model corresponding to the model identification information is a target model to be downloaded based on the model identification information according to local needs includes: According to the model identification information and the terminal operating environment information, determining whether the algorithm model corresponding to the model identification information is a model type required by the terminal; If so, judging, based on the model identification information, whether the algorithm model corresponding to the model identification information has a version upgrade relative to the algorithm model already existing in the terminal; If so, the algorithm model corresponding to the model identification information is the target model to be downloaded.
[0006] Optionally, the terminal intelligent model management method further includes: According to the model identification information of the downloaded model, determining whether the downloaded model is valid by querying the server; If the downloaded model is invalid, the downloaded model is deleted from the terminal database.
[0007] Optionally, the generating a model download request based on the model identification information includes: Generate a model download task based on the model identification information, and add the model download task to a model download list; Generate model download requests corresponding to each model download task in sequence according to the order in the model download list.
[0008] Optionally, after receiving the target model sent by the server, the method further includes: Generate an inference engine strategy corresponding to the target model according to the type information of the target model and the terminal operating environment information; The target model is subjected to inference acceleration according to the inference engine strategy.
[0009] Optionally, generating an inference engine strategy corresponding to the target model according to the type information of the target model and the terminal operating environment information includes: Determining a hardware acceleration proxy type corresponding to the target model according to the type information of the target model and the terminal operating environment information; An inference engine strategy corresponding to the target model is generated according to the hardware acceleration agent type.
[0010] In a second aspect, the present application discloses a terminal intelligent model management method, which is applied to a server, including: Sending model identification information to the terminal so that the terminal can determine whether the algorithm model corresponding to the model identification information is the target model to be downloaded by the terminal based on the model identification information and the terminal's needs; the model identification information is specifically unique, and the model identification information includes the model business, extension field, engine type and model version of the corresponding algorithm model; acquiring a model download request sent by the terminal based on the model identification information after determining that the algorithm model corresponding to the model identification information is a target model; By querying the correspondence between the pre-built model identification information and the model, the target model corresponding to the model download request is determined, and the target model is sent to the terminal so that the terminal uses the target model to perform the computing task.
[0011] In a third aspect, the present application discloses an electronic device, comprising: Memory, used to store computer programs; The processor is used to execute the computer program to implement the aforementioned terminal intelligent model management method.
[0012] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein the computer program implements the aforementioned end intelligent model management method when executed by a processor.
[0013] In a fifth aspect, the present application discloses a computer program product, including a computer program, which implements the aforementioned music generation method when executed by a processor.
[0014] In this application, the model identification information sent by the server is obtained; the model identification information is specifically unique, and the model identification information includes the business to which the model belongs, the extension field, the engine type and the model version of the corresponding algorithm model; based on the model identification information and according to local needs, it is determined whether the algorithm model corresponding to the model identification information is the target model to be downloaded; if it is the target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model sent by the server is received, so as to perform the computing task using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-built model identification information and the model. By creating a unique model identification information for the model, the business to which the model belongs, the engine type corresponding to the model and the model version are identified by the model identification information, thereby, the model identification information corresponding to the models of different structures is different, the server combines the model identification information to store the model, and the terminal downloads the model from the server according to the model identification information and manages the model, which can support the management of multiple structure models and improve the terminal intelligent model management capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0016] Figure 1 A flow chart of a terminal intelligent model management method provided for this application; Figure 2 A specific flow chart of the terminal intelligent model management method provided in this application; Figure 3 Another specific end intelligent model management method flow chart provided for this application; Figure 4 A schematic diagram of the structure of a specific terminal intelligent model management system provided for this application; Figure 5 A specific flow chart of the terminal intelligent model management method provided in this application; Figure 6 A schematic diagram of the structure of a terminal intelligent model management device provided in this application; Figure 7 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] In the prior art, the terminal downloads the model from the cloud server to the local server based on the model meta-information to realize terminal intelligence. However, based on the model meta-information, only one structural model can be managed, and heterogeneous model management in multiple scenarios cannot be realized. In order to overcome the above technical problems, this application proposes a terminal intelligent model management method that can support the management of multiple structural models and improve the ability of terminal intelligent model management.
[0019] The present application embodiment discloses a terminal intelligent model management method, which is applied to a terminal, see Figure 1 As shown, the method may include the following steps: Step S11: Obtain the model identification information sent by the server; the model identification information is specific and unique, and the model identification information includes the model business, extension fields, engine type and model version of the corresponding algorithm model.
[0020] The above-mentioned acquisition of the model identification information sent by the server may include: sending a model information acquisition request to the server, so that the server sends the corresponding model identification information according to the model information acquisition request; or, acquiring the model identification information sent by the server for the updated model. That is, the terminal may send a model identification information acquisition request to the server, and the server may feedback the corresponding model identification information according to the request. Specifically, it may be an information request for all models, or an information request for a certain type of model, or the server may feedback the identification information of the model within the authority according to the authority of the terminal; of course, it may also be that when there is an update to the model in the server, a notification is actively sent to the terminal. The specific method of acquiring the model identification information is not specifically limited in this embodiment.
[0021] The above-mentioned model identification information can characterize the business to which the model belongs, the engine type that the model needs to adopt, and the model version information, wherein the model identification information also includes an extension field, which is used to characterize the secondary business to which the model belongs. For example, the model identification information is defined as ModelUnique, and ModelUnique is mainkey_subkey_engintype_version; mainkey indicates the business to which the model belongs, subkey indicates the extension field, engintype indicates the engine type, and version indicates the model version. In addition to conventional CPU (Central Processing Unit) algorithm models, there are also acceleration models for special hardware. These heterogeneous models previously had different versions, and it is also necessary to distinguish models between different businesses; a segmented marking method is used to mark the corresponding business, hardware structure, and version of the end-intelligent model, so as to achieve end-intelligent model management in combination with local storage mapping.
[0022] Step S12: Based on the model identification information and according to local needs, determine whether the algorithm model corresponding to the model identification information is the target model to be downloaded.
[0023] The terminal determines whether the algorithm model corresponding to the model identification information is the target model that the terminal needs to download based on the obtained model identification information and the terminal needs. The target model to be downloaded may be a model that does not exist in the terminal and needs to be newly downloaded, or a model that needs to be updated. Local needs are determined by the computing tasks of the business on the terminal and the terminal operating environment information. The operating environment information of the terminal is obtained, and the operating environment information includes but is not limited to the model, chip, system version (such as IOS / Android), and supported engine version information.
[0024] In some embodiments, judging whether the algorithm model corresponding to the model identification information is the target model to be downloaded based on the model identification information according to local requirements may include: judging whether the algorithm model corresponding to the model identification information is the model type required by the terminal according to the model identification information and the terminal operating environment information; If the algorithm model corresponding to the model identification information is not the model type required by the terminal, it indicates that the terminal does not need the model. If the algorithm model corresponding to the model identification information is the model type required by the terminal, it indicates that the terminal needs the model. Then, according to the model identification information, it is determined whether the algorithm model corresponding to the model identification information has a version upgrade relative to the algorithm model already existing in the terminal; if there is a version upgrade, the algorithm model corresponding to the model identification information is the target model to be downloaded; if the version information in the model identification information is consistent with the model version currently used by the terminal, there is no need to download and update. Model types include CPU models, NPU (Neural Processing Unit) models, etc. The required model type is selected according to the type of chip used by the terminal; then it is further determined whether there is a version upgrade, that is, the version of the model currently downloaded by the terminal is compared with the version in the model identification information. If there is a version upgrade, it is determined as the target model to be downloaded, or the terminal does not currently contain the model, and it is also used as the target model to be downloaded.
[0025] In addition to supporting model version upgrades, this embodiment also supports model rollback, that is, rolling back the existing algorithm model version of the terminal to the historical version. Specifically, the terminal can generate a model download request based on the historical version information of the algorithm model and send it to the server, so that the server can send the historical version model to the terminal to realize the rollback of the algorithm model on the terminal.
[0026] Step S13: If it is a target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model sent by the server is received so as to perform computing tasks using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-constructed model identification information and the model.
[0027] After determining the model to be downloaded, a model download request is generated based on the model identification information and sent to the server. The server stores the correspondence between the model identification information and the model metadata. The correspondence is queried based on the model identification information, and the target model can be determined from all stored models and sent to the terminal. File download, file persistence, and database status storage are performed by downloading model information.
[0028] The above-mentioned generating a model download request based on the model identification information may include: generating a model download task based on the model identification information, and adding the model download task to the model download list; and sequentially generating model download requests corresponding to each model download task according to the order in the model download list. Figure 2 As shown, when faced with multiple model download tasks, in order to ensure the success rate of model download, a download task list is constructed and the tasks in the list are executed in a first-in-first-out order.
[0029] In this embodiment, the method may further include: determining whether the downloaded model is valid by querying the server according to the model identification information of the downloaded model; if the downloaded model is invalid, deleting the downloaded model from the terminal database. Figure 2 As shown in the figure, after the model is downloaded to the terminal, the terminal will perform local resource management, specifically judging whether the local model is valid according to the model identification information. If it is invalid, the relevant model will be deleted from the terminal database (effect model DB). If it is valid, the model version can be further verified to determine whether it is the latest version of the model. If there is no valid model, the first model download task is executed. If the model exists but needs to be updated, the update model download task is executed. Before executing the model download task, it is determined whether the task queue is idle. If it is, the model download task is executed directly. If there is an ongoing model download task, the generated model download task is first stored in the waiting queue so that each download task can be executed sequentially. After the model is downloaded from the model management background of the server, the terminal database is updated to realize the terminal intelligent model. Specifically, when the model needs to be downloaded, a model download request is sent to the model management background of the server, and the model is updated according to the feedback of the server. If the model involved in the model download request has been removed from the shelf, the local invalid model database is updated. If it has not been removed from the shelf, the model is downloaded and the terminal database is updated. The terminal database is used to store downloaded and valid algorithm models. For multi-business end intelligent heterogeneous models, this application supports the classification, issuance, storage, version management and model version upgrade and rollback of multi-business models.
[0030] As can be seen from the above, in this embodiment, the model identification information sent by the server is obtained; the model identification information is specifically unique, and the model identification information includes the business to which the model belongs, the extension field, the engine type and the model version of the corresponding algorithm model; based on the model identification information and according to local needs, it is determined whether the algorithm model corresponding to the model identification information is the target model to be downloaded; if it is the target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model sent by the server is received, so as to perform the calculation task using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-built model identification information and the model. By creating unique model identification information for the model, the business to which the model belongs, the engine type corresponding to the model and the model version are identified by the model identification information, thus, the model identification information corresponding to the models of different structures is different, the server combines the model identification information to store the model, and the terminal downloads the model from the server according to the model identification information and manages the model, supports the management of multiple structure models, and improves the terminal intelligent model management capability.
[0031] The present application embodiment discloses a specific terminal intelligent model management method, see Figure 3 As shown, the method may include the following steps: Step S21: Obtain the model identification information sent by the server; the model identification information is specific and unique, and the model identification information includes the model business, extension fields, engine type and model version of the corresponding algorithm model.
[0032] Step S22: Based on the model identification information and according to local needs, determine whether the algorithm model corresponding to the model identification information is the target model to be downloaded.
[0033] Step S23: If it is the target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model sent by the server is received so as to perform the computing task using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-constructed model identification information and the model.
[0034] Step S24: Generate an inference engine strategy corresponding to the target model according to the type information of the target model and the terminal operating environment information.
[0035] Models with different structures require different inference engine strategies, and different terminals support different engine versions. Therefore, the inference engine strategy for the target model is generated by combining the type information of the target model and the terminal operating environment information. The terminal operating environment information includes but is not limited to the model, chip, system version, and supported engine version information.
[0036] For example Figure 4 The figure shows a schematic diagram of the structure of the terminal intelligent model management system, with a mobile phone as the terminal; the model file is configured in advance on the server side, that is, the algorithm model and the corresponding model identification information are uploaded to the server side; the terminal determines whether it is the target model through the model download manager, and after downloading the target model according to the model identification information, the hardware acceleration agent for the model is determined in combination with the operating environment of the mobile phone. It can be understood that since different acceleration strategies support different operators, the corresponding optimal models are also different. In this embodiment, the above-mentioned inference engine strategy corresponding to the target model is generated according to the type information of the target model and the terminal operating environment information, including: determining the type of hardware acceleration agent corresponding to the target model according to the type information of the target model and the terminal operating environment information; generating the inference engine strategy corresponding to the target model according to the hardware acceleration agent type. That is, for the loaded model, the corresponding acceleration agent is determined. For example, if the target model is an NPU model, the inference engine corresponding to the NPU model is used to be responsible for the model inference process, and the NPU hardware acceleration is enabled to accelerate the inference process.
[0037] Step S25: Accelerate the inference of the target model according to the inference engine strategy.
[0038] After the inference engine strategy is generated, the target model is inferred and accelerated according to the inference engine strategy. For example, if the target model is a CPU model, the generated inference engine strategy is to use the inference engine corresponding to the CPU model to be responsible for model inference, and enable CPU hardware acceleration. According to the high inference engine strategy, the inference engine corresponding to the CPU model is used for model inference, and CPU hardware acceleration is used to accelerate the inference process.
[0039] Among them, the specific process of the above steps S21 to S23 can refer to the corresponding content disclosed in the above embodiments, and will not be repeated here.
[0040] As can be seen from the above, in this embodiment, the model identification information sent by the server is obtained; the model identification information is specifically unique, and the model identification information includes the business to which the model belongs, the extension field, the engine type and the model version of the corresponding algorithm model; based on the model identification information and according to local needs, it is determined whether the algorithm model corresponding to the model identification information is the target model to be downloaded; if it is the target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model sent by the server is received, so as to perform the computing task using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-built model identification information and the model; according to the type information of the target model and the terminal operating environment information, the inference engine strategy corresponding to the target model is generated; and the inference acceleration of the target model is performed according to the inference engine strategy. For multi-structure models, by generating the corresponding inference engine strategy, an adaptive acceleration agent is selected for the model and the terminal to improve the model inference speed.
[0041] The present application embodiment discloses a specific terminal intelligent model management method applied to the server, see Figure 5 As shown, the method may include the following steps: Step S31: Send model identification information to the terminal so that the terminal can determine whether the algorithm model corresponding to the model identification information is the target model to be downloaded by the terminal based on the model identification information and terminal needs; the model identification information is specifically unique, and the model identification information includes the model business, extension field, engine type and model version of the corresponding algorithm model.
[0042] Step S32: obtaining a model download request sent by the terminal based on the model identification information after the terminal determines that the algorithm model corresponding to the model identification information is the target model.
[0043] Step S33: determining the target model corresponding to the model download request by querying the correspondence between the pre-built model identification information and the model, and sending the target model to the terminal so that the terminal can perform the computing task using the target model.
[0044] As can be seen from the above, in this embodiment, unique model identification information is created for the model, and the business to which the model belongs, the engine type corresponding to the model, and the model version are identified through the model identification information. Therefore, models of different structures have different model identification information corresponding to them. The server stores the model in combination with the model identification information, and the terminal downloads the model from the server according to the model identification information and manages the model. This supports the management of models of various structures and improves the terminal's intelligent model management capabilities.
[0045] In the end intelligent model management solution of this application, the system framework used can be specifically referred to Figure 6 As shown, it may specifically include: a server and a number of terminals that establish communication connections with the server, wherein the terminals include but are not limited to tablet computers, laptop computers, smart phones, and personal computers (PCs), which are not limited here.
[0046] In the present application, the server is used to obtain model identification information from the server, and the terminal executes the steps of intelligent model management, including obtaining the model identification information issued by the server; the model identification information is specifically unique, and the model identification information includes the model business, extension fields, engine type and model version of the corresponding algorithm model; based on the model identification information and according to local needs, it is determined whether the algorithm model corresponding to the model identification information is the target model to be downloaded; if it is the target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model issued by the server is received, so as to use the target model to perform computing tasks; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-constructed model identification information and the model.
[0047] Accordingly, the embodiment of the present application also discloses a terminal intelligent model management device, which includes: The model identification information acquisition module 11 is used to acquire the model identification information sent by the server; the model identification information is specific and unique, and the model identification information includes the model business, extension field, engine type and model version of the corresponding algorithm model; A target model determination module 12 is used to determine whether the algorithm model corresponding to the model identification information is a target model to be downloaded based on the model identification information according to local needs; The model download module 13 is used to generate a model download request based on the model identification information and send it to the server if it is the target model to be downloaded, and receive the target model sent by the server so as to perform the computing task using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-constructed model identification information and the model.
[0048] As can be seen from the above, in this embodiment, the model identification information sent by the server is obtained; the model identification information is specifically unique, and the model identification information includes the business to which the model belongs, the extension field, the engine type and the model version of the corresponding algorithm model; based on the model identification information and according to local needs, it is determined whether the algorithm model corresponding to the model identification information is the target model to be downloaded; if it is the target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model sent by the server is received, so as to perform the calculation task using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-built model identification information and the model. By creating unique model identification information for the model, the business to which the model belongs, the engine type corresponding to the model and the model version are identified by the model identification information, thus, the model identification information corresponding to the models of different structures is different, the server combines the model identification information to store the model, and the terminal downloads the model from the server according to the model identification information and manages the model, supports the management of multiple structure models, and improves the terminal intelligent model management capability.
[0049] In some specific embodiments, the model identification information acquisition module 11 may specifically include: An information acquisition request sending unit, used to send a model information acquisition request to the server, so that the server sends corresponding model identification information according to the model information acquisition request; The information acquisition unit is used to acquire the model identification information sent by the server for the updated model.
[0050] In some specific embodiments, the target model determination module 12 may specifically include: A type judgment unit, configured to judge whether the algorithm model corresponding to the model identification information is a model type required by the terminal according to the model identification information and the terminal operating environment information; A version determination unit, configured to determine, based on the model identification information, whether the algorithm model corresponding to the model identification information has a version upgrade relative to the algorithm model already existing in the terminal, if the model type is required by the terminal; The target model determining unit is used to determine that if there is a version upgrade, the algorithm model corresponding to the model identification information is the target model to be downloaded.
[0051] In some specific embodiments, the terminal intelligent model management device may further include: A validity judgment unit, configured to judge whether the downloaded model is valid by querying the server according to the model identification information of the downloaded model; A deleting unit is used to delete the downloaded model from the terminal database if the downloaded model is invalid.
[0052] In some specific embodiments, the model downloading module 13 may specifically include: A task generating unit, configured to generate a model downloading task based on the model identification information, and add the model downloading task to a model downloading list; The task execution unit is used to generate model download requests corresponding to each model download task in sequence according to the order in the model download list.
[0053] In some specific embodiments, the terminal intelligent model management device may further include: An inference engine strategy generating unit, configured to generate, after receiving the target model sent by the server, an inference engine strategy corresponding to the target model according to type information of the target model and terminal operating environment information; A model reasoning acceleration unit is used to accelerate the reasoning of the target model according to the reasoning engine strategy.
[0054] In some specific embodiments, the inference engine strategy generation unit may specifically include: A hardware acceleration proxy type determination unit, configured to determine a hardware acceleration proxy type corresponding to the target model according to the type information of the target model and the terminal operating environment information; An inference engine strategy generating unit is used to generate an inference engine strategy corresponding to the target model according to the hardware acceleration agent type.
[0055] Furthermore, the present application also discloses an electronic device, see Figure 7 As shown, the contents in the drawings should not be considered as any limitation on the scope of use of the present application.
[0056] Figure 7 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the terminal intelligent model management method disclosed in any of the aforementioned embodiments.
[0057] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0058] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 221, a computer program 222, and data 223 including model identification information, etc. The storage method can be temporary storage or permanent storage.
[0059] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, so as to realize the operation and processing of the massive data 223 in the memory 22 by the processor 21, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the terminal intelligent model management method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0060] Furthermore, an embodiment of the present application also discloses a computer storage medium, in which computer executable instructions are stored. When the computer executable instructions are loaded and executed by a processor, the steps of the terminal intelligent model management method disclosed in any of the aforementioned embodiments are implemented.
[0061] Furthermore, an embodiment of the present application also discloses a computer program product, including a computer program, which, when executed by a processor, implements the steps of the terminal intelligent model management method disclosed in any of the aforementioned embodiments.
[0062] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0063] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0064] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0065] The above is a detailed introduction to the end intelligent model management method, device and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A terminal intelligent model management method, characterized in that: Applied to terminals, including: Obtain the model identification information sent by the server; the model identification information is specific and unique, and the model identification information includes the model business, extension fields, engine type and model version of the corresponding algorithm model; Based on the model identification information and according to local needs, determining whether the algorithm model corresponding to the model identification information is a target model to be downloaded; If it is a target model to be downloaded, a model download request is generated based on the model identification information and sent to the server, and the target model sent by the server is received so as to perform computing tasks using the target model; the server is used to determine the target model corresponding to the model download request by querying the correspondence between the pre-built model identification information and the model.
2. The terminal intelligent model management method according to claim 1, characterized in that: The obtaining of the model identification information sent by the server includes: Sending a model information acquisition request to the server, so that the server sends corresponding model identification information according to the model information acquisition request; Or, obtain the model identification information sent by the server for the updated model.
3. The terminal intelligent model management method according to claim 1, characterized in that: The determining, based on the model identification information and according to local needs, whether the algorithm model corresponding to the model identification information is a target model to be downloaded includes: According to the model identification information and the terminal operating environment information, determining whether the algorithm model corresponding to the model identification information is a model type required by the terminal; If so, judging, based on the model identification information, whether the algorithm model corresponding to the model identification information has a version upgrade relative to the algorithm model already existing in the terminal; If so, the algorithm model corresponding to the model identification information is the target model to be downloaded.
4. The terminal intelligent model management method according to claim 1, characterized in that: Also includes: According to the model identification information of the downloaded model, determining whether the downloaded model is valid by querying the server; If the downloaded model is invalid, the downloaded model is deleted from the terminal database.
5. The terminal intelligent model management method according to claim 1, characterized in that: The generating a model download request based on the model identification information includes: Generate a model download task based on the model identification information, and add the model download task to a model download list; Generate model download requests corresponding to each model download task in sequence according to the order in the model download list.
6. The terminal intelligent model management method according to any one of claims 1 to 5, characterized in that: After receiving the target model sent by the server, the method further includes: Generate an inference engine strategy corresponding to the target model according to the type information of the target model and the terminal operating environment information; The target model is subjected to inference acceleration according to the inference engine strategy.
7. The terminal intelligent model management method according to claim 6, characterized in that: The generating, according to the type information of the target model and the terminal operating environment information, an inference engine strategy corresponding to the target model comprises: Determining a hardware acceleration proxy type corresponding to the target model according to the type information of the target model and the terminal operating environment information; An inference engine strategy corresponding to the target model is generated according to the hardware acceleration agent type.
8. A terminal intelligent model management method, characterized in that: Applied to the server, including: Sending model identification information to the terminal so that the terminal can determine whether the algorithm model corresponding to the model identification information is the target model to be downloaded by the terminal based on the model identification information and the terminal's needs; the model identification information is specifically unique, and the model identification information includes the model business, extension field, engine type and model version of the corresponding algorithm model; acquiring a model download request sent by the terminal based on the model identification information after determining that the algorithm model corresponding to the model identification information is a target model; By querying the correspondence between the pre-built model identification information and the model, the target model corresponding to the model download request is determined, and the target model is sent to the terminal so that the terminal uses the target model to perform the computing task.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the terminal intelligent model management method according to any one of claims 1 to 7 or the terminal intelligent model management method according to claim 8.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein when the computer program is executed by a processor, it implements the terminal intelligent model management method as described in any one of claims 1 to 7 or the terminal intelligent model management method as described in claim 8.
Citation Information
Patent Citations
Artificial intelligence model operation method and computer equipment
CN118586499A