Data recommendation method and device, model training method and device

CN116522192BActive Publication Date: 2026-08-21ALIBABA CLOUD COMPUTING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310276810.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2026-08-21
Estimated Expiration
2043-03-16

AI Technical Summary

Technical Problem

目前大多采用模型自学习自动更新的方法,但是这种方法也需要积累数据才能重新构建样本进行训练,使得模型在更新之前还是无法正常为用户提供相应服务

Benefits of technology

[0041] The data recommendation method provided in this specification includes: obtaining initial recommendation data corresponding to target data of a recommendation task, and an initial recommendation score corresponding to the initial recommendation data; selecting target feedback data corresponding to the target data from a feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks; adjusting the initial recommendation score based on the target feedback data to obtain a target recommendation score corresponding to the initial recommendation data; and determining the target recommendation data corresponding to the recommendation task from the initial recommendation data based on the target recommendation score.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116522192B_ABST
    Figure CN116522192B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a data recommendation method and device, a model training method and device, wherein the data recommendation method comprises: obtaining initial recommendation data corresponding to target data of a recommendation task and an initial recommendation score corresponding to the initial recommendation data; selecting target feedback data corresponding to the target data from a feedback data set, wherein the feedback data set comprises feedback data of historical recommendation results of historical recommendation tasks; adjusting the initial recommendation score based on the target feedback data to obtain a target recommendation score corresponding to the initial recommendation data; and determining target recommendation data corresponding to the recommendation task from the initial recommendation data according to the target recommendation score. By adjusting the initial recommendation score according to the real-time feedback data, the recommendation data corresponding to the target text is more accurately predicted, thereby providing a better user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of artificial intelligence technology, and in particular to data recommendation methods. One or more embodiments of this specification also relate to model training methods, data recommendation devices, model training devices, a computing device, and a computer-readable storage medium. Background Technology

[0002] With the rapid development of information and network technologies, artificial intelligence (AI) technology is widely used in the field of natural language processing, such as text translation and intelligent customer service. In practical applications, pre-trained algorithm models are typically deployed and used in specific projects. However, problems still arise that the algorithm models cannot handle, such as processing unfamiliar text, leading to incorrect output. Because model training and updating are costly, model updates are usually infrequent. Currently, most methods employ self-learning and automatic updates, but this method also requires accumulating data to rebuild samples for training, meaning the model cannot provide services correctly to users before updates. Therefore, ensuring accurate predictions from the model even without updates is a pressing issue that needs to be addressed. Summary of the Invention

[0003] In view of this, embodiments of this specification provide data recommendation methods and model training methods. One or more embodiments of this specification also relate to data recommendation devices, model training devices, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.

[0004] According to a first aspect of the embodiments of this specification, a data recommendation method is provided, comprising:

[0005] Obtain the initial recommendation data corresponding to the target data of the recommendation task, and the initial recommendation score corresponding to the initial recommendation data;

[0006] Select the target feedback data corresponding to the target data in the feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks;

[0007] The initial recommendation score is adjusted based on the target feedback data to obtain the target recommendation score corresponding to the initial recommendation data;

[0008] Based on the target recommendation score, the target recommendation data corresponding to the recommendation task is determined from the initial recommendation data.

[0009] According to a second aspect of the embodiments of this specification, a data recommendation method is provided, comprising:

[0010] Obtain the initial classification text corresponding to the target text of the recommendation task, and the initial classification score corresponding to the initial classification text;

[0011] Select the target feedback text corresponding to the target text in the feedback text set, wherein the feedback text set includes feedback texts of historical recommendation results of historical recommendation tasks;

[0012] The initial classification score is adjusted based on the target feedback text to obtain the target classification score corresponding to the initial classification text;

[0013] Based on the target classification score, the target classification text corresponding to the recommendation task is determined from the initial classification text.

[0014] According to a third aspect of the embodiments of this specification, a model training method is provided, applied to a cloud-side device, comprising:

[0015] Acquire sample data, sample recommendation data, and sample feedback data submitted by the end-side device, and input the sample data into the data recommendation model;

[0016] Determine the initial prediction recommendation data corresponding to the sample data, and the initial prediction recommendation score corresponding to the initial prediction recommendation data; select the prediction feedback data corresponding to the sample data based on the sample data and the initial prediction recommendation data.

[0017] Based on the predicted feedback data, the initial predicted recommendation score is adjusted to obtain the target predicted recommendation score corresponding to the initial predicted recommendation data. Based on the target predicted recommendation score, the predicted recommendation data corresponding to the sample data is determined in the initial predicted recommendation data.

[0018] Calculate a first loss value based on the sample recommendation data and the predicted recommendation data, and calculate a second loss value based on the sample feedback data and the predicted feedback data;

[0019] The data recommendation model is tuned based on the first loss value and the second loss value until the model training termination condition is met.

[0020] The target model parameters corresponding to the data recommendation model that meets the model training termination condition are sent to the edge device.

[0021] According to a fourth aspect of the embodiments of this specification, a data recommendation apparatus is provided, comprising:

[0022] The acquisition module is configured to acquire the initial recommendation data corresponding to the target data of the recommendation task, and the initial recommendation score corresponding to the initial recommendation data;

[0023] The selection module is configured to select target feedback data corresponding to the target data from the feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks;

[0024] The adjustment module is configured to adjust the initial recommendation score based on the target feedback data to obtain the target recommendation score corresponding to the initial recommendation data;

[0025] The determination module is configured to determine the target recommendation data corresponding to the recommendation task from the initial recommendation data based on the target recommendation score.

[0026] According to a fifth aspect of the embodiments of this specification, a data recommendation apparatus is provided, comprising:

[0027] The acquisition module is configured to acquire the initial classification text corresponding to the target text of the recommendation task, and the initial classification score corresponding to the initial classification text.

[0028] The selection module is configured to select the target feedback text corresponding to the target text from the feedback text set, wherein the feedback text set includes feedback texts of historical recommendation results of historical recommendation tasks;

[0029] The adjustment module is configured to adjust the initial classification score based on the target feedback text to obtain the target classification score corresponding to the initial classification text;

[0030] The determination module is configured to determine the target category text corresponding to the recommendation task from the initial category text based on the target category score.

[0031] According to a sixth aspect of the embodiments of this specification, a model training apparatus is provided, applied to a cloud-side device, comprising:

[0032] The acquisition module is configured to acquire sample data, sample recommendation data, and sample feedback data submitted by the end device, and input the sample data into the data recommendation model;

[0033] The determination module is configured to determine the initial prediction recommendation data corresponding to the sample data and the initial prediction recommendation score corresponding to the initial prediction recommendation data, and select the prediction feedback data corresponding to the sample data based on the sample data and the initial prediction recommendation data;

[0034] The adjustment module is configured to adjust the initial prediction recommendation score based on the prediction feedback data to obtain a target prediction recommendation score corresponding to the initial prediction recommendation data, and to determine the prediction recommendation data corresponding to the sample data in the initial prediction recommendation data according to the target prediction recommendation score.

[0035] The calculation module is configured to calculate a first loss value for the sample recommendation data and the predicted recommendation data, and to calculate a second loss value for the sample feedback data and the predicted feedback data;

[0036] The parameter tuning module is configured to tune the data recommendation model based on the first loss value and the second loss value until the model training termination condition is met.

[0037] The sending module is configured to send the target model parameters corresponding to the data recommendation model that meets the model training termination condition to the edge device.

[0038] According to a seventh aspect of the embodiments of this specification, a computing device is provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor executes the computer instructions to implement the steps of the data recommendation method and the model training method.

[0039] According to an eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer instructions, which, when executed by a processor, implement the steps of the data recommendation method and the model training method.

[0040] According to a ninth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described data recommendation method and model training method.

[0041] The data recommendation method provided in this specification includes: obtaining initial recommendation data corresponding to target data of a recommendation task, and an initial recommendation score corresponding to the initial recommendation data; selecting target feedback data corresponding to the target data from a feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks; adjusting the initial recommendation score based on the target feedback data to obtain a target recommendation score corresponding to the initial recommendation data; and determining the target recommendation data corresponding to the recommendation task from the initial recommendation data based on the target recommendation score.

[0042] This specification provides an embodiment to address the problem of inaccurate model predictions due to untimely model updates. It achieves this by selecting target feedback data corresponding to the target data from a feedback data set that includes historical recommendation results from previous recommendation tasks. Subsequently, the initial recommendation score corresponding to the initial recommendation data is adjusted based on the target feedback data to obtain the target recommendation score. Finally, the target recommendation data corresponding to the target data is determined based on this target recommendation score. This allows for optimization of the model output based on feedback data without updating the model itself. The model adjusts its initial recommendation score according to real-time feedback data, resulting in more accurate predictions of the recommended data corresponding to the target data, thus providing a better user experience. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the structure of a data recommendation method provided in one embodiment of this specification;

[0044] Figure 2 This is a flowchart illustrating a data recommendation method provided in one embodiment of this specification;

[0045] Figure 3 This is a schematic diagram of the structure of a data recommendation model for a data recommendation method provided in one embodiment of this specification;

[0046] Figure 4 This is a flowchart of another data recommendation method provided in one embodiment of this specification;

[0047] Figure 5 This is a flowchart illustrating a model training method for cloud-based devices, provided in one embodiment of this specification.

[0048] Figure 6A This is a flowchart illustrating the processing procedure of a data recommendation method provided in one embodiment of this specification;

[0049] Figure 6B This is a schematic diagram illustrating a data recommendation method processing scenario provided in one embodiment of this specification;

[0050] Figure 6C This is a schematic diagram illustrating a scenario of a data recommendation method applied to item recommendation, provided in one embodiment of this specification.

[0051] Figure 6D This is a schematic diagram illustrating a scenario of a data recommendation method applied to item classification, provided in one embodiment of this specification.

[0052] Figure 7 This is a schematic diagram of the structure of a data recommendation device provided in one embodiment of this specification;

[0053] Figure 8 This is a schematic diagram of another data recommendation device provided in one embodiment of this specification;

[0054] Figure 9 This is a schematic diagram of the structure of a model training device applied to cloud-side equipment according to one embodiment of this specification;

[0055] Figure 10 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0056] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0057] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to any or all possible combinations including one or more of the associated listed items.

[0058] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0059] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0060] Real-time feedback perception: The algorithm model can adjust in real time based on user feedback to optimize the output results.

[0061] Model self-learning: When a certain amount of data is accumulated, the algorithm model can automatically build samples to continue or retrain the model to achieve the effect of automatic algorithm update.

[0062] Currently, when data recommendation algorithms are implemented in industry, they are often deployed and used in specific projects based on pre-trained algorithm models. Since the cost of retraining and updating the model is high, the update frequency of such models is usually relatively low. The common solution to this problem is to use the model self-learning automatic update method. That is, after the model accumulates a certain amount of data, it can use the accumulated data as training samples to continue or retrain the model to achieve the effect of automatic algorithm update. However, this solution also requires time to accumulate data. Before the model is automatically updated, it will still output incorrect results, resulting in a poor user experience.

[0063] Based on this, this specification provides a data recommendation method to solve the problem of the model continuously outputting incorrect results due to its inability to update in a timely manner. This specification also relates to a model training method, a data recommendation device, a model training device, a computing device, a computer-readable storage medium, and a computer program, which will be described in detail in the following embodiments.

