Training method, device, equipment and storage medium for temperature measurement model

Through local training and server-side processing methods on the client, the problem of difficulty in collecting temperature measurement data in multiple scenarios is solved, the accuracy and data security of the temperature measurement model are improved, and the implementation of the multi-scenario Joint training.

CN112036504BActive Publication Date: 2024-12-20PINGAN INT SMART CITY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010970862.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-15
Publication Date
2024-12-20
Estimated Expiration
2040-09-15

AI Technical Summary

Technical Problem

Existing infrared temperature measurement products are difficult to collect temperature measurement data in multiple scenarios, resulting in low model training accuracy and insufficient data security.

Method used

The initial model parameters are obtained from the server side through multiple clients, and the model is trained according to the pre-built local training set to obtain the initial model, and these initial model parameters are processed on the server side to obtain the average parameters. After judging that the model converges, the client adjusts the Model to improve temperature measurement accuracy and data security.

Benefits of technology

The measurement accuracy and data security of the temperature measurement model are improved, data sharing between different clients is avoided, and prediction accuracy and robustness of the model are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112036504B_ABST
    Figure CN112036504B_ABST
Patent Text Reader

Abstract

The present application relates to the field of model construction, and specifically discloses a training method, device, equipment and storage medium for a temperature measurement model, wherein the method comprises: a plurality of clients obtain initial model parameters from a server, and perform model training according to a pre-constructed local training set to obtain a plurality of initial models, wherein the local training set is a feature vector including environmental information; the server receives initial model parameters corresponding to the initial models sent by the plurality of clients, and processes the plurality of initial model parameters to obtain an average parameter; the server sends the average parameter to each client, and determines whether the plurality of initial models converge respectively; if the initial models converge, the client adjusts the initial model according to the average parameter to obtain a temperature measurement model. Joint training is performed based on temperature measurement data in a plurality of scenarios to improve data security and the measurement accuracy of the temperature measurement model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of model training, and in particular to a training method, device, equipment and storage medium for a temperature measurement model. Background Art

[0002] With the development of artificial intelligence, deep learning and machine learning have gradually been applied to human infrared temperature measurement products. Since there are many factors that affect the accuracy of human infrared temperature measurement, and the temperature measurement data that can be collected by a single-point infrared temperature measurement product is single-scene and has few temperature measurement data samples, the temperature measurement accuracy of the trained temperature measurement model is low. However, if temperature measurement data in all scenarios is to be collected, not only will the workload be large, but it will also involve some privacy issues and low data security.

[0003] Therefore, how to conduct joint training based on temperature measurement data in multiple scenarios to improve data security and the measurement accuracy of the temperature measurement model has become an urgent problem to be solved. Summary of the invention

[0004] The present application provides a training method, apparatus, device and storage medium for a temperature measurement model, so as to perform joint training based on temperature measurement data in multiple scenarios, so as to improve data security and improve the measurement accuracy of the temperature measurement model.

[0005] In a first aspect, the present application provides a method for training a temperature measurement model, the method comprising:

[0006] Multiple clients obtain model initial parameters from a server, and perform model training according to a pre-built local training set to obtain multiple initial models, wherein the local training set is a feature vector including environmental information; the server receives initial model parameters corresponding to the initial models sent by the multiple clients, and processes the multiple initial model parameters to obtain average parameters; the server sends the average parameters to each client, and determines whether the multiple initial models converge; if the initial models converge, the client adjusts the initial model according to the average parameters to obtain a temperature measurement model.

[0007] In a second aspect, the present application also provides a training device for a temperature measurement model, the device comprising:

[0008] An initial training module is used for multiple clients to obtain initial model parameters from a server, and to perform model training according to a pre-built local training set to obtain multiple initial models, wherein the local training set is a feature vector including environmental information; a parameter processing module is used for the server to receive initial model parameters corresponding to the initial models sent by multiple clients, and to process the multiple initial model parameters to obtain average parameters; a convergence judgment module is used for the server to send the average parameters to each client respectively, and to judge whether the multiple initial models have converged respectively; a model adjustment module is used for, if the initial models have all converged, the client to adjust the initial model according to the average parameters to obtain a temperature measurement model.

[0009] In a third aspect, the present application also provides a computer device, comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the training method of the temperature measurement model as described above when executing the computer program.

[0010] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the training method of the temperature measurement model as described above.

