Model optimization method, device and system, computer equipment and storage medium

By obtaining the client's model parameters and loss functions, and using the server to determine and transmit the target model parameters, the problem of long optimization cycle of deep learning model is solved, efficiency is improved and waste of manpower and material resources is reduced.

CN119026702APending Publication Date: 2024-11-26SHANGHAI UNITED IMAGING HEALTHCARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310601964.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

When the prior art optimizes deep learning models, it is necessary to re-collect a large amount of data from the field for labeling and training, resulting in a very long optimization cycle and inefficient efficiency.

Method used

By obtaining the model parameters and loss functions sent by the client, the server uses the server to determine the target model parameters based on the local model and loss functions, and transmit them back to the client to replace the initial model parameters, to achieve model optimization and avoid re-collecting training data.

Benefits of technology

It reduces the cycle of model optimization, improves efficiency, and reduces the waste of manpower and material resources, and optimization on the server side will not affect the normal use of the client.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026702A_ABST
    Figure CN119026702A_ABST
Patent Text Reader

Abstract

The invention relates to a model optimization method, device and system, computer equipment and a storage medium. The method comprises the following steps: acquiring a plurality of model parameters and a plurality of loss functions of a local model sent by a client; the plurality of model parameters are in one-to-one correspondence with the plurality of loss functions; determining a target model parameter according to the local model, the plurality of loss functions and the plurality of model parameters; and transmitting the target model parameter to the client, so that the client replaces the initial model parameter of the local model with the target model parameter to obtain an optimized local model. By using the model optimization related in the invention, the period of model optimization can be reduced, and the efficiency of model optimization can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of medical technology, and in particular to a model optimization method, apparatus, system, computer equipment and storage medium. Background Art

[0002] With the rapid development of artificial intelligence, deep learning models are often used in the medical field for the classification, segmentation, and detection of various medical images. For model training, a large amount of data is usually collected from the field, labeled by experienced technicians, and then the labeled data and original data are used to train the deep learning model to obtain the target model.

[0003] When the trained model needs to be optimized, a large amount of data needs to be collected from the field again and trained after being marked. However, the cycle of this method of optimizing the model is very long. Summary of the invention

[0004] Based on this, it is necessary to provide a model optimization method, device, system, computer equipment and storage medium that can reduce the cycle of model optimization in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a model optimization method, the method comprising:

[0006] Acquire multiple model parameters and multiple loss functions of the local model sent by the client; the multiple model parameters correspond one-to-one to the multiple loss functions;

[0007] Determine target model parameters according to the local model, multiple loss functions and multiple model parameters;

[0008] The target model parameters are transmitted to the client, so that the client replaces the initial model parameters of the local model with the target model parameters to obtain an optimized local model.

[0009] In one embodiment, determining target model parameters according to the local model, multiple loss functions, and multiple model parameters includes:

[0010] Using each model parameter to replace the initial model parameters of the local model to obtain multiple intermediate models;

[0011] Input the input data in the training sample set into each intermediate model to obtain the output results of each intermediate model;

[0012] The target model parameters are determined based on the output results of each intermediate model, the output results corresponding to the input data, and multiple loss functions.

[0013] In one embodiment, the target model parameters are determined according to the output results of each intermediate model, the output results corresponding to the input data, and a plurality of loss functions, including:

[0014] Calculate the difference between the output result of each intermediate model and the output result corresponding to the input data to obtain multiple differences;

[0015] The model parameters corresponding to the difference being less than or equal to the preset difference threshold and the loss function being less than or equal to the preset loss threshold are determined as the target model parameters.

[0016] In one of the embodiments, the local model includes at least one of a segmentation model, a detection model, and a classification model.

[0017] In a second aspect, an embodiment of the present application provides a model optimization method, the method comprising:

[0018] Sending multiple model parameters and multiple loss functions of the currently used local model to the server to instruct the server to determine the target model parameters according to the local model, the multiple loss functions and the multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond to the multiple loss models one by one;

[0019] The target model parameters are received and the initial model parameters of the local model are replaced with the target model parameters to obtain an optimized local model.

[0020] In one embodiment, the method further comprises:

[0021] Multiple model parameters and multiple loss functions of the local model are obtained according to the test data input by the user on the preset interface.