[0064] Figure 1 This diagram illustrates a structural schematic of a data recommendation method according to an embodiment of this specification, wherein target data is input into a data recommendation model. Figure 1Taking text recommendation based on text data in an online shopping scenario as an example, the target data can be understood as the user's submitted question or opinion text data. The target data is the target text data, which might be, "I applied for a return or exchange of this garment due to a quality issue, but why did the merchant refuse my request?" The target user wants to inquire about product returns and exchanges with the online shopping platform's service, so they can describe the relevant problem to customer service. After receiving the question, customer service, perhaps busy serving other users, can first return target recommended data (target recommended text) to the user based on the data recommendation model, allowing the user to make further selections. This enables customer service to quickly locate the user's question based on the selected question type and effectively resolve the user's problem, improving the user experience. After the target data is input into the data recommendation model, the model can predict the initial recommended data and the initial recommendation score corresponding to the target data. The initial recommended data can be understood as the recommended data predicted by the model to correspond to the target data. In this scenario, it is the text data of the question type corresponding to the user's question. Due to the model's failure to update in time, the data recommendation model may make incorrect predictions. To avoid this, the data recommendation model provided in this manual can determine the target feedback data corresponding to the target data after determining the initial recommended data and the initial recommendation score. The feedback data is generated based on the model's historical processing results. For example, if the model has previously processed similar question text and predicted the corresponding question type text, it compares the correct question type text selected by the user with the predicted question type text. Based on the comparison result, it determines whether the prediction is correct and combines the prediction result with the question text to generate feedback text. When the model encounters similar question text again, it can introduce the feedback text to reorder the prediction results, thereby improving the model's prediction accuracy. Therefore, after the data recommendation model determines the feedback data corresponding to the target data, the initial recommendation score corresponding to the initial recommendation data can be adjusted according to the feedback data to obtain the target recommendation score. The target recommendation data is then determined according to the target recommendation score and output to the model, providing feedback to the user. This enables the model to determine the feedback data in real time based on user feedback, and to re-rank the model's prediction results based on the feedback data, thereby determining the target recommendation data that better matches the target data. This improves the accuracy of the model's prediction results and provides a better user experience. It also achieves the effect of adjusting the model's output results in real time based on feedback data even when the model is not updated in a timely manner.

[0065] Figure 2 A flowchart of a data recommendation method according to an embodiment of this specification is shown, including steps 202 to 208.

[0066] Step 202: Obtain the initial recommendation data corresponding to the target data of the recommendation task, and the initial recommendation score corresponding to the initial recommendation data.

[0067] In this context, recommendation tasks can be understood as predicting recommended data based on target data. Target data can be understood as user-submitted data, which can be of different data types in different project scenarios. For example, in text recommendation scenarios, target data could be question text or complaint text, while in product recommendation scenarios, it could be user behavior data. Data recommendation has a wide range of applications. For instance, in online shopping projects, target text could be a question submitted to a merchant or platform customer service regarding a product. For example, a user might submit the question, "My clothes haven't shipped yet, can I apply for a return?" After obtaining the user's target text, it can be input into a text recommendation model. The model then categorizes the user's target text into question types, thereby better understanding the user's true intent and providing more accurate solutions.

[0068] In practical applications, recommendation tasks can be performed using data recommendation models. These models are pre-trained algorithms that output recommended data based on target data. Recommended data can be understood as categorized data corresponding to the target data. For example, if the target data is "My clothes haven't shipped yet, can I apply for a return?", the model's output recommended data could be "product return / exchange issues," "product shipping issues," etc. This allows merchants to more accurately understand user intent based on the recommended data, thereby providing better solutions and improving the user experience.

[0069] For specific implementation, the model architecture of the data recommendation model provided in this manual can be found in [reference needed]. Figure 3 , Figure 3This diagram illustrates the model structure of a data recommendation model according to an embodiment of this specification. Taking text recommendation as an example, the model outputs data from bottom to top. During training, the final output is the loss function's loss value. In actual use, the output can be the recommended text and its corresponding recommendation score. Taking an event classification project scenario as an example, an event can be understood as the problem description text submitted by the user during the project process (i.e., the target text), an item can be understood as a summary of a type of event, and an item name can be understood as an event category name. Therefore, the recommended text output by the model is the category text corresponding to the target text. During model training, the model input is an item text and an event text, as well as a batch of positive feedback events and negative feedback events most similar to the current event. Positive feedback events are defined as events where the algorithm recommends the correct item, and negative feedback events are defined as events where the algorithm recommends the incorrect item. Keywords & patterns are the keywords and templates of an event. Two feature vectors are calculated: the pattern feature and the keyword feature, indicating which keywords and key templates the current event matches. This ultimately calculates the relevance between the event and the event. City-BERT is a text semantic representation model that converts text into semantic vectors. The match score represents the semantic matching score between the event text and the event text. The scene score represents the score of the current event's scene classification; a scene can be understood as a higher-level event category than an event, such as "job hunting" which could include events like "interview appointment questions." Positive feedback corresponds to the fused representation vector calculated by applying an attention mechanism between the semantic vectors of the positive feedback event and the current event. Negative feedback corresponds to the fused representation vector calculated by applying an attention mechanism between the semantic vectors of the negative feedback event and the current event. The upper-level FC (Fully Connected) layer is a fully connected neural network that concatenates all the feature vectors to calculate the overall relevance, ultimately outputting the loss function value or the predicted score. The model training uses a multi-task loss function, where l... t It's a hinge loss based on the max-margin (maximum margin) used to learn the loss between positive and negative sample pairs. n This is the loss function corresponding to the negative feedback samples, indicating that the model pays more attention to negative feedback (samples that the algorithm recommends incorrectly). The final overall loss function is loss = l. t +l nIn practical applications, the loss function (loss) can be calculated using the following formula (see Formula 1), where loss represents the overall loss function, and l t It is the loss of positive and negative feedback sample pairs, l n It is the loss of negative feedback samples, and α and β are hyperparameters used to control l. t and l n The weights for ranking are typically calculated as follows: α and β are usually set to 0.5 in practical applications, meaning that the contribution of each of the two loss values ​​is 50%. t It is the hinge loss of max-margin, S pos It is a score for positive feedback samples, S neg This is the scoring for negative feedback samples, where m is the margin value, used to ensure that the difference between the scores of positive and negative feedback samples is greater than m. If the difference is less than 0, it is set to 0. It is the score of the negative feedback sample, which is passed through the sigmoid (activation function) and the threshold is between (0,1), and the logarithm and average are taken.

[0070]

[0071] Based on this, a data recommendation model is implemented through the above model architecture. The positive and negative feedback information of users is fed into the re-ranking model through a real-time vectorized recall link. The positive and negative feedback is efficiently combined with other features of item and event matching. At the same time, by introducing negative feedback loss, the model pays more attention to the features of the results of previous incorrect recommendations by the algorithm, so that the model has better error correction ability, thereby meeting the needs of the model for real-time feedback perception.

[0072] In a specific embodiment of this specification, taking a text recommendation scenario as an example, target data is obtained. The target data is the question text submitted by the user. The text content of the target text is "I live in xx community. Do I need to undergo home observation after returning from City A? I have already undergone medical testing." After obtaining the target text, the target text is input into the data recommendation model so that the target text can be answered according to the recommended text output by the data recommendation model.

[0073] It should be noted that the data recommendation method provided in this specification can be used in a variety of different project scenarios. This embodiment mainly uses text recommendation as an example for illustration. The data recommendation method can also be applied to product and interest recommendation, text and item classification, etc. This specification does not impose specific limitations on these applications.

[0074] The initial recommendation data can be understood as the recommendation data predicted by the data recommendation model based on the target data. The initial recommendation score can be understood as the output probability of the initial recommendation data. The higher the initial recommendation score, the higher the matching degree between the initial recommendation data and the target data, and the greater the probability of the model outputting the initial recommendation data. Therefore, the model can determine the final output result based on the recommendation score.

[0075] In practical applications, data recommendation models may not be updated in a timely manner. Therefore, the initial recommendation data predicted by the data recommendation model based on the target data may contain prediction errors. The initial recommendation data may consist of one or more initial recommendation data, each with its own recommendation score. To solve this problem, the subsequent data recommendation model can introduce feedback data to reorder the initial recommendation scores of the initial recommendation data, thereby enabling the data recommendation model to output more accurate results.

[0076] In a specific embodiment of this specification, referring to the above example, the initial recommended text corresponding to the target text is determined. The text content of the initial recommended text is "medical testing problem" and "community personnel management". The initial recommended score corresponding to the initial recommended text can also be determined. The recommended score for medical testing problem is 90 points, and the recommended score for community personnel management is 85 points. The expression of the initial recommended text and initial recommended score determined by the model can be "medical testing problem: 90" and "community personnel management: 85". Since the recommended text output by the model is ultimately selected according to the recommended score, but because the data recommendation model is not updated in time, the recommended text output by the model may be inaccurate. Therefore, it is necessary to introduce feedback text to adjust the initial recommended score and select a target recommended text that is more consistent with the target text.

[0077] Furthermore, when the initial recommended data corresponding to the target data and the initial recommendation score corresponding to the initial recommended data are determined through a data recommendation model, the specific processing procedure of the model includes: extracting the keyword vector of the target data, and determining the initial recommended data corresponding to the target data based on the keyword vector; encoding the target data and the initial recommended data to obtain the target encoding vector corresponding to the target data and the initial recommendation encoding vector corresponding to the initial recommended data; calculating the first matching score and the second matching score corresponding to the target data based on the target encoding vector and the initial recommendation encoding vector, wherein the first matching score is the matching score between the target data and the initial recommended data, and the second matching score is the matching score between the data types to which the target data and the initial recommended data belong; and determining the initial recommendation score corresponding to the initial recommended data based on the first matching score and the second matching score.

[0078] The keyword vector can be understood as the feature vector corresponding to which keywords of the event the target data matches. In practice, the keyword vector can be divided into template feature vector and keyword feature vector. Keywords are used to determine the relevance between the target data and the recommended data, thereby determining the initial recommended data from multiple recommended data. The target data and the initial recommended data are encoded to obtain the target encoding vector of the target data and the initial recommendation vector of the initial recommended data. The target encoding vector can be understood as the encoding vector of the target data. If the target data is text data, the target encoding vector is the text semantic encoding vector. The initial recommendation vector can be understood as the encoding vector of the initial recommended data. If the initial recommended data is text data, the initial recommendation vector is the text semantic encoding vector. The first matching score can be understood as the matching score between the target data and the initial recommended data. The second matching score can be understood as the matching score between the data types of the target data and the initial recommended data. For example, if the target data is event text and the initial recommended data is event text, the first matching score is the matching score between the event text and the event text, and the second matching score is the matching score between the event text and the context text to which the event text belongs.

[0079] In practical applications, data recommendation models can first determine the relevance between the target data and each recommended data based on the keyword vector in the target data, thereby determining the initial recommended data among multiple recommended data, and calculating the initial recommendation score corresponding to the initial recommended data based on the target encoding vector and the initial recommendation vector.

[0080] Furthermore, to avoid the data recommendation model incorrectly determining the recommended data corresponding to the target data, resulting in subsequent prediction results being irrelevant to the target data and degrading the user experience, the initial recommended data can be determined based on the correlation between the target text and the recommended text. Specifically, obtaining the initial recommended data corresponding to the target data of the recommendation task and the initial recommendation score corresponding to the initial recommended data includes: obtaining the target data of the recommendation task and calculating the matching score between the target data and the recommended data stored in the recommendation database; selecting initial recommended data from the recommended data stored in the recommendation database based on the matching score, and using the matching score as the initial recommendation score corresponding to the initial recommended data.

