Model Dynamic Update Method, Device, Storage Medium and Computer Program Product
By considering the terminal resource information and transmission link quality during the model transmission process, dynamically updating the model, the problem of long model transmission delay in the existing technology is solved, and more efficient model updates and applications are achieved.
Patent Information
- Application Number
- CN202410610270.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2044-05-16
AI Technical Summary
In the prior art, the model transmission delay is long, and the terminal resource information and transmission link quality cannot be effectively considered, resulting in low model update efficiency.
By sending a detection signal to the terminal, terminal resource information is obtained, including line quality, terminal computing power and business needs, the target model is obtained and optimized based on this information, and finally the target model is sent to the terminal for update.
By dynamically updating the model, rationally making use of resources, reducing model transmission delay, improving model application flexibility and adaptability, and saving model training overhead.
Smart Images

Figure CN118368210B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technologies, and in particular, to a method, device, storage medium, and computer program product for dynamically updating a model. Background Art
[0002] With the rapid development of large artificial intelligence models, as of July 2023, the cumulative number of large models released abroad has reached 138, and there have also been 130 large models released in China. Large models can empower specific scenarios / domains, including natural language processing, image classification and recognition, and even cross-modal content generation, etc. Their performance highly depends on training data, and for unfamiliar data outside a specific domain, they will not be able to correctly process and implement functions, and it is difficult to meet the growing diverse needs in the long term. Large models are not static, and as functions evolve, the models are also updated.
[0003] In artificial intelligence applications, transfer learning technology can transfer an existing model in one domain to another domain through knowledge transfer, effectively improving the performance of the model in executing new target tasks and quickly solving new task problems using the knowledge of the existing model. Based on transfer learning technology, the cloud server realizes rapid transfer learning and updates of large models according to the model update requests sent by the terminal, and sends the updated large model to the terminal. However, this process still takes a lot of time in large model transmission.
[0004] Therefore, how to reduce the model transmission delay is an urgent problem to be solved currently.
[0005] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0006] The main objective of this application is to provide a method, device, storage medium, and computer program product for dynamically updating a model, aiming to solve the technical problem of how to reduce the model transmission delay.
[0007] To achieve the above objective, this application proposes a method for dynamically updating a model, and the method includes:
[0008] Sending a probe signal to the terminal and receiving the terminal resource information fed back by the terminal;
[0009] Obtaining a target model according to the terminal resource information;
[0010] Sending the target model to the terminal to update the model of the terminal.
[0011] In one embodiment, the terminal resource information includes line quality information, terminal computing power information, and terminal service requirements. The step of sending a detection signal to the terminal and receiving the terminal resource information fed back by the terminal includes:
[0012] Pre-configure the line equipment;
[0013] Based on the pre-configured line equipment, periodically send a detection signal to the terminal and calculate the delay of the received feedback signal;
[0014] Based on the delay, obtain the line quality information;
[0015] Based on the feedback signal, obtain the terminal computing power information and terminal service requirements.
[0016] In one embodiment, the step of obtaining the target model according to the terminal resource information includes:
[0017] Obtain an intermediate model according to the terminal resource information;
[0018] Optimize the intermediate model according to the terminal resource information to obtain the target model.
[0019] In one embodiment, the step of obtaining the intermediate model according to the terminal resource information includes:
[0020] Receive the large model parameters generated based on local data;
[0021] Extract the intermediate model from the large model parameters according to the terminal service requirements.
[0022] In one embodiment, the step of extracting the intermediate model from the large model parameters according to the terminal service requirements includes:
[0023] Extract sample data from the large model parameters according to the terminal service requirements;
[0024] Based on the sample data, calculate the gradient value;
[0025] Update the large model parameters according to the gradient value;
[0026] Based on the updated large model parameters, extract the intermediate model.
[0027] In one embodiment, the step of optimizing the intermediate model according to the terminal resource information to obtain the target model includes:
[0028] Compress the volume of the intermediate model to different gears to obtain intermediate models of different gears;
[0029] Select the volume of the intermediate model according to the line quality information and the terminal computing power information;
[0030] Maximize the accuracy of the intermediate model corresponding to the volume to obtain the target model.
[0031] In addition, to achieve the above object, the present application also proposes a model dynamic update device, which includes:
[0032] A signal sending module, configured to send a detection signal to the terminal and receive the terminal resource information fed back by the terminal;
[0033] A model acquisition module, configured to acquire a target model according to the terminal resource information;
[0034] A model sending module, configured to send the target model to the terminal to update the model of the terminal.
[0035] In addition, to achieve the above object, the present application also proposes a model dynamic update device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the model dynamic update method as described above.
[0036] In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the model dynamic update method as described above are implemented.
[0037] In addition, to achieve the above object, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the model dynamic update method as described above are implemented.
[0038] One or more technical solutions proposed by the present application have at least the following technical effects:
[0039] A model dynamic update method, by sending a detection signal to the terminal, receiving the terminal resource information fed back by the terminal, and acquiring a target model according to the terminal resource information, the target model will change dynamically with the terminal resource information, this process ensures that resources are reasonably and effectively utilized. Further, the target model is sent to the terminal to update the model of the terminal. Through the adaptive combination of the target model and the terminal, the flexibility of model application is enhanced. At the same time, the model training cost is saved, and the delay of model transmission can be effectively reduced. Description of the Drawings
[0040] The accompanying drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with this application, and are used together with the description to explain the principles of this application.
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0042] Figure 1 System device architecture diagram provided for the model dynamic update method of this application;
[0043] Figure 2 Flow schematic diagram of the first embodiment of the model dynamic update method of this application;
[0044] Figure 3 Schematic diagram of the model transmission structure from the edge server to the terminal in the embodiments of this application;
[0045] Figure 4 Flow schematic diagram of the second embodiment of the model dynamic update method of this application;
[0046] Figure 5 Flow schematic diagram of the third embodiment of the model dynamic update method of this application;
[0047] Figure 6 Schematic diagram of the model transmission structure from the cloud server to the edge server in the embodiments of this application;
[0048] Figure 7 Schematic diagram of the multi - terminal model update structure of the model dynamic update method in the embodiments of this application;
[0049] Figure 8 Schematic diagram of the module structure of the model dynamic update device in the embodiments of this application;
[0050] Figure 9 Schematic diagram of the device structure of the hardware operating environment involved in the model dynamic update method in the embodiments of this application.
[0051] The realization of the purpose, functional features, and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.
[0053] To better understand the technical solutions of this application, the following will be described in detail in combination with the description of the accompanying drawings and specific implementation manners.
[0054] The main solution of the embodiment of the present application is: sending a detection signal to a terminal and receiving the terminal resource information fed back by the terminal; obtaining a target model according to the terminal resource information; and sending the target model to the terminal to update the model of the terminal.
[0055] In the prior art, updating the large model and transmitting the large model according to the model update requirements of different terminals takes a lot of time. In addition, the transmission link conditions and the computing power of the terminal are not considered during the model update process, and the model update can only meet the needs of one terminal within the same time period. The above situations all lead to an increase in the delay of model transmission. Therefore, how to reduce the model transmission delay is an urgent problem to be solved at present.
[0056] The present application provides a solution. By sending a detection signal to a terminal, receiving the terminal resource information fed back by the terminal, and obtaining a target model according to the terminal resource information, the target model will change dynamically with the terminal resource information. This process ensures that resources are reasonably and effectively utilized. Further, sending the target model to the terminal to update the model of the terminal enhances the flexibility and adaptability of model application, saves model training overhead, and can effectively reduce the model transmission delay.
[0057] It should be noted that the system device architecture of this embodiment consists of three parts: cloud-edge-terminal, as Figure 1 shown. The cloud server and the edge server, and the edge server and the terminal are in a one-to-one or one-to-many relationship. The cloud server and the edge server are connected by wire and can perform high-speed lossless data communication. The edge server and the terminal are connected wirelessly and can perform model transmission. The cloud server continuously trains and updates the full-function large model offline based on a large amount of local data, and transmits the updated full-function large model to the edge server without loss; the edge server is responsible for collecting the requirements of the terminal, perceiving the computing power of the terminal, and the quality of the communication link between the terminal and the terminal. After comprehensive consideration, the corresponding sub-model is extracted from the full-function large model and transmitted to the terminal; after receiving the sub-model, the terminal loads and runs it, and finally completes the model update.
[0058] The execution subject of this embodiment can be an edge server, which is a computing device located at the network edge. Its function is to place computing resources, storage, and application programs as close as possible to users or data sources to provide faster response time and higher data processing capabilities. These servers are usually deployed on physical or virtual devices, such as network boundary routers, switches, load balancers, etc.
[0059] Based on this, the embodiment of the present application provides a model dynamic update method. Referring to Figure 2 , Figure 2 is the flowchart of the first embodiment of the model dynamic update method of the present application.
[0060] In this embodiment, the model dynamic update method includes steps S10 to S30:
[0061] Step S10, send a detection signal to the terminal and receive the terminal resource information fed back by the terminal.
[0062] It should be noted that the detection signal can be a type of network data packet used to test the reachability of the terminal, the network connection quality, the terminal resource status, etc. These detection signals can contain various types of information and data, such as Ping requests, TCP SYN (Synchronize Sequence Numbers) packets, HTTP requests, etc. Among them, the Ping request is the most common type of detection signal, which is sent using the ICMP (Internet Control Message Protocol) protocol to test whether the terminal is online and accessible. The TCP SYN packet is the first packet in the TCP three-way handshake process, used to test whether the port is open or accessible. The HTTP request is used to detect the status of the terminal, and the terminal's web server will return an HTTP response, which contains the server status information. The terminal can be a computing service device with data processing, network communication, and program running functions, located at the outermost periphery of the computer network, such as a tablet computer, a personal computer, a mobile phone, etc. The terminal resource information can be the resource usage of the terminal system, including but not limited to line quality information, terminal computing power information, and terminal service requirements, etc., and ensuring the stable operation of the system by monitoring the terminal resource information.
[0063] Step S20, obtain the target model according to the terminal resource information.
[0064] Among them, the target model can be understood as the model optimized by the edge server according to the terminal resource information from the extracted model. Exemplarily, reference Figure 3 is used for illustration, but it does not limit this application. Figure 3 is a schematic diagram of the model transmission structure from the edge server to the terminal in the embodiment of this application. Figure 3 In it, assume that the detection feedback module of the edge server receives the terminal resource information sent by the terminal. The detection feedback module sends the terminal resource information to the model extraction module, and the model extraction module optimizes the extracted model according to the received terminal resource information to obtain the target model.
[0065] Step S30, send the target model to the terminal to update the model of the terminal.
[0066] Exemplarily, after obtaining the target model, the edge server sends the target model to the model loading module of the terminal through interface B, and the terminal loads and updates the target model to implement the update of the terminal model.
[0067] In this embodiment, by sending a detection signal to the terminal, receiving the terminal resource information fed back by the terminal, and obtaining the target model according to the terminal resource information, the target model will change dynamically with the terminal resource information. This process ensures that resources are reasonably and effectively utilized. Further, the target model is sent to the terminal to update the model of the terminal. Through the adaptive combination of the target model and the terminal, the flexibility of model application is enhanced. At the same time, the model training cost is saved, and the delay of model transmission can be effectively reduced.
[0068] Refer to Figure 4 , Figure 4 is a schematic flowchart of the second embodiment of the model dynamic update method of the present application. Based on the first embodiment shown above Figure 2 a second embodiment of the model dynamic update method of the present application is proposed.
[0069] In the second embodiment, step S10 includes:
[0070] Step S101, pre-configure the line equipment.
[0071] It should be understood that, in order to better receive the terminal resource information fed back by the terminal, in this embodiment, first determine the transmission amount of the detection signal, and then pre-configure the line equipment according to the transmission amount of the detection signal, so that the model update requests of multiple terminals can be processed within the same time period.
[0072] Exemplarily, pre-configuring the line equipment can be pre-configuring the line equipment according to prior knowledge. In a specific implementation, for example, according to the physical layer characteristics of the line equipment, including transmission media (such as optical fiber, coaxial cable, twisted pair, etc.), transmission speed, bandwidth, interface standards (such as RJ-45, SFP, etc.), number of interfaces, etc., understand the physical limitations such as the maximum transmission distance, attenuation, and delay supported by the equipment, and pre-configure the line equipment.
[0073] Step S102, based on the pre-configured line equipment, regularly send a detection signal to the terminal and calculate the delay of the received feedback signal.
[0074] Among them, the feedback signal includes a Ping reply signal. When the terminal receives a Ping request, it will reply with a Ping reply to confirm its reachability. Exemplarily, such as Figure 3As shown in the figure, the edge server may include a model extraction module and a detection feedback module. The edge server is pre-configured according to the physical layer characteristics of the known line devices. The detection feedback module periodically sends Ping requests to the terminal through interface B, calculates the time delay from when the Ping request is sent until the terminal feedback information is received, and the magnitude of the time delay corresponds to the quality of the link. It can be understood that interface B is connected to the wireless link, located at the data output end of the edge server and the data input end of the terminal, responsible for connecting the edge server and the terminal, and the quality of the wireless links connected by different interface Bs can be different. Exemplarily, the edge server sends a Ping request to the terminal, records the time when the Ping request is sent as t1, and sets a preset feedback signal time delay threshold as τ. When the edge server is waiting for the terminal feedback signal, it continuously calculates the time delay T = t - t1 between the current time t and the time when the Ping request is sent. If T > τ, it stops waiting for the feedback signal and sends a Ping request again until the edge server receives the terminal feedback signal within the time delay threshold, and records the current time delay of the terminal detection and feedback signal as T.
[0075] Step S103: Based on the time delay, obtain the line quality information.
[0076] Exemplarily, the edge server determines the quality of the link according to the time delay T. According to the known objective line quality, the line quality can be divided into three grades: good, medium, and poor (S1 < S2 < S3). The smaller the time delay, the better the link quality, and vice versa.
[0077] Step S104: Based on the feedback signal, obtain the terminal computing power information and the terminal service requirements.
[0078] Among them, the feedback signal also includes the terminal resource information sent by the terminal to the edge server. It can be understood that the terminal computing power information can be the computing power achieved by the terminal, that is, the ability to process information data, which reflects the efficiency of model update. The terminal service requirements can be the requirements generated by the terminal user or the terminal service link, including but not limited to data collection and processing requirements, real-time feedback and monitoring requirements, user experience and interaction requirements, security and privacy protection requirements, etc. Exemplarily, as Figure 3 shown in the figure, the terminal includes a target model loading module and a feedback module. After receiving the Ping request sent by the edge server, the terminal sends its own computing power information and service requirements to the edge server through the feedback module, and the detection feedback module of the edge server receives the reported own computing power information and service requirements from the terminal through interface B.
[0079] The above is only a feasible implementation manner of step S10 provided in this embodiment, and this embodiment does not make specific limitations on the specific implementation manner of step S10.
[0080] In this embodiment, by determining the transmission volume of the detection signal and pre-configuring the line equipment according to the transmission volume of the detection signal, multiple terminal model update requests can be processed within the same time period. At the same time, the pre-configuration of the line also ensures the stability of the line and the security of the network. Based on the pre-configured line equipment, detection signals are regularly sent to the terminals, the delay of the received feedback signals is calculated, and the line quality information is obtained according to the delay. The delay information verifies whether the line configuration is perfect. Through the line quality information, network faults can be diagnosed in a timely manner, thereby reducing the risk of network faults. Further, through the feedback signals, the terminal computing power information and the terminal service requirements are obtained, and a more scientific optimization strategy is formulated, so that the model update meets various complex scenarios, reducing the delay while also enhancing the user experience.
[0081] Referring to Figure 5 , Figure 5 FIG. is a schematic flowchart of the third embodiment of the model dynamic update method of the present application. Based on the second embodiment shown in the above figure, the third embodiment of the model dynamic update method of the present application is proposed.
[0082] In the third embodiment, step S20 includes:
[0083] Step S201, obtaining an intermediate model according to the terminal resource information.
[0084] It should be noted that the terminal resource information includes the terminal service requirements, and the intermediate model can be understood as a preliminary model obtained by the edge server from the cloud service according to the terminal service requirements.
[0085] It should be understood that obtaining the intermediate model according to the terminal resource information may be to analyze the terminal resource information, obtain the terminal model requirements, and generate the intermediate model based on the terminal model requirements. Among them, the terminal model requirements are used to represent the requirement information during the model dynamic update. Generating the intermediate model based on the terminal model requirements may be to write the terminal model requirements into a preset model template, where the preset model template may be a pre-set terminal model template.
[0086] Further, considering that generating the model in real time is time-consuming and laborious with low efficiency, in order to improve the model acquisition efficiency, step S201 includes: receiving the large model parameters generated based on the local data; extracting the intermediate model from the large model parameters according to the terminal service requirements.
[0087] It should be noted that the local data can be understood as offline massive data, usually containing millions, tens of millions or even more data samples. The large model parameters can be a large-scale data set generated before training the model according to these already collected, stored and processed data samples, which cover the input features of the model and the corresponding labels, and are used to train the model and learn the rules and patterns in the data.
[0088] Exemplarily, as Figure 6 shown, the cloud server includes a local data module and a large model parameter module. Among them, the large model parameter module can be understood as a full-functional large model training module, which is used to continuously train and update the large model and can process large-scale data and complex models. It should be noted that the large model training method can be to train a Supernet structure and then gradually shrink the subnet size from four dimensions, such as depth, width, kernel size, and input size, and fine-tune the subnet in the super network so that any subnet in the super network can achieve good accuracy. The large model trained in this way has multiple subnet structures, and each subnet can serve a specific business field. After being distributed to the edge side, it can generate a sub-model through a neural network structure search method. It can be understood that the intermediate model can be understood as the above-mentioned sub-model. The edge server extracts the corresponding intermediate model from the large model parameter module according to the terminal service requirements and transmits it to its own model extraction module through interface A. It can be understood that interface A is connected to a wired link and is located at the data output end of the cloud server and the data input end of the edge server, and is responsible for connecting the cloud server and the edge server.
[0089] Further, the extracting the intermediate model from the large model parameters according to the terminal service requirements includes: extracting sample data from the large model parameters according to the terminal service requirements; calculating a gradient value based on the sample data; updating the large model parameters according to the gradient value; and extracting the intermediate model based on the updated large model parameters.
[0090] It should be noted that the sample data can be a data subset used for further training, verification, testing, or analysis. Exemplarily, the edge server extracts a data subset according to new interaction requirements. It can be understood that the extracted data subset contains interaction elements corresponding to these new interaction requirements. The gradient value is a measure of the derivative of the loss function with respect to the model parameters and is used to adjust the model parameters to reduce the loss of the sample data.
[0091] Exemplarily, the edge server can update the large model parameters using a learning rate and the calculated gradient value. Among them, the learning rate can be a positive decimal. The edge server updates the large model parameters according to the terminal service requirements, extracts the corresponding intermediate model from the updated large model parameter module, and transmits it to its own model extraction module through interface A.
[0092] It should be noted that the process of extracting an intermediate model from the large model parameters according to the terminal service requirements further includes: extracting different neural network structures from the large model parameters according to the terminal service requirements; training the extracted neural network structures, evaluating and calculating the fitness of the extracted neural network structures in different terminal service requirement scenarios; screening the trained neural network structures according to the fitness; generating a new network structure based on the screened neural network structures; training the new network structure; updating the large model parameters based on the trained new network structure; repeating the iterative training process and continuously updating the large model parameters; and extracting the intermediate model based on the updated large model parameters. Among them, the generation of the new network structure further includes: performing a crossover operation on the screened neural network structures or randomly introducing new variables.
[0093] It should be noted that the process of extracting an intermediate model from the large model parameters according to the terminal service requirements can be understood as a process of model training, including but not limited to evolutionary search algorithms, stochastic gradient descent methods, batch gradient descent methods, momentum methods, alternating direction multiplier methods, etc.
[0094] In this embodiment, sample data is extracted from the large model parameters according to the terminal service requirements, and based on the sample data, the gradient value is calculated. Further, the large model parameters are updated according to the gradient value. Through such a model training method, the model can operate efficiently on a large-scale data set. By using the sample data to update the parameters, the computational efficiency and update stability can be balanced. Then, based on the updated large model parameters, the intermediate model is extracted, so that the extracted intermediate model is an optimized model, thereby shortening the model update time.
[0095] Step S202: Optimize the intermediate model according to the terminal resource information to obtain the target model.
[0096] It can be understood that after extracting the intermediate model from the large model parameters according to the terminal service requirements, the intermediate model is further optimized according to the line quality information and the terminal computing power information, and further, the target model is obtained.
[0097] Further, step S202 includes: compressing the volume of the intermediate model to different levels to obtain intermediate models at different levels; selecting the volume of the intermediate model according to the line quality information and the terminal computing power information; and maximizing the accuracy of the intermediate model corresponding to the volume to obtain the target model.
[0098] It should be noted that in order to meet the limitations of the line quality and computing power of the terminal, the volume of the intermediate model needs to be further compressed. The methods for compressing the model volume include, but are not limited to, parameter pruning, knowledge distillation, quantization, low-rank decomposition, etc. Among them, parameter pruning is a common model compression method, which reduces the volume of the model by deleting redundant parameters or neurons in the model. Specifically, those parameters or neurons that contribute less to the model performance can be identified and removed from the model. This method can significantly reduce the storage requirements and computational amount of the model. Knowledge distillation is a method that uses a large teacher model to guide the learning of a small student model. Quantization is the process of converting floating-point numbers in the model into fixed-point numbers or integers, thereby reducing the storage requirements and computational amount of the model. Quantization can reduce the volume of the model while maintaining the model performance. Low-rank decomposition is to decompose the weight matrix into the product of two or more smaller matrices, thereby reducing the volume of the model. This method can significantly reduce the storage requirements and computational amount of the model while maintaining the model performance. Exemplarily, assume that the volume of the intermediate model can be compressed into three levels: large, medium, and small (M1 < M2 < M3).
[0099] It should be noted that in order to ensure that the intermediate model can be correctly transmitted and the target model can be successfully loaded, the volume of the intermediate model is determined by the worst level of the terminal computing power and line quality, as shown in Table 1 specifically.
[0100] Table 1
[0101]
[0102] It can be understood that in Table 1, when the computing power is the worst (at level C1) or the line quality is the worst (at level S1), the volume of the corresponding intermediate model is the smallest (at level M1). When the computing power is C2 or C3 and the line quality is not S1, the volume of the intermediate model corresponds to M2 and M3 in ascending order according to the line quality. Only when both the computing power and the line quality are at the optimal level, the volume of the corresponding intermediate model is the largest (at level M3). Exemplarily, as Figure 7 shown, assume that there are currently 6 terminals performing image recognition tasks connected to an edge server, and the edge server is connected to a cloud server. Assume that the feedback information of each terminal received by the edge server detection feedback module can be expressed in the following situations.
[0103] Terminal 1: Available computing power is C1, link quality is S1, and the demand scenario is the medical field;
[0104] Terminal 2: Available computing power is C3, link quality is S3, and the demand scenario is the transportation field;
[0105] Terminal 3: Available computing power is C2, link quality is S3, and the demand scenario is the home field;
[0106] Terminal 4: The available computing power is C3, the link quality is S1, and the demand scenario is the logistics field;
[0107] Terminal 5: The available computing power is C1, the link quality is S2, and the demand scenario is the retail field.
[0108] Among them, the edge server quickly extracts the intermediate models in relevant fields according to business requirements. Assuming that the volume compression ratios of the intermediate models are preset as M1 = 40%, M2 = 20%, M3 = 0%, the following intermediate model optimization and compression are performed:
[0109] For Terminal 1, based on the medical field model, since the computing power and link of Terminal 1 are in the C1 and S1 levels respectively, the corresponding intermediate model compression ratio is selected to compress by 40%, and the model is sent to Terminal 1.
[0110] For Terminal 2, based on the transportation field model, since the computing power and link of Terminal 2 are in the C3 and S3 levels respectively, the corresponding intermediate model compression ratio is selected to compress by 0%, that is, not compressed, and the model is sent to Terminal 2.
[0111] For Terminal 3, based on the home field model, since the computing power and link of Terminal 3 are in the C2 and S3 levels respectively, the corresponding intermediate model compression ratio is selected to compress by 20%, and the model is sent to Terminal 3.
[0112] For Terminal 4, based on the logistics field model, since the computing power and link of Terminal 4 are in the C3 and S1 levels respectively, the corresponding intermediate model compression ratio is selected to compress by 40%, and the model is sent to Terminal 4.
[0113] For Terminal 5, based on the retail field model, since the computing power and link of Terminal 5 are in the C1 and S2 levels respectively, the corresponding intermediate model compression ratio is selected to compress by 40%, and the model is sent to Terminal 5.
[0114] It can be understood that based on the intermediate model with the selected volume, the accuracy of the intermediate model is optimized. Further, the target model is obtained. The optimization of the model accuracy can be achieved through methods such as data preprocessing, adjusting hyperparameters, and adding regularization. Among them, data preprocessing can include data cleaning, normalization, standardization, and feature engineering, etc. Hyperparameters can be understood as adjustable parameters in machine learning algorithms, such as learning rate, number of iterations, hidden layer dimension, convolution kernel size, etc. Regularization is a technique to prevent overfitting and can help improve the generalization ability of the model.
[0115] In this embodiment, an intermediate model is obtained according to the terminal resource information. Specifically, the large model parameters generated based on local data can be received, and the intermediate model can be extracted from the large model parameters according to the terminal service requirements. This way of obtaining the intermediate model not only meets specific service requirements but also improves the data usage efficiency. Further, by compressing the volume of the intermediate model to different levels, intermediate models at different levels are obtained, and the volume of the intermediate model is selected according to the line quality information and the terminal computing power information. On this basis, the accuracy corresponding to the selected volume model is maximized to obtain the target model. Such an optimization method realizes the adaptive model compression and transmission based on communication and computing power conditions, further improving the system performance.
[0116] This application also provides a model dynamic update device. Please refer to Figure 8 , the model dynamic update device includes:
[0117] A signal sending module, configured to send a detection signal to the terminal and receive the terminal resource information fed back by the terminal;
[0118] A model obtaining module, configured to obtain the target model according to the terminal resource information;
[0119] A model sending module, configured to send the target model to the terminal to update the model of the terminal.
[0120] The model dynamic update device provided by this application adopts the model dynamic update method in the above embodiment, which can solve the technical problem of high model transmission delay. Compared with the prior art, the beneficial effects of the model dynamic update device provided by this application are the same as those of the model dynamic update method provided by the above embodiment, and other technical features in the model dynamic update device are the same as those disclosed in the method of the above embodiment, which will not be elaborated here.
[0121] This application provides a model dynamic update device. The model dynamic update device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the model dynamic update method in the first embodiment above.
[0122] Next, refer to Figure 9, which shows a schematic structural diagram of a model dynamic update device suitable for implementing the embodiments of the present application. The model dynamic update device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 9 The shown model dynamic update device is merely an example and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0123] As Figure 9 shown, the model dynamic update device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the model dynamic update device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the model dynamic update device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a model dynamic update device with various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems may be implemented or had.
[0124] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.
[0125] The model dynamic update device provided by the present application adopts the model dynamic update method in the above embodiments and can solve the technical problem of high model transmission delay. Compared with the prior art, the beneficial effects of the model dynamic update device provided by the present application are the same as those of the model dynamic update method provided by the above embodiments, and other technical features in the model dynamic update device are the same as those disclosed in the method of the previous embodiment, which will not be elaborated here.
[0126] It should be understood that each part disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0127] As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, and all of them should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0128] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the model dynamic update method in the above embodiments.
[0129] The computer-readable storage medium provided by this application can, for example, be a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0130] The above computer-readable storage medium can be included in the model dynamic update device; or it can exist separately and not be assembled into the model dynamic update device.
[0131] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the model dynamic update device, the model dynamic update device is caused to: send a detection signal to the terminal and receive the terminal resource information feedback by the terminal; obtain a target model according to the terminal resource information; send the target model to the terminal to update the model of the terminal.
[0132] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0134] The modules involved in the embodiments described in this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0135] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned model dynamic update method, and can solve the technical problem of high model transmission delay. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the model dynamic update method provided in the above embodiments, and will not be elaborated here.
[0136] The present application also provides a computer program product, including a computer program, which implements the steps of the model dynamic update method as described above when executed by a processor.
[0137] The computer program product provided by the present application can solve the technical problem of high model transmission delay. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the model dynamic update method provided by the above embodiments, and will not be elaborated herein.
[0138] The above are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A model dynamic updating method, characterized in that: The method includes: Sending a detection signal to a terminal, and receiving terminal resource information fed back by the terminal; Acquire an intermediate model according to the terminal resource information; Optimizing the intermediate model according to the terminal resource information to obtain a target model; Sending the target model to the terminal to update the model of the terminal; The terminal resource information includes line quality information, terminal computing power information, and terminal service requirements. The step of sending a detection signal to the terminal and receiving the terminal resource information fed back by the terminal includes: Pre-configure line equipment; Based on the pre-configured line equipment, periodically send a detection signal to the terminal, and calculate the delay of receiving a feedback signal; Based on the time delay, obtaining the line quality information; Based on the feedback signal, obtaining the terminal computing power information and terminal service requirements; The step of optimizing the intermediate model according to the terminal resource information to obtain the target model comprises: Compressing the volume of the intermediate model to different gears to obtain intermediate models at different gears; Selecting a volume of the intermediate model according to the line quality information and the terminal computing power information; The accuracy of the intermediate model corresponding to the volume is maximized to obtain the target model.
2. The method according to claim 1, characterized in that The step of acquiring the intermediate model according to the terminal resource information comprises: Receive large model parameters generated based on local data; An intermediate model is extracted from the large model parameters according to the terminal service requirements.
3. The method according to claim 2, characterized in that The step of extracting the intermediate model from the large model parameters according to the terminal service requirements includes: Extracting sample data from the large model parameters according to the terminal service requirements; Based on the sample data, calculating a gradient value; According to the gradient value, updating the large model parameters; Based on the updated large model parameters, the intermediate model is extracted.
4. A model dynamic updating device, characterized in that: The device comprises: A signal sending module, used to send a detection signal to a terminal and receive terminal resource information fed back by the terminal; A model acquisition module, used to acquire an intermediate model according to the terminal resource information; A model optimization module, used to optimize the intermediate model according to the terminal resource information to obtain a target model; A model sending module, used to send the target model to the terminal to update the model of the terminal; The terminal resource information includes line quality information, terminal computing power information and terminal service requirements. The signal sending module is further used to pre-configure the line equipment; based on the pre-configured line equipment, periodically send a detection signal to the terminal, and calculate the delay of receiving the feedback signal; based on the delay, obtain the line quality information; based on the feedback signal, obtain the terminal computing power information and terminal service requirements; The model optimization module is also used to compress the volume of the intermediate model to different levels to obtain intermediate models of different levels; select the volume of the intermediate model according to the line quality information and terminal computing power information; maximize the accuracy of the intermediate model corresponding to the volume to obtain the target model.
5. A model dynamic update device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the model dynamic updating method according to any one of claims 1 to 3.
6. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the model dynamic update method according to any one of claims 1 to 3 are implemented.
7. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the model dynamic updating method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Model acquisition method, electronic equipment and storage medium
CN114662700A