[0011] The present application discloses a training method, device, equipment and storage medium for a temperature measurement model. The method uses multiple clients to obtain the initial parameters of the model from the server, and performs model training according to a pre-constructed local training set to obtain multiple initial models, wherein the local training set is a feature vector including environmental information; the server receives the initial model parameters corresponding to the initial models sent by the multiple clients, and processes the multiple initial model parameters to obtain an average parameter; the server sends the average parameter to each client, and determines whether the multiple initial models converge; if the initial models converge, the client adjusts the initial model according to the average parameter to obtain a temperature measurement model. Since the model training process occurs locally on each client, the local training set of each client is not shared with other clients, which improves data security and reliability. At the same time, joint training is performed based on the temperature measurement data of multiple clients, thereby improving the accuracy of the obtained temperature measurement model for temperature measurement. And the training set used to train the initial model includes environmental information, which improves the prediction accuracy of the trained initial model. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0013] Figure 1 is a schematic flow chart of a method for training a temperature measurement model provided in an embodiment of the present application;

[0014] Figure 2 is a schematic flow chart of another method for training a temperature measurement model provided in an embodiment of the present application;

[0015] Figure 3 is a schematic block diagram of a training device for a temperature measurement model provided in an embodiment of the present application;

[0016] Figure 4 is a schematic block diagram of another temperature measurement model training device provided in an embodiment of the present application;

[0017] Figure 5 A schematic block diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0019] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0020] It should be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0021] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0022] The embodiments of the present application provide a method, device, computer equipment and storage medium for training a temperature measurement model. The method for training a temperature measurement model can be used to train a temperature measurement model, thereby improving the measurement accuracy of the trained temperature measurement model, thereby improving the convenience and accuracy of temperature measurement.

[0023] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0024] See also Figure 1 , Figure 1 The present invention is a schematic flow chart of a method for training a temperature measurement model provided in an embodiment of the present invention. The method for training a temperature measurement model jointly trains the temperature measurement model on the temperature measurement data of multiple clients to improve the measurement accuracy of the trained temperature measurement model.

[0025] like Figure 1 As shown, the training method of the temperature measurement model specifically includes: steps S101 to S104.

[0026] S101. Multiple clients obtain initial model parameters from a server, and perform model training according to a pre-built local training set to obtain multiple initial models.

[0027] The client refers to a local temperature measurement client, and multiple local temperature measurement clients obtain model initialization parameters from the server, and perform model training according to a pre-built local training set to obtain multiple initial models, wherein the local training set can be a feature vector including environmental information. In the specific implementation process, for example, an integrated learning algorithm (Gradient boosting regression) can be used for model training.

[0028] Among them, during training, each local temperature measurement client can perform model training according to its own locally constructed training set. That is, the training samples of the local training sets used by different local temperature measurement clients can be the same or different, but the structure and data format of the local training sets used by different local temperature measurement clients are the same.

[0029] Since the initial model training is performed on each local temperature measurement client, each local temperature measurement client does not need to communicate and share the training set with other clients during model training, thereby improving data security and reliability. In addition, environmental information is added to the feature vector, and model training is performed based on the feature vector including environmental information, which reduces the influence of environmental information on the initial model obtained by training and improves the prediction accuracy of the initial model obtained by training.

[0030] In some embodiments, when each client performs training of the initial model, it can determine whether the model has been trained by calculating the loss function of the initial model.

[0031] S102: The server receives initial model parameters corresponding to the initial models sent by the multiple clients, and processes the multiple initial model parameters to obtain average parameters.

[0032] Each local temperature measurement client can train an initial model based on its own local training set. After the initial model training is completed, each local temperature measurement client sends the model parameters of the initial model trained by itself to the server. After receiving the initial model parameters sent by each client, the server processes multiple initial model parameters to obtain average parameters. The processing may include multiple methods, such as calculating the average value of parameters.

[0033] In some embodiments, the processing of the multiple initial model parameters includes: performing weighted averaging processing on the multiple initial model parameters.

[0034] For multiple initial model parameters sent by multiple clients, when using the weighted average algorithm to calculate the average parameter, the weights of the multiple clients can be adjusted to improve the accuracy of the final average parameter. For example, the client with a large amount of data in the local training set can be adjusted to a higher weight, while the client with a small amount of data in the local training set can be adjusted to a lower weight.

[0035] S103: The server sends the average parameter to each client, and determines whether the multiple initial models converge.