[0081] The recommendation database can be understood as a database that stores recommendation data. It can be a database imported during model pre-training. The recommendation database contains recommendation data corresponding to many different target texts. Therefore, when encountering similar target data, the model can select the recommendation data with the highest matching degree with the target data as the initial recommendation data. The matching score can be understood as the correlation score between the target data and the recommendation data. The higher the matching score, the greater the probability that the recommendation data is the real data corresponding to the target data. Therefore, the initial recommendation data corresponding to the target data can be determined based on the matching score, and the matching score is used as the initial score of the initial recommendation data.

[0082] In practical applications, since the target data contains many data features, when the data recommendation model predicts the recommended data for the target data, it may determine that the target data has a matching relationship with multiple recommended data. According to the model's preset selection strategy, it can select a preset number of recommended data with the highest matching score from multiple recommended data. Therefore, it can select the initial recommended data from the recommended data stored in the recommendation database based on the matching score.

[0083] In a specific embodiment of this specification, referring to the above example, the matching score between the target text and the recommended texts stored in the recommended text library is calculated. The calculation result is "Medical testing problem: 90... Community personnel management: 85". Based on the matching score, the recommended texts stored in the recommended text library are sorted. According to the preset selection strategy, the top two recommended texts with the highest matching scores are selected as the initial recommended texts, and the recommendation score corresponding to each recommended text is used as the initial recommendation score corresponding to the initial recommended text.

[0084] Based on this, by calculating the matching score between the target data and the recommended data, the initial recommended data corresponding to the target data can be determined more accurately, thereby improving the accuracy of the subsequent model output prediction results.

[0085] Step 204: Select the target feedback data corresponding to the target data from the feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks.

[0086] The feedback data set includes feedback data from historical recommendation results of historical recommendation tasks. Target feedback data can be understood as data generated based on historical recommendation results of historical recommendation tasks, or data generated based on the historical output results of the data recommendation model. The feedback data contains two parts: historical target data and historical recommendation data corresponding to the historical target data. Taking text data as an example, the feedback data might include "Medical testing question (historical recommendation text): I live in xx community, do I need to get a medical test after returning from City A (historical target text)." The feedback data is used to reorder the initial recommendation data, thereby more accurately selecting target recommendation data that matches the target data from the initial recommendation data, improving the model's output accuracy. Feedback data can be one or more data points, depending on the selection results of the target data and the initial recommendation data. The more text similar to the target data included in the feedback data set, the more feedback data will be determined.

[0087] In practical applications, the feedback data in the feedback dataset can be stored in a feedback database. This database contains the target data and recommended data for each recommendation task processed by the data recommendation model. When the model makes a recommendation based on the target data, it can search for target feedback data in the feedback dataset of the feedback database, thereby finding data with semantic similarity to the target data and corresponding recommended data. This optimizes the recommendation results and improves the accuracy of the model's output.

[0088] In a specific embodiment of this specification, referring to the above example, the target feedback text corresponding to the target text is selected in the feedback text set. The text content of the target feedback text is "Medical testing question: I am a resident of xx community. Do I need to observe at home after returning from location B? The medical test report is negative" and "Community personnel management: I am a resident of xx community. Do I need to observe at home after returning from location B? The medical test report is negative". It can be seen that the historical target text in the target feedback text is similar to the target text.

[0089] Based on this, by selecting target feedback data corresponding to the target data according to the target data and the initial recommendation data, the initial recommendation score of the initial recommendation data can be adjusted based on the target feedback data. Thus, based on the adjusted initial recommendation score, more suitable recommendation data is selected from the initial recommendation data, making the model output results more accurate.

[0090] Furthermore, to avoid incorrect adjustments to the initial recommendation score based on feedback data, it is necessary to distinguish between positive and negative feedback data. Specifically, the target feedback data includes both positive and negative feedback data. Selecting the target feedback data corresponding to the target data from the feedback data set includes: selecting the positive feedback data corresponding to the target data from the positive feedback data set and selecting the negative feedback data corresponding to the target data from the negative feedback data set, based on the target data and the initial recommendation data.

[0091] In this context, the positive feedback dataset can be understood as the set of positive feedback data stored in the feedback database, and the negative feedback dataset can be understood as the set of negative feedback data stored in the feedback database. Both positive and negative feedback datasets contain historical target data and corresponding historical recommendation data. The difference between positive and negative feedback datasets lies in the fact that the historical recommendation data in the positive feedback dataset represents the correct prediction results of the historical target data, while the historical recommendation data in the negative feedback dataset represents the incorrect prediction results of the historical target data. It should be noted that positive and negative feedback datasets often appear in the form of data pairs, meaning that the same historical target data can have one correctly predicted historical recommendation data and one incorrectly predicted historical recommendation data.

[0092] In practical applications, since the model may output multiple recommended data based on the target data, after returning multiple recommended data to the user, the user will select one recommended data from them. The recommended data selected by the user is the data that is correctly predicted. The other recommended data can be combined with the target data to form negative feedback data and stored in the negative feedback data set. The recommended data selected by the user can be combined with the target data to generate positive feedback data and stored in the positive feedback data set.

[0093] In a specific embodiment of this specification, referring to the above example, positive feedback text is selected from the positive feedback text set. The text content of the positive feedback text is "Community Personnel Management: I am a resident of xx community. Do I need to undergo home observation after returning from location B? My medical test report is negative." Negative feedback text is selected from the negative feedback text set. The text content of the negative feedback text is "Medical Testing Question: I am a resident of xx community. Do I need to undergo home observation after returning from location B? My medical test report is negative."

[0094] Based on this, by selecting positive feedback data from the positive feedback data set and negative feedback data from the negative feedback data set, the model can subsequently enhance the corresponding recommendation scores with positive feedback based on the positive feedback data and correct the corresponding recommendation scores with negative feedback based on the negative feedback data. This allows the model to select recommendation data that better matches the target data from the initial recommendation data based on the adjusted recommendation scores, thereby improving the accuracy of the model output.

[0095] Furthermore, to avoid selecting feedback data that does not correspond to the target data or initial recommended data from the feedback data set, it is necessary to use the target data and initial recommended data as filtering conditions in the feedback data set. Specifically, based on the target data, positive feedback data corresponding to the target data is selected from the positive feedback data set, and negative feedback data corresponding to the target data is selected from the negative feedback data set. This includes: selecting initial positive feedback data containing data with a similar relationship to the target data from the positive feedback data set, and determining the positive feedback data corresponding to the target data from the initial positive feedback data based on the initial recommended data; selecting initial negative feedback data containing data with a similar relationship to the target data from the negative feedback data set, and determining the negative feedback data corresponding to the target data from the initial negative feedback data based on the initial recommended data.

[0096] In this context, data with a similar relationship to the target data can be understood as historical target data in the initial positive feedback data that shares the same or similar characteristics with the target data. For example, similarity can be understood as the target data and historical target data belonging to texts describing similar problems. Therefore, both the initial positive feedback data selected from the positive feedback data set based on the target data and the initial negative feedback data selected from the negative feedback data set contain historical target data with a similar relationship to the target data, and these historical target data can be the same. This will lead to better results in subsequent score adjustments. Initial positive feedback data can be understood as data filtered solely based on the target data, which will then be further filtered based on the initial recommendation data. Similarly, initial negative feedback data can be understood as data filtered solely based on the target data, which will also be further filtered based on the initial recommendation data.

[0097] In practical applications, the stored feedback data in the positive or negative feedback dataset may contain many historical target data that have similar relationships to the target data. Furthermore, the historical recommended data in these feedback datasets may differ from the stored initial recommended data. Therefore, after determining the initial positive and negative feedback data, further filtering is required based on the initial recommended data corresponding to the current target data.

[0098] In a specific embodiment of this specification, referring to the above example, initial positive feedback text is selected from the positive feedback text set, containing texts with a similar relationship to the target text. The initial positive feedback text includes phrases such as "Community Personnel Management: I am a resident of xx community. Do I need to undergo home observation after returning from location B? My medical test report is negative," and "Home Observation Question: I am a resident of xx community. Do I need to undergo home observation after returning from location B? My medical test report is negative." Similarly, initial negative feedback text is selected from the negative feedback text set, containing texts with a similar relationship to the target text. The initial negative feedback text includes phrases such as "Medical Testing Question: I am a resident of xx community..." The initial positive and negative feedback texts were further filtered based on the initial recommended texts "Medical Testing Issues" and "Community Personnel Management". The positive feedback text selected was "Community Personnel Management: I am a resident of xx community. Do I need to undergo home quarantine after returning from location B? My medical report is negative".

[0099] Based on this, by using target data and initial recommendation data as filtering conditions, positive feedback data and negative feedback data are determined from the positive feedback data set and negative feedback data set, respectively. This allows the initial recommendation score to be adjusted accordingly based on the positive and negative feedback data, enabling the model to output more accurate recommendation data.

[0100] Step 206: Adjust the initial recommendation score based on the target feedback data to obtain the target recommendation score corresponding to the initial recommendation data.

[0101] The target recommendation score can be understood as the recommendation score adjusted from the initial recommendation score based on the target feedback data. After determining the target feedback data corresponding to the target data, the target feedback data can be used as real-time user feedback to adjust the initial recommendation score of the initial recommendation data. This increases the recommendation score corresponding to the correct recommendation data and decreases the recommendation score corresponding to the incorrect recommendation data, enabling the subsequent model to select the correctly predicted recommendation data from the initial recommendation data.

[0102] In practical applications, since the target feedback data includes both positive and negative feedback data, the recommendation score of the corresponding initial recommendation data can be increased based on the positive feedback data, and the recommendation score of the corresponding initial recommendation data can be decreased based on the negative feedback data. This allows the subsequent model to select the more accurate recommendation data as the model output when selecting recommendation data based on the recommendation score.

[0103] In a specific embodiment of this specification, referring to the above example, based on the positive feedback text in the target feedback text, the recommendation score of the recommended text that has the same recommendation as the positive feedback text is increased, and based on the negative feedback text in the feedback text, the recommendation score of the recommended text that has the same recommendation as the negative feedback text is decreased. The target recommendation score corresponding to each initial recommended text is determined according to the adjustment result.

[0104] Furthermore, when adjusting the initial recommendation score based on the target feedback data using a data recommendation model, and determining the target recommendation score corresponding to the initial recommendation data based on the adjustment result, the specific processing procedure of the model includes: encoding the target feedback data to obtain a target feedback vector corresponding to the target feedback data; fusing the target feedback vector and the target encoding vector to obtain a fused encoding vector corresponding to the target feedback data; generating a target fused vector based on the keyword vector, the first matching score, the second matching score, and the fused encoding vector; decoding the target fused vector, and determining the target recommendation score corresponding to the initial recommendation data based on the decoding result.

[0105] The target feedback vector can be understood as the representation vector after encoding the target feedback data. For example, if the target feedback data is text data, the target feedback vector is the text semantic vector. The fusion encoding vector can be understood as the fusion representation vector calculated by the target feedback vector and the target encoding vector through an attention mechanism. In practice, since the target feedback data includes both positive and negative feedback data, the target feedback vector includes both positive and negative feedback vectors. When fusing the target feedback vector with the target encoding vector, positive and negative feedback fusion vectors can also be obtained. The positive feedback fusion vector is the fusion representation vector calculated by the target encoding vector and the positive feedback vector through an attention mechanism, and the negative feedback fusion vector is the fusion representation vector calculated by the target encoding vector and the negative feedback vector through an attention mechanism. The target fusion vector can be understood as a vector generated by concatenating the keyword vector, the first matching score, the second matching score, and the fusion encoding vector. The target fusion vector is used to calculate the overall relevance, thereby adjusting the initial recommendation score to obtain the target recommendation score.