[0022] In a third aspect, an embodiment of the present application provides a model optimization system, which includes a client and a server, the server is used to execute the steps of the method provided in the first aspect above, and the client is used to execute the steps of the method provided in the second aspect above.

[0023] In a fourth aspect, an embodiment of the present application provides a model optimization device, the device comprising:

[0024] An acquisition module is used to acquire multiple model parameters and multiple loss functions of the local model sent by the client; the model parameters and the loss functions correspond one to one;

[0025] A determination module, used for determining target model parameters according to a local model, a plurality of loss functions and a plurality of model parameters;

[0026] The replacement module is used to transmit the target model parameters to the client, so that the client uses the target model parameters to replace the initial model parameters of the local model to obtain the optimized local model.

[0027] In a fifth aspect, an embodiment of the present application provides a model optimization device, the device comprising:

[0028] A sending module, used to send multiple model parameters and multiple loss functions of the currently used local model to the server, so as to instruct the server to determine the target model parameters according to the local model, the multiple loss functions and the multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond to the multiple loss models one by one;

[0029] The receiving module is used to receive the target model parameters and use the target model parameters to replace the initial model parameters of the local model to obtain an optimized local model.

[0030] In a sixth aspect, an embodiment of the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method provided in the first and second aspects above are implemented.

[0031] The above-mentioned model optimization method, device, system, computer equipment and storage medium, the method obtains multiple model parameters and multiple loss functions of the local model sent by the client; multiple model parameters correspond to multiple loss functions one by one, determine the target model parameters according to the local model, multiple loss functions and multiple model parameters, and transmit the target model parameters to the client, so that the client uses the target model parameters to replace the initial model parameters of the local model to obtain the optimized local model. In this embodiment, the server determines the target model parameters according to the local model, multiple loss functions and multiple model parameters, and the client uses the target model parameters to replace the initial model parameters of the local model in the client to optimize the local model. In this way, the process of optimizing the local model does not need to re-acquire a large amount of training data from the field to train the local model, which can reduce the cycle of optimizing the local model, thereby improving the efficiency of optimizing the local model. In addition, the process of optimizing the local model does not require technical personnel to mark the data, which can reduce the waste of manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of the structure of a model optimization system in one embodiment;

[0033] Figure 2 A schematic diagram of a step flow chart of a model optimization method in an embodiment;

[0034] Figure 3A schematic flow chart of the steps of a model optimization method in another embodiment;

[0035] Figure 4 A schematic flow chart of the steps of a model optimization method in another embodiment;

[0036] Figure 5 A schematic diagram of a step flow chart of a model optimization method in another embodiment;

[0037] Figure 6 is a schematic diagram of a preset interface in an embodiment;

[0038] Figure 7 This is a schematic diagram of an interface corresponding to an identifier of a target detection item in an embodiment;

[0039] Figure 8 A schematic diagram of a step flow chart of a model optimization method in another embodiment;

[0040] Fig. 9 A schematic diagram of the structure of a model optimization device in one embodiment;

[0041] Fig.10 It is a structural schematic diagram of a model optimization device in another embodiment;

[0042] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] Before specifically introducing the technical solutions of the embodiments of the present application, the technical background or technical evolution context on which the embodiments of the present application are based is first introduced. With the rapid development of artificial intelligence, deep learning models are usually used in the classification, segmentation and detection of various traditional Chinese medicine images in the medical field. For the training of deep learning models, a large amount of data is usually collected from the field, labeled by experienced technicians, and then the labeled data and original data are used to train the deep learning model to obtain the final target model, and the target model is engineered and integrated into the user terminal.

[0045] When the target model is used and optimized, a large amount of data needs to be collected from the field again, and the target model needs to be optimized and trained after being marked. However, the process of optimizing the target model involves data collection and retraining, and the cycle is very long. In this regard, the present application provides a model optimization method.

[0046] The following is an introduction to the technical solutions involved in the embodiments of the present application in combination with the scenarios in which the embodiments of the present application are applied.

[0047] The model optimization method provided in this application can be applied to model optimization systems, such as Figure 1 As shown, the model optimization system 10 includes a client 11 and a server 12. The client 11 and the server 12 are connected in communication. The client 11 and the server 12 can be, but are not limited to, various personal computers, laptops, tablet computers, etc.