[0036] After calculating the average parameters, the server can send the calculated average parameters to each client respectively, and judge the convergence state of the initial model trained by each local temperature measurement client.

[0037] When judging whether the initial models trained by each local temperature measurement client have converged, a variety of methods can be used to judge the status of the initial models, such as calculating the loss function of each initial model separately, or judging by the number of iterative training of each initial model.

[0038] In some embodiments, the determining whether the multiple initial models have converged includes: determining whether the number of iterations of the initial model has reached a preset number; if the number of iterations of the initial model has reached the preset number, determining that the initial model has converged.

[0039] The server may set a preset number of times, which indicates the number of iterations required for the initial model. Only when the number of iterative training of the initial model reaches the preset number of times, the initial model is considered to have converged.

[0040] For the initial models trained by multiple local temperature measurement clients respectively, the same preset number of times can be used for judgment, and when judging whether the initial model converges, each initial model needs to be judged separately.

[0041] S104: If the initial models are all converged, the client adjusts the initial models according to the average parameters to obtain a temperature measurement model.

[0042] When the initial model trained by each local temperature measurement client is judged to be converged by the server, the client adjusts the initial model parameters of the initial model according to the received average parameters, and uses the model after parameter adjustment as the temperature measurement model. The client can measure the temperature according to the temperature measurement model.

[0043] The training method of the temperature measurement model provided in the above embodiment obtains the initial parameters of the model from the server side by using multiple clients, and performs model training according to a pre-built local training set to obtain multiple initial models; the server side receives the initial model parameters corresponding to the initial models sent by the multiple clients, and processes the multiple initial model parameters to obtain average parameters; the server side sends the average parameters to each client side respectively, and judges whether the multiple initial models converge respectively; if the initial models converge, the client side adjusts the initial model according to the average parameters to obtain the temperature measurement model. Since the model training process occurs locally on each client side, the local training set of each client side is not shared with other clients, which improves data security and reliability. At the same time, joint training is performed based on the temperature measurement data of multiple clients, thereby improving the accuracy of the obtained temperature measurement model for temperature measurement.

[0044] See also Figure 2 , Figure 2 It is a schematic flow chart of another method for training a temperature measurement model provided in an embodiment of the present application.

[0045] like Figure 2 As shown, the training method of the temperature measurement model specifically includes: steps S201 to S208.

[0046] S201. The client obtains a local temperature measurement image and temperature information corresponding to the local temperature measurement image.

[0047] The local temperature measurement client can use an infrared camera to obtain a human infrared temperature measurement data image, use the obtained human infrared temperature measurement data image as a local temperature measurement image, and record the temperature information obtained by measuring the human infrared temperature measurement data image.

[0048] S202: The client performs feature extraction on the local temperature measurement image to obtain a feature vector corresponding to the local temperature measurement image.

[0049] When extracting features from local temperature measurement images, a deep learning model can be used to extract features, extract high-dimensional features from the local temperature measurement images, and use a set of high-dimensional arrays to present the abstract structure of the object to be measured in the image, that is, the human body. For example, the deep learning model can be resnet50.

[0050] In some embodiments, before extracting features from the local temperature measurement image, the method further includes: the client preprocessing the local temperature measurement image.

[0051] The preprocessing may include at least one of image enhancement and image normalization. The local temperature measurement image is preprocessed to eliminate irrelevant information in the image, filter out interference and noise, enhance the detectability of available information and simplify data, thereby improving the reliability of feature extraction.

[0052] S203. Add environmental information corresponding to the local temperature measurement image to the feature vector to obtain a target feature vector, and save the target feature vector and the temperature information corresponding to the local temperature measurement image to obtain a local training set.

[0053] The environmental information when the local temperature measurement image is collected is obtained, and the environmental information is added to the feature vector to obtain the target feature vector. The temperature information corresponding to the local temperature measurement image is used as the label value, and is saved in the local database in a one-to-one correspondence with the target feature vector of the same local temperature measurement image to construct a local training set.

[0054] For each local temperature measurement client, a local training set can be constructed based on the above method. The data of the training set is stored locally, and there is no need to transfer sample data between multiple local temperature measurement clients, which improves data security.

[0055] In some embodiments, before saving the feature vector and the temperature information corresponding to the local temperature measurement image, the method also includes: the client performs a dimensionality reduction operation on the feature vector to obtain a feature vector after dimensionality reduction; the client obtains environmental information when the local temperature measurement image is collected, and adds the environmental information to the feature vector after dimensionality reduction to obtain a target feature vector.