[0106] Furthermore, when adjusting the initial recommendation score of the initial recommendation data based on the target feedback data, in order to avoid excessive adjustment that could lead to deviations in the model output, the score to be adjusted can be calculated based on the target feedback data. Specifically, adjusting the initial recommendation score based on the target feedback data and determining the target recommendation score of the initial recommendation data based on the adjustment result includes: calculating the modified score corresponding to the initial recommendation data based on the target feedback data; and calculating the target recommendation score corresponding to the initial recommendation data based on the modified score and the initial recommendation score.

[0107] The "modified score" can be understood as an adjustment to the initial recommended score. For example, if the initial recommended score is 60 and the modified score is 20, the adjusted initial recommended score will be 80. If the modified score is -20, the adjusted initial recommended score will be 40. The adjusted initial recommended score is the target recommended score.

[0108] In practical applications, since the target feedback data can be divided into positive feedback data and negative feedback data, the score modification value can also be divided into positive feedback modification value and negative feedback modification value. Positive feedback modification value increases the initial recommended score, while negative feedback modification value decreases the initial recommended score.

[0109] In a specific embodiment of this specification, referring to the above example, the modification score corresponding to the initial recommended text is calculated based on the target feedback text, and the target recommendation score corresponding to the initial recommended text is calculated based on the modification score and the initial recommendation score.

[0110] Based on this, by calculating the modified score corresponding to the initial recommendation data according to the target feedback data, the target recommendation score corresponding to the initial recommendation data can be calculated based on the modified score and the initial recommendation score corresponding to the initial recommendation data. This enables the feedback optimization of the initial recommendation data based on the target feedback data, thereby improving the accuracy of subsequent model output.

[0111] Furthermore, since the target feedback data includes both positive and negative feedback data, to avoid calculating incorrect target recommendation scores for the initial recommendation data, it is necessary to optimize each recommendation data in the initial recommendation data based on both the positive and negative feedback data. Specifically, the target feedback data includes both positive and negative feedback data. The process of adjusting the initial recommendation score based on the target feedback data and determining the target recommendation score corresponding to the initial recommendation data based on the adjustment result includes: determining the positive recommendation data corresponding to the positive feedback data in the initial recommendation data, calculating the gain score corresponding to the positive recommendation data, calculating the target recommendation score corresponding to the positive recommendation data based on the initial recommendation score and the gain score; and determining the negative recommendation data corresponding to the negative feedback data in the initial recommendation data, calculating the loss score corresponding to the negative recommendation data, and calculating the target recommendation score corresponding to the negative recommendation data based on the initial recommendation score and the loss score.

[0112] In this context, positive recommendation data can be understood as data in the initial recommendation data that is identical to historical recommendation data in the positive feedback data, and negative recommendation data can be understood as data in the initial recommendation data that is identical to historical recommendation data in the negative feedback data. For example, if the current initial recommendation data includes data A, data B, and data C, and data A is the historical recommendation data in the positive feedback data, then data A is determined to be positive recommendation data. If data B is the historical recommendation data in the negative feedback data, then data B is determined to be negative recommendation data. Subsequently, positive feedback optimization can be performed on the recommendation scores corresponding to the positive recommendation data, and negative feedback optimization can be performed on the recommendation scores corresponding to the negative recommendation data. Gain scores can be understood as the modified scores when performing positive feedback optimization on the recommendation scores corresponding to the positive recommendation data, and loss scores can be understood as the modified scores when performing negative feedback optimization on the recommendation scores corresponding to the negative recommendation data.

[0113] In practical applications, after determining the positive and negative recommendation data, the gain score corresponding to the positive recommendation data can be calculated based on the positive feedback data, and the loss score corresponding to the negative recommendation data can be calculated based on the negative feedback data. Subsequently, the target recommendation score corresponding to the positive recommendation data can be calculated based on the gain score and the initial recommendation score corresponding to the positive recommendation data, and the target recommendation score corresponding to the negative recommendation data can be calculated based on the loss score and the initial recommendation score corresponding to the negative recommendation data.

[0114] In a specific embodiment of this specification, referring to the above example, the positive recommendation text corresponding to the positive feedback text is determined in the initial recommendation text. The text content of the positive recommendation text is "community personnel management". The gain score of the positive recommendation text is calculated based on the positive feedback text. Based on the original initial recommendation score and gain score of the positive recommendation text, the target recommendation score of the positive recommendation text is calculated. Similarly, the negative recommendation text corresponding to the negative feedback text is determined in the initial recommendation text. The text content of the negative recommendation text is "medical testing issues". The loss score of the negative recommendation text is calculated based on the negative feedback text. Based on the original initial recommendation score and loss score of the negative recommendation text, the target recommendation score of the negative recommendation text is calculated.

[0115] Based on this, the gain and loss scores of positive and negative recommendation data are calculated respectively using positive and negative feedback data. This can increase the score of the positive recommendation data that is predicted more correctly in the initial recommendation data and decrease the score of the negative recommendation data that is predicted less correctly in the initial recommendation data. As a result, the positive recommendation data can be selected as the target recommendation data in the initial recommendation data. When the data recommendation model performs the recommendation task, the target recommendation data can be used as the model output result, thereby improving the accuracy of the model output.

[0116] Step 208: Based on the target recommendation score, determine the target recommendation data corresponding to the recommendation task from the initial recommendation data.

[0117] The target recommendation data can be understood as the final result of the recommendation task. When the recommendation task is executed through the data recommendation model, the target recommendation data is the final output of the model. The model output may contain only the target recommendation data or contain the target recommendation data and the target recommendation score corresponding to the target recommendation data.

[0118] In practical applications, after determining the target recommendation score corresponding to each initial recommendation data, selection can be made from the target recommendation data based on the target recommendation score. The target recommendation data with higher target recommendation scores can be selected. The specific number of selections can be determined according to a preset selection strategy. For example, the top K initial recommendation data can be selected as the target recommendation data, that is, K initial recommendation data are selected as the target recommendation data according to the target recommendation scores from high to low.

[0119] In a specific embodiment of this specification, referring to the example above, the target recommendation score corresponding to the initial recommended text "medical testing problem" is 85 points, and the target recommendation score corresponding to the initial recommended text "community personnel management" is 90 points. When the preset selection strategy only selects to output one recommended text, the initial recommended text with the higher target recommendation score is selected as the target recommended text, and the target recommended text is output as the model output result.

[0120] Furthermore, to avoid incorrectly selecting target recommended data based on the target recommendation score, the initial recommended data can be sorted according to the target recommendation score first, and then the target recommended data can be determined based on the sorting result. Specifically, determining the target recommended data corresponding to the recommendation task based on the target recommendation score includes: sorting the initial recommended data based on the target recommendation score; and selecting the target recommended data corresponding to the recommendation task from the initial recommended data according to the sorting result.

[0121] The sorting of initial recommendation data based on the target recommendation score can be understood as sorting the initial recommendation data from highest to lowest or lowest to highest according to the target recommendation score corresponding to each initial recommendation data. After sorting, the initial recommendation data in order can be obtained. In specific implementation, the target recommendation text can be selected from the sorting results according to the preset selection strategy. The preset selection strategy can be understood as the strategy for the number of output results of the recommendation task, or the preset selection strategy can also be the preset model output strategy, i.e., the strategy for the number of output results of the model. The number of recommendation texts output by the model can be determined according to the preset model output strategy.

[0122] In a specific embodiment of this specification, referring to the above example, after sorting the initial recommended texts according to the target recommendation score, the sorting result is "1: Community personnel management, 2: Medical testing issues". According to the preset model output strategy, it is determined that only one recommended text needs to be output. Therefore, "Community personnel management" is selected as the target recommended text and is used as the output result of the model.

[0123] Based on this, by sorting the initial recommendation data according to the target recommendation score, the target recommendation data can be selected more accurately from the initial recommendation data, so that the model outputs more accurate target recommendation data.

[0124] Furthermore, to prevent the model from outputting incorrect predicted recommendation data when encountering similar target data in the future, the target data can be stored based on user feedback for feedback optimization processing during subsequent model predictions. Specifically, the method further includes: obtaining the real recommendation data corresponding to the target data; comparing the real recommendation data and the target recommendation data, and determining the first recommendation data and the second recommendation data in the target recommendation data according to the comparison result; generating the first feedback data based on the target data and the first recommendation data, and storing the first feedback data in a positive feedback data set; and generating the second feedback data based on the target data and the second recommendation data, and storing the second feedback data in a negative feedback data set.

[0125] In this context, "real recommendation data" can be understood as the recommendation data selected from the results of the recommendation task or the model output that corresponds to the target data. Since real recommendation data is manually selected to correspond to the target data, it is guaranteed to be correctly predicted. By comparing the real recommendation data with the target recommendation data, we can determine which recommendation data the model predicted correctly and which were predicted incorrectly. The first recommendation data is the correctly predicted recommendation data, and the second recommendation data is the incorrectly predicted recommendation data. The first feedback data is the feedback data generated by combining the first recommendation data and the target data, and the second feedback data is the feedback data generated by combining the second recommendation data and the target data.

[0126] In practical applications, the first recommended data that is correctly predicted can be combined with the target data to generate the first feedback data, which is then stored as positive feedback data in the positive feedback data set. The second recommended data that is incorrectly predicted can be combined with the target data to generate the second feedback data, which is then stored as negative feedback data in the negative feedback data set. When similar data to the target data is encountered again, the first feedback data can be obtained from the positive feedback data set, and the second feedback data can be obtained from the negative feedback data set, thereby performing corresponding feedback optimization.

[0127] In a specific embodiment of this specification, referring to the above example, the actual recommended text corresponding to the target text is obtained. The content of the actual recommended text is "Community Personnel Management". The actual recommended text is compared with the target recommended text. Based on the comparison result, the first recommended text is determined to be "Community Personnel Management" and the second recommended text is "Medical Testing Question". A first feedback text is generated based on the first recommended text and the target text. The first feedback text is "Community Personnel Management: I live in xx community. Do I need to undergo home observation after returning from City A? I have already undergone medical testing". A second feedback text is generated based on the second recommended text and the target text. The second feedback text is "Medical Testing Question: I live in xx community. Do I need to undergo home observation after returning from City A? I have already undergone medical testing". The first feedback text is stored in the positive feedback text set, and the second feedback text is stored in the negative feedback text set.

[0128] Based on this, by dividing the recommendation results of this recommendation task or the target recommendation data output by the model into first recommendation data and second recommendation data, and generating corresponding first feedback data and second feedback data, the first feedback data can be stored in the positive feedback data set, and the second feedback data can be stored in the negative feedback data set. In subsequent recommendation tasks or when the model encounters data to be processed that is similar to the target data, the corresponding feedback data can be selected for feedback optimization processing, thereby achieving the effect of real-time feedback optimization of the model and ensuring the accuracy of the output results.

[0129] Furthermore, to avoid the inability to perform feedback optimization when the model processes the target data for the first time and there is no historical target data similar to the target data in the feedback data set, the target recommendation data can be directly determined based on the initial recommendation score. Specifically, when there is no corresponding target feedback data for the target data, the method further includes: using the initial recommendation score as the target recommendation score corresponding to the initial recommendation data, and performing the step of determining the target recommendation data corresponding to the target data based on the target recommendation score.