[0048] In one embodiment, Figure 2 As shown, a model optimization method is provided. This embodiment uses the method applied to the server as an example. In this embodiment, the method includes the following steps:

[0049] Step 200: Obtain multiple model parameters and multiple loss functions of the local model sent by the client; the multiple model parameters correspond one-to-one to the multiple loss functions.

[0050] The local model refers to a model obtained by collecting a large amount of data on site, labeling it through technical personnel, using the labeled data to train the initial deep learning model, and integrating it into the client. This embodiment does not limit the type of local model.

[0051] In one embodiment, the local model includes at least one of a segmentation model, a detection model, and a classification model. The segmentation model refers to performing segmentation processing on the received data. The detection model refers to performing detection processing on the received data to determine whether the medical image contains the target object. The classification model refers to performing classification processing on the received data.

[0052] When the user uses the local model on the client, multiple model parameters and multiple loss functions corresponding to the local model will be generated, and the model parameters and loss functions are one-to-one corresponding. That is to say, when the user inputs a piece of data to be processed into the local model on the client, a model parameter and a loss function corresponding to the local model will be obtained. The client will send the generated multiple model parameters and multiple loss functions of the local model to the client. This embodiment does not limit the specific types of model parameters and loss functions, and the specific method for the server to obtain multiple model parameters and multiple loss functions, as long as its functions can be achieved.

[0053] In an optional embodiment, each time the client generates model parameters and loss functions corresponding to a local model, they are sent to the server in real time. That is, the server can obtain the model parameters and loss functions of the local model in real time, thereby obtaining multiple model parameters and multiple loss functions of the local model within a preset time period.

[0054] In another optional embodiment, after generating a model parameter and a loss function corresponding to a local model, the client stores them in a corresponding memory, and sends the stored multiple model parameters and multiple loss functions to the server after a preset time period, so that the server obtains the multiple model parameters and multiple loss functions.

[0055] In an optional embodiment, the model parameter may be the number of iterations of the model, the activation function of the model, etc.

[0056] Step 210: Determine target model parameters according to the local model, multiple loss functions and multiple model parameters.

[0057] The server also stores a local model. After the client obtains multiple model parameters and multiple loss functions, the server directly determines the target model parameters based on the local model stored in the server, the obtained multiple model parameters and multiple loss functions. In other words, the server determines the optimal model parameters from the multiple model parameters as the target model parameters based on the local model, the multiple model parameters and the multiple loss functions.

[0058] In an optional embodiment, after receiving multiple model parameters and multiple loss functions, the server displays them on the display interface of the server. The technician will compare, analyze and evaluate the model performance of the multiple loss functions and multiple model parameters based on experience, select the optimal model parameters from the multiple model parameters, and determine the target model parameters.

[0059] Step 220: Transmit the target model parameters to the client, so that the client uses the target model parameters to replace the initial model parameters of the local model to obtain an optimized local model.

[0060] After determining the target model parameters, the server will send the target model parameters to the client. After receiving the target model parameters, the client will use the target model parameters to replace the initial model parameters of the local model in the client to optimize the local model and obtain the optimized local model.

[0061] In an optional embodiment, when the client uses the local model, the model parameters of the local model may not change, that is, the initial model parameters of the local model are the model parameters in the initially trained local model.

[0062] The model optimization method provided in the embodiment of the present application obtains multiple model parameters and multiple loss functions of the local model sent by the client; multiple model parameters correspond to multiple loss functions one by one, determine the target model parameters according to the local model, multiple loss functions and multiple model parameters, and transmit the target model parameters to the client, so that the client uses the target model parameters to replace the initial model parameters of the local model to obtain the optimized local model. In this embodiment, the server determines the target model parameters according to the local model, multiple loss functions and multiple model parameters, and the client uses the target model parameters to replace the initial model parameters of the local model in the client to optimize the local model. In this way, the process of optimizing the local model does not need to obtain a large amount of training data from the field to train the local model, which can reduce the cycle of optimizing the local model, thereby improving the efficiency of optimizing the local model. And the process of optimizing the local model does not require the technician to mark the data, which can reduce the waste of manpower and material resources. In addition, in this embodiment, the optimization of the local model is performed on the server, which will not affect the normal use of the client, thereby improving the practicality and reliability of model optimization.

