Artificial intelligence model deployment method and device, storage medium and electronic equipment

By building a communication link between the server and the terminal device, the efficient deployment of the artificial intelligence model is achieved, the problem of low terminal device deployment efficiency is solved, and the user experience and system reliability are improved.

CN119512600APending Publication Date: 2025-02-25INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411649560.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the prior art, the efficiency of deploying artificial intelligence models in terminal devices is relatively low, especially in scenarios where real-time responses to user needs, the efficiency of model deployment directly affects the user experience and system reliability.

Method used

By building a communication link between the server and multiple terminal devices, the server generates an artificial intelligence model in the initial model format and transmits the model to the target terminal device through the link. The device converts the model from the initial format to a reference model format suitable for itself, and returns the converted model to the server, and finally deploys the artificial intelligence model in the reference model format to multiple terminal devices.

Benefits of technology

It improves the efficiency of deploying artificial intelligence models in terminal devices, reduces the steps and time of manual operation, and improves the speed and reliability of model deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512600A_ABST
    Figure CN119512600A_ABST
Patent Text Reader

Abstract

The invention discloses an artificial intelligence model deployment method and apparatus, a storage medium and an electronic device, the method and apparatus are applied to a server, a communication link is constructed between the server and a plurality of terminal devices, the server is used for generating an artificial intelligence model in an initial model format, and the artificial intelligence model deployment method comprises the steps of receiving a target deployment request; in response to the target deployment request, screening out a target terminal device which allows the artificial intelligence model to be converted into a reference model format from an initial model format from a plurality of reference terminal devices; transmitting the artificial intelligence model in the initial model format to a target terminal device through a communication link; and deploying the artificial intelligence model in the reference model format to the plurality of reference terminal devices through the communication link, and by adopting the technical scheme, the problems of low efficiency of deploying the artificial intelligence model by the terminal devices and the like in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computers, and specifically, to a method and device for deploying an artificial intelligence model, a storage medium, and an electronic device. Background Art

[0002] As the complexity of artificial intelligence models and the amount of data increase, how to efficiently deploy and update these models has become a technical challenge to be solved, especially in scenarios that require real-time response to user needs, such as online recommendation systems and autonomous driving. The efficiency of model deployment directly affects user experience and system reliability.

[0003] In the related technology, the way to deploy and update artificial intelligence models is usually as follows: first, the initial artificial intelligence model needs to be trained and updated on the server to obtain the artificial intelligence model to be deployed. Since the terminal devices are usually deployed in the local area network, the server cannot know the IP of the terminal devices in the local area network. Therefore, there are obstacles in the communication between the server and the terminal devices in the local area network. When deploying the artificial intelligence model, you first need to bring the terminal device to the server room, then copy the artificial intelligence model to the USB flash drive, and finally insert the USB flash drive into each terminal device for deployment. Usually, there are a large number of terminal devices that need to deploy artificial intelligence models. Each terminal device needs to perform the above steps, and needs to wait for the deployment to be completed, check the deployment results and eliminate exceptions, which is very time-consuming and labor-intensive, greatly limiting the deployment efficiency of the model.

[0004] There is no effective solution to the problem of low efficiency in deploying artificial intelligence models on terminal devices in related technologies. Summary of the invention

[0005] The embodiments of the present application provide a method and device for deploying an artificial intelligence model, a storage medium, and an electronic device, so as to at least solve the problem of low efficiency in deploying artificial intelligence models on terminal devices in related technologies.

[0006] According to one embodiment of the present application, a method for deploying an artificial intelligence model is provided, which is applied to a server, wherein a communication link is established between the server and a plurality of terminal devices, and the server is used to generate an artificial intelligence model in an initial model format, including:

[0007] receiving a target deployment request, wherein the target deployment request is used to request deployment of an artificial intelligence model in a reference model format to a plurality of reference terminal devices belonging to a reference device type among the plurality of terminal devices;

[0008] In response to the target deployment request, a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format is screened out from the plurality of reference terminal devices, wherein the terminal devices of different device types are adapted to different model formats, and the reference model format is a model format adapted to the terminal devices of the reference device type;

[0009] Transmitting the artificial intelligence model in the initial model format to the target terminal device via the communication link, wherein the target terminal device is configured to convert the artificial intelligence model from the initial model format to a reference model format, and transmit the artificial intelligence model in the reference model format back to the server;

[0010] The artificial intelligence model in the reference model format is deployed to multiple reference terminal devices through the communication link.

[0011] Optionally, the step of selecting a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the plurality of reference terminal devices includes:

[0012] Acquire a device performance parameter of each of the reference terminal devices among the plurality of reference terminal devices, wherein the device performance parameter is used to indicate a conversion capability of the corresponding reference terminal device to currently convert the artificial intelligence model from the initial model format to the reference model format, and the device performance parameter is positively correlated with the conversion capability;

[0013] The reference terminal device whose device performance parameter is greater than a target parameter threshold is screened out from the plurality of reference terminal devices as the target terminal device.

[0014] Optionally, a communication interface is deployed on the server, and the obtaining of device performance parameters of each of the reference terminal devices includes:

[0015] Obtaining computing resource parameters and storage resource parameters reported by each of the reference terminal devices through the communication interface, wherein the computing resource parameters are used to indicate the amount of computing resources currently allowed to be used in the corresponding reference terminal device, and the storage resource parameters are used to indicate the amount of storage resources currently allowed to be used in the corresponding reference terminal device, and the computing resources and the storage resources are resources required to convert the artificial intelligence model from the initial model format to the reference model format, and each of the reference terminal devices is configured to report the computing resource parameters and the storage resource parameters to the server through the communication interface according to a preset period;

[0016] The computing resource parameters and the storage resource parameters are determined as the device performance parameters of the corresponding reference terminal device.

[0017] Optionally, a model running device is deployed in each of the terminal devices, the model running device is a device for running an artificial intelligence model, and model running devices of different device types are adapted to different model formats. Before screening out a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the plurality of reference terminal devices, the method further includes:

[0018] Acquire the device type of the model running device deployed in each of the plurality of terminal devices, and obtain the device type and the terminal device having a corresponding relationship;

[0019] A plurality of reference terminal devices corresponding to a reference device type are screened out from the device types and the terminal devices having a corresponding relationship, wherein the model format adapted by the model running device belonging to the reference device type is the reference model format.

[0020] Optionally, deploying the artificial intelligence model in the reference model format to the plurality of reference terminal devices through the communication link includes:

[0021] The target model file corresponding to the artificial intelligence model in the reference model format is divided into multiple parts to obtain a model file sequence, wherein the model file sequence includes multiple sub-model files with a file assembly order, each of the sub-model files is used to generate a part of the artificial intelligence model in the reference model format, and the file assembly order is used to indicate the order in which the multiple sub-model files are spliced ​​to obtain the target model file;

[0022] Each of the sub-model files in the model file sequence is transmitted in sequence to each of the multiple reference terminal devices through the communication link in accordance with the file assembly order, wherein each of the reference terminal devices is used to splice the multiple sub-model files in accordance with the file assembly order after receiving the sub-model files to obtain the target model file, and run the target model file to deploy the artificial intelligence model in the reference model format.