[0056] After extracting features from the local temperature measurement image and obtaining the high-dimensional features of the image, in order to reduce the number of predictive variables and ensure the independence between variables, the feature vector can be reduced in dimension. When reducing the dimension, the PCA model can be used for dimensionality reduction. Of course, other dimensionality reduction methods can also be used, such as Lasso, wavelet analysis, LDA, etc.

[0057] The environmental information includes air humidity, room temperature, measurement angle and measurement distance. Since the accuracy of human infrared temperature measurement is greatly affected by factors such as air humidity, room temperature, measurement angle and measurement distance, these variables will affect the temperature measured by the infrared camera. Since the locations and times at which each local client collects images are different, the environmental information of the collected local temperature measurement images may also be different. Therefore, the environmental information is added to the feature vector after dimensionality reduction. When each client uses the target feature vector to train the initial model, the model trained by each client has better robustness.

[0058] S204. Multiple clients obtain initial model parameters from the server, and perform model training according to a pre-built local training set to obtain multiple initial models.

[0059] The client refers to a local temperature measurement client. Multiple local temperature measurement clients respectively obtain model initialization parameters from the server, and perform model training according to a pre-built local training set to obtain multiple initial models.

[0060] S205. The server receives initial model parameters corresponding to the initial models sent by the multiple clients, and processes the multiple initial model parameters to obtain average parameters.

[0061] Each local temperature measurement client can train an initial model based on its own local training set. After the initial model training is completed, each local temperature measurement client sends the model parameters of its trained initial model to the server. After receiving the initial model parameters sent by each client, the server processes multiple initial model parameters to obtain the average parameters.

[0062] S206: The server sends the average parameter to each client, and determines whether the multiple initial models converge.

[0063] After calculating the average parameters, the server can send the calculated average parameters to each client respectively, and judge the convergence state of the initial model trained by each local temperature measurement client.

[0064] S207: If the initial models are all converged, the client adjusts the initial models according to the average parameters to obtain a temperature measurement model.

[0065] When the initial model trained by each local temperature measurement client is judged to be converged by the server, the client adjusts the initial model parameters of the initial model according to the received average parameters, and uses the model after parameter adjustment as the temperature measurement model.

[0066] S208: If at least one of the initial models does not converge, the client continues model training according to the average parameter.

[0067] If the server determines that at least one of the initial models has not converged, each client continues to train the model based on the average parameters sent by the server.

[0068] That is, the local temperature measurement client uses the average parameter as the model parameter and uses the local training set to iteratively train the model. After the model training of each local temperature measurement client is completed, the trained parameters are sent to the server again. The server again determines whether the retrained model has converged until it is determined that the initial model has converged.

[0069] The training method of the temperature measurement model provided in the above embodiment is to construct a local training set including environmental information when collecting local temperature measurement images through the client, perform model training, and obtain multiple initial models; the server receives the initial model parameters corresponding to the initial models sent by the multiple clients, and processes the multiple initial model parameters to obtain average parameters; the server sends the average parameters to each client, and judges whether the multiple initial models converge respectively; if the initial models converge, the client adjusts the initial model according to the average parameters to obtain the temperature measurement model. On the basis of improving data security and reliability, the model training is performed using environmental information, so that the initial model obtained by training has better robustness. And the average parameters are calculated by the server, and the average parameters are used as model parameters when all initial models converge, which also increases the amount of sample data of the model during the training process, and performs joint training according to the temperature measurement data of multiple clients, thereby improving the accuracy of the obtained temperature measurement model for temperature measurement.

[0070] See also Figure 3 , Figure 3 The embodiment of the present application also provides a schematic block diagram of a training device for a temperature measurement model, and the training device for the temperature measurement model is used to execute the training method for the temperature measurement model described above. The training device for the temperature measurement model can be configured in a server or a terminal.

[0071] The server may be an independent server or a server cluster. The terminal may be an electronic device such as a mobile phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, a wearable device, etc.

[0072] like Figure 3 As shown, the temperature measurement model device 300 includes: an initial training module 301 , a parameter processing module 302 , a convergence judgment module 303 and a model adjustment module 304 .

[0073] The initial training module 301 is used for multiple clients to obtain initial model parameters from the server, and perform model training according to a pre-built local training set to obtain multiple initial models. The local training set is a feature vector including environmental information.