[0063] In one embodiment, Figure 3 As shown, it involves an implementation method of determining target model parameters according to a local model, multiple loss functions and multiple model parameters, and the steps of the implementation method include:

[0064] Step 300: Use each model parameter to replace the initial model parameters of the local model to obtain multiple intermediate models.

[0065] After obtaining multiple model parameters, the server will use each model parameter to replace the initial model parameters in the local model stored in the server, and obtain multiple intermediate models after replacing the local model. Each model parameter corresponds to an intermediate model. In other words, the intermediate model is a model that simply replaces the initial model parameters of the local model with the received model parameters.

[0066] Step 310: Input the input data in the training sample set into each intermediate model to obtain the output results of each intermediate model.

[0067] The training sample set refers to the sample set used when training the local model, that is, a large amount of data collected from the field and the labeled training sample set. The training sample set includes input data, that is, a large amount of data collected from the field.

[0068] After obtaining each intermediate model, the server inputs the input data in the training sample set into each intermediate model respectively, and can obtain the output result of each intermediate model.

[0069] Step 320: Determine the target model parameters according to the output results of each intermediate model, the output results corresponding to the input data, and multiple loss functions.

[0070] The training sample set also includes the output results corresponding to the input data, that is, the data collected by technicians on site and labeled.

[0071] After obtaining the output results of each intermediate model based on the input data, the server determines the target parameters according to the output results of each intermediate model, the output results corresponding to the input data, and multiple loss functions. In other words, the server compares and analyzes the output results of each intermediate model with the output results corresponding to the input data to determine the optimal intermediate model; then the target model parameters are determined based on the model parameters corresponding to the optimal intermediate model and the loss function.

[0072] In this embodiment, the server uses the obtained model parameters to replace the initial model of the local model, and can obtain multiple intermediate models; the input data in the training sample set is input into each intermediate model to obtain the output result of each intermediate model; according to the output result of the intermediate model, the output result corresponding to the input, and multiple loss functions, the target model parameters can be determined. In this way, the server directly uses the training sample set used to train the local model, without the need to re-acquire new training samples, which can reduce the waste of manpower and material resources and improve the efficiency of determining the target model parameters.

[0073] In one embodiment, Figure 4 As shown, it involves an implementation method of determining the target model parameters according to the output results of each intermediate model, the output results corresponding to the input data, and multiple loss functions. The steps of the implementation method include:

[0074] Step 400: Calculate the difference between the output result of each intermediate model and the output result corresponding to the input data to obtain multiple differences.

[0075] After obtaining the output results of each intermediate model, the server compares the output results of each intermediate model with the output results corresponding to the input data, that is, calculates the difference between the output results of each intermediate model and the output results corresponding to the input data to obtain multiple differences. The output results corresponding to the input data are accurate output results manually marked by technicians. By calculating the difference between the output results of each intermediate model and the output results corresponding to the input data, the output results of the intermediate model that are closer to the accurate output results can be determined.

[0076] Step 410: Determine the model parameters corresponding to the difference being less than or equal to the preset difference threshold and the loss function being less than or equal to the preset loss threshold as the target model parameters.

[0077] After calculating the difference between the output results of each intermediate model and the output results corresponding to the input data, the server compares each difference with the preset difference threshold. If the difference is less than or equal to the preset difference threshold, it means that the model parameters of the intermediate model corresponding to the difference are better; if the difference is greater than the preset difference threshold, it means that the model parameters of the intermediate model corresponding to the difference are worse. The server also compares the multiple loss functions received with the preset loss threshold. If the loss function is less than or equal to the preset loss threshold, it means that the model parameters corresponding to the loss function are better; if the loss function is greater than the preset loss threshold, it means that the model parameters corresponding to the loss function are worse. The server determines the model parameters corresponding to the difference less than or equal to the preset difference threshold and the loss function less than or equal to the preset loss threshold as the target model parameters. In other words, the corresponding difference of the target model parameters is less than or equal to the preset difference threshold, and the loss function corresponding to the target model parameters is less than or equal to the preset loss threshold.