[0023] Optionally, the transmitting each of the sub-model files in the model file sequence to each of the reference terminal devices in the plurality of reference terminal devices through the communication link in sequence according to the file assembly order comprises:

[0024] In the case where the multiple reference terminal devices include M reference terminal devices and the target model file is divided into N parts, the sub-model files in the model file sequence are transmitted to the i-th reference terminal device among the M reference terminal devices in sequence according to the file assembly order through the following steps, where M is an integer greater than or equal to 1 and N is an integer greater than 1:

[0025] Obtaining the j-th sub-model file from the model file sequence as the target sub-model file to be transmitted, wherein j is an integer greater than or equal to 1 and less than or equal to N, and when j is 1, the j-th sub-model file is the first sub-model file in the model file sequence;

[0026] Transmitting the target sub-model file to the i-th reference terminal device via the communication link, and detecting a transmission status of the target sub-model file during the transmission of the target sub-model file, wherein the transmission status is used to indicate whether the target sub-model file is successfully transmitted;

[0027] When the transmission status indicates that the target sub-model file is successfully transmitted and j is less than N, obtaining the j+1th sub-model file from the model file sequence as the target sub-model file, and continuing to transmit it to the i-th reference terminal device through the communication link;

[0028] When the transmission status is used to indicate that the target sub-model file is successfully transmitted, and j is equal to N, it is determined that the transmission of the model file sequence is completed, and the deployment status of the artificial intelligence model in the reference model format in the i-th reference terminal device is detected, wherein the i-th reference terminal device is configured to, after completing the reception of the model file sequence, splice the N sub-model files in the model file sequence according to the file assembly order to obtain the target model file, and run the target model file to deploy the artificial intelligence model in the reference model format, and after the artificial intelligence model in the reference model format is successfully deployed, return deployment success information to the server;

[0029] When the deployment success information transmitted back by the i-th reference terminal device is received, it is determined that the deployment of the i-th reference terminal device is completed.

[0030] Optionally, after detecting the transmission status of the target sub-model file, the method further includes:

[0031] In the case where the transmission status indicates that the transmission of the target sub-model file fails, the assembly sequence number of the target sub-model file in the model file sequence is recorded, and the transmission of the model file sequence is suspended, wherein the assembly sequence number is used to indicate the position of the target sub-model file in the model file sequence, and the i-th reference terminal device is configured to save the j-1 sub-model files that have completed transmission before the target sub-model file;

[0032] Executing a target repair operation, wherein the target repair operation is used to repair a transmission failure that causes the target sub-model file to fail to be transmitted;

[0033] After the transmission failure is repaired by the target repair operation, the sub-model file corresponding to the assembly number is obtained from the model file sequence as the target sub-model file to be transmitted, and the target sub-model file continues to be transmitted to the i-th reference terminal device through the communication link.

[0034] According to another embodiment of the present application, there is also provided a deployment device for an artificial intelligence model, which is applied to a server, wherein a communication link is established between the server and a plurality of terminal devices, and the server is used to generate an artificial intelligence model in an initial model format, including:

[0035] A receiving module, configured to receive a target deployment request, wherein the target deployment request is used to request deployment of an artificial intelligence model in a reference model format to a plurality of reference terminal devices belonging to a reference device type among the plurality of terminal devices;

[0036] A response module, configured to respond to the target deployment request, and select a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the plurality of reference terminal devices, wherein the terminal devices of different device types are adapted to different model formats, and the reference model format is a model format adapted to the terminal devices of the reference device type;

[0037] a transmission module, configured to transmit the artificial intelligence model in the initial model format to the target terminal device via the communication link, wherein the target terminal device is configured to convert the artificial intelligence model from the initial model format to a reference model format, and transmit the artificial intelligence model in the reference model format back to the server;

[0038] A deployment module is used to deploy the artificial intelligence model in the reference model format to multiple reference terminal devices through the communication link.

[0039] According to another embodiment of the present application, a computer program product is provided, including a computer program, wherein the computer program is executed by a processor to perform the steps in any of the above method embodiments.

[0040] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0041] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0042] In an embodiment of the present application, a method for deploying an artificial intelligence model is proposed, wherein a communication link is established between a server and multiple terminal devices, the server is used to generate an artificial intelligence model in an initial model format, the server first receives a target deployment request, wherein the target deployment request is used to request that the artificial intelligence model in a reference model format be deployed to multiple reference terminal devices of a reference device type among the multiple terminal devices; then, in response to the target deployment request, a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format is screened out from the multiple reference terminal devices, wherein the model formats adapted to terminal devices of different device types are different, and the reference model format is a model format adapted to terminal devices of the reference device type; then, the artificial intelligence model in the initial model format is transmitted to the target terminal device via the communication link, wherein the target terminal device is configured to convert the artificial intelligence model Convert from the initial model format to the reference model format, and transmit the artificial intelligence model in the reference model format back to the server; finally, the server deploys the artificial intelligence model in the reference model format to multiple reference terminal devices through a communication link, that is, a communication link is pre-built between the server and multiple terminal devices. When the server needs to deploy the artificial intelligence model in the initial model format to multiple reference terminal devices belonging to the same reference device type, a terminal device is selected from multiple reference terminal devices as the target terminal device to perform the model format conversion operation, and then the initial model format can be directly transmitted to the target terminal device using the communication link, so as to receive the artificial intelligence model after the model format conversion, and then the model is deployed to multiple reference terminal devices through the communication link, without taking the terminal device to the server room and using a USB flash drive for deployment, and the terminal device has low efficiency in deploying artificial intelligence models. The above technical solution solves the problems of low efficiency in deploying artificial intelligence models by terminal devices in related technologies, and achieves the technical effect of improving the efficiency of deploying artificial intelligence models by terminal devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a hardware structure block diagram of a computer device of a method for deploying an artificial intelligence model in an embodiment of the present application;

[0044] Figure 2 is a flow chart of a method for deploying an artificial intelligence model according to an embodiment of the present application;

[0045] Figure 3 is a schematic diagram of a cloud scheduling platform according to an embodiment of the present application;

[0046] Figure 4 It is a schematic diagram of a correspondence between a terminal device and a type of a model running device deployed therein according to an embodiment of the present application;

[0047] Figure 5 is a flow chart of a method for deploying an artificial intelligence model according to an embodiment of the present application;

[0048] Figure 6 It is a structural block diagram of a deployment device of an artificial intelligence model according to an embodiment of the present application;

[0049] Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0050] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0052] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 1 is a hardware structure block diagram of a computer device for a method for deploying an artificial intelligence model in an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1More or fewer components as shown, or with Figure 1 Different configurations shown.

[0053] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the deployment method of the artificial intelligence model in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the server device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0054] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0055] In this embodiment, a method for deploying an artificial intelligence model is provided, which is applied to a server, wherein a communication link is established between the server and a plurality of terminal devices, and the server is used to generate an artificial intelligence model in an initial model format. Figure 2 is a flowchart of a method for deploying an artificial intelligence model according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0056] Step S12, receiving a target deployment request, wherein the target deployment request is used to request deployment of the artificial intelligence model in the reference model format to multiple reference terminal devices of the reference device type among the multiple terminal devices;