[0130] In practical applications, when there is no feedback data corresponding to the target data in the feedback database, the initial recommendation score predicted by the model is used as the target recommendation score, and the target recommendation data is selected from the initial recommendation data based on the target recommendation score.

[0131] In a specific embodiment of this specification, if the model has not processed the same type of target text before, there is no corresponding feedback text in the feedback text set. In this case, after determining the initial recommended text and initial recommended score corresponding to the target text, the initial recommended score is used as the target recommended score, and the target recommended text is selected from the initial recommended text according to the target recommended score and the model is output.

[0132] Based on this, by directly using the initial recommendation score as the target recommendation score, the target recommendation data can be output according to the target recommendation score without the model performing feedback optimization, thus ensuring that the model can output recommendation data normally.

[0133] Furthermore, to avoid selecting incorrect target recommendation data due to excessively low initial recommendation scores, the recommendation data can be optimized based on similar data. Specifically, after obtaining the initial recommendation data corresponding to the target data of the recommendation task and the initial recommendation score corresponding to the initial recommendation data, the process further includes: determining similar data corresponding to the target data based on the target data and the initial recommendation data; determining the recommendation data to be optimized and the default recommendation data corresponding to the similar data in the initial recommendation data, and determining the score to be adjusted corresponding to the recommendation data to be optimized in the initial recommendation score, wherein the recommendation data to be optimized is related to the similar recommendation data in the similar data, and the default recommendation data includes the recommendation data in the initial recommendation data other than the recommendation data to be optimized; calculating the optimization score corresponding to the recommendation data to be optimized based on the similar data, adjusting the score to be adjusted based on the optimization score to obtain the target recommendation score corresponding to the recommendation data to be optimized; and determining the target recommendation data corresponding to the target data based on the target recommendation score corresponding to the recommendation data to be optimized and the initial recommendation score corresponding to the default recommendation data.

[0134] Similar data can be understood as data that is semantically similar to or belongs to the same type as the target data. Similar data includes similar recommended data and similar target data. Similar data can be manually selected data of various types stored in the similar data set. Subsequently, similar data that is similar to the target data can be selected from the similar data set. After selecting similar data, the recommended data to be optimized and the default recommended data can be determined in the initial recommended data. The recommended data to be optimized can be understood as text that is the same as the recommended data in the similar data or text that has a relationship with the similar data. For example, the recommended data to be optimized has the same semantic features as the recommended data in the similar data. The default recommended data can be understood as the recommended data in the initial recommended data other than the recommended data to be optimized. The score to be adjusted can be understood as the initial recommendation score corresponding to the recommended data to be optimized. Subsequently, the initial recommendation score corresponding to the recommended data to be optimized needs to be adjusted.

[0135] In practical applications, the initial recommendation score of unprocessed target data may be too low, resulting in a large deviation between the model output and the actual result. To solve this problem, similar data can be introduced. Based on the similar data, the score to be adjusted for the recommended data to be optimized is adjusted, thereby determining the target recommendation score for the recommended data to be optimized. Subsequently, the target recommended data can be determined based on the target recommendation score for the recommended data to be optimized and the initial recommendation scores corresponding to other default recommended data.

[0136] In a specific embodiment of this specification, the similar text is determined to be "Medical testing supplies: My antigen test kit has expired, what happened?". The text to be optimized is "medical testing supplies" in the initial recommended text, while the default recommended text is "medical complaint issues". The score corresponding to the text to be optimized is calculated based on the similar text, and the score to be adjusted is adjusted accordingly to obtain the target recommended score. Subsequently, based on the target recommended score and the initial recommended score of the default recommended text, the target recommended text is determined to be "medical testing supplies", and this is output to the model.

[0137] Based on this, by introducing similar data for similarity optimization, the problem of the initial recommendation data differing too much from the real recommendation text due to the initial recommendation score being too low is avoided, thus ensuring the accuracy of the model output.

[0138] Furthermore, to ensure the model can correctly output recommended data, the data recommendation model performing the recommendation task can be pre-trained. Specifically, the training method for the data recommendation model includes: acquiring sample data, sample recommendation data, and sample feedback data, and inputting the sample data into the data recommendation model; determining the initial predicted recommendation data corresponding to the sample data and the initial predicted recommendation score corresponding to the initial predicted recommendation data, and selecting the predicted feedback data corresponding to the sample data from the feedback data set; adjusting the initial predicted recommendation score based on the predicted feedback data to obtain the target predicted recommendation score corresponding to the initial predicted recommendation data, and determining the predicted recommendation data corresponding to the sample data from the initial predicted recommendation data based on the target predicted recommendation score; calculating a first loss value for the sample recommendation data and the predicted recommendation data, and calculating a second loss value for the sample feedback data and the predicted feedback data; and tuning the parameters of the data recommendation model based on the first loss value and the second loss value until the model training termination condition is met.

[0139] Among them, sample data, sample recommendation data, and sample feedback data can all be understood as training data used to train the model. Sample data refers to the target sample data, sample recommendation data refers to the real recommendation data corresponding to the target sample text, and sample feedback data refers to the feedback data selected during the optimization process of the target sample data.

[0140] In practice, during model training, sample data is input into the data recommendation model, and initial predicted recommendation data and initial predicted recommendation scores are determined. Initial predicted recommendation data can be understood as the recommendation data predicted by the model based on the sample data, and initial predicted recommendation scores can be understood as the scores corresponding to the initial predicted recommendation data. Then, during feedback optimization, predicted feedback data is selected based on the sample data and initial predicted recommendation data. This predicted feedback data is the feedback data corresponding to the sample data, containing both positive and negative predicted feedback data. Based on this predicted feedback data, feedback optimization processing of the sample data prediction can be achieved, i.e., adjusting the initial predicted recommendation score according to the predicted feedback data, thereby determining the target predicted recommendation score corresponding to the initial predicted recommendation data. Subsequent predicted recommendation data is determined according to the target predicted recommendation score. The predicted recommendation data can be understood as the model's output result for this iteration. During model training, a first loss value can be calculated based on the sample recommendation data and predicted recommendation data, and a second loss value can be calculated based on the sample feedback data and predicted feedback data. The model parameters are then tuned based on the first and second loss values ​​until the model meets the training adjustment requirements, thus obtaining the trained target data recommendation model.

[0141] In practical applications, after obtaining the first loss value and the second loss value, a weighted loss value can be obtained based on the first loss value and the second loss value using a weighted average method. The model training conditions can be that the training rounds are met or the model parameters reach preset values. When the model training conditions are met, training will stop and the target data recommendation model will be obtained after training is completed.

[0142] In a specific embodiment of this specification, sample data, sample recommendation data, and sample feedback data are acquired, and the sample data is input into the data recommendation model. Initial predicted recommendation data corresponding to the sample data is determined. Predictive feedback data corresponding to the sample data is selected based on the sample data and the initial predicted recommendation data. Based on the predicted positive feedback data and the predicted negative feedback data in the predicted feedback data, the predicted recommendation scores of the corresponding recommendation data are adjusted respectively. The target predicted recommendation score corresponding to the initial predicted recommendation data is determined based on the adjustment results. The predicted recommendation data corresponding to the sample data is determined based on the target predicted recommendation score. A first loss value is calculated based on the sample recommendation data and the predicted recommendation data. A second loss value is calculated based on the sample feedback data and the predicted feedback data. The model parameters are tuned based on the first loss value and the second loss value. The model continues to be trained. After the number of training rounds reaches the number set in the model training conditions, the model training is stopped and the target data recommendation model is obtained.

[0143] In summary, by training the data recommendation model to obtain the target data recommendation model, it is possible to achieve self-learning based on positive and negative feedback, thereby ensuring the accuracy of the model's output and providing users with a better user experience.

[0144] This specification provides a data recommendation method, comprising: obtaining initial recommendation data corresponding to target data of a recommendation task, and an initial recommendation score corresponding to the initial recommendation data; selecting target feedback data corresponding to the target data from a feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks; adjusting the initial recommendation score based on the target feedback data to obtain a target recommendation score corresponding to the initial recommendation data; and determining the target recommendation data corresponding to the recommendation task from the initial recommendation data based on the target recommendation score. This method addresses the problem of inaccurate model prediction due to untimely model updates by selecting target feedback data corresponding to the target data from the target data and initial recommendation data, subsequently adjusting the initial recommendation score corresponding to the initial recommendation data based on the target feedback data to obtain the target recommendation score, and determining the target recommendation data corresponding to the target data based on the target recommendation score. It enables optimization of the model output based on feedback data without updating the model, allowing the model to adjust the initial recommendation score based on real-time feedback data, more accurately predicting the recommendation data corresponding to the target data, thereby providing a better user experience.

[0145] Figure 4 A flowchart of another data recommendation method provided according to an embodiment of this specification is shown, including steps 402 to 408.

[0146] Step 402: Obtain the initial classification text corresponding to the target text of the recommendation task, and the initial classification score corresponding to the initial classification text.

[0147] The target text can be understood as the text describing a question submitted by the target user in the project they are participating in. For example, the target user might submit a question about a product in an online shopping project, or a question about an online shopping service. After receiving the question text submitted by the target user, the question text can be input into a pre-trained text recommendation model. The initial classification text can be understood as the classification text predicted by the text recommendation model for the target text. The initial classification text represents the category of the question described in the question text, and the initial classification score is the output score of the initial classification text.

[0148] In one feasible approach, the text of the question submitted by the target user is obtained. The text of the question is "The goods I purchased have not been shipped, why can't I get a refund?" The question text is then input into a text recommendation model to determine the initial category text corresponding to the question text. The initial category text "refund question" has an initial category score of "80", and the initial category text "shipping question" has an initial category score of "90".

[0149] Step 404: Select the target feedback text corresponding to the target text from the feedback text set, wherein the feedback text set includes feedback texts of historical recommendation results of historical recommendation tasks.

[0150] In one feasible approach, based on the question text and the initial classification text, the corresponding feedback text is selected from the set of feedback texts. The content of the feedback text is "Refund issue: The merchant did not ship the goods to me, so I am applying for a refund" or "Return issue: The merchant did not ship the goods to me, so I am applying for a refund".

[0151] Step 406: Adjust the initial classification score based on the target feedback text to obtain the target classification score corresponding to the initial classification text.

[0152] In one feasible approach, the initial classification score is adjusted based on the target feedback text, resulting in "Refund Issue: 90 points" and "Shipping Issue: 85 points".

[0153] Step 408: Based on the target classification score, determine the target classification text corresponding to the recommendation task from the initial classification text.

[0154] In one feasible approach, the target category text is determined to be "refund question" in the initial category text based on the target category score, and the target category text is output to the model so that users can choose the target category text to express their true intentions. Subsequently, the user's question can be quickly located based on the user's choice, and the answer text of the corresponding question type can be determined according to the target category text.

