Model training method, device, and system
By extracting and storing features of the target data, using a second server to train the model, and using only feature data for model training, the problem of low data security is solved and data privacy protection is achieved.
Patent Information
- Application Number
- CN202210711503.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-06-22
AI Technical Summary
The lack of effective data protection methods leads to low security of training data. Data model demanders lack data while data owners need to protect user privacy, and contradictions are becoming increasingly apparent.
The first server extracts features from the target data and stores them in the target database. The second server is used to train the model. Only feature data is used for model training, isolating the direct transmission of original data to achieve data privacy protection.
The purpose of encrypting training data is achieved, the privacy of training data is protected, data security is improved, and the problem of low security caused by the lack of data protection methods is solved.
Smart Images

Figure CN114970761B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and more specifically, to a model training method, device, and system. Background Art
[0002] As data leaks become increasingly common, the need for the protection and use of user privacy data is increasing. Data model demanders lack data, while data owners need to protect user data privacy, creating a growing conflict.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] The embodiments of the present application provide a model training method, device, and system to at least solve the technical problem of low security of training data due to the lack of data protection methods.
[0005] According to one aspect of an embodiment of the present application, a model training method is provided, comprising:
[0006] The first server performs feature extraction on the target data obtained using the first preset model to obtain multiple feature data of the target data, and stores the multiple feature data in the target database; the first server receives the model to be trained sent by the target terminal, and determines the target feature data that matches the model to be trained from the target database based on the model to be trained, and sends the target feature data to the second server; the first server receives the target model trained by the second server, and forwards the target model to the target terminal, wherein the target model is obtained by the second server extracting the target feature data from the target database and training the model to be trained using the target feature data.
[0007] Optionally, storing multiple feature data in a target database includes: the first server uses a second preset model to infer the multiple feature data to obtain feature data labels corresponding to the multiple feature data; and the first server stores the multiple feature data and the feature data labels in the target database.
[0008] Optionally, the first server receives the model to be trained sent by the target terminal, and determines the target feature data matching the model to be trained from the target database based on the model to be trained, including: the first server receives the first selection instruction sent by the target terminal, and determines the first preset model; the first server receives the model to be trained and the required data label sent by the target terminal, and determines the target feature data matching the model to be trained and the target feature data label corresponding to the target feature data based on the model to be trained, the first preset model and the required data label.
[0009] Optionally, the first server receives the target model trained by the second server, including: the first server sends the model to be trained and the target data list to the second server, wherein the target data list is used to indicate target feature data and target feature data labels; the first server sends a first control instruction to the second server to control the second server to extract target feature data and target feature data labels from the target database according to the instructions of the target data list; the first server sends a second control instruction to the second server to control the second server to use the target feature data and target feature data labels to train the model to be trained to obtain the target model.
[0010] Optionally, after the first server receives the model to be trained sent by the target terminal, the method also includes: the first server sends a receipt message and a first message to the target terminal, the receipt message is used to indicate that the first server has received the model to be trained, and the first information is used to display the training progress of the model to be trained on the display interface of the target terminal.
[0011] Optionally, after the first server receives the target model trained by the second server and forwards it to the target terminal, the method further includes: the first server sends second information to the target terminal, where the second information is used to prompt that the target model has been sent to the target terminal.
[0012] Optionally, the first server uses a first preset model to extract features from the acquired target data, and the first preset model includes: a residual network model and a super-resolution test sequence model.
[0013] According to another aspect of an embodiment of the present application, a model training system is also provided, including: a data source server, a distributed database, an intermediary server, a training server and a data demand terminal; the intermediary server is used to obtain a first preset model from the data source server, and input the target data into the first preset model to obtain multiple feature data; the distributed database is used to store multiple feature data and feature data labels corresponding to the multiple feature data; the data demand terminal is used to send the model to be trained; the training server is used to train the target model using the model to be trained, the target feature data and the target feature data labels; the intermediary server is also used to forward the target model to the data demand terminal.
[0014] According to another aspect of the embodiment of the present application, a model training device is also provided, including: an extraction module, used to extract features of target data obtained using a first preset model, obtain multiple feature data of the target data, and store the multiple feature data in a target database; a determination module, used to receive the model to be trained sent by the target terminal, and determine the target feature data that matches the model to be trained from the target database based on the model to be trained; a sending module, used to receive the target model trained by the second server, and forward the target model to the target terminal, wherein the target model is obtained by the second server extracting the target feature data from the target database and using the target feature data to train the model to be trained.
[0015] According to another aspect of an embodiment of the present application, a non-volatile storage medium is further provided, which includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above-mentioned model training method.
[0016] According to another aspect of the embodiments of the present application, a processor is further provided, which is used to run a program, wherein the above-mentioned model training method is executed when the program is running.
[0017] In an embodiment of the present application, a first server is used to perform feature extraction on the acquired target data to obtain multiple feature data of the target data, and store the multiple feature data in a target database; the first server receives the model to be trained sent by the target terminal, and determines the target feature data that matches the model to be trained from the target database based on the model to be trained, and sends the target feature data to the second server; the first server receives the target model trained by the second server and forwards it to the target terminal, wherein the target model is obtained by training the model to be trained by extracting the target feature data from the target database by the second server, and by performing feature extraction on the acquired target data and performing model training only using the feature data obtained after feature extraction, the purpose of encrypting the training data is achieved, thereby realizing the technical effect of protecting the privacy of the training data, and further solving the technical problem of low security of the training data caused by the lack of data protection methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) for a model training method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a model training method according to the present application;
[0021] Figure 3 A schematic diagram of an optional model training system according to an embodiment of the present application;
[0022] Figure 4 This is a schematic diagram of an optional model training device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] According to an embodiment of the present application, an embodiment of a model training method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0026] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal, a cloud server or a similar computing device. Figure 1 FIG1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a model training method. Figure 1As shown, the computer terminal 10 (or mobile device 10) may include one or more (illustrated as 102a, 102b, ..., 102n) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0027] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0028] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the model training method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implementing the model training method of the above-mentioned application. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0029] The transmission module 106 is configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission module 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission module 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.
[0030] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0031] According to an embodiment of the present application, an embodiment of a model training method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0032] Figure 2 is a flow chart of the model training method according to an embodiment of the present application, such as Figure 2 As shown, the method includes the following steps:
[0033] Step S202: The first server extracts features from the acquired target data to obtain multiple feature data of the target data, and stores the multiple feature data in a target database;
[0034] Step S204: the first server receives the model to be trained sent by the target terminal, determines target feature data matching the model to be trained from the target database according to the model to be trained, and sends the target feature data to the second server;
[0035] In step S206, the first server receives the target model trained by the second server and forwards the target model to the target terminal, wherein the target model is obtained by the second server extracting target feature data from the target database and training the model to be trained using the target feature data.
[0036] Through the above steps, it is possible to perform feature extraction on the acquired target data and perform model training using only the feature data obtained after feature extraction, thereby achieving the purpose of encrypting the training data, thereby achieving the technical effect of protecting the privacy of the training data, and further solving the technical problem of low security of the training data caused by the lack of data protection methods.
[0037] In step S202, the preset model can be used to perform feature extraction on the target data to obtain multiple feature data. It should be noted that the original data cannot be restored based on the feature data, thereby achieving the effect of encrypting the target data.
[0038] In step S204, the first server receives the model to be trained sent by the target terminal, and determines the target feature data that matches the model to be trained from the target database based on the model to be trained, and sends the target feature data to the second server. The first server also needs to send the model to be trained to the second server for the second server to train the model to be trained. The above-mentioned model to be trained can be an initial model.
[0039] The above steps S202 to S206 are described in detail below through a specific embodiment.
[0040] In step S202, multiple feature data are stored in the target database. Before storing the multiple feature data in the target database, it is determined whether the multiple feature data have labeling information corresponding to the multiple feature data, such as classification information, detection boxes, etc. If the multiple feature data are not labeled, the first server uses the second preset model to infer the multiple feature data to obtain feature data labels corresponding to the multiple feature data; it can be understood that a matching relationship between the multiple feature data and the feature data labels is obtained. The second preset model can be one or more trained neural network models, which are used to label the feature data. The first server then stores the multiple feature data and the feature data labels in the target database.
[0041] In step S204, the first server receives the first selection instruction sent by the target terminal and determines the first preset model; the first server receives the model to be trained and the required data label sent by the target terminal, and determines the target feature data matching the model to be trained and the target feature data label corresponding to the target feature data based on the model to be trained, the first preset model and the required data label.
[0042] The first preset model may be a model with a feature extraction function, such as a residual network model and a super-resolution test sequence model.
[0043] The target terminal selects the corresponding first preset model so that multiple feature data corresponding to the first preset model can be selected. Specifically, the target terminal can select the first preset model corresponding to the model to be trained by sending the selected first preset model. At the same time, the model parameters of the model to be trained and the required data labels are provided. The target feature data labels in the target database are determined by the required labels. The target feature data in the multiple feature data obtained in step 202 are matched with the feature data labels to determine the target feature data. Finally, the target feature data and the corresponding target feature data labels are used to train the model to be trained. It can be understood that the first preset model can be used as a pre-model of the training system to extract feature data, and the model to be trained can be used as a post-model of the system and trained using the feature data obtained by training with the first preset model.
[0044] In step S206, the first server receives the target model trained by the second server. It should be noted that the target model is the trained model to be trained. The first server sends the trained model and a target data list to the second server. The target data list indicates target feature data and target feature data labels. The second server extracts the target feature data and target feature data labels from the target database according to the target data list. The target feature data and target feature data labels are then used to train the trained model to obtain the target model.
[0045] Obtaining training data through the second server further improves confidentiality by isolating the path for obtaining data from the first server.
[0046] In an optional manner, after the first server receives the model to be trained sent by the target terminal, the first server sends a receipt message and a first message to the target terminal. The receipt message is used to indicate that the first server has received the model to be trained, and the first message is used to display the training progress of the model to be trained on the display interface of the target terminal. In some embodiments of the present application, a trigger email can also be sent to the target terminal to indicate that the model to be trained and the model training progress have been received. Improve user experience. The training progress can also be displayed from the moment the target terminal sends the model training request. For example, the interface display process is: request sent, request received, data acquisition, model training, and model training completed.
[0047] In some optional embodiments, after the first server receives the target model trained by the second server and forwards it to the target terminal, the first server sends second information to the target terminal, where the second information is used to prompt that the target model has been sent to the target terminal.
[0048] The present application also provides a model training system. Figure 3As shown, it includes: a data source server 30, a distributed database 32, a first server 34, a second server 36 and a target terminal 38; the first server 34 is used to obtain a first preset model from the data source server 30, and input the target data into the first preset model to obtain multiple feature data; the target database 32 is used to store multiple feature data and feature data labels corresponding to the multiple feature data; the target terminal 38 is used to send the model to be trained; the second server 36 is used to train the target model using the model to be trained, the target feature data and the target feature data labels; the first server 34 is also used to forward the target model to the target terminal 38.
[0049] The target database may be a database located in a server.
[0050] The present application also provides a model training device, such as Figure 4 As shown, it includes: an extraction module 40, which is used to extract features from the acquired target data, obtain multiple feature data of the target data, and store the multiple feature data in the target database; a determination module 42, which is used to receive the model to be trained sent by the target terminal, and determine the target feature data that matches the model to be trained from the target database according to the model to be trained; a sending module 44, which is used to receive the target model trained by the second server and forward it to the target terminal, wherein the target model is trained by the second server extracting the target feature data from the target database.
[0051] The extraction module 40 includes a storage submodule, which is used to use the second preset model to infer multiple feature data to obtain feature data labels corresponding to the multiple feature data; and store the multiple feature data and the feature data labels in the target database.
[0052] The determination module 42 includes: a receiving submodule, which is used to receive a first selection instruction sent by the target terminal and determine a first preset model; receive the model to be trained and the required data label sent by the target terminal, and determine the target feature data matching the model to be trained and the target feature data label corresponding to the target feature data based on the model to be trained, the first preset model and the required data label.
[0053] The sending module 44 includes: a training submodule and a sending submodule, the training submodule is used to send the model to be trained and the target data list to the second server, wherein the target data list is used to indicate the target feature data and the target feature data label; and send a first control instruction to the second server to control the second server to extract the target feature data and the target feature data label from the target database according to the indication of the target data list; send a second control instruction to the second server to control the second server to use the target feature data and the target feature data label to train the model to be trained to obtain the target model.
[0054] The sending submodule is used to send a receipt message and a first message to the target terminal after the first server receives the model to be trained sent by the target terminal. The receipt message is used to indicate that the first server has received the model to be trained, and the first information is used to display the training progress of the model to be trained on the display interface of the target terminal; and after the first server receives the target model trained by the second server and forwards it to the target terminal, the second message is sent to the target terminal. The second information is used to prompt that the target model has been sent to the target terminal.
[0055] According to another aspect of an embodiment of the present application, a non-volatile storage medium is also provided, comprising a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above-mentioned model training method.
[0056] According to another aspect of an embodiment of the present application, a processor is further provided, which is used to run a program, wherein the above-mentioned model training method is executed when the program is running.
[0057] The above-mentioned processor is used to run a program that performs the following functions: the first server extracts features from the acquired target data to obtain multiple feature data of the target data, and stores the multiple feature data in a target database; the first server receives the model to be trained sent by the target terminal, and determines the target feature data that matches the model to be trained from the target database based on the model to be trained, and sends the target feature data to the second server; the first server receives the target model trained by the second server and forwards it to the target terminal, wherein the target model is obtained by the second server extracting the target feature data from the target database to train the model to be trained.
[0058] The above-mentioned processor executes the above-mentioned model training method, and achieves the purpose of encrypting the training data by extracting features from the acquired target data and only using the feature data obtained after feature extraction for model training, thereby achieving the technical effect of protecting the privacy of the training data, and further solving the technical problem of low security of training data caused by the lack of data protection methods.
[0059] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0060] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0061] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected to achieve the purpose of the present embodiment according to actual needs.
[0062] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0063] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program code.
[0064] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A model training method, characterized in that: include: The first server extracts features from the acquired target data using a first preset model to obtain a plurality of feature data of the target data, and stores the plurality of feature data in a target database; The first server receives the model to be trained sent by the target terminal, determines target feature data matching the model to be trained from the target database according to the model to be trained, and sends the target feature data to the second server; The first server receives the target model trained by the second server and forwards the target model to the target terminal, wherein the target model is obtained by the second server extracting the target feature data from the target database and training the model to be trained using the target feature data; The first server receives the target model trained by the second server, comprising: the first server sends the to-be-trained model and the target data list to the second server, wherein the target data list is used to indicate the target feature data and the target feature data label; The first server sends a first control instruction to the second server, controlling the second server to extract the target feature data and the target feature data label from the target database according to the instruction of the target data list; The first server sends a second control instruction to the second server, controlling the second server to train the model to be trained using the target feature data and the target feature data label to obtain the target model.
2. The method according to claim 1, characterized in that Storing the plurality of feature data in a target database includes: The first server uses a second preset model to infer the plurality of feature data to obtain feature data labels corresponding to the plurality of feature data; The first server stores the plurality of feature data and the feature data tags in the target database.
3. The method according to claim 2, characterized in that The first server receives the model to be trained sent by the target terminal, and determines the target feature data matching the model to be trained from the target database according to the model to be trained, including: The first server receives the first selection instruction sent by the target terminal and determines the first preset model; The first server receives the model to be trained and the required data label sent by the target terminal, and determines the target feature data matching the model to be trained and the target feature data label corresponding to the target feature data based on the model to be trained, the first preset model and the required data label.
4. The method according to claim 1, wherein After the first server receives the model to be trained sent by the target terminal, the method further includes: The first server sends a receipt message and first information to the target terminal, the receipt message is used to indicate that the first server has received the model to be trained, and the first information is used to display the training progress of the model to be trained on the display interface of the target terminal.
5. The method according to claim 4, characterized in that After the first server receives the target model trained by the second server and forwards it to the target terminal, the method further includes: The first server sends second information to the target terminal, where the second information is used to prompt that the target model has been sent to the target terminal.
6. The method according to claim 1, characterized in that The first server performs feature extraction on the acquired target data, including: The first server uses a first preset model to extract features from the acquired target data, where the first preset model includes: a residual network model and a super-resolution test sequence model.
7. A model training system, characterized in that: include: Data source server, distributed database, intermediary server, training server and data demand terminal; The intermediary server is used to obtain a first preset model from the data source server, and input the target data into the first preset model to obtain a plurality of feature data; The distributed database is used to store a plurality of feature data and feature data labels corresponding to the plurality of feature data; The data demand terminal is used to send the model to be trained; The training server is used to train a target model using the model to be trained, target feature data and target feature data labels; The intermediary server is further configured to forward the target model to the data demand terminal.
8. A model training device, characterized in that: include: An extraction module is used to extract features from the acquired target data to obtain multiple feature data of the target data, and store the multiple feature data in a target database; a determination module, configured to receive the model to be trained sent by the target terminal, determine target feature data matching the model to be trained from the target database according to the model to be trained, and send the target feature data to the second server; a sending module, configured to receive a target model trained by the second server and forward the target model to the target terminal, wherein the target model is obtained by the second server extracting the target feature data from the target database and training the model to be trained using the target feature data; The first server receives the target model trained by the second server, comprising: the first server sends the to-be-trained model and the target data list to the second server, wherein the target data list is used to indicate the target feature data and the target feature data label; The first server sends a first control instruction to the second server, controlling the second server to extract the target feature data and the target feature data label from the target database according to the instruction of the target data list; The first server sends a second control instruction to the second server, controlling the second server to train the model to be trained using the target feature data and the target feature data label to obtain the target model.
9. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the model training method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Model training method and device, electronic equipment and storage medium
CN113392974A