[0057] Step S14, in response to the target deployment request, selecting a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the plurality of reference terminal devices, wherein the terminal devices of different device types are adapted to different model formats, and the reference model format is a model format adapted to the terminal device of the reference device type;

[0058] Step S16, transmitting the artificial intelligence model in the initial model format to the target terminal device through the communication link, wherein the target terminal device is configured to convert the artificial intelligence model from the initial model format to a reference model format, and transmit the artificial intelligence model in the reference model format back to the server;

[0059] Step S18: deploy the artificial intelligence model in the reference model format to multiple reference terminal devices through the communication link.

[0060] Optionally, in this embodiment, Figure 3 is a schematic diagram of a cloud scheduling platform according to an embodiment of the present application, such as Figure 3As shown, the cloud scheduling platform can be deployed in a server or not limited to the server, the terminal device can be a user end or an edge end (for example, terminal device A, terminal device B, etc.), the target deployment request can be a request initiated by the server administrator through a command or other means, and the request content can be to deploy the artificial intelligence model in the initial model format to multiple reference terminal devices of the reference device type in multiple terminal devices, wherein the artificial intelligence model can be an AI model generated by the server, including but not limited to deep learning models (such as CNN (Convolutional Neural Networks, Convolutional Neural Networks), RNN (Rerrent Neural Network, Recurrent Neural Network), LSTM (Long Short-Term Memory, Long Short-Term Memory Network), etc.), machine learning models (such as random forests, SVM (Support Vector Machine, Support Vector Machine), etc.) and hybrid models. The artificial intelligence model is used to be deployed on the terminal device to realize different functions, such as being deployed on the camera to realize the function of face recognition / vehicle recognition, and being deployed on the voice device to realize the function of simultaneous interpretation, etc. The artificial intelligence model can include but is not limited to face recognition models, vehicle recognition models, language translation models, etc. The terminal device can include but is not limited to cameras and voice devices, etc. Assume that the model generated by the server is model_0; the initial model format can be the format of the AI ​​model generated by the server, that is, assuming that the format of model_0 is format_0, the initial model format is format_0; the terminal device can be but is not limited to an edge device that can process and run AI models, including smart cameras, smart home devices or edge servers, etc., and a communication link (such as a websocket link, the server communicates with the terminal device through a websocket communication module) is established between multiple terminal devices and the server for information transmission; the reference device type can be but is not limited to a certain type to which the terminal device belongs. For example, there are three types of device types to which multiple terminal devices belong, namely type_A, type_B or type_C, and the reference device type can be one of the types, such as type_A; the reference terminal device can be a terminal device of type_A device type among multiple terminal devices, and there can be one or more reference terminal devices.

[0061] Optionally, in this embodiment, the server's response to the target deployment request may include but is not limited to the following steps: filtering out a target terminal device that allows the format of model_0 to be converted from format_0 to a reference model format from multiple reference terminal devices, wherein the reference model format may be a model format adapted for terminal devices belonging to a reference device type (type_A), and different device types have different adapted model formats, for example, a terminal device of type_A device type is adapted to format_A, a terminal device of type_B device type is adapted to format_B, and a terminal device of type_C device type is adapted to format_C; the target terminal device may be a terminal device selected by the server from multiple reference terminal devices, and the screening conditions may be the computing resources, storage resources or task load of the terminal device, etc.

[0062] Optionally, in this embodiment, the model model_0 in the format of format_0 is transmitted to the target terminal device through the websocket link. When the target terminal device receives the model model_0, it first performs an environment check to check whether the current environment supports the execution of the model format conversion operation. After the check is passed, the format conversion is performed, that is, the format of the model model_0 is converted from format_0 to format_A. At the same time, the conversion progress information during the format conversion process can also be sent to the server in real time through the websocket link to realize the real-time display of the conversion progress on the server. The form of displaying the conversion progress may include a progress bar or a percentage, etc. After the model format conversion is completed, the target terminal device can test and run the model. If the operation is successful, it means that the model conversion is successful, and the model model_A in the format of format_A is obtained and deployed, and then the model model_A is transmitted back to the server through the websocket link; if the operation fails, it means that the model conversion fails, and the test failure information is sent to the server through the websocket link.

[0063] Optionally, in this embodiment, if Figure 3 As shown, when the server receives the model model_A in the format_A sent back by the target terminal device, it first stores the model model_A in the algorithm / model library of the algorithm and model management, and records the attribute information corresponding to the model, where the attribute information may include the model name, the format type of the model, the supported processors, the model size or computing power requirements, etc. The model model_A is deployed to multiple terminal devices of the type_A device type through the websocket link, and all terminal devices of the type_A device type complete the deployment of the model model_A in the format_A.

[0064] Optionally, in this embodiment, the target terminal device can be, but is not limited to, also configured to directly deploy the artificial intelligence model in the reference model format after converting the artificial intelligence model from the initial model format to the reference model format, and transmit the artificial intelligence model in the reference model format back to the server; accordingly, the server only needs to deploy the artificial intelligence model in the reference model format to other reference terminal devices among the multiple reference terminal devices except the target terminal device through the communication link. In this way, the target terminal device is directly deployed after converting the artificial intelligence model from the initial model format to the reference model format, without the need for the server to send the deployment again through the communication link. While improving the deployment efficiency, it also saves the consumption of communication link resources.

[0065] Optionally, in this embodiment, the terminal device in this application deploys terminal software, and the server deploys server software. The steps and processes executed by the terminal device in this application may be, but are not limited to, executed by the terminal software. The steps and processes executed by the server may be, but are not limited to, executed by the server software.

[0066] As an optional solution, the step of selecting a target terminal device that allows converting the artificial intelligence model from the initial model format to the reference model format from the plurality of reference terminal devices includes:

[0067] S21, obtaining a device performance parameter of each of the reference terminal devices among the plurality of reference terminal devices, wherein the device performance parameter is used to indicate a conversion capability of the corresponding reference terminal device to currently convert the artificial intelligence model from the initial model format to the reference model format, and the device performance parameter is positively correlated with the conversion capability;

[0068] S22, selecting the reference terminal device whose device performance parameter is greater than a target parameter threshold from the plurality of reference terminal devices as the target terminal device.

[0069] Optionally, in this embodiment, the target terminal device that allows the model model_0 to be converted from format format_0 to format_A is screened out from multiple terminal devices belonging to type_A (reference terminal devices), which may include but is not limited to the following methods: obtaining the device performance parameters of each reference terminal device, wherein the device performance parameters may be but are not limited to numerical values ​​obtained by comprehensively evaluating information such as computing resources, storage resources or task load of each reference terminal device, which can be used to measure the current conversion capability of the reference terminal device to convert model_0 from format format_0 to format_A, assuming that the larger the device performance parameter, the stronger the conversion capability of the reference terminal device; then, the reference terminal device whose device performance parameter is greater than the target parameter threshold is screened out from multiple reference terminal devices as the target terminal device, or the reference terminal device whose device performance parameter is the largest is screened out from multiple reference terminal devices as the target terminal device, that is, the reference terminal device with the strongest conversion capability is selected as the target terminal device. Suppose there are 100 terminal devices, 10 of which are type A terminal devices (reference terminal devices). After receiving the device performance parameters of these 10 reference terminal devices, the server conducts a comprehensive evaluation and finds that the ability of terminal device 2 to execute model format operations is the best among the 10 terminal devices. Then the server can select terminal device 2 as the target terminal device.