[0155] This specification provides a data recommendation method, comprising: obtaining the target text of a recommendation task; determining the initial classification text corresponding to the target text and the initial classification score corresponding to the initial classification text; selecting the target feedback text corresponding to the target text from a set of feedback texts, wherein the set of feedback texts includes feedback texts of historical recommendation results from historical recommendation tasks; adjusting the initial classification score based on the target feedback text to obtain the target classification score corresponding to the initial classification text; and determining the target classification text corresponding to the recommendation task from the initial classification text based on the target classification score. This method addresses the problem of inaccurate model predictions due to untimely model updates by selecting the feedback text corresponding to the question text from the question text and the initial classification text. The feedback text is determined based on the historical classification results of the text recommendation model. Subsequently, the initial classification score corresponding to the initial classification text is adjusted based on the feedback text to obtain the target classification score, and the target classification text corresponding to the question text is determined based on the target classification score. This method enables optimization of the model output based on the feedback text without updating the model, allowing the model to adjust the initial classification score based on real-time feedback text, more accurately predicting the classification text corresponding to the question text, thereby providing a better user experience.

[0156] The above is an illustrative scheme of another data recommendation method in this embodiment. It should be noted that the technical solution of this data recommendation method belongs to the same concept as the technical solution of the data recommendation method described above. For details not described in detail in the technical solution of the data recommendation method, please refer to the description of the technical solution of the data recommendation method described above.

[0157] Figure 5 A flowchart of a model training method for cloud-side devices according to an embodiment of this specification is shown, including steps 502 to 512.

[0158] Step 502: Obtain the sample data, sample recommendation data, and sample feedback data submitted by the end device, and input the sample data into the data recommendation model.

[0159] In one feasible approach, the cloud-side device can be understood as the cloud computing device of the project provider, and the edge device can be understood as the client device of the project user. The project user can send sample text, sample recommendation text, and sample feedback text as training data to the cloud-side device, which will then train the model, thereby ensuring the data security of the project user and preventing the leakage of the project provider's training data.

[0160] Step 504: Determine the initial prediction recommendation data corresponding to the sample data and the initial prediction recommendation score corresponding to the initial prediction recommendation data, and select the prediction feedback data corresponding to the sample data based on the sample data and the initial prediction recommendation data.

[0161] Step 506: Adjust the initial prediction recommendation score based on the prediction feedback data to obtain the target prediction recommendation score corresponding to the initial prediction recommendation data. Based on the target prediction recommendation score, determine the prediction recommendation data corresponding to the sample data in the initial prediction recommendation data.

[0162] Step 508: Calculate the first loss value of the sample recommendation data and the predicted recommendation data, and calculate the second loss value of the sample feedback data and the predicted feedback data.

[0163] Step 510: Adjust the parameters of the data recommendation model based on the first loss value and the second loss value until the model training termination condition is met.

[0164] Step 512: Send the target model parameters corresponding to the data recommendation model that meets the model training termination condition to the edge device.

[0165] In one feasible approach, after the project provider trains the target data recommendation model based on the training data submitted by the project user and obtains the trained model, the target model parameters corresponding to the target data recommendation model can be sent to the end device of the project user, so that the project user can use the corresponding model based on the target model parameters.

[0166] This specification provides a model training method for cloud-based devices, comprising: acquiring sample data, sample recommendation data, and sample feedback data submitted by the edge device, and inputting the sample data into a data recommendation model; determining initial predicted recommendation data corresponding to the sample data and an initial predicted recommendation score corresponding to the initial predicted recommendation data; selecting predicted feedback data corresponding to the sample data based on the sample data and the initial predicted recommendation data; adjusting the initial predicted recommendation score based on the predicted feedback data to obtain a target predicted recommendation score corresponding to the initial predicted recommendation data; determining the predicted recommendation data corresponding to the sample data from the initial predicted recommendation data based on the target predicted recommendation score; calculating a first loss value for the sample recommendation data and the predicted recommendation data, and calculating a second loss value for the sample feedback data and the predicted feedback data; tuning the parameters of the data recommendation model based on the first loss value and the second loss value until the model training termination condition is met; and sending the target model parameters corresponding to the data recommendation model that meets the model training termination condition to the edge device. By training the data recommendation model on cloud-based devices using training data, the computational load on edge devices is reduced, thereby reducing user resource consumption and ensuring user data security.

[0167] The following is in conjunction with the appendix Figure 6A Taking the application of the data recommendation method provided in this specification in the customer service field as an example, the data recommendation method will be further explained. Figure 6A The flowchart of a data recommendation method provided in one embodiment of this specification is shown, with specific steps including steps 602 to 618.

[0168] Step 602: Obtain the target text for the text recommendation task and input the target text into the text recommendation model.

[0169] In one feasible approach, the target text A submitted by the user regarding a product return issue is obtained, and the target text A is input into a text recommendation model.

[0170] Step 604: Calculate the matching score between the target text and the recommended texts stored in the recommended text library.

[0171] In one feasible approach, the matching score between the target text A and each of the recommended texts stored in the recommended text library is calculated.

[0172] Step 606: Select an initial recommended text from the recommended texts stored in the recommended text library based on the matching score, and use the matching score as the initial recommended score corresponding to the initial recommended text.

[0173] In one feasible approach, initial recommended text B and initial recommended text C are selected from the recommended texts based on their matching scores, and the matching score corresponding to initial recommended text B is used as the initial recommended score, and the matching score corresponding to initial recommended text C is used as the initial recommended score.

[0174] Step 608: Based on the target text and the initial recommended text, select the positive feedback text corresponding to the target text from the positive feedback text set, and select the negative feedback text corresponding to the target text from the negative feedback text set.

[0175] In one feasible approach, initial positive feedback texts containing texts similar to the target text are selected from the positive feedback text set. Based on the initial recommended texts, the corresponding positive feedback text for the target text is determined from the initial positive feedback texts. Similarly, initial negative feedback texts containing texts similar to the target text are selected from the negative feedback text set. Based on the initial recommended texts, the corresponding negative feedback text for the target text is determined from the initial negative feedback texts.

[0176] Step 610: Use the positive feedback text and negative feedback text as the feedback text corresponding to the target text.

[0177] Step 612: Calculate the modification score corresponding to the initial recommended text based on the feedback text, and calculate the target recommendation score corresponding to the initial recommended text based on the modification score and the initial recommendation score.

[0178] In one feasible approach, positive recommendation texts corresponding to positive feedback texts are identified from the initial recommendation texts. A gain score is calculated for each positive recommendation text. Based on the initial recommendation score and the gain score, a target recommendation score is calculated for each positive recommendation text. Similarly, negative recommendation texts corresponding to negative feedback texts are identified from the initial recommendation texts. A deduction score is calculated for each negative recommendation text. Based on the initial recommendation score and the deduction score, a target recommendation score is calculated for each negative recommendation text.

[0179] Step 614: Sort the initial recommended texts based on the target recommendation score, select the target recommended text corresponding to the target text from the initial recommended texts according to the preset model output strategy, and output the target recommended text through the text recommendation model.

[0180] In one feasible approach, the initial recommended texts B and C are sorted according to the target recommendation score. Following a preset model output strategy, the initial recommended text B is determined as the target recommended text based on the sorting results, and the target recommended text is output through a text recommendation model.

[0181] In one feasible approach, when no feedback text exists for the target text, similar texts corresponding to the target text are determined based on the target text and the initial recommended text. Within the initial recommended text, the recommended text to be optimized and the default recommended text corresponding to the similar texts are determined. The adjusted score corresponding to the recommended text to be optimized is determined from the initial recommendation score. The optimized score corresponding to the recommended text to be optimized is calculated based on the similar texts. The adjusted score is then adjusted based on the optimized score. The target recommendation score corresponding to the recommended text to be optimized is determined based on the adjustment result. Finally, the target recommended text corresponding to the target text is determined based on the target recommendation score corresponding to the recommended text to be optimized and the initial recommendation score corresponding to the default recommended text, and the text recommendation model is output.

[0182] Step 616: Obtain the real recommended text corresponding to the target text, compare the real recommended text and the target recommended text, and determine the first recommended text and the second recommended text in the target recommended text based on the comparison results.

[0183] In one feasible approach, the true recommended text of the target text is obtained, the true recommended text and the target recommended text are compared, and based on the comparison result, the first recommended text in the target recommended text is determined as the initial recommended text B, and the second recommended text is determined as the initial recommended text C.

[0184] Step 618: Generate a first feedback text based on the target text and the first recommended text, and store the first feedback text in the positive feedback text set. Generate a second feedback text based on the target text and the second recommended text, and store the second feedback text in the negative feedback text set.

[0185] In one feasible approach, a first feedback text is generated based on the target text and the initial recommended text B and stored in a positive feedback text set, and a second feedback text is generated based on the target text and the initial recommended text C and stored in a negative feedback text set.

[0186] This specification provides a data recommendation method that addresses the issue of inaccurate model predictions due to untimely model updates. It selects a feedback text corresponding to the target text based on the target text and initial recommended text. The feedback text is determined based on the historical recommendation results of the text recommendation model. Subsequently, the initial recommendation score corresponding to the initial recommended text is adjusted based on the feedback text to obtain the target recommendation score. Finally, the target recommended text is determined based on the target recommendation score. This method optimizes the model's output based on feedback text without updating the model itself. It allows the model to adjust the initial recommendation score based on real-time feedback text, resulting in more accurate predictions of the recommended text corresponding to the target text and thus providing a better user experience.

[0187] The following is in conjunction with the appendix Figure 6BTaking the data recommendation method provided in this specification as an example in the application of item recommendation, the data recommendation method will be further explained. Figure 6B This is a schematic diagram illustrating a data recommendation method processing scenario provided in one embodiment of this specification. In the first input event text data, "I live in xx community, do I need to undergo home observation after returning from City A? I have already had a medical test," since this event text has no corresponding feedback data or similar data, the initial recommendation score of the initial recommendation item can be directly used as the target recommendation score; that is, the initial recommendation item is the target recommendation item. Subsequently, after determining the true recommendation item, the current recommendation result can be compared with the true recommendation item, thereby storing the incorrectly recommended data "medical testing problem" in the negative feedback event set and the correctly recommended data "community personnel management" in the positive feedback event set. In the second input event text data, "I live in xx community, do I need to undergo observation after returning from City B? I have previously had a medical test," since similar events have been processed before, negative feedback data and positive feedback data can be determined from the negative feedback event set and the positive feedback event set, respectively. This adjusts the initial recommendation score in the initial recommendation item, determining the target recommendation item. Subsequently, it can be further compared with the true recommendation item, and the results of this predicted recommendation can be saved to different feedback event sets. In the third input event text, "I felt unwell after a medical test at the hospital, and I believe there is a problem with the medical testing supplies," since the model has not encountered this event text before, it can search for similar data in the similar event set. If similar data is found, the initial recommendation is enhanced based on similar events, thereby improving the results with lower recommendation scores and outputting more accurate recommendations. Through the model's processing in these three different scenarios, the concept of the real-time feedback perception link proposed in the data recommendation method provided in this manual is illustrated. The algorithm's recommendation results are compared with the user's final selection, and the user's positive and negative feedback information is recalled through a real-time vectorized recall link. This enables efficient and accurate adjustments based on the user's real-time feedback without updating the model.