[0078] If there are multiple differences that are less than or equal to the preset difference threshold, there are multiple corresponding model parameters. The loss functions corresponding to the multiple model parameters are compared with the preset loss threshold to determine whether the loss functions corresponding to the multiple model parameters are less than or equal to the preset loss threshold. If so, the model parameters whose loss functions are less than or equal to the preset loss threshold are determined as the target model parameters. If not, it means that the multiple model parameters received by the server are not optimal, then the initial model parameters of the local model are determined as the target model parameters.

[0079] If there is a difference that is less than or equal to the preset difference threshold, the loss function of the model parameter corresponding to the difference is compared to see whether it is less than or equal to the preset loss threshold; if so, the model parameter is determined as the target model parameter; if not, the initial model parameters of the local model are determined as the target model parameters.

[0080] If the differences are all greater than the preset difference threshold, or the loss functions are all greater than the preset loss threshold, the initial model parameters of the local model are directly determined as the target model parameters.

[0081] In this embodiment, the server determines the target model parameters by calculating the difference between the output results of each intermediate model and the output results corresponding to the input data, and by comparing the difference with a preset difference threshold, and the loss function with a preset loss threshold. This method of determining the target model parameters is simple, fast, and easy to implement.

[0082] In an optional embodiment, the model optimization method further includes:

[0083] If the differences are all greater than the preset difference threshold, or the loss functions are all greater than the preset loss threshold, a notification message is sent to the client so that the client will not modify the initial model parameters of the local model based on the notification message; the notification message is used to inform the client that the target model parameters have not been determined.

[0084] See also Figure 5 In one embodiment of the present application, a model optimization method is provided. In this embodiment, the method is applied to a client for illustration. In this embodiment, the method includes the following steps:

[0085] Step 500: Send multiple model parameters and multiple loss functions of the currently used local model to the server to instruct the server to determine the target model parameters based on the local model, multiple loss functions and multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond one-to-one to the multiple loss models.

[0086] The client sends multiple model parameters and multiple loss functions generated in the process of using the local model to the server. The client can send the model parameters and loss functions to the server in real time, or store the generated multiple model parameters and multiple loss functions in a corresponding memory first, and send the stored multiple model parameters and multiple loss functions to the server after a preset time period.

[0087] After receiving the multiple model parameters and the multiple loss functions, the server determines the target model parameters according to the local model, the multiple loss functions and the multiple model parameters stored in the server. For the description of the server determining the target model parameters according to the local model, the multiple loss functions and the multiple model parameters, reference can be made to the specific description in the above embodiment, which will not be repeated here.

[0088] Step 510: Receive target model parameters, and use the target model parameters to replace initial model parameters of the local model to obtain an optimized local model.

[0089] After receiving the target model parameters, the client uses the target model parameters to replace the initial model parameters of the local model, optimizes the local model, and obtains the optimized local model.

[0090] The model optimization method provided in the embodiment of the present application sends multiple model parameters and multiple loss functions of the currently used local model to the server to instruct the server to determine the target model parameters according to the local model, multiple loss functions and multiple model parameters, and transmit the target model parameters to the client. Receive the target model parameters, and use the target model parameters to replace the initial model parameters of the local model to obtain the optimized local model. In this embodiment, the server determines the target model parameters according to the local model, multiple loss functions and multiple model parameters, and the client uses the target model parameters to replace the initial model parameters of the local model in the client to optimize the local model. In this way, the process of optimizing the local model does not need to obtain a large amount of training data from the scene to train the local model, which can reduce the cycle of optimizing the local model, thereby improving the efficiency of optimizing the local model. In addition, the process of optimizing the local model does not require the technician to mark the data, which can reduce the waste of manpower and material resources. In addition, in this embodiment, the optimization of the local model is performed on the server, which will not affect the normal use of the client, thereby improving the practicality and reliability of the model optimization.

[0091] In one embodiment, the model optimization method further includes:

[0092] Multiple model parameters and multiple loss functions of the local model are obtained according to the test data input by the user on the preset interface.

[0093] The preset interface refers to the interface that the client displays to the user when using the local model. Test data is data that needs to be processed by the local model. The user performs input operations on the preset interface and inputs test data. The client responds to the input operation and obtains multiple model parameters and multiple loss functions of the local model.