[0070] As an optional solution, a communication interface is deployed on the server, and the obtaining of device performance parameters of each of the reference terminal devices in the plurality of reference terminal devices includes:

[0071] S31, obtaining computing resource parameters and storage resource parameters reported by each of the reference terminal devices through the communication interface, wherein the computing resource parameters are used to indicate the amount of computing resources currently allowed to be used in the corresponding reference terminal device, and the storage resource parameters are used to indicate the amount of storage resources currently allowed to be used in the corresponding reference terminal device, and the computing resources and the storage resources are resources required to convert the artificial intelligence model from the initial model format to the reference model format, and each of the reference terminal devices is configured to report the computing resource parameters and the storage resource parameters to the server through the communication interface according to a preset period;

[0072] S32: Determine the computing resource parameter and the storage resource parameter as the device performance parameter of the corresponding reference terminal device.

[0073] Optionally, in this embodiment, if Figure 3As shown, the communication interface deployed on the server may be, but not limited to, an http service interface (the server receives information transmitted by the terminal device through its internal http service module), and the server obtains the device performance parameters of each reference terminal device in the multiple reference terminal devices in the following ways, but not limited to:

[0074] In the first step, each terminal device needs to be initialized and the terminal software is deployed. The terminal software can control the corresponding terminal device to perform a series of operations, including deploying the environment and testing whether the communication link (http service interface link) is normal.

[0075] The second step is that the terminal software deploys the model conversion environment of the corresponding model format according to the model format adapted by the corresponding terminal device, wherein the model conversion environment is the basic condition for executing the model format conversion operation;

[0076] In the third step, the terminal software obtains the terminal device attributes of each terminal device. The terminal device attributes can be, but are not limited to, information that can instruct the server to evaluate the ability of the corresponding terminal device to perform the conversion model format operation, including whether a conversion device (such as an accelerator card) with the conversion model format function is deployed, and the operating resources allocated to the conversion device, such as the computing resources and storage resources allocated to the accelerator card. The computing resources and storage resources are both resources required to perform the conversion model format operation. The computing resources of the conversion device can be obtained from the processor. The amount of computing resources can be represented by the computing resource parameters of the processor. The computing resource parameters are used to indicate the current computing power of the processor. The computing resource parameters can be used to measure the amount of computing resources currently allowed to be used by the corresponding terminal device; the storage resources of the conversion device can be obtained from the storage device. The amount of storage resources can be represented by the storage resource parameters of the storage device. The storage resource parameters are used to indicate the current remaining storage space size of the storage device. The storage resource parameters can be used to measure the amount of storage resources currently allowed to be used by the corresponding terminal device;

[0077] Step 4: The terminal software tests whether the http service interface link between the corresponding terminal device and the server is normal. The http service interface link is a channel for the terminal device to transmit information to the central server in one direction. If the test result is normal, the terminal device attributes are sent to the server through the http service interface link, and a websocket link is established between the terminal device and the server. The websocket link can realize real-time and two-way information transmission between the terminal device and the server. If the test result is abnormal, an error warning is given and no subsequent operations are performed until the http service interface link returns to normal.

[0078] In the fifth step, when the test result of the http service interface link is normal, the terminal software starts the scheduled task at a preset time period, and controls the terminal device to send the terminal device attributes to the server through the http service interface link according to the preset period (for example, every 10 seconds).

[0079] In the sixth step, after receiving the terminal device attributes of all terminal devices through the http service interface, the server stores them in the corresponding storage modules in the server, such as the device registration and computing resource information modules, and updates them according to the preset period;

[0080] In the seventh step, when it is necessary to obtain the device performance parameters of the reference terminal device, the terminal device attributes determined as the reference terminal device are screened out from the terminal device attributes of all currently stored terminal devices, and the computing resource parameters and storage resource parameters in the terminal device attributes corresponding to the reference terminal device are determined as the device performance parameters of the reference terminal device.

[0081] In this application, the terminal device communicates with the server through a router. The router provides a local area network for the terminal device. Each terminal device is assigned a unique local area network IP, which is invisible to the server. Therefore, there are obstacles in the communication between the server and the terminal device under the local area network in the related technology. To solve this problem, this application executes the following steps to build a websocket link (i.e., the above-mentioned communication link) through the http interface deployed on the server:

[0082] 1) The server sends the interface address of the http interface and the server public IP to the router;

[0083] 2) The router sends the interface address and server public IP to each terminal device;

[0084] 3) Each terminal device reports information to the server through the interface address and the server public IP, including the LAN IP of the terminal device and the public IP of the corresponding router;

[0085] 4) The server uses the received LAN IP and the corresponding router public IP to establish a websocket link with the terminal device.

[0086] As an optional solution, a model running device is deployed in each of the terminal devices, and the model running device is a device for running an artificial intelligence model. Model running devices of different device types are adapted to different model formats. Before screening out a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the multiple reference terminal devices, the method also includes:

[0087] S41, obtaining the device type of the model running device deployed in each of the plurality of terminal devices, and obtaining the device type and the terminal device having a corresponding relationship;

[0088] S42, filtering out a plurality of reference terminal devices corresponding to a reference device type from the device types and the terminal devices having a corresponding relationship, wherein the model format adapted by the model running device belonging to the reference device type is the reference model format.

[0089] Optionally, in this embodiment, a model running device is deployed in each terminal device. The model running device may be, but is not limited to, a device that can run AI models and perform format conversion operations on AI models, such as an accelerator card in the terminal device. Accelerator cards of different device types (model running devices) can run different model formats. Assume that there are three different types of accelerator cards, namely type_A, type_B, and type_C. Accordingly, an accelerator card with a device type of type_A can run a model format of format_A, an accelerator card with a device type of type_B can run a model format of format_B, and an accelerator card with a device type of type_C can run a model format of format_C.

[0090] Optionally, in this embodiment, if Figure 4 is a schematic diagram of a corresponding relationship between a terminal device and a type of a model running device deployed therein according to an embodiment of the present application, such as Figure 4 As shown, there is a corresponding relationship between the device type of the model running device and the terminal device. Assuming that a type_A type accelerator card is deployed in a terminal device, it can be said that the terminal device is a terminal device of the type_A device type, and the model format that can be run by the type_A type accelerator card is format_A, that is, the model format adapted by the terminal device is format_A.

