Model training and task processing method, device and system, equipment and storage medium
By collecting user life scene data in machine learning model training and using scenario to understand model extraction features, the training data acquisition difficulties and data security problems are solved, and efficient model training and data security guarantee have been achieved.
Patent Information
- Application Number
- CN202411379516.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, it is difficult to obtain training data of machine learning models and there is a security risk of data leakage.
By collecting life scene data of sample users, the scene understanding model is used to extract features from the data, and local task feature training is performed to avoid uploading original data and ensure data security.
It makes it easier to obtain a large amount of task-related training data, improves the generalization ability of the model, and avoids data leakage through distributed training and data security measures.
Smart Images

Figure CN119357664A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a model training and task processing method, apparatus, system, device and storage medium. Background Art
[0002] Machine learning models can be used to process Internet-related tasks, such as item recommendation tasks, message push tasks, and user classification tasks. Before processing Internet-related tasks, a large amount of training data is often required to train the machine learning model to ensure the task processing effect.
[0003] In the process of implementing the present invention, the inventors found that the current training of machine learning models has at least the following problems: first, in the real world, it is often very difficult to obtain sufficient training data; second, the obtained training data needs to be uploaded to the server, and model training is performed on the server side, which may result in data leakage and make it difficult to ensure data security. Summary of the invention
[0004] The embodiments of the present invention provide a model training and task processing method, apparatus, system, device and storage medium, which can more easily obtain a large amount of task-related training data and ensure the security of the training data.
[0005] In a first aspect, a model training method provided by an embodiment of the present invention is applied to each node device in a model training system, wherein the model training system also includes a central device, and the model training method includes:
[0006] Collect life scenario data of sample users and obtain feature understanding guidance data corresponding to the target task;
[0007] Inputting the feature understanding guidance data and the life scene data of the sample user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the sample user, and obtains the local task features of the sample user;
[0008] Training a task processing model based on the local task features of the sample user to obtain node training parameters of the current node device, wherein the task processing model is used to process the target task;
[0009] Uploading the node training parameters of the current node device to the central device;
[0010] The target training parameters are obtained from the central device and applied to the task processing model. The target training parameters are determined by the central device according to the node training parameters uploaded by each node device.
[0011] In a second aspect, an embodiment of the present invention provides a task processing method, including:
[0012] Collect life scenario data of target users and obtain feature understanding guidance data corresponding to target tasks;
[0013] Inputting the feature understanding guidance data and the life scene data of the target user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the target user, and obtains the local task features of the target user;
[0014] Inputting the local task features of the target user into a task processing model, so that the task processing model processes the target task based on the local task features of the target user to obtain an actual processing result;
[0015] The task processing model is trained according to the model training method described in the embodiment of the present invention.
[0016] In a third aspect, a model training device provided by an embodiment of the present invention is applied to each node device in a model training system, wherein the model training system also includes a central device, and the model training device includes:
[0017] The first data collection module is used to collect life scene data of sample users;
[0018] A first data acquisition module is used to acquire feature understanding guidance data corresponding to the target task;
[0019] A first scene understanding module, configured to input the feature understanding guidance data and the life scene data of the sample user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the sample user, and obtains the local task features of the sample user;
[0020] A model training module, used to train a task processing model based on the local task characteristics of the sample user to obtain node training parameters of the current node device, wherein the task processing model is used to process the target task;
[0021] A parameter uploading module, used for uploading the node training parameters of the current node device to the central device;
[0022] A parameter application module is used to obtain target training parameters from the central device and apply the target training parameters to the task processing model. The target training parameters are determined by the central device according to the node training parameters uploaded by each node device.
[0023] In a fourth aspect, an embodiment of the present invention provides a task processing device, including:
[0024] The second data collection module is used to collect the life scene data of the target user;
[0025] The second data acquisition module is used to obtain feature understanding guidance data corresponding to the target task;
[0026] A second feature understanding module is used to input the feature understanding guidance data and the life scene data of the target user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the target user, and obtains the local task features of the target user;
[0027] A task processing module, used for inputting the local task features of the target user into a task processing model, so that the task processing model processes the target task based on the local task features of the target user to obtain an actual processing result;
[0028] The task processing model is trained according to the model training method described in the embodiment of the present invention.
[0029] In a fifth aspect, the model training system provided by an embodiment of the present invention includes a central device and node devices for executing the model training method described in the embodiment of the present invention.
[0030] In a sixth aspect, an electronic device provided by an embodiment of the present invention comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a model training method as in any embodiment of the present invention is implemented, or when the processor executes the program, a task processing method as in any embodiment of the present invention is implemented.
[0031] In the seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements a model training method as in any embodiment of the present invention, or when the program is executed by a processor, it implements a task processing method as in any embodiment of the present invention.
[0032] The scheme of the embodiment of the present invention obtains features for model training through the collected life scene data of sample users. Life scene data is relatively easy to obtain, so it is easier to obtain a large amount of training data related to the task; provide task feature understanding guidance data, so that the scene understanding model can understand the local task features from the life scene data of sample users based on the task feature understanding guidance data, so as to achieve accurate acquisition of training data; and the life scene data is closer to the real situation, which helps to improve the generalization ability of the model. In addition, the model training process of the present invention is carried out locally by each node device according to the local task features obtained by itself, that is, distributed training, and there is no need to upload the original training data to other devices, which can avoid data leakage and ensure data security. Furthermore, each node device uploads the model parameters obtained by training to the central device, and the central device summarizes the model parameters uploaded by each node device, and applies the summarized model parameters to the model of each node device. Each node device can participate in the training, effectively utilizing the computing resources of each node device, further increasing the amount of training data, improving the training effect of the model, and facilitating the continuous optimization of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 It is a flowchart of the model training method provided by an embodiment of the present invention;
[0035] Figure 2 is a structural schematic diagram of a model training system provided by an embodiment of the present invention;
[0036] Figure 3 is another flow chart of the model training method provided by an embodiment of the present invention;
[0037] Figure 4 is a flowchart of a task processing method provided by an embodiment of the present invention;
[0038] Figure 5 is a structural schematic diagram of a model training device provided by an embodiment of the present invention;
[0039] Figure 6 is a structural diagram of a task processing device provided by an embodiment of the present invention;
[0040] Figure 7It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below 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 of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] Figure 1 It is a flow chart of the model training method provided by an embodiment of the present invention. The model training method provided by an embodiment of the present invention can be applied to scenarios where there is little training data, the training data is not easy to obtain and the security of the training data needs to be guaranteed. The method can be executed by the model training device provided by an embodiment of the present invention, and the device can be implemented in software and / or hardware.
[0044] In a specific embodiment, the model training method provided in the embodiment of the present invention can be applied to a model training system. The model training system may include multiple node devices and a central device. The node device may be a user-side device. The user-side device may be, for example, a user's mobile phone, tablet computer, personal computer, smart watch, smart bracelet, smart glasses, etc. The central device may be a server. For example, the model training system may be as follows: Figure 2 As shown, it includes N node devices and one central device, where N is an integer greater than 2. The model training method provided in the embodiment of the present invention can be specifically used for each node device in the model training system. The following embodiment takes the model training method used for the current node device in the model training system as an example for explanation, and the current node device can be any node device in the model training system.
[0045] Continue reading Figure 1The model training method of this embodiment may include the following steps:
[0046] Step 101, collect life scene data of sample users, and obtain feature understanding guidance data corresponding to the target task.
[0047] Sample users are users involved in the task processing model training process. Sample users include a large number of users. Sample users can be all network users or some users selected from all network users based on actual needs, tasks or services. Sample users have node devices. Node devices can be terminal devices such as mobile phones, tablet computers, personal computers, etc. Node devices can also be wearable devices such as smart watches, smart bracelets, smart glasses, etc. Node devices are configured with data collection devices, which can include but are not limited to cameras, sensors, inductors, etc. On the premise of obtaining user authorization or permission, the data collection devices configured on the node devices can be used to collect the life scene data of sample users.
[0048] Life scene data can include multimodal data, where modality refers to data type or data source. Life scene data can be data that reflects information such as user status, social interaction, daily living habits, behavior, preferences, etc. For example, life scene data can be user location data collected by a mobile phone, temperature, humidity, light and other data of the user's location collected by environmental sensors, and data reflecting the user's health status monitored by physiological monitoring equipment. Life scene data can be represented by structured data such as text and tables, or by unstructured data such as pictures, videos, and audio.
[0049] The target task is a task that needs to be processed by the task processing model, and the target task may include one or more tasks. For example, the target task may be an information push task, an item recommendation task, a user grading task, etc., which are not specifically limited here. Correspondingly, the task processing model may be an information push model, an item recommendation model, a user grading model, etc. When the task processing model processes the target task, it needs input data or reference data. The data required by the task processing model to process the target task can be called task features. Different task features are required to process different tasks.
[0050] Specifically in this embodiment, since the scene understanding model is used to understand the features required for processing the target task from the life scene data of the sample users, in order to achieve accurate acquisition of task features, the task features required for each target task can be processed according to the task processing model, and feature understanding guidance data can be configured in real time or in advance for the corresponding target task, so as to use the feature understanding guidance data to guide the scene understanding model to understand the features required for processing the target task from the life scene data of the sample users.
[0051] Feature understanding guidance data is generally specially designed to assist the model to perform its intended task more effectively. In this embodiment, feature understanding guidance data, also referred to as prompt word prompt, is a type of data used to guide the scene understanding model to understand and extract specific features. Specifically, feature understanding guidance data may include some information related to the target task, such as relevant keywords, examples, questions, etc. This information is designed to guide the scene understanding model to extract specific attributes or features related to the target task from life scene data. For example, if the target task is an item recommendation task, feature understanding guidance data may be keywords or question statements related to user preferences, consumption levels, etc. If the target task is an information push task, feature understanding guidance data may be keywords or question statements related to user areas of concern, reading preferences, etc.
[0052] Step 102, input the feature understanding guidance data and the life scene data of the sample user into the scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the sample user, and obtains the local task features of the sample user.
[0053] The scene understanding model can be a machine learning model. The scene understanding model can be pre-trained. Its function is to understand and extract features corresponding to feature understanding guidance data from the user's life scene data. These features are the features required for processing the target task. In this embodiment, it is equivalent to using the scene understanding model to filter out information useful for the target task from a large amount of life scene data, thereby forming a local task feature data.
[0054] For example, the target task is an item recommendation task, and the feature understanding guidance data is question statements related to the user's shopping behavior, such as the brand, purchase time, and frequency of use of items purchased by the user. The scene understanding model will search for data related to shopping behavior from the user's life scene data, thereby establishing a feature library of the user's shopping habits and preferences. This feature library is the local task feature of the sample user.
[0055] Step 103: Train the task processing model based on the local task features of the sample users to obtain node training parameters of the current node device.
[0056] The node device can pre-configure the task processing model locally. The task processing models pre-configured locally on different node devices can be the same, and all are initialized task processing models. Each node device can directly train the task processing model locally using the local task features of the sample users obtained by itself, and obtain the model parameters after training. The node training parameters of the current node device, that is, the model parameters obtained after the current node device trains the task processing model, can include parameter items and parameter values of the corresponding parameter items. In the node training parameters of different node devices, the parameter items can be the same, but the parameter values of the corresponding parameter items may be different.
[0057] Step 104: Upload the node training parameters of the current node device to the central device.
[0058] That is, the current node device can upload the model parameters obtained by training the task processing model to the central device. Since what is uploaded is the model parameters obtained by training based on the training data, rather than the training data itself, user privacy can be protected and the security of the training data can be guaranteed.
[0059] Step 105, obtaining target training parameters from the central device, and applying the target training parameters to the task processing model, the target training parameters are determined by the central device according to the node training parameters uploaded by each node device.
[0060] The central device can receive the node training parameters uploaded by each node device, and the central device can process the received node training parameters by direct averaging, weighted averaging, etc., so as to obtain the target training parameters. Each node device can obtain the target training parameters from the central device and apply the target training parameters to the task processing model to complete the model training.
[0061] Applying the target training parameters to the task processing model can be to directly adjust the model parameters of the task processing model to the target training parameters, or to adaptively adjust the model parameters of the task processing model according to the target training parameters so that the model parameters of the task processing model approach the target training parameters. The way in which different node devices apply the target training parameters to the task processing model can be the same or different. When different node devices apply the target training parameters to the task processing model in the same way, the consistency of the model can be ensured, making the parameter update process more intuitive and predictable, and ensuring that all subsequent node devices use a unified standard to process the target task. When different node devices apply the target training parameters to the task processing model in different ways, it is equivalent to providing different node devices with a more personalized model parameter adjustment method. Since different node devices may have differences in performance, task background, etc., allowing each node device to apply the target training parameters to the task processing model in different ways can better meet the needs of each node device itself.
[0062] The scheme of this embodiment obtains features for model training through the collected life scene data of sample users. Life scene data is relatively easy to obtain, so it is easier to obtain a large amount of training data related to the task; provide task feature understanding guidance data, so that the scene understanding model can understand the local task features from the life scene data of sample users based on the task feature understanding guidance data, so as to achieve accurate acquisition of training data; and the life scene data is closer to the real situation, which helps to improve the generalization ability of the model. In addition, the model training process of the present invention is carried out locally by each node device according to the local task features obtained by itself, that is, distributed training, and there is no need to upload the original training data to other devices, which can avoid data leakage and ensure data security. Furthermore, each node device uploads the model parameters obtained by training to the central device, and the central device summarizes the model parameters uploaded by each node device, and applies the summarized model parameters to the model of each node device. Each node device can participate in the training, effectively utilizing the computing resources of each node device, further increasing the amount of training data, improving the training effect of the model, and facilitating the continuous optimization of the model.
[0063] The model training method provided by the embodiment of the present invention is further described below. Figure 3 As shown, the method of this embodiment may include:
[0064] Step 301, generate a data collection request and display the data collection request, respond to the consent collection instruction fed back to the data collection request, and use the data collection component of the current node device to collect the life scene data of the sample user.
[0065] In a specific implementation, a data collection request can be generated and displayed on a preset interface. The data collection request may include a start-up request and a data description of the data collection component. The data description may be used to describe the type of data collected by the data collection component, the purpose of the corresponding type of data, etc., so that the user can decide whether to allow the start of the data collection component to collect life scene data according to his or her own wishes. If the user agrees or allows the start of the data collection component to collect life scene data, the preset interface can be used to feedback the consent collection instruction, and the node device will start the data collection component to collect life scene data. If the user does not agree or does not allow the start of the data collection component to collect life scene data, the data collection component will not be started or the life scene data will not be collected. That is, the data collection of the present invention is collected with the knowledge and consent of the user, which is legal and compliant.
[0066] Life scene data can be data that reflects information such as the user's status, social interaction, daily living habits, behaviors, preferences, etc. For example, life scene data can be image data obtained by taking photos of the user's environment, video data obtained by taking photos of the user's area, audio data obtained by recording the user's social interaction, or data such as blood pressure, blood lipids, heart rate, etc. obtained by monitoring the user's body to reflect the user's health status.
[0067] Step 302: Obtain feature understanding guidance data corresponding to the target task.
[0068] The target task can be a task that the task processing model needs to perform, which can be an information push task, an item recommendation task, a user classification task, etc. For example, the information push task can be an advertising push task, an article push task, etc.; the item recommendation task can be a recommendation task for virtual products (such as electronic cards, online services, etc.) and physical products (such as electronic products, daily life users, etc.); the user classification task can be a user value classification task, a user credit classification task, a user satisfaction classification task, etc. Feature understanding guidance data is data used to guide the scene understanding model to understand and extract specific features. Feature understanding guidance data can include some information related to the target task, such as related keywords, examples, questions, etc.
[0069] Specifically, the task features required for each target task can be processed according to the task processing model, and feature understanding guidance data can be configured in real time or in advance for the corresponding target task. For the current target task, feature understanding guidance data can be obtained according to the configuration.
[0070] Step 303, input the feature understanding guidance data and the life scene data of the sample user into the scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the sample user, and obtains the local task features of the sample user.
[0071] The scene understanding model can be a machine learning model that can be obtained through training. The scene understanding model can understand, analyze or summarize the life scene data like a human being to output the required features or data. In this embodiment, the scene understanding model will filter out useful information for the target task from a large amount of life scene data based on the guidance of the feature understanding guidance data, thereby forming the local task feature data of the sample user, and these task feature data can form a local portrait of the sample user.
[0072] For example, when the target task is an item recommendation task and the feature understanding guidance data is the user's age, gender, and family member status, if the local task features of the sample user are that the user is 30 years old, the user's gender is female, there are three family members, one of whom is a baby, the local portrait of the sample user can be a mother, based on which an item recommendation model can be trained to perform the maternal and child product recommendation task.
[0073] Step 304: input the local task features of the sample users into the task processing model, so that the task processing model processes the target task based on the local task features of the sample users to obtain a training processing result.
[0074] The task processing model can process the target task based on the local task features of the sample user to obtain the task processing result, which is the training processing result. For example, when the task processing model is an item recommendation model, the training processing result can be the item that should be recommended to the sample user predicted by the item recommendation model, and the predicted item can be recommended to the sample user. When the task processing model is a user satisfaction grading model, the training processing result can be the satisfaction grading result of the sample user for a certain service or product predicted by the user satisfaction grading model, and the predicted satisfaction grading result can be displayed to the sample user.
[0075] Step 305: Obtain feedback information from sample users on the training processing results.
[0076] Feedback information may include whether the sample user accepts the push or recommendation, whether the user agrees with the rating, suggestions or adjustments to the training processing results, etc.
[0077] Step 306: Optimize the model parameters of the task processing model according to the feedback information to obtain the node training parameters of the current node device.
[0078] The node training parameters of the current node device are model parameters obtained after the current node device trains the task processing model. The model parameters may include parameter items and parameter values of corresponding parameter items.
[0079] Step 307: compress and encrypt the node training parameters of the current node device and upload them to the central device.
[0080] Since the amount of data of node training parameters is relatively large, in order to improve data transmission efficiency, the node training parameters can be compressed; in order to protect data security, the compressed node training parameters can also be encrypted and uploaded to the central device. The central device will receive the node training parameters uploaded by each node device. In the node training parameters of different node devices, the parameter items can be the same, but the parameter values of the corresponding parameter items may be different.
[0081] Step 308, obtaining target training parameters from the central device, decrypting and decompressing the target training parameters and applying them to the task processing model. The target training parameters are jointly determined by the central device based on the central training parameters of the central device and the node training parameters uploaded by each node device.
[0082] The central device can be a server. The central device has the remote task characteristics of the sample users. A task processing model is also configured on the central device. The task processing model configured on the central device can be the same as the task processing model configured on the node device. The central training parameters are obtained by the central device training the task processing model based on the remote task characteristics of the sample users, that is, the central training parameters are the model parameters obtained by the central device training the task processing model.
[0083] The local task features of the sample users possessed by the node device refer to the feature data generated and stored on the node device. These feature data are usually related to the real-time behavior or status of a specific user and are directly processed on the local device, emphasizing real-time and locality. The remote task features of the sample users possessed by the central device refer to the feature data generated and stored by the central device. These feature data can be based on the original data uploaded by the node device, historical data or the historical behavior and historical status of the user, and are obtained by further processing and extraction on the central device. For example, the remote task features of the sample users possessed by the central device can be obtained based on the registration information, Internet records, consumption records, etc. of the sample users. Specifically, the central device can extract or summarize the features of the registration information, Internet records, consumption records, etc. of the sample users, so as to obtain the remote task features of the sample users. The remote task features and local task features of the sample users can be different in feature type or dimension. The remote task features of the sample users can constitute the remote profile of the sample users, and the remote profile and local profile of the sample users constitute the complete profile of the sample users. That is, for the target task, the remote task features and local task features of the sample users complement each other.
[0084] For example, a bank wants to recommend digital products to user X. The bank only has features A and B of user X, which are relatively few, and it is not convenient to transmit features A and B to the user. The node device on the user side understands and analyzes the life scenario data of user X to obtain features C, D, E, F, and H of user X, and it is not convenient for the node device to upload features C, D, E, F, and H of user X to the bank. The node device on the user side and the central device on the bank side can train the item recommendation model based on their respective features. After each training is completed, the central device can summarize the model parameters obtained by the node device training and the model parameters obtained by the central device training to obtain the target training parameters, and then compress and encrypt the target training parameters and send them to each node device.
[0085] The current node device can obtain the target training parameters from the central device, and apply the target training parameters to the task processing model after decrypting and decompressing them. Applying the target training parameters to the task processing model can be to directly adjust the model parameters of the task processing model to the target training parameters, or to adaptively adjust the model parameters of the task processing model according to the target training parameters so that the model parameters of the task processing model approach the target training parameters.
[0086] The scheme of this embodiment obtains features for model training through the collected life scene data of sample users. Life scene data is relatively easy to obtain, so it is easier to obtain a large amount of training data related to the task; provide task feature understanding guidance data, so that the scene understanding model can understand the local task features from the life scene data of sample users based on the task feature understanding guidance data, so as to achieve accurate acquisition of training data; and the life scene data is closer to the real situation, which helps to improve the generalization ability of the model. In addition, the model training process of the present invention is carried out locally by each node device according to the local task features obtained by itself, that is, distributed training, and there is no need to upload the original training data to other devices, which can avoid data leakage and ensure data security. Furthermore, each node device uploads the model parameters obtained by training to the central device, and the central device summarizes the model parameters uploaded by each node device, and applies the summarized model parameters to the model of each node device. Each node device can participate in the training, effectively utilizing the computing resources of each node device, further increasing the amount of training data, improving the training effect of the model, and facilitating the continuous optimization of the model.
[0087] Furthermore, the model training of this embodiment utilizes local task characteristics of sample users on the node device side and remote task characteristics of sample users on the central device side, thereby improving the comprehensiveness and diversity of model training data, and helping to improve the generalization capability and processing accuracy of the trained task processing model; and the node device and the central device do not share task characteristics and user data, which can avoid the leakage of sensitive data, and multi-device collaborative training can improve model training efficiency.
[0088] The following describes a task processing method provided by an embodiment of the present invention. The task processing method can also be applied to various node devices, such as Figure 4 As shown, the method of this embodiment may include:
[0089] Step 401, collect life scene data of the target user, and obtain feature understanding guidance data corresponding to the target task.
[0090] The target user is the user involved in the use process after the task processing model training is completed. The target user can include multiple users. The life scene data collected during the task processing model training and use process can be of the same type and dimension. The life scene data of the target user can be collected using the data collection device configured on the node device, provided that the target user has authorized or allowed it. The life scene data can be data that reflects the target user's status, social, daily living habits, behaviors, preferences, and other information.
[0091] Feature understanding guidance data is data used to guide the scene understanding model to understand and extract specific features. Feature understanding guidance data can include some information related to the target task, such as related keywords, examples, questions, etc. Feature understanding guidance data for the target task can be obtained according to the configuration.
[0092] Step 402, input the feature understanding guidance data and the life scene data of the target user into the scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the target user, and obtains the local task features of the target user.
[0093] The scene understanding model will filter out information that is useful for the target task from a large amount of life scene data based on the guidance of feature understanding guidance data, and form local task feature data for the target user. These task feature data can form a local profile of the target user.
[0094] Step 403: input the local task features of the target user into the task processing model, so that the task processing model processes the target task based on the local task features of the target user to obtain an actual processing result.
[0095] The task processing model can be trained using the model training method provided in the previous embodiment, that is, the task processing model is applied to the target training parameters. The task processing model can process the target task based on the local task characteristics of the target user to obtain the task processing result, which is the actual processing result.
[0096] In this embodiment, the features required for processing the target task are obtained by collecting the target user's life scene data. The life scene data is relatively easy to obtain, so a large amount of feature data related to the task can be more easily obtained; the feature understanding guidance data of the task is provided, so that the scene understanding model can understand the local task features from the target user's life scene data based on the feature understanding guidance data of the task, so as to achieve accurate acquisition of feature data; and the life scene data is closer to the real situation, which is helpful for the task processing effect. In addition, the task processing process of the present invention is performed locally by each node device according to the local task features obtained by itself, and there is no need to upload the feature data to other devices, which can avoid data leakage and ensure data security.
[0097] In addition, the central device can also apply the target training parameters to the task processing model to execute the target task. That is, the central device can obtain the remote task features of the target user and input the remote task features of the target user into the task processing model so that the task processing model processes the target task based on the remote task features of the target user to obtain the actual processing results. Since there are differences between the task features used by the central device to execute the target task and the task features used by the node device to execute the target task, there may also be differences between the actual processing results obtained by the central device to execute the target task and the actual processing results obtained by the node device to execute the target task.
[0098] Figure 5 is a structural diagram of a model training device provided in an embodiment of the present invention. The model training device can be applied to each node device in a model training system. The model training system also includes a central device. The model training device is suitable for executing the model training method provided in an embodiment of the present invention, such as Figure 5 As shown, the device may specifically include:
[0099] The first data collection module 501 is used to collect life scene data of sample users;
[0100] A first data acquisition module 502 is used to acquire feature understanding guidance data corresponding to the target task;
[0101] A first scene understanding module 503, configured to input the feature understanding guidance data and the life scene data of the sample user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the sample user, and obtains the local task features of the sample user;
[0102] A model training module 504 is used to train a task processing model based on the local task characteristics of the sample user to obtain node training parameters of the current node device, and the task processing model is used to process the target task;
[0103] A parameter uploading module 505 is used to upload the node training parameters of the current node device to the central device;
[0104] The parameter application module 506 is used to obtain target training parameters from the central device and apply the target training parameters to the task processing model. The target training parameters are determined by the central device according to the node training parameters uploaded by each node device.
[0105] In one embodiment, the target training parameters are determined by the central device based on the central training parameters of the central device and the node training parameters uploaded by each node device. The central device has the remote task characteristics of the sample user, and the central training parameters are obtained by the central device training the task processing model based on the remote task characteristics of the sample user.
[0106] In one embodiment, the first data acquisition module 501 is specifically used for:
[0107] generating a data collection request and displaying the data collection request;
[0108] In response to the consent collection instruction fed back to the data collection request, the life scene data of the sample user is collected by using the data collection component of the current node device.
[0109] In one embodiment, the model training module 504 is specifically used to:
[0110] Inputting the local task features of the sample user into the task processing model, so that the task processing model processes the target task based on the local task features of the sample user to obtain a training processing result;
[0111] Obtaining feedback information from the sample users on the training processing result;
[0112] The model parameters of the task processing model are optimized according to the feedback information to obtain the node training parameters of the current node device.
[0113] In one embodiment, the life scene data includes at least one of video, audio and image.
[0114] In one embodiment, the parameter upload module 505 is specifically used for:
[0115] Compressing and encrypting the node training parameters of the current node device and uploading them to the central device;
[0116] The parameter application module 506 applies the target training parameters to the task processing model, including: decrypting and decompressing the target training parameters and then applying them to the task processing model.
[0117] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0118] The device of the embodiment of the present invention obtains features for model training through the collected life scene data of sample users. Life scene data is relatively easy to obtain, so it is easier to obtain a large amount of training data related to the task; provide task feature understanding guidance data, so that the scene understanding model can understand the local task features from the life scene data of the sample user based on the task feature understanding guidance data, so as to achieve accurate acquisition of training data; and the life scene data is closer to the real situation, which helps to improve the generalization ability of the model. In addition, the model training process of the present invention is carried out locally by each node device according to the local task features obtained by itself, that is, distributed training, and there is no need to upload the original training data to other devices, which can avoid data leakage and ensure data security. Further, each node device uploads the model parameters obtained by training to the central device, and the central device summarizes the model parameters uploaded by each node device, and applies the summarized model parameters to the model of each node device. Each node device can participate in the training, effectively utilizing the computing resources of each node device, further increasing the amount of training data, improving the training effect of the model, and facilitating the continuous optimization of the model.
[0119] Figure 6 is a structural diagram of a task processing device provided by an embodiment of the present invention, such as Figure 6 As shown, the device may include:
[0120] The second data collection module 601 is used to collect life scene data of the target user;
[0121] The second data acquisition module 602 is used to acquire feature understanding guidance data corresponding to the target task;
[0122] A second feature understanding module 603 is used to input the feature understanding guidance data and the life scene data of the target user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the target user, and obtains the local task features of the target user;
[0123] A task processing module 604 is used to input the local task characteristics of the target user into a task processing model, so that the task processing model processes the target task based on the local task characteristics of the target user to obtain an actual processing result;
[0124] The task processing model is trained according to the model training method described in the embodiment of the present invention.
[0125] The device of this embodiment obtains the features required for processing the target task by collecting the target user's life scene data. The life scene data is relatively easy to obtain, so a large amount of feature data related to the task can be more easily obtained; it provides the task's feature understanding guidance data, so that the scene understanding model can understand the local task features from the target user's life scene data based on the task's feature understanding guidance data, and can achieve accurate acquisition of feature data; and the life scene data is closer to the real situation, which is helpful for the task processing effect. In addition, the task processing process of the present invention is performed locally by each node device according to the local task features obtained by itself, and there is no need to upload the feature data to other devices, which can avoid data leakage and ensure data security.
[0126] An embodiment of the present invention further provides an electronic device, which may be each node device in the model training system provided by the embodiment of the present invention. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the model training method provided by any of the above embodiments is implemented; or, when the processor executes the program, the task processing method provided by any of the above embodiments is implemented.
[0127] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of an electronic device suitable for implementing an embodiment of the present invention. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0128] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the computer system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0129] Typically, the following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0130] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0131] It should be noted that the computer-readable medium shown in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0132] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0133] The modules and / or units involved in the embodiments of the present invention may be implemented in software or in hardware. The modules and / or units described may also be provided in a processor, for example, may be described as: a processor including a first data acquisition module, a first data acquisition module, a first scene understanding module, a model training module, a parameter upload module, and a parameter application module; or, may be described as: a second data acquisition module, a second data acquisition module, a second feature understanding module, and a task processing module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0134] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0135] Collect life scenario data of sample users and obtain feature understanding guidance data corresponding to the target task;
[0136] Inputting the feature understanding guidance data and the life scene data of the sample user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the sample user, and obtains the local task features of the sample user;
[0137] Training a task processing model based on the local task characteristics of the sample user to obtain node training parameters of the current node device, wherein the task processing model is used to process the target task;
[0138] Uploading the node training parameters of the current node device to the central device;
[0139] The target training parameters are obtained from the central device and applied to the task processing model. The target training parameters are determined by the central device according to the node training parameters uploaded by each node device.
[0140] Alternatively, when the above one or more programs are executed by a device, the device includes:
[0141] Collect life scenario data of target users and obtain feature understanding guidance data corresponding to target tasks;
[0142] Inputting the feature understanding guidance data and the life scene data of the target user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the target user, and obtains the local task features of the target user;
[0143] Inputting the local task features of the target user into a task processing model, so that the task processing model processes the target task based on the local task features of the target user to obtain an actual processing result;
[0144] The task processing model is trained according to the model training method provided by an embodiment of the present invention.
[0145] The technical solution of the embodiment of the present invention is that during the model training process, the features used for model training are obtained through the collected life scene data of sample users. The life scene data is relatively easy to obtain, so a large amount of task-related training data can be more easily obtained; the feature understanding guidance data of the task is provided, so that the scene understanding model can understand the local task features from the life scene data of the sample user based on the feature understanding guidance data of the task, so as to achieve accurate acquisition of training data; and the life scene data is closer to the real situation, which helps to improve the generalization ability of the model. In addition, the model training process of the present invention is carried out locally by each node device according to the local task features obtained by itself, that is, distributed training, and there is no need to upload the original training data to other devices, which can avoid data leakage and ensure data security. Furthermore, each node device uploads the model parameters obtained by training to the central device, and the central device summarizes the model parameters uploaded by each node device, and applies the summarized model parameters to the model of each node device. Each node device can participate in the training, effectively utilizing the computing resources of each node device, further increasing the amount of training data, improving the training effect of the model, and facilitating the continuous optimization of the model.
[0146] During the use of the model, the features required for processing the target task are obtained by collecting the target user's life scene data. The life scene data is relatively easy to obtain, so a large amount of feature data related to the task can be more easily obtained; the feature understanding guidance data of the task is provided, so that the scene understanding model can understand the local task features from the target user's life scene data based on the feature understanding guidance data of the task, and the feature data can be accurately obtained; and the life scene data is closer to the real situation, which is helpful for the task processing effect. In addition, the task processing process of the present invention is carried out locally by each node device according to the local task features obtained by itself, and there is no need to upload the feature data to other devices, which can avoid data leakage and ensure data security.
[0147] An embodiment of the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements a model training method as provided in any embodiment of the present application; or, the computer program, when executed by a processor, implements a task processing method as provided in any embodiment of the present application.
[0148] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0149] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0150] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0151] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A model training method, characterized in that: The model training method is applied to each node device in the model training system, and the model training system also includes a central device. The model training method includes: Collect life scenario data of sample users and obtain feature understanding guidance data corresponding to the target task; Inputting the feature understanding guidance data and the life scene data of the sample user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the sample user, and obtains the local task features of the sample user; Training a task processing model based on the local task features of the sample user to obtain node training parameters of the current node device, wherein the task processing model is used to process the target task; Uploading the node training parameters of the current node device to the central device; The target training parameters are obtained from the central device and applied to the task processing model. The target training parameters are determined by the central device according to the node training parameters uploaded by each node device.
2. The model training method according to claim 1, characterized in that: The target training parameters are jointly determined by the central device based on the central training parameters of the central device and the node training parameters uploaded by each node device. The central device has the remote task characteristics of the sample user, and the central training parameters are obtained by the central device training the task processing model based on the remote task characteristics of the sample user.
3. The model training method according to claim 1, characterized in that: The collecting of the sample user's life scenario data includes: generating a data collection request and displaying the data collection request; In response to the consent collection instruction fed back to the data collection request, the life scene data of the sample user is collected by using the data collection component of the current node device.
4. The model training method according to claim 1, characterized in that: The step of training the task processing model based on the local task features of the sample user to obtain the node training parameters of the current node device includes: Inputting the local task features of the sample user into the task processing model, so that the task processing model processes the target task based on the local task features of the sample user to obtain a training processing result; Obtaining feedback information from the sample users on the training processing result; The model parameters of the task processing model are optimized according to the feedback information to obtain the node training parameters of the current node device.
5. The model training method according to claim 1, characterized in that: The life scene data includes at least one of video, audio and image.
6. The model training method according to any one of claims 1 to 5, characterized in that: The uploading of the node training parameters of the current node device to the central device comprises: compressing and encrypting the node training parameters of the current node device and uploading them to the central device; Correspondingly, applying the target training parameters to the task processing model includes: decrypting and decompressing the target training parameters and then applying them to the task processing model.
7. A task processing method, characterized in that: include: Collect life scenario data of target users and obtain feature understanding guidance data corresponding to target tasks; Inputting the feature understanding guidance data and the life scene data of the target user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the target user, and obtains the local task features of the target user; Inputting the local task features of the target user into a task processing model, so that the task processing model processes the target task based on the local task features of the target user to obtain an actual processing result; Wherein, the task processing model is trained according to the model training method according to any one of claims 1 to 6.
8. A model training device, characterized in that: The model training device is applied to each node device in the model training system, and the model training system also includes a central device. The model training device includes: The first data collection module is used to collect life scene data of sample users; A first data acquisition module is used to acquire feature understanding guidance data corresponding to the target task; A first scene understanding module, configured to input the feature understanding guidance data and the life scene data of the sample user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the sample user, and obtains the local task features of the sample user; A model training module, used to train a task processing model based on the local task characteristics of the sample user to obtain node training parameters of the current node device, wherein the task processing model is used to process the target task; A parameter uploading module, used for uploading the node training parameters of the current node device to the central device; A parameter application module is used to obtain target training parameters from the central device and apply the target training parameters to the task processing model. The target training parameters are determined by the central device according to the node training parameters uploaded by each node device.
9. A task processing device, characterized in that: include: The second data collection module is used to collect the life scene data of the target user; The second data acquisition module is used to obtain feature understanding guidance data corresponding to the target task; A second feature understanding module is used to input the feature understanding guidance data and the life scene data of the target user into a scene understanding model, so that the scene understanding model understands the features corresponding to the feature understanding guidance data from the life scene data of the target user, and obtains the local task features of the target user; A task processing module, used for inputting the local task features of the target user into a task processing model, so that the task processing model processes the target task based on the local task features of the target user to obtain an actual processing result; Wherein, the task processing model is trained according to the model training method according to any one of claims 1 to 6.
10. A model training system, characterized in that: It includes a central device and each node device for executing the model training method as described in any one of claims 1 to 6.
11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the model training method as described in any one of claims 1 to 6, or, when the processor executes the program, it implements the task processing method as described in claim 7.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements the model training method as described in any one of claims 1 to 6, or, when the program is executed by a processor, it implements the task processing method as described in claim 7.