[0094] In an optional embodiment, when the model optimization method of this embodiment is applied to the medical field, the test data input by the user refers to the medical image to be processed. Specifically, the user selects the medical image to be processed in the preset interface. The preset interface is as follows: Figure 6 As shown, the preset interface includes multiple medical images corresponding to the examination items, the identifier of the examination item (StudyInstanceUID), and the time corresponding to the identifier of the examination item (StudyInstanceUID). The user selects the identifiers of the multiple examination items on the preset interface to determine the identifier of the target examination item. In response to the selection operation, the client displays the interface corresponding to the identifier of the target examination item. Figure 7As shown, the interface corresponding to the identifier of the target examination item includes identifiers of multiple sub-examination items corresponding to the target examination item, time corresponding to the sub-examination item, and sub-examination items. The user selects multiple sub-examination items in the interface corresponding to the identifier of the target examination item to obtain a medical image to be processed.

[0095] In an optional embodiment, after obtaining the medical image to be processed, the client will pre-process the image to be processed according to a preset rule to obtain a processed medical image.

[0096] The process of preprocessing the image to be processed by the client includes: obtaining the pixel value, row information and column information of the medical image to be processed; resampling, resizing and normalizing the medical image to be processed according to the row information and column information.

[0097] See also Figure 8 , an embodiment of the present application provides a model optimization method, the steps of the method include:

[0098] Step 800: The client obtains multiple model parameters and multiple loss functions of the local model according to the test data input by the user on the preset interface; and sends the multiple model parameters and multiple loss functions to the server; wherein the multiple model parameters correspond to the multiple loss functions one by one;

[0099] Step 810: The server uses each model parameter to replace the initial model parameter of the local model to obtain multiple intermediate models;

[0100] Step 820: The server inputs the input data in the training sample set into each intermediate model to obtain the output result of each intermediate model;

[0101] Step 830: The server calculates the difference between the output results of each intermediate model and the output results corresponding to the input data to obtain multiple differences;

[0102] Step 840: The server determines the model parameters corresponding to the difference being less than or equal to the preset difference threshold and the loss function being less than or equal to the preset loss threshold as the target model parameters, and transmits the target model to the client;

[0103] Step 850: The client uses the target model parameters to replace the initial model parameters of the local model to obtain an optimized local model.

[0104] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0105] Based on the same inventive concept, the embodiment of the present application also provides a model optimization device for implementing the model optimization method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more model optimization device embodiments provided below can refer to the limitations on the model optimization method above, and will not be repeated here.

[0106] In one embodiment, Fig. 9 As shown, a model optimization device 20 is provided, comprising: an acquisition module 21, a determination module 22 and a replacement module 23, wherein:

[0107] The acquisition module 21 is used to obtain multiple model parameters and multiple loss functions of the local model sent by the client; the model parameters and the loss functions correspond one to one.

[0108] The determination module 22 is used to determine the target model parameters according to the local model, multiple loss functions and multiple model parameters.

[0109] The replacement module 23 is used to transmit the target model parameters to the client, so that the client uses the target model parameters to replace the initial model parameters of the local model to obtain the optimized local model.

[0110] In one embodiment, the determination module 22 includes a replacement unit, a result determination unit, and a parameter determination unit. The replacement unit is used to replace the initial model parameters of the local model with each model parameter to obtain multiple intermediate models; the result determination unit is used to input the input data in the training sample set into each intermediate model to obtain the output result of each intermediate model; the parameter determination unit is used to determine the target model parameters according to the output results of each intermediate model, the output results corresponding to the input data, and multiple loss functions.

[0111] In one embodiment, the parameter determination unit is specifically used to calculate the difference between the output results of each intermediate model and the output results corresponding to the input data to obtain multiple differences; the model parameters corresponding to the difference being less than or equal to a preset difference threshold and the loss function being less than or equal to the preset loss threshold are determined as target model parameters.

[0112] In one embodiment, the local model includes at least one of a segmentation model, a detection model, and a classification model.

[0113] In one embodiment, Fig.10 As shown, a model optimization device 30 is provided, comprising: a sending module 31 and a receiving module 32, wherein:

[0114] A sending module 31 is used to send multiple model parameters and multiple loss functions of the currently used local model to the server, so as to instruct the server to determine the target model parameters according to the local model, the multiple loss functions and the multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond to the multiple loss models one by one;

[0115] The receiving module 32 is used to receive the target model parameters and use the target model parameters to replace the initial model parameters of the local model to obtain an optimized local model.

[0116] In one embodiment, the model optimization device 30 further includes an acquisition module. The acquisition module is used to acquire multiple model parameters and multiple loss functions of the local model according to the test data input by the user on the preset interface.

[0117] Each module in the above-mentioned model optimization device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0118] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a model optimization method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0119] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0120] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0121] Obtain multiple model parameters and multiple loss functions of the local model sent by the client; the multiple model parameters correspond to the multiple loss functions one by one;

[0122] Determine target model parameters according to the local model, multiple loss functions and multiple model parameters;

[0123] The target model parameters are transmitted to the client, so that the client replaces the initial model parameters of the local model with the target model parameters to obtain an optimized local model.

[0124] In one embodiment, when the processor executes the computer program, the following steps are also implemented: using each model parameter to replace the initial model parameters of the local model to obtain multiple intermediate models; inputting the input data in the training sample set into each intermediate model to obtain the output result of each intermediate model; determining the target model parameters based on the output results of each intermediate model, the output results corresponding to the input data, and multiple loss functions.

[0125] In one embodiment, when the processor executes the computer program, the following steps are also implemented: calculating the difference between the output results of each intermediate model and the output results corresponding to the input data to obtain multiple differences; and determining the model parameters corresponding to the difference being less than or equal to a preset difference threshold and the loss function being less than or equal to the preset loss threshold as the target model parameters.

[0126] In one embodiment, the local model includes at least one of a segmentation model, a detection model, and a classification model.

[0127] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0128] Sending multiple model parameters and multiple loss functions of the currently used local model to the server to instruct the server to determine the target model parameters according to the local model, the multiple loss functions and the multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond to the multiple loss models one by one;

[0129] The target model parameters are received and the initial model parameters of the local model are replaced with the target model parameters to obtain an optimized local model.

[0130] In one embodiment, when the processor executes the computer program, it also implements the following steps: obtaining multiple model parameters and multiple loss functions of the local model according to the test data input by the user on the preset interface.

[0131] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0132] Obtain multiple model parameters and multiple loss functions of the local model sent by the client; the multiple model parameters correspond to the multiple loss functions one by one;

[0133] Determine target model parameters according to the local model, multiple loss functions and multiple model parameters;

[0134] The target model parameters are transmitted to the client, so that the client replaces the initial model parameters of the local model with the target model parameters to obtain an optimized local model.

[0135] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using each model parameter to replace the initial model parameters of the local model to obtain multiple intermediate models; inputting the input data in the training sample set into each intermediate model to obtain the output result of each intermediate model; determining the target model parameters based on the output results of each intermediate model, the output results corresponding to the input data, and multiple loss functions.

[0136] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the difference between the output results of each intermediate model and the output results corresponding to the input data is calculated to obtain multiple differences; the model parameters corresponding to the difference being less than or equal to a preset difference threshold and the loss function being less than or equal to the preset loss threshold are determined as target model parameters.

[0137] In one embodiment, the local model includes at least one of a segmentation model, a detection model, and a classification model.

[0138] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0139] Sending multiple model parameters and multiple loss functions of the currently used local model to the server to instruct the server to determine the target model parameters according to the local model, the multiple loss functions and the multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond to the multiple loss models one by one;

[0140] The target model parameters are received and the initial model parameters of the local model are replaced with the target model parameters to obtain an optimized local model.

[0141] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: multiple model parameters and multiple loss functions of the local model are obtained according to the test data input by the user on the preset interface.

[0142] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0143] Obtain multiple model parameters and multiple loss functions of the local model sent by the client; the multiple model parameters correspond to the multiple loss functions one by one;

[0144] Determine target model parameters according to the local model, multiple loss functions and multiple model parameters;

[0145] The target model parameters are transmitted to the client, so that the client replaces the initial model parameters of the local model with the target model parameters to obtain an optimized local model.