[0091] Optionally, in this embodiment, if Figure 4As shown, the reference terminal device can be screened out from multiple terminal devices in the following manners, but not limited to: first, the type of the model running device deployed in each terminal device among all the terminal devices is obtained to obtain the device type and the terminal device with a corresponding relationship. For example, for terminal device 1, the type of the accelerator card deployed therein is type_A, then the corresponding relationship between the device type and the terminal device can be obtained, that is, terminal device 1 belongs to type_A type; for terminal device N, the type of the accelerator card deployed therein is type_C, then the corresponding relationship between the device type and the terminal device can be obtained, that is, terminal device N belongs to type_C type; the above operation is performed on all N terminal devices to obtain the corresponding relationship between each terminal device and the type of the accelerator card deployed therein; then, multiple reference terminal devices corresponding to the reference device type are screened out from the device types and terminal devices with a corresponding relationship. For example, when the reference model format is format_A, the terminal device belonging to type_A type is screened as the reference terminal device.

[0092] As an optional solution, deploying the artificial intelligence model in the reference model format to the plurality of reference terminal devices through the communication link includes:

[0093] S51, dividing the target model file corresponding to the artificial intelligence model in the reference model format into multiple parts to obtain a model file sequence, wherein the model file sequence includes multiple sub-model files with a file assembly order, each of the sub-model files is used to generate a part of the artificial intelligence model in the reference model format, and the file assembly order is used to indicate the order in which the multiple sub-model files are spliced ​​to obtain the target model file;

[0094] S52, transmitting each of the sub-model files in the model file sequence in turn through the communication link to each of the multiple reference terminal devices in accordance with the file assembly order, wherein each of the reference terminal devices is used to splice the multiple sub-model files in accordance with the file assembly order after receiving the sub-model files to obtain the target model file, and run the target model file to deploy the artificial intelligence model in the reference model format.

[0095] Optionally, in this embodiment, the model model_A (artificial intelligence model) in the format of format_A (reference model format) is deployed to multiple terminal devices (reference terminal devices) belonging to the type_A device type through a websocket link (communication link), which can include but is not limited to the following methods: first, the server obtains the model model_A to be deployed and the attribute information corresponding to the model from the model library; then, according to the attribute information of model A, combined with the terminal device attributes of all terminal devices stored in the server, one or more reference terminal devices that can run model A are screened out from multiple terminal devices; finally, the model model_A is transmitted to each of the multiple reference terminal devices. If the model to be deployed is model_A, the server screens out the model format adapted by terminal devices 1 to 10 from the multiple terminal devices as format_A, that is, the server needs to transmit the model model_A to terminal devices 1 to 10 through the websocket link. After the transmission is successful, terminal devices 1 to 10 can realize the deployment of the format_A format model model_A by running model model_A.

[0096] Optionally, in this embodiment, the model model_A is transmitted to each of the reference terminal devices in the multiple reference terminal devices, but is not limited to the following methods: first, the target model file corresponding to the model model_A is divided into sub-model files of appropriate size, and the divided sub-model files can be spliced ​​into a complete target model file in a certain order; then, each sub-model file is identified according to the splicing order, and the identification information of all sub-model files is constructed into a list according to the splicing order to obtain the model file sequence of model model_A; the corresponding sub-model files are transmitted to each of the reference terminal devices in the multiple reference terminal devices through the websocket link in the order of the identification information in the model file sequence; finally, after successfully receiving all the sub-model files, each reference terminal device splices all the sub-model files in the order of the identification information to obtain a complete target model file, and backs up the artificial intelligence model in the initial model format to the old model list, and then runs the target model file to complete the deployment of the model model_A.

[0097] Optionally, in this embodiment, assuming that the size of the target model file file_A corresponding to the model model_A is 200M, and model_A currently needs to be deployed in the terminal device 1 among the multiple reference terminal devices, file_A must first be divided into sub-model files of size 2M, which can be divided into 100 sub-model files, and if the last digit of the identification information of each sub-model file is used as the splicing order to splice all the sub-model files, a complete file file_A can be obtained, and at the same time, the identification information of all the sub-model files can be obtained according to the splicing order to obtain the model file sequence seq_A , and then according to the order of elements in sequence seq_A, select the sub-model file corresponding to the element and transmit it to terminal device 1 through the websocket link until all elements in sequence seq_A are traversed. Correspondingly, after terminal device 1 successfully receives 100 sub-model files, it splices the sub-model files corresponding to each element according to the order of elements in sequence seq_A to obtain a complete file file_A, and backs up the artificial intelligence model model_0 in the initial model format to the old model list, and then runs file_A through the accelerator card, and terminal device 1 completes the deployment of model model_A.