[0074] The parameter processing module 302 is used for receiving, at the server side, initial model parameters corresponding to the initial models sent by the multiple clients, and processing the multiple initial model parameters to obtain average parameters.

[0075] The convergence judgment module 303 is used for the server to send the average parameters to each client and judge whether the multiple initial models converge.

[0076] The model adjustment module 304 is used for adjusting the initial model according to the average parameter by the client to obtain a temperature measurement model if the initial models are converged.

[0077] Please refer to 4, Figure 4 It is a schematic block diagram of another training device for a temperature measurement model provided in an embodiment of the present application.

[0078] like Figure 4 As shown, the temperature measurement model device 400 includes: an image acquisition module 401, a feature extraction module 402, an information storage module 403, an initial training module 404, a parameter processing module 405, a convergence judgment module 406, a model adjustment module 407 and a continuous training module 408.

[0079] The image acquisition module 401 is used for the client to acquire a local temperature measurement image and temperature information corresponding to the local temperature measurement image.

[0080] In the feature extraction module 402 , the client performs feature extraction on the local temperature measurement image to obtain a feature vector corresponding to the local temperature measurement image.

[0081] Information saving module 403, the client saves the feature vector and the temperature information corresponding to the local temperature measurement image to obtain a local training set.

[0082] The initial training module 404 is used for multiple clients to obtain initial model parameters from the server, and perform model training according to a pre-built local training set to obtain multiple initial models. The local training set is a feature vector including environmental information.

[0083] The parameter processing module 405 is used for receiving, at the server side, initial model parameters corresponding to the initial models sent by the multiple clients, and processing the multiple initial model parameters to obtain average parameters.

[0084] The convergence judgment module 406 is used for the server to send the average parameter to each client and judge whether the multiple initial models are converged.

[0085] The model adjustment module 407 is used for adjusting the initial model according to the average parameter by the client to obtain a temperature measurement model if the initial models are converged.

[0086] The continuing training module 408 is used for the client to continue model training according to the average parameter if at least one of the initial models does not converge.

[0087] It should be noted that technical personnel in the relevant field can clearly understand that for the convenience and conciseness of description, the specific working process of the training device of the temperature measurement model and each module described above can refer to the corresponding process in the aforementioned training method embodiment of the temperature measurement model, and will not be repeated here.

[0088] The training device for the temperature measurement model can be implemented in the form of a computer program. Figure 5 Runs on the computer device shown.

[0089] See also Figure 5 , Figure 5 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device may be a server or a terminal.

[0090] See also Figure 5 The computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0091] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any training method of the temperature measurement model.

[0092] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0093] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any training method of the temperature measurement model.

[0094] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that Figure 5 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.

[0095] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0096] In one embodiment, the processor is used to run a computer program stored in the memory to implement the following steps:

[0097] Multiple clients obtain model initial parameters from a server, and perform model training according to a pre-built local training set to obtain multiple initial models, wherein the local training set is a feature vector including environmental information; the server receives initial model parameters corresponding to the initial models sent by the multiple clients, and processes the multiple initial model parameters to obtain average parameters; the server sends the average parameters to each client, and determines whether the multiple initial models converge; if the initial models converge, the client adjusts the initial model according to the average parameters to obtain a temperature measurement model.

[0098] In one embodiment, the processor is configured to implement: if at least one of the initial models does not converge, the client continues to perform model training according to the average parameter.

[0099] In one embodiment, the processor is used to implement: the client obtains a local temperature measurement image and temperature information corresponding to the local temperature measurement image; the client performs feature extraction on the local temperature measurement image to obtain a feature vector corresponding to the local temperature measurement image; the environmental information corresponding to the local temperature measurement image is added to the feature vector to obtain a target feature vector, and the target feature vector and the temperature information corresponding to the local temperature measurement image are saved to obtain a local training set.

[0100] In one embodiment, before implementing the feature extraction of the local temperature measurement image, the processor is used to implement: the client preprocesses the local temperature measurement image, wherein the preprocessing may include at least one of image enhancement and image normalization.

[0101] In one embodiment, when the processor implements the step of adding the environmental information corresponding to the local temperature measurement image to the feature vector to obtain the target feature vector, it is used to implement: the client performs a dimensionality reduction operation on the feature vector to obtain the feature vector after dimensionality reduction; the client obtains the environmental information when the local temperature measurement image is collected, and adds the environmental information to the feature vector after dimensionality reduction to obtain the target feature vector.