[0146] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using each model parameter to replace the initial model parameters of the local model to obtain multiple intermediate models; inputting the input data in the training sample set into each intermediate model to obtain the output result of each intermediate model; determining the target model parameters based on the output results of each intermediate model, the output results corresponding to the input data, and multiple loss functions.

[0147] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: the difference between the output results of each intermediate model and the output results corresponding to the input data is calculated to obtain multiple differences; the model parameters corresponding to the difference being less than or equal to a preset difference threshold and the loss function being less than or equal to the preset loss threshold are determined as target model parameters.

[0148] In one embodiment, the local model includes at least one of a segmentation model, a detection model, and a classification model.

[0149] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0150] Sending multiple model parameters and multiple loss functions of the currently used local model to the server to instruct the server to determine the target model parameters according to the local model, the multiple loss functions and the multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond to the multiple loss models one by one;

[0151] The target model parameters are received and the initial model parameters of the local model are replaced with the target model parameters to obtain an optimized local model.

[0152] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: multiple model parameters and multiple loss functions of the local model are obtained according to the test data input by the user on the preset interface.

[0153] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0154] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0155] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A model optimization method, It is characterized in that The method comprises: Acquire multiple model parameters and multiple loss functions of the local model sent by the client; the multiple model parameters correspond one to one with the multiple loss functions; Determining target model parameters according to the local model, the multiple loss functions and the multiple model parameters; The target model parameters are transmitted to the client, so that the client uses the target model parameters to replace the initial model parameters of the local model to obtain an optimized local model.

2. The method according to claim 1, It is characterized in that The step of determining target model parameters according to the local model, the multiple loss functions and the multiple model parameters comprises: Using each of the model parameters to replace the initial model parameters of the local model to obtain multiple intermediate models; Inputting the input data in the training sample set into each of the intermediate models to obtain the output results of each of the intermediate models; The target model parameters are determined according to the output results of each of the intermediate models, the output results corresponding to the input data, and the multiple loss functions.

3. The method according to claim 2, It is characterized in that Determining the target model parameters according to the output results of each of the intermediate models, the output results corresponding to the input data, and the multiple loss functions includes: Calculating the difference between the output result of each intermediate model and the output result corresponding to the input data to obtain a plurality of differences; The model parameters corresponding to the difference being less than or equal to a preset difference threshold and the loss function being less than or equal to a preset loss threshold are determined as the target model parameters.

4. The method according to any one of claims 1 to 3, It is characterized in that The local model includes at least one of a segmentation model, a detection model and a classification model.

5. A model optimization method, It is characterized in that The method comprises: Sending multiple model parameters and multiple loss functions of the currently used local model to the server to instruct the server to determine target model parameters according to the local model, the multiple loss functions and the multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond one-to-one to the multiple loss models; The target model parameters are received, and the initial model parameters of the local model are replaced with the target model parameters to obtain an optimized local model.

6. The method according to claim 5, It is characterized in that The method further comprises: The multiple model parameters and the multiple loss functions of the local model are obtained according to the test data input by the user on the preset interface.

7. A model optimization system, It is characterized in that The system comprises a client and a server, wherein the server is used to execute the steps of the method according to any one of claims 1 to 4, and the client is used to execute the steps of the method according to claims 5 and 6.

8. A model optimization device, It is characterized in that The device comprises: An acquisition module, used to acquire multiple model parameters and multiple loss functions of the local model sent by the client; the model parameters and the loss functions correspond one to one; A determination module, configured to determine target model parameters according to the local model, the plurality of loss functions and the plurality of model parameters; A replacement module is used to transmit the target model parameters to the client, so that the client uses the target model parameters to replace the initial model parameters of the local model to obtain an optimized local model.

9. A model optimization device, It is characterized in that The device comprises: A sending module, used to send multiple model parameters and multiple loss functions of the currently used local model to the server, so as to instruct the server to determine the target model parameters according to the local model, the multiple loss functions and the multiple model parameters, and transmit the target model parameters to the client; wherein the multiple model parameters correspond to the multiple loss models one by one; The receiving module is used to receive the target model parameters and use the target model parameters to replace the initial model parameters of the local model to obtain an optimized local model.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.