[0098] Optionally, in this embodiment, the 100 sub-model files obtained by segmenting file_A are file_A_1, file_A_2, ..., file_A_100, and the corresponding identification information can be set in a variety of ways, including: Method 1, the identification information includes the assembly order, which is "file_A_1", "file_A_2", ..., "file_A_100", then the model file sequence seq_A is seq_A = ["file_A_1", "file_A_2", ..., "file_A_100"]; Method 2, the identification information includes the identification of the previous sub-model file and the next file identification, which is ["file_A_1", null,"file_A_2"], ["file_A_2", "file_A_1", "file_A_3"], ..., [" In the example above, the identification information of each sub-model file includes its own identification, the identification of the previous sub-model file and the identification of the next sub-model file. The "null" in the identification information ["file_A_1",null,"file_A_2"] of the first sub-model file file_A_1 indicates that the file is the first sub-model file and there is no previous sub-model file. The same is true for the "null" in the identification information of the last sub-model file. Then the model file sequence seq_A is seq_A = [("file_A_1",none,"file_A_2"), ("file_A_2","file_A_1","file_A_3"), ..., ("file_A_100","file_A_99",none)]. By setting the identification information in the second way, the orderliness of multiple sub-model files can be ensured, which is convenient for quickly accessing the previous or next sub-model file when needed. The setting methods of multiple identification information also improve the flexibility of sub-model file transmission.

[0099] As an optional solution, the transmitting of each of the sub-model files in the model file sequence to each of the reference terminal devices in the plurality of reference terminal devices through the communication link in sequence according to the file assembly order includes:

[0100] S61, when the plurality of reference terminal devices include M reference terminal devices and the target model file is divided into N parts, the sub-model files in the model file sequence are transmitted to the i-th reference terminal device among the M reference terminal devices in sequence according to the file assembly order through the following steps, where M is an integer greater than or equal to 1 and N is an integer greater than 1:

[0101] S62, obtaining the j-th sub-model file from the model file sequence as the target sub-model file to be transmitted, wherein j is an integer greater than or equal to 1 and less than or equal to N, and when j is 1, the j-th sub-model file is the first sub-model file in the model file sequence;

[0102] S63, transmitting the target sub-model file to the i-th reference terminal device through the communication link, and detecting the transmission status of the target sub-model file during the transmission of the target sub-model file, wherein the transmission status is used to indicate whether the target sub-model file is successfully transmitted;

[0103] S64, when the transmission status indicates that the target sub-model file is successfully transmitted and j is less than N, obtaining the j+1th sub-model file from the model file sequence as the target sub-model file, and continuing to transmit it to the i-th reference terminal device through the communication link;

[0104] S65, when the transmission status is used to indicate that the target sub-model file is successfully transmitted and j is equal to N, it is determined that the transmission of the model file sequence is completed, and the deployment status of the artificial intelligence model in the reference model format in the i-th reference terminal device is detected, wherein the i-th reference terminal device is configured to splice the N sub-model files in the model file sequence according to the file assembly order after completing the reception of the model file sequence to obtain the target model file, and run the target model file to deploy the artificial intelligence model in the reference model format, and after the artificial intelligence model in the reference model format is successfully deployed, the deployment success information is returned to the server;

[0105] S66: upon receiving the deployment success information returned by the i-th reference terminal device, determining that the deployment of the i-th reference terminal device is completed.

[0106] Optionally, in this embodiment, assuming that the multiple reference terminal devices are terminal devices 1 to 10, including 10 (M=10) reference terminal devices, and the target model file file_A is divided into 100 (N=100) sub-model files, for terminal device 1 (i=1) among the multiple reference terminal devices, transmitting each sub-model file to terminal device 1 may include but is not limited to the following methods: starting with the first sub-model file, transmitting multiple sub-model files in sequence according to the assembly order until the last sub-model file is transmitted. Assuming that the transmission of the sub-model file with an assembly order of 59 (j=59) is currently being executed, that is, the target sub-model file is sub-model file file_A_59, through the websocket link The sub-model file file_A_59 is transmitted to the terminal device 1, and the transmission status of the sub-model file file_A_59 is detected during the transmission process, that is, whether the sub-model file file_A_59 is transmitted successfully. If the transmission status is successful, the next sub-model file is obtained from the model file sequence as the target sub-model file to perform the transmission operation until the corresponding sub-model files in the model file sequence are all transmitted. After the terminal device 1 receives all the sub-model files, all 100 sub-model files are spliced ​​in the assembly order to obtain file_A, and file_A is run to deploy the model model_A. After detecting that the model model_A is deployed successfully, the deployment success information is returned to the server, indicating that the model model_A is upgraded successfully.

[0107] As an optional solution, after detecting the transmission status of the target sub-model file, the method further includes:

[0108] S71, when the transmission status indicates that the transmission of the target sub-model file fails, recording the assembly sequence number of the target sub-model file in the model file sequence, and pausing the transmission of the model file sequence, wherein the assembly sequence number is used to indicate the position of the target sub-model file in the model file sequence, and the i-th reference terminal device is configured to save j-1 sub-model files that have completed transmission before the target sub-model file;

[0109] S72, executing a target repair operation, wherein the target repair operation is used to repair a transmission failure that causes the target sub-model file to fail to be transmitted;

[0110] S73, after the transmission failure is repaired by the target repair operation, the sub-model file corresponding to the assembly number is obtained from the model file sequence as the target sub-model file to be transmitted, and the target sub-model file continues to be transmitted to the i-th reference terminal device through the communication link.

[0111] Optionally, in this embodiment, the sub-model file file_A_59 is transmitted to the terminal device 1 via the websocket link, and when it is detected during the transmission process that the transmission status of the sub-model file file_A_59 is a transmission failure (caused by network loss or other reasons), the assembly sequence number of the sub-model file currently performing the transmission operation, that is, 59, is recorded, and the transmission of the sub-model file is suspended. At the same time, the terminal device 1 is instructed to save the sub-model files file_1 to file_58 that have been successfully received, and then the target repair operation is performed. The target repair operation may include but is not limited to all operations that can solve the transmission failure that caused the transmission failure, that is, after the target repair operation is performed, the transmission of the sub-model file can be continued, and based on the assembly sequence number 59 of the sub-model file that failed to be transmitted, the sub-model file file_A_59 corresponding to the assembly sequence number 59 is obtained from the model file sequence as the target sub-model file, and the sub-model file is continued to be transmitted to the terminal device 1 via the websocket link until the corresponding sub-model files in the model file sequence are all transmitted.

[0112] Optionally, in this embodiment, in order to better understand the process of the deployment method of the above-mentioned artificial intelligence model, the deployment method process of the above-mentioned artificial intelligence model is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of this application.

[0113] In this embodiment, a method for deploying an artificial intelligence model is provided. Figure 5 is a schematic diagram of a deployment process of an artificial intelligence model according to an embodiment of the present application, such as Figure 5 As shown, it mainly includes three main parts: the edge end and the center end perform model conversion operations and the center end performs model cluster distribution operations:

[0114] For the edge end, the terminal device at the edge end is first initialized and the terminal software is deployed. The terminal software can deploy the model conversion environment in the terminal device, and then register the device information to the central end (server) through the http service interface, send the terminal device attributes (including device attributes and real-time computing resource usage, etc.) and computing resource usage (set a scheduled task to send in real time). Once a terminal device is selected as the target terminal device for performing the model conversion operation, the terminal device will complete the task of model conversion, including receiving the sub-model files obtained after segmenting the initial model through the websocket link, splicing the sub-model files into a complete model, and converting the format type of the complete model. After the conversion is completed, the converted model is model verified and the verification information is sent to the central end. For example, the model file is run on the target terminal device. If the operation is successful, it means that the model verification has passed, and if the operation is unsuccessful, it means that the model verification has failed, so as to ensure its accuracy and performance. After confirming that the model conversion is successful, the new model after the successful operation is automatically loaded, and the new model and model information are uploaded to the central end.

[0115] For the model conversion operation performed on the central end, the central end first obtains the model type to be converted and the corresponding hardware acceleration card type, and obtains the list of acceleration card types corresponding to each terminal device based on the terminal device attributes and computing resource occupancy information sent by the terminal device, and selects the terminal device with the least computing resource occupancy as the target terminal device for performing the model conversion operation. After selecting the target terminal device, the central end will send the model to be converted to the target terminal device through the websocket link to perform the model conversion operation. Once the target terminal device completes the model conversion operation, the central end will receive the converted model from the target terminal device and store it in the model library for subsequent use or further processing.

[0116] For the model cluster distribution operation executed on the center end, the center end first obtains the model to be distributed from the model library, and then traverses the terminal device attribute information sent by the edge terminal device, and selects a list of terminal devices (reference terminal devices) to which the model can be distributed from the terminal devices according to information such as the accelerator card type. Then, the center end selects a specific terminal device from the terminal device list to distribute the model through the websocket link. This process can be completed with one-click operation. The model to be distributed will be segmented and arrive at each reference terminal device in the form of multiple sub-model files. At the same time, the center end will monitor this process, display the distribution progress in real time, and collect upgrade information after the model is successfully distributed, such as upgrade success or upgrade failure.

[0117] The entire process achieves rapid deployment and updating of AI models and improves the efficiency of AI model deployment by performing model conversion on edge terminal devices and model management on the center end.

[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0119] In this embodiment, a deployment device for an artificial intelligence model is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0120] Figure 6 is a structural block diagram of a deployment device for an artificial intelligence model according to an embodiment of the present application; Figure 6 As shown, it is applied to a server, a communication link is established between the server and multiple terminal devices, and the server is used to generate an artificial intelligence model in an initial model format, including:

[0121] A receiving module 602 is used to receive a target deployment request, wherein the target deployment request is used to request to deploy the artificial intelligence model in the reference model format to multiple reference terminal devices of the reference device type among the multiple terminal devices;