[0102] In one embodiment, when implementing the processing of the multiple initial model parameters, the processor is used to implement: performing weighted averaging processing on the multiple initial model parameters.

[0103] In one embodiment, when implementing the determination of whether the multiple initial models have converged, the processor is used to: determine whether the number of iterations of the initial model has reached a preset number; if the number of iterations of the initial model has reached the preset number, determine that the initial model has converged.

[0104] A computer-readable storage medium is also provided in an embodiment of the present application, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and the processor executes the program instructions to implement any temperature measurement model training method provided in the embodiment of the present application.

[0105] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.

[0106] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for training a temperature measurement model, characterized in that: include: The multiple clients obtain the initial parameters of the model from the server, and perform model training according to a pre-built local training set to obtain multiple initial models, wherein the local training set is a feature vector including environmental information; The server receives initial model parameters corresponding to the initial models sent by the multiple clients, and performs weighted average processing on the multiple initial model parameters to obtain average parameters; the weight of the client is in direct proportion to the amount of data in the local training set of the client; The server sends the average parameter to each client, and determines whether the multiple initial models converge. If the initial models are all converged, the client adjusts the initial models according to the average parameters to obtain a temperature measurement model; If at least one of the initial models does not converge, the client continues to perform model training according to the average parameter; The method comprises: The client obtains a local temperature measurement image and temperature information corresponding to the local temperature measurement image; the local temperature measurement image is determined based on a human body infrared temperature measurement data image obtained by an infrared camera; The client performs feature extraction on the local temperature measurement image to obtain a feature vector corresponding to the local temperature measurement image; The environmental information corresponding to the local temperature measurement image is added to the feature vector to obtain a target feature vector, and the target feature vector and the temperature information corresponding to the local temperature measurement image are saved to obtain a local training set; the environmental information includes air humidity, room temperature, the measurement angle of the infrared camera, and the measurement distance of the infrared camera.

2. The training method of the temperature measurement model according to claim 1, characterized in that: Before extracting features from the local temperature measurement image, the method includes: The client preprocesses the local temperature measurement image, wherein the preprocessing includes at least one of image enhancement and image normalization.

3. The training method of the temperature measurement model according to claim 1, characterized in that: The step of adding the environmental information corresponding to the local temperature measurement image to the feature vector to obtain a target feature vector includes: The client performs a dimensionality reduction operation on the feature vector to obtain a feature vector after dimensionality reduction; The client obtains the environmental information when the local temperature measurement image is collected, and adds the environmental information to the feature vector after dimension reduction to obtain a target feature vector.

4. The training method of the temperature measurement model according to claim 1, characterized in that: The determining whether the multiple initial models converge comprises: Determine whether the number of iterations of the initial model reaches a preset number; If the number of iterations of the initial model reaches a preset number, it is determined that the initial model has converged.

5. A training device for a temperature measurement model, characterized in that: include: An initial training module, which is used for multiple clients to obtain initial model parameters from the server, and to perform model training according to a pre-built local training set to obtain multiple initial models, wherein the local training set is a feature vector including environmental information; A parameter processing module, used for receiving, at the server side, initial model parameters corresponding to the initial model sent by the multiple clients, and performing weighted average processing on the multiple initial model parameters to obtain average parameters; the weight of the client is in direct proportion to the amount of data in the local training set of the client; A convergence judgment module is used for the server to send the average parameter to each client and judge whether the multiple initial models are converged. A model adjustment module, configured to adjust the initial model according to the average parameter to obtain a temperature measurement model if the initial models are converged; The model adjustment module is further configured to, if at least one of the initial models does not converge, allow the client to continue model training according to the average parameter; The training device further comprises: The client obtains a local temperature measurement image and temperature information corresponding to the local temperature measurement image; the local temperature measurement image is determined based on a human body infrared temperature measurement data image obtained by an infrared camera; The client performs feature extraction on the local temperature measurement image to obtain a feature vector corresponding to the local temperature measurement image; The environmental information corresponding to the local temperature measurement image is added to the feature vector to obtain a target feature vector, and the target feature vector and the temperature information corresponding to the local temperature measurement image are saved to obtain a local training set; the environmental information includes air humidity, room temperature, the measurement angle of the infrared camera, and the measurement distance of the infrared camera.

6. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the training method of the temperature measurement model according to any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the method for training a temperature measurement model according to any one of claims 1 to 4.