[0188] It should be noted that the data recommendation method provided in this manual can be applied to item recommendation scenarios, as shown in [reference needed]. Figure 6C , Figure 6CThis is a schematic diagram illustrating a data recommendation method for event recommendation provided in one embodiment of this specification. After an event is input into the model, the event recommendation algorithm recalls and scores the events, determining the initial recommended events and initial recommendation scores. The scores of the initial recommended events are adjusted using recall feedback data, and the corresponding recommendation results are output. After determining the user's click selection result using real-time tracking data, the final event is obtained and compared with the recommendation result. Correctly recommended events are stored in the positive feedback event set (event library), and incorrectly recommended events are stored in the negative feedback event library. Data from the positive feedback event library is then stored offline in the similar event base library. The data recommendation method provided in this specification can also be applied to event classification scenarios, as described in [reference needed]. Figure 6D , Figure 6D This is a schematic diagram illustrating a data recommendation method for item classification provided in one embodiment of this specification. After an event is input into the model, the classification algorithm scores the event, determines the initial classification data and corresponding initial classification scores, and adjusts the initial classification scores by recalling feedback data through a re-ranking model. Based on the classification item logic, it outputs the corresponding target classification result. Subsequent processing logic is the same as the item recommendation described above and will not be elaborated further. The data recommendation method provided in this specification can also be applied to other project scenarios, such as product recommendation and product classification. This specification does not impose specific limitations on the application scenarios of the data recommendation method; it can be deployed and applied according to actual conditions.

[0189] Corresponding to the above method embodiments, this specification also provides embodiments of a data recommendation device. Figure 7 A schematic diagram of a data recommendation device according to an embodiment of this specification is shown. Figure 7 As shown, the device includes:

[0190] The data acquisition module 702 is configured to acquire the initial recommendation data corresponding to the target data of the recommendation task, and the initial recommendation score corresponding to the initial recommendation data;

[0191] The data selection module 704 is configured to select target feedback data corresponding to the target data from the feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks;

[0192] The data adjustment module 706 is configured to adjust the initial recommendation score based on the target feedback data to obtain the target recommendation score corresponding to the initial recommendation data;

[0193] The data determination module 708 is configured to determine the target recommendation data corresponding to the recommendation task from the initial recommendation data based on the target recommendation score.

[0194] Optionally, the data acquisition module 702 is further configured to: acquire target data for the recommendation task, and calculate a matching score between the target data and the recommendation data stored in the recommendation database; select initial recommendation data from the recommendation data stored in the recommendation database based on the matching score, and use the matching score as the initial recommendation score corresponding to the initial recommendation data.

[0195] Optionally, the data selection module 704 is further configured to: select positive feedback data corresponding to the target data from the positive feedback data set and select negative feedback data corresponding to the target data from the negative feedback data set, based on the target data and the initial recommended data.

[0196] Optionally, the data selection module 704 is further configured to: select initial positive feedback data containing data with a similar relationship to the target data from the positive feedback data set; determine the positive feedback data corresponding to the target data from the initial positive feedback data based on the initial recommended data; and select initial negative feedback data containing data with a similar relationship to the target data from the negative feedback data set; determine the negative feedback data corresponding to the target data from the initial negative feedback data based on the initial recommended data.

[0197] Optionally, the data adjustment module 706 is further configured to: determine the positive recommendation data corresponding to the positive feedback data in the initial recommendation data, calculate the gain score corresponding to the positive recommendation data, calculate the target recommendation score corresponding to the positive recommendation data based on the initial recommendation score and the gain score, and determine the negative recommendation data corresponding to the negative feedback data in the initial recommendation data, calculate the loss score corresponding to the negative recommendation data, and calculate the target recommendation score corresponding to the negative recommendation data based on the initial recommendation score and the loss score.

[0198] Optionally, the device further includes a similarity adjustment module, configured to: determine similar data corresponding to the target data based on the target data and the initial recommendation data; determine, in the initial recommendation data, the recommended data to be optimized and the default recommendation data corresponding to the similar data, and determine the score to be adjusted corresponding to the recommended data to be optimized in the initial recommendation score, wherein the recommended data to be optimized is associated with the similar recommendation data in the similar data, and the default recommendation data includes the recommendation data in the initial recommendation data excluding the recommended data to be optimized; calculate the optimization score corresponding to the recommended data to be optimized based on the similar data, adjust the score to be adjusted based on the optimization score to obtain the target recommendation score corresponding to the recommended data to be optimized; and determine the target recommendation data corresponding to the target data based on the target recommendation score corresponding to the recommended data to be optimized and the initial recommendation score corresponding to the default recommendation data.

[0199] Optionally, the device further includes a storage module configured to: acquire real recommendation data corresponding to the target data; compare the real recommendation data and the target recommendation data, and determine first recommendation data and second recommendation data in the target recommendation data according to the comparison result; generate first feedback data according to the target data and the first recommendation data, and store the first feedback data in a positive feedback data set; and generate second feedback data according to the target data and the second recommendation data, and store the second feedback data in a negative feedback data set.

[0200] Optionally, the device further includes a training module configured to: acquire sample data, sample recommendation data, and sample feedback data, and input the sample data into the data recommendation model; determine the initial predicted recommendation data corresponding to the sample data and the initial predicted recommendation score corresponding to the initial predicted recommendation data, and select the predicted feedback data corresponding to the sample data from the feedback data set; adjust the initial predicted recommendation score based on the predicted feedback data to obtain the target predicted recommendation score corresponding to the initial predicted recommendation data, and determine the predicted recommendation data corresponding to the sample data from the initial predicted recommendation data according to the target predicted recommendation score; calculate a first loss value for the sample recommendation data and the predicted recommendation data, and calculate a second loss value for the sample feedback data and the predicted feedback data; and tune the data recommendation model based on the first loss value and the second loss value until the model training termination condition is met.

[0201] Optionally, the data acquisition module 702 is further configured to: extract keyword vectors from the target data; determine initial recommended data corresponding to the target data based on the keyword vectors; encode the target data and the initial recommended data to obtain a target encoding vector corresponding to the target data and an initial recommended encoding vector corresponding to the initial recommended data; calculate a first matching score and a second matching score corresponding to the target data based on the target encoding vector and the initial recommended encoding vector, wherein the first matching score is the matching score between the target data and the initial recommended data, and the second matching score is the matching score between the data types to which the target data and the initial recommended data belong; and determine the initial recommended score corresponding to the initial recommended data based on the first matching score and the second matching score.

[0202] Optionally, the data adjustment module 706 is further configured to: encode the target feedback data to obtain a target feedback vector corresponding to the target feedback data; fuse the target feedback vector and the target encoding vector to obtain a fused encoding vector corresponding to the target feedback data; generate a target fused vector based on the keyword vector, the first matching score, the second matching score, and the fused encoding vector; decode the target fused vector, and determine the target recommendation score corresponding to the initial recommendation data based on the decoding result.

[0203] This specification provides a data recommendation device, comprising: a data acquisition module configured to acquire initial recommendation data corresponding to target data of a recommendation task and an initial recommendation score corresponding to the initial recommendation data; a data selection module configured to select target feedback data corresponding to the target data from a feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks; a data adjustment module configured to adjust the initial recommendation score based on the target feedback data to obtain a target recommendation score corresponding to the initial recommendation data; and a data determination module configured to determine the target recommendation data corresponding to the recommendation task from the initial recommendation data based on the target recommendation score. This device enables optimization of the model output based on feedback data without updating the model, allowing the model to adjust the initial recommendation score according to real-time feedback data, more accurately predicting the recommendation data corresponding to the target data, thereby providing a better user experience.

[0204] The above is an illustrative scheme of a data recommendation device according to this embodiment. It should be noted that the technical solution of this data recommendation device and the technical solution of the data recommendation method described above belong to the same concept. For details not described in detail in the technical solution of the data recommendation device, please refer to the description of the technical solution of the data recommendation method described above.

[0205] Corresponding to the above method embodiments, this specification also provides another embodiment of a data recommendation device. Figure 8 A schematic diagram of another data recommendation device provided in one embodiment of this specification is shown. For example... Figure 8 As shown, the device includes:

[0206] The text acquisition module 802 is configured to acquire the initial classification text corresponding to the target text of the recommendation task, and the initial classification score corresponding to the initial classification text;

[0207] The text selection module 804 is configured to select the target feedback text corresponding to the target text from the feedback text set, wherein the feedback text set includes the feedback text of the historical recommendation results of the historical recommendation task;

[0208] The text adjustment module 806 is configured to adjust the initial classification score based on the target feedback text to obtain the target classification score corresponding to the initial classification text.

[0209] The text determination module 808 is configured to determine the target classification text corresponding to the recommendation task from the initial classification text based on the target classification score.

[0210] This specification provides a data recommendation device, comprising: a text acquisition module configured to acquire an initial category text corresponding to the target text of a recommendation task and an initial category score corresponding to the initial category text; a text selection module configured to select a target feedback text corresponding to the target text from a set of feedback texts, wherein the set of feedback texts includes feedback texts of historical recommendation results from historical recommendation tasks; a text adjustment module configured to adjust the initial category score based on the target feedback text to obtain a target category score corresponding to the initial category text; and a text determination module configured to determine the target category text corresponding to the recommendation task from the initial category texts based on the target category score. This device enables optimization of the model output based on feedback text without updating the model, allowing the model to adjust the initial recommendation score based on real-time feedback text, more accurately predicting the recommended text corresponding to the target text, thereby providing a better user experience.

[0211] The above is an illustrative scheme of a data recommendation device according to this embodiment. It should be noted that the technical solution of this data recommendation device and the technical solution of the data recommendation method described above belong to the same concept. For details not described in detail in the technical solution of the data recommendation device, please refer to the description of the technical solution of the data recommendation method described above.

[0212] Corresponding to the above method embodiments, this specification also provides embodiments of a model training device applied to cloud-side devices. Figure 9 A schematic diagram of a model training device for cloud-based equipment, provided in one embodiment of this specification, is shown. Figure 9 As shown, the device includes:

[0213] The acquisition module 902 is configured to acquire sample data, sample recommendation data and sample feedback data submitted by the end device, and input the sample data into the data recommendation model;

[0214] The determining module 904 is configured to determine the initial prediction recommendation data corresponding to the sample data and the initial prediction recommendation score corresponding to the initial prediction recommendation data, and select the prediction feedback data corresponding to the sample data based on the sample data and the initial prediction recommendation data;

[0215] The adjustment module 906 is configured to adjust the initial prediction recommendation score based on the prediction feedback data to obtain a target prediction recommendation score corresponding to the initial prediction recommendation data, and determine the prediction recommendation data corresponding to the sample data in the initial prediction recommendation data according to the target prediction recommendation score.

[0216] The calculation module 908 is configured to calculate a first loss value of the sample recommendation data and the predicted recommendation data, and to calculate a second loss value of the sample feedback data and the predicted feedback data.

[0217] The parameter tuning module 910 is configured to tune the parameters of the data recommendation model based on the first loss value and the second loss value until the model training termination condition is met.

[0218] The sending module 912 is configured to send the target model parameters corresponding to the data recommendation model that meets the model training termination condition to the end device.

[0219] This specification provides a model training device for cloud-based devices, comprising: an acquisition module configured to acquire sample data, sample recommendation data, and sample feedback data submitted by an edge device, and input the sample data into the data recommendation model; a determination module configured to determine initial predicted recommendation data corresponding to the sample data and an initial predicted recommendation score corresponding to the initial predicted recommendation data, and select predicted feedback data corresponding to the sample data based on the sample data and the initial predicted recommendation data; an adjustment module configured to adjust the initial predicted recommendation score based on the predicted feedback data to obtain a target predicted recommendation score corresponding to the initial predicted recommendation data, and determine the predicted recommendation data corresponding to the sample data from the initial predicted recommendation data based on the target predicted recommendation score; a calculation module configured to calculate a first loss value of the sample recommendation data and the predicted recommendation data, and calculate a second loss value of the sample feedback data and the predicted feedback data; a parameter tuning module configured to tune the data recommendation model based on the first loss value and the second loss value until the model training termination condition is met; and a sending module configured to send the target model parameters corresponding to the data recommendation model that meets the model training termination condition to the edge device. By training the data recommendation model using cloud-based devices based on training data, the computational load on edge devices is reduced, thereby reducing resource consumption for users and ensuring data security.

[0220] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, the data recommendation device and model training device are basically similar to the data recommendation method and model training method embodiments, so the description is relatively simple. Relevant parts can be referred to the descriptions of the data recommendation method and model training method embodiments.

[0221] Figure 10 A structural block diagram of a computing device 1000 according to one embodiment of this specification is shown. The components of the computing device 1000 include, but are not limited to, a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and a database 1050 is used to store data.

[0222] The computing device 1000 also includes an access device 1040, which enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 1040 may include one or more of any type of wired or wireless network interface (e.g., a network interface controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.

[0223] In one embodiment of this specification, the above-described components of the computing device 1000 and Figure 10 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 10 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0224] The computing device 1000 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 1000 can also be a mobile or stationary server.

[0225] The processor 1020 is used to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned data recommendation method and model training method.

[0226] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. In particular, the computing device embodiments are basically similar to the data recommendation method and model training method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the data recommendation method and model training method embodiments.

[0227] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described data recommendation method and model training method.

[0228] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the computer-readable storage medium embodiments are basically similar to the data recommendation method and model training method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the data recommendation method and model training method embodiments.

[0229] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described data recommendation method and model training method.

[0230] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the computer program embodiments are relatively simple in description because they are fundamentally similar to the data recommendation method and model training method embodiments; relevant parts can be referred to the descriptions of the data recommendation method and model training method embodiments.

[0231] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0232] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0233] It should be noted that the above description describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous. Secondly, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification. In the above embodiments, the descriptions of each embodiment have their own emphasis; for parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0234] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A data recommendation method, applied to product recommendation scenarios, comprising: Obtain the initial recommendation data corresponding to the target data of the recommendation task, and the initial recommendation score corresponding to the initial recommendation data. The target data includes user behavior data, and the initial recommendation score is the output probability of the initial recommendation data. The step of obtaining the initial recommendation data corresponding to the target data of the recommendation task and the initial recommendation score corresponding to the initial recommendation data includes: determining the correlation between the target data and each recommendation data according to the keyword vector in the target data, thereby determining the initial recommendation data among multiple recommendation data, and calculating the initial recommendation score corresponding to the initial recommendation data according to the target encoding vector and the initial recommendation vector, wherein the target encoding vector is the encoding vector of the target data, and the initial recommendation vector is the encoding vector of the initial recommendation data; Select the target feedback data corresponding to the target data in the feedback data set, wherein the feedback data set includes feedback data of historical recommendation results of historical recommendation tasks; The initial recommendation score is adjusted based on the target feedback data to obtain the target recommendation score corresponding to the initial recommendation data; Based on the target recommendation score, the target recommendation data corresponding to the recommendation task is determined from the initial recommendation data.

2. The method as described in claim 1, wherein obtaining the initial recommendation data corresponding to the target data of the recommendation task and the initial recommendation score corresponding to the initial recommendation data includes: Obtain the target data for the recommendation task, and calculate the matching score between the target data and the recommendation data stored in the recommendation database; Based on the matching score, initial recommended data is selected from the recommended data stored in the recommendation database, and the matching score is used as the initial recommendation score corresponding to the initial recommended data.

3. The method as described in claim 1, wherein the target feedback data includes positive feedback data and negative feedback data; in, Select the target feedback data corresponding to the target data in the feedback data set, including: Based on the target data and the initial recommendation data, positive feedback data corresponding to the target data is selected from the positive feedback data set, and negative feedback data corresponding to the target data is selected from the negative feedback data set.

4. The method of claim 3, wherein, based on the target data and the initial recommendation data, positive feedback data corresponding to the target data is selected from a set of positive feedback data, and negative feedback data corresponding to the target data is selected from a set of negative feedback data, comprising: Select initial positive feedback data that contains data that has a similar relationship with the target data from the positive feedback data set; and determine the positive feedback data corresponding to the target data from the initial positive feedback data based on the initial recommendation data. Select initial negative feedback data from the negative feedback data set that contains data that has a similar relationship to the target data, and determine the negative feedback data corresponding to the target data from the initial negative feedback data based on the initial recommendation data.

5. The method as described in claim 1, wherein the target feedback data includes positive feedback data and negative feedback data; in, Adjusting the initial recommendation score based on the target feedback data, and determining the target recommendation score corresponding to the initial recommendation data based on the adjustment result, includes: From the initial recommendation data, determine the positive recommendation data corresponding to the positive feedback data, calculate the gain score corresponding to the positive recommendation data, and based on the initial recommendation score and the gain score, calculate the target recommendation score corresponding to the positive recommendation data. The negative recommendation data corresponding to the negative feedback data is determined from the initial recommendation data, the deduction score corresponding to the negative recommendation data is calculated, and the target recommendation score corresponding to the negative recommendation data is calculated based on the initial recommendation score and the deduction score.

6. The method as described in claim 1, further comprising, after obtaining the initial recommendation data corresponding to the target data of the recommendation task and the initial recommendation score corresponding to the initial recommendation data: Based on the target data and the initial recommendation data, determine the similar data corresponding to the target data; In the initial recommendation data, the recommended data to be optimized and the default recommendation data corresponding to the similar data are determined, and the score to be adjusted corresponding to the recommended data to be optimized is determined in the initial recommendation score. The recommended data to be optimized is associated with the similar recommendation data in the similar data. The default recommendation data includes the recommendation data in the initial recommendation data other than the recommended data to be optimized. Calculate the optimization score corresponding to the recommended data to be optimized based on the similar data, adjust the score to be adjusted based on the optimization score, and obtain the target recommendation score corresponding to the recommended data to be optimized. Based on the target recommendation score corresponding to the recommendation data to be optimized and the initial recommendation score corresponding to the default recommendation data, the target recommendation data is determined.

7. The method of claim 1, further comprising: Obtain the actual recommendation data corresponding to the target data; Compare the real recommendation data and the target recommendation data, and determine the first recommendation data and the second recommendation data from the target recommendation data based on the comparison results; First feedback data is generated based on the target data and the first recommendation data, and the first feedback data is stored in the positive feedback data set. as well as, The second feedback data is generated based on the target data and the second recommendation data, and the second feedback data is stored in the negative feedback data set.

8. The method as described in any one of claims 1 to 7, wherein the recommendation task is performed by a data recommendation model; in, The training method for the data recommendation model includes: Acquire sample data, sample recommendation data, and sample feedback data, and input the sample data into the data recommendation model; Determine the initial prediction recommendation data corresponding to the sample data and the initial prediction recommendation score corresponding to the initial prediction recommendation data, and select the prediction feedback data corresponding to the sample data from the feedback data set; Based on the predicted feedback data, the initial predicted recommendation score is adjusted to obtain the target predicted recommendation score corresponding to the initial predicted recommendation data. Based on the target predicted recommendation score, the predicted recommendation data corresponding to the sample data is determined in the initial predicted recommendation data. Calculate the first loss value of the sample recommendation data and the predicted recommendation data, and calculate the second loss value of the sample feedback data and the predicted feedback data; The data recommendation model is tuned based on the first loss value and the second loss value until the model training termination condition is met.

9. The method as described in any one of claims 1 to 7, wherein the recommendation task is performed by a data recommendation model; in, The initial recommendation score is calculated based on the target encoding vector and the initial recommendation vector, corresponding to the initial recommendation data, including: The target data and the initial recommendation data are encoded to obtain the target encoding vector corresponding to the target data and the initial recommendation encoding vector corresponding to the initial recommendation data. Calculate a first matching score and a second matching score corresponding to the target data based on the target encoding vector and the initial recommendation encoding vector, wherein the first matching score is the matching score between the target data and the initial recommendation data, and the second matching score is the matching score between the data types of the target data and the initial recommendation data. Based on the first matching score and the second matching score, the initial recommendation score corresponding to the initial recommendation data is determined; Adjusting the initial recommendation score based on the target feedback data, and determining the target recommendation score corresponding to the initial recommendation data based on the adjustment result, includes: The target feedback data is encoded to obtain the target feedback vector corresponding to the target feedback data; The target feedback vector and the target encoding vector are fused to obtain the fused encoding vector corresponding to the target feedback data; A target fusion vector is generated based on the keyword vector, the first matching score, the second matching score, and the fusion encoding vector; The target fusion vector is decoded, and the target recommendation score corresponding to the initial recommendation data is determined based on the decoding result.

10. A data recommendation method, comprising: Obtain the initial classification text corresponding to the target text of the recommendation task, and the initial classification score corresponding to the initial classification text, wherein the initial classification score is the output probability of the initial classification text; The process of obtaining the initial classification text corresponding to the target text of the recommendation task and the initial classification score corresponding to the initial classification text includes: determining the correlation between the target text and each classification text based on the keyword vector in the target text, thereby determining the initial classification text among multiple classification texts, and calculating the initial classification score corresponding to the initial classification text based on the target encoding vector and the initial recommendation vector, wherein the target encoding vector is the encoding vector of the target text, and the initial recommendation vector is the encoding vector of the initial classification text; Select the target feedback text corresponding to the target text in the feedback text set, wherein the feedback text set includes feedback texts of historical recommendation results of historical recommendation tasks; The initial classification score is adjusted based on the target feedback text to obtain the target classification score corresponding to the initial classification text; Based on the target classification score, the target classification text corresponding to the recommendation task is determined from the initial classification text.

11. A model training method applied to cloud-based devices in a product recommendation scenario, comprising: Acquire sample data, sample recommendation data, and sample feedback data submitted by the end-side device, and input the sample data into the data recommendation model; Determine the initial predicted recommendation data corresponding to the sample data and the initial predicted recommendation score corresponding to the initial predicted recommendation data. Select the predicted feedback data corresponding to the sample data based on the sample data and the initial predicted recommendation data. The sample data includes user behavior data, and the initial predicted recommendation score is the output probability of the initial predicted recommendation data. The step of determining the initial predicted recommendation data corresponding to the sample data and the initial predicted recommendation score corresponding to the initial predicted recommendation data includes: determining the correlation between the sample data and each recommendation data according to the keyword vector in the sample data, thereby determining the initial predicted recommendation data among multiple recommendation data, and calculating the initial predicted recommendation score corresponding to the initial predicted recommendation data according to the target encoding vector and the initial recommendation vector, wherein the target encoding vector is the encoding vector of the sample data, and the initial recommendation vector is the encoding vector of the initial predicted recommendation data; Based on the predicted feedback data, the initial predicted recommendation score is adjusted to obtain the target predicted recommendation score corresponding to the initial predicted recommendation data. Based on the target predicted recommendation score, the predicted recommendation data corresponding to the sample data is determined in the initial predicted recommendation data. Calculate the first loss value of the sample recommendation data and the predicted recommendation data, and calculate the second loss value of the sample feedback data and the predicted feedback data; The data recommendation model is tuned based on the first loss value and the second loss value until the model training termination condition is met. The target model parameters corresponding to the data recommendation model that meets the model training termination condition are sent to the edge device.

12. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the method according to any one of claims 1-11.

13. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-11.

14. A computer program product comprising computer instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1-11.

Citation Information

Patent Citations

  • Information scoring method and device and storage medium

    CN107729542A

  • Training method and device of sequence recommendation model

    CN115564532A