[0122] A response module 604 is used to respond to the target deployment request, and select a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the multiple reference terminal devices, wherein the terminal devices of different device types are adapted to different model formats, and the reference model format is a model format adapted to the terminal device of the reference device type;

[0123] A transmission module 606, configured to transmit the artificial intelligence model in the initial model format to the target terminal device via the communication link, wherein the target terminal device is configured to convert the artificial intelligence model from the initial model format to a reference model format, and transmit the artificial intelligence model in the reference model format back to the server;

[0124] The deployment module 608 is used to deploy the artificial intelligence model in the reference model format to the multiple reference terminal devices through the communication link.

[0125] In an exemplary embodiment, the response module includes:

[0126] an acquisition unit, configured to acquire a device performance parameter of each of the reference terminal devices among the plurality of reference terminal devices, wherein the device performance parameter is used to indicate a conversion capability of the corresponding reference terminal device to currently convert the artificial intelligence model from the initial model format to the reference model format, and the device performance parameter is positively correlated with the conversion capability;

[0127] The screening unit is used to screen out the reference terminal devices whose device performance parameters are greater than the target parameter threshold from the multiple reference terminal devices as the target terminal devices.

[0128] In an exemplary embodiment, a communication interface is deployed on the server, and the acquisition unit is used to:

[0129] Obtaining computing resource parameters and storage resource parameters reported by each of the reference terminal devices through the communication interface, wherein the computing resource parameters are used to indicate the amount of computing resources currently allowed to be used in the corresponding reference terminal device, and the storage resource parameters are used to indicate the amount of storage resources currently allowed to be used in the corresponding reference terminal device, and the computing resources and the storage resources are resources required to convert the artificial intelligence model from the initial model format to the reference model format, and each of the reference terminal devices is configured to report the computing resource parameters and the storage resource parameters to the server through the communication interface according to a preset period;

[0130] The computing resource parameters and the storage resource parameters are determined as the device performance parameters of the corresponding reference terminal device.

[0131] In an exemplary embodiment, a model running device is deployed in each of the terminal devices, and the model running device is a device for running an artificial intelligence model. Model running devices of different device types are adapted to different model formats. Before screening out a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the plurality of reference terminal devices, the apparatus further includes:

[0132] A first acquisition module is used to acquire the device type of the model running device deployed in each of the plurality of terminal devices, and obtain the device type and the terminal device having a corresponding relationship;

[0133] A screening module is used to screen out a plurality of reference terminal devices corresponding to a reference device type from the device types and the terminal devices having a corresponding relationship, wherein the model format adapted by the model running device belonging to the reference device type is the reference model format.

[0134] In an exemplary embodiment, the deployment module includes:

[0135] A segmentation unit, used to segment a target model file corresponding to the artificial intelligence model in the reference model format into multiple parts to obtain a model file sequence, wherein the model file sequence includes multiple sub-model files with a file assembly order, each of the sub-model files is used to generate a part of the artificial intelligence model in the reference model format, and the file assembly order is used to indicate the order in which the multiple sub-model files are spliced ​​to obtain the target model file;

[0136] A transmission unit is used to transmit each of the sub-model files in the model file sequence to each of the reference terminal devices through the communication link in sequence according to the file assembly order, wherein each of the reference terminal devices is used to, after receiving the sub-model files, splice the multiple sub-model files in the file assembly order to obtain the target model file, and run the target model file to deploy the artificial intelligence model in the reference model format.

[0137] In an exemplary embodiment, the transmission unit is used to:

[0138] In the case where the multiple reference terminal devices include M reference terminal devices and the target model file is divided into N parts, the sub-model files in the model file sequence are transmitted to the i-th reference terminal device among the M reference terminal devices in sequence according to the file assembly order through the following steps, where M is an integer greater than or equal to 1 and N is an integer greater than 1:

[0139] Obtaining the j-th sub-model file from the model file sequence as the target sub-model file to be transmitted, wherein j is an integer greater than or equal to 1 and less than or equal to N, and when j is 1, the j-th sub-model file is the first sub-model file in the model file sequence;

[0140] Transmitting the target sub-model file to the i-th reference terminal device via the communication link, and detecting a transmission status of the target sub-model file during the transmission of the target sub-model file, wherein the transmission status is used to indicate whether the target sub-model file is successfully transmitted;

[0141] When the transmission status indicates that the target sub-model file is successfully transmitted and j is less than N, obtaining the j+1th sub-model file from the model file sequence as the target sub-model file, and continuing to transmit it to the i-th reference terminal device through the communication link;

[0142] When the transmission status is used to indicate that the target sub-model file is successfully transmitted, and j is equal to N, it is determined that the transmission of the model file sequence is completed, and the deployment status of the artificial intelligence model in the reference model format in the i-th reference terminal device is detected, wherein the i-th reference terminal device is configured to, after completing the reception of the model file sequence, splice the N sub-model files in the model file sequence according to the file assembly order to obtain the target model file, and run the target model file to deploy the artificial intelligence model in the reference model format, and after the artificial intelligence model in the reference model format is successfully deployed, return deployment success information to the server;

[0143] When the deployment success information transmitted back by the i-th reference terminal device is received, it is determined that the deployment of the i-th reference terminal device is completed.

[0144] In an exemplary embodiment, the apparatus further comprises:

[0145] a recording module, configured to, after detecting the transmission status of the target sub-model file, record the assembly sequence number of the target sub-model file in the model file sequence and suspend the transmission of the model file sequence when the transmission status indicates that the transmission of the target sub-model file fails, wherein the assembly sequence number indicates the position of the target sub-model file in the model file sequence, and the i-th reference terminal device is configured to save j-1 sub-model files that have completed transmission before the target sub-model file;

[0146] An execution module, used for executing a target repair operation, wherein the target repair operation is used for repairing a transmission failure that causes the transmission failure of the target sub-model file;

[0147] The second acquisition module is used to obtain the sub-model file corresponding to the assembly number from the model file sequence as the target sub-model file to be transmitted after the transmission fault is repaired by the target repair operation, and continue to transmit the target sub-model file to the i-th reference terminal device through the communication link.

[0148] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0149] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in each embodiment of the present application; the computer program product also includes a non-volatile computer-readable storage medium, which stores the computer program, and when executed by a processor, implements the steps of the method described in each embodiment of the present application.

[0150] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0151] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0152] An embodiment of the present application further provides an electronic device, Figure 7 is a schematic diagram of an electronic device according to an embodiment of the present application, such as Figure 7 As shown, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0153] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0154] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0155] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0156] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for deploying an artificial intelligence model, characterized in that: Applied to a server, a communication link is established between the server and a plurality of terminal devices, and the server is used to generate an artificial intelligence model in an initial model format, including: receiving a target deployment request, wherein the target deployment request is used to request deployment of an artificial intelligence model in a reference model format to a plurality of reference terminal devices belonging to a reference device type among the plurality of terminal devices; In response to the target deployment request, a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format is screened out from the plurality of reference terminal devices, wherein the terminal devices of different device types are adapted to different model formats, and the reference model format is a model format adapted to the terminal devices of the reference device type; Transmitting the artificial intelligence model in the initial model format to the target terminal device via the communication link, wherein the target terminal device is configured to convert the artificial intelligence model from the initial model format to a reference model format, and transmit the artificial intelligence model in the reference model format back to the server; The artificial intelligence model in the reference model format is deployed to multiple reference terminal devices through the communication link.

2. The method according to claim 1, characterized in that The step of selecting a target terminal device that allows converting the artificial intelligence model from the initial model format to the reference model format from the plurality of reference terminal devices includes: Acquire a device performance parameter of each of the reference terminal devices among the plurality of reference terminal devices, wherein the device performance parameter is used to indicate a conversion capability of the corresponding reference terminal device to currently convert the artificial intelligence model from the initial model format to the reference model format, and the device performance parameter is positively correlated with the conversion capability; The reference terminal device whose device performance parameter is greater than a target parameter threshold is screened out from the plurality of reference terminal devices as the target terminal device.

3. The method according to claim 2, characterized in that A communication interface is deployed on the server, and the obtaining of device performance parameters of each of the reference terminal devices in the plurality of reference terminal devices includes: Obtaining computing resource parameters and storage resource parameters reported by each of the reference terminal devices through the communication interface, wherein the computing resource parameters are used to indicate the amount of computing resources currently allowed to be used in the corresponding reference terminal device, and the storage resource parameters are used to indicate the amount of storage resources currently allowed to be used in the corresponding reference terminal device, and the computing resources and the storage resources are resources required to convert the artificial intelligence model from the initial model format to the reference model format, and each of the reference terminal devices is configured to report the computing resource parameters and the storage resource parameters to the server through the communication interface according to a preset period; The computing resource parameters and the storage resource parameters are determined as the device performance parameters of the corresponding reference terminal device.

4. The method according to claim 1, characterized in that: A model running device is deployed in each of the terminal devices, and the model running device is a device for running an artificial intelligence model. Model running devices of different device types are adapted to different model formats. Before selecting a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the plurality of reference terminal devices, the method further includes: Acquire the device type of the model running device deployed in each of the plurality of terminal devices, and obtain the device type and the terminal device having a corresponding relationship; A plurality of reference terminal devices corresponding to a reference device type are screened out from the device types and the terminal devices having a corresponding relationship, wherein the model format adapted by the model running device belonging to the reference device type is the reference model format.

5. The method according to claim 1, characterized in that The step of deploying the artificial intelligence model in the reference model format to the plurality of reference terminal devices via the communication link comprises: The target model file corresponding to the artificial intelligence model in the reference model format is divided into multiple parts to obtain a model file sequence, wherein the model file sequence includes multiple sub-model files with a file assembly order, each of the sub-model files is used to generate a part of the artificial intelligence model in the reference model format, and the file assembly order is used to indicate the order in which the multiple sub-model files are spliced ​​to obtain the target model file; Each of the sub-model files in the model file sequence is transmitted in sequence to each of the multiple reference terminal devices through the communication link in accordance with the file assembly order, wherein each of the reference terminal devices is used to splice the multiple sub-model files in accordance with the file assembly order after receiving the sub-model files to obtain the target model file, and run the target model file to deploy the artificial intelligence model in the reference model format.

6. The method according to claim 5, characterized in that The step of transmitting each of the sub-model files in the model file sequence to each of the reference terminal devices in the plurality of reference terminal devices through the communication link in sequence according to the file assembly order comprises: In the case where the multiple reference terminal devices include M reference terminal devices and the target model file is divided into N parts, the sub-model files in the model file sequence are transmitted to the i-th reference terminal device among the M reference terminal devices in sequence according to the file assembly order through the following steps, where M is an integer greater than or equal to 1 and N is an integer greater than 1: Obtaining the j-th sub-model file from the model file sequence as the target sub-model file to be transmitted, wherein j is an integer greater than or equal to 1 and less than or equal to N, and when j is 1, the j-th sub-model file is the first sub-model file in the model file sequence; Transmitting the target sub-model file to the i-th reference terminal device via the communication link, and detecting a transmission status of the target sub-model file during the transmission of the target sub-model file, wherein the transmission status is used to indicate whether the target sub-model file is successfully transmitted; When the transmission status indicates that the target sub-model file is successfully transmitted and j is less than N, obtaining the j+1th sub-model file from the model file sequence as the target sub-model file, and continuing to transmit it to the i-th reference terminal device through the communication link; When the transmission status is used to indicate that the target sub-model file is successfully transmitted, and j is equal to N, it is determined that the transmission of the model file sequence is completed, and the deployment status of the artificial intelligence model in the reference model format in the i-th reference terminal device is detected, wherein the i-th reference terminal device is configured to, after completing the reception of the model file sequence, splice the N sub-model files in the model file sequence according to the file assembly order to obtain the target model file, and run the target model file to deploy the artificial intelligence model in the reference model format, and after the artificial intelligence model in the reference model format is successfully deployed, return deployment success information to the server; When the deployment success information transmitted back by the i-th reference terminal device is received, it is determined that the deployment of the i-th reference terminal device is completed.

7. The method according to claim 6, characterized in that After detecting the transmission status of the target sub-model file, the method further includes: In the case where the transmission status indicates that the transmission of the target sub-model file fails, the assembly sequence number of the target sub-model file in the model file sequence is recorded, and the transmission of the model file sequence is suspended, wherein the assembly sequence number is used to indicate the position of the target sub-model file in the model file sequence, and the i-th reference terminal device is configured to save the j-1 sub-model files that have completed transmission before the target sub-model file; Executing a target repair operation, wherein the target repair operation is used to repair a transmission failure that causes the target sub-model file to fail to be transmitted; After the transmission failure is repaired by the target repair operation, the sub-model file corresponding to the assembly number is obtained from the model file sequence as the target sub-model file to be transmitted, and the target sub-model file continues to be transmitted to the i-th reference terminal device through the communication link.

8. A deployment device for an artificial intelligence model, characterized in that: Applied to a server, a communication link is established between the server and a plurality of terminal devices, and the server is used to generate an artificial intelligence model in an initial model format, including: A receiving module, configured to receive a target deployment request, wherein the target deployment request is used to request deployment of an artificial intelligence model in a reference model format to a plurality of reference terminal devices belonging to a reference device type among the plurality of terminal devices; A response module, configured to respond to the target deployment request, and select a target terminal device that allows the artificial intelligence model to be converted from the initial model format to the reference model format from the plurality of reference terminal devices, wherein the terminal devices of different device types are adapted to different model formats, and the reference model format is a model format adapted to the terminal devices of the reference device type; a transmission module, configured to transmit the artificial intelligence model in the initial model format to the target terminal device via the communication link, wherein the target terminal device is configured to convert the artificial intelligence model from the initial model format to a reference model format, and transmit the artificial intelligence model in the reference model format back to the server; A deployment module is used to deploy the artificial intelligence model in the reference model format to multiple reference terminal devices through the communication link.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Deployment method and device of deep learning model, electronic equipment and storage medium

    CN111767059A

  • Model deployment system, method and device and storage medium

    CN113961199A

  • Artificial intelligence model deployment method, system, device and equipment and storage medium

    CN116932093A

  • Model deployment scheduling method and device, equipment and storage medium

    CN117707731A