Data processing method and device, and computer device
By constructing target word pairs and using a target model to predict the probability of candidate rewritten words, the problem of selecting effective rewritten words from candidate rewritten words is solved, achieving more accurate and efficient rewritten word selection and improving the quality of search engine feedback information.
Patent Information
- Application Number
- CN202210946984.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2042-08-08
AI Technical Summary
How to accurately select effective rewrites of search terms from a large number of candidate rewrites and improve the quality of search engine feedback information.
Target word pairs are constructed, and the probability of candidate rewritten words is predicted based on feature information using the target model. Valid rewritten words are then sorted and selected based on the probability. The target model is trained using training samples and sample labels, taking into account the posterior data and semantic relationships between candidate rewritten words and target search words.
It improves the accuracy and prediction efficiency of effective rewritten words, reduces semantic drift, and enhances the quality of search engine feedback.
Smart Images

Figure CN115292577B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, specifically to the field of computer technology, and in particular to a data processing method, apparatus, and computer equipment. Background Technology
[0002] With the rapid development of internet technology, search engines are increasingly widely used in people's work, study, and daily lives. Currently, after receiving a search term from an input user, search engines typically first recall candidate paraphrases for that search term, then filter out the effective paraphrases from these candidates, and finally use these effective paraphrases along with the original search term to output relevant feedback information to the user. Therefore, how to determine the effective paraphrases from a large number of candidate paraphrases has become a current research hotspot. Summary of the Invention
[0003] This application provides a data processing method, apparatus, and computer device that can determine effective rewritten words for target search terms based on the ranking results of candidate rewritten words, thereby improving the accuracy of effective rewritten word selection.
[0004] On one hand, embodiments of this application provide a data processing method, the method comprising:
[0005] After determining the N candidate rewriting words corresponding to the target search term, N target word pairs are constructed using the target search term and the N candidate rewriting words; a target word pair includes the target search term and a candidate rewriting word, and the candidate rewriting words in different target word pairs are all different, where N is a positive integer;
[0006] The target model is invoked to predict the probability that the candidate rewritten words in each target word pair are valid rewritten words of the target search word based on the feature information of each target word pair. The target model is trained using at least one training sample and corresponding sample labels. A training sample includes a sample search word and a sample rewritten word. The sample label of any training sample is determined based on the posterior data of each word in the corresponding training sample, and the sample label of any training sample is used to indicate whether the sample rewritten word in the corresponding training sample is a valid rewritten word of the corresponding sample search word.
[0007] The N candidate rewritten words are sorted based on the predicted probabilities, and the effective rewritten words of the target search term are selected from the N candidate rewritten words according to the sorting results.
[0008] On the other hand, embodiments of this application provide a data processing apparatus, the apparatus comprising:
[0009] The construction unit is used to construct N target word pairs after determining N candidate rewriting words corresponding to the target search word, using the target search word and the N candidate rewriting words; a target word pair includes the target search word and a candidate rewriting word, and the candidate rewriting words in different target word pairs are different from each other, where N is a positive integer;
[0010] The prediction unit is used to call the target model to predict the probability that the candidate rewritten words in each target word pair are valid rewritten words of the target search word based on the feature information of each target word pair. The target model is trained using at least one training sample and corresponding sample labels. A training sample includes a sample search word and a sample rewritten word. The sample label of any training sample is determined based on the posterior data of each word in the corresponding training sample, and the sample label of any training sample is used to indicate whether the sample rewritten word in the corresponding training sample is a valid rewritten word of the corresponding sample search word.
[0011] The sorting unit is used to sort the N candidate rewrite words based on the predicted probabilities, so as to select the effective rewrite words of the target search word from the N candidate rewrite words according to the sorting results.
[0012] In another aspect, embodiments of this application provide a computer device, which includes an input interface, an output interface, a processor, and a computer storage medium. The processor is used to invoke one or more instructions stored in the computer storage medium to execute the following steps:
[0013] After determining the N candidate rewriting words corresponding to the target search term, N target word pairs are constructed using the target search term and the N candidate rewriting words; a target word pair includes the target search term and a candidate rewriting word, and the candidate rewriting words in different target word pairs are all different, where N is a positive integer;
[0014] The target model is invoked to predict the probability that the candidate rewritten words in each target word pair are valid rewritten words of the target search word based on the feature information of each target word pair. The target model is trained using at least one training sample and corresponding sample labels. A training sample includes a sample search word and a sample rewritten word. The sample label of any training sample is determined based on the posterior data of each word in the corresponding training sample, and the sample label of any training sample is used to indicate whether the sample rewritten word in the corresponding training sample is a valid rewritten word of the corresponding sample search word.
[0015] The N candidate rewritten words are sorted based on the predicted probabilities, and the effective rewritten words of the target search term are selected from the N candidate rewritten words according to the sorting results.
[0016] In another aspect, embodiments of this application provide a computer storage medium storing one or more instructions, which are adapted to be executed by the processor as follows:
[0017] After determining the N candidate rewriting words corresponding to the target search term, N target word pairs are constructed using the target search term and the N candidate rewriting words; a target word pair includes the target search term and a candidate rewriting word, and the candidate rewriting words in different target word pairs are all different, where N is a positive integer;
[0018] The target model is invoked to predict the probability that the candidate rewritten words in each target word pair are valid rewritten words of the target search word based on the feature information of each target word pair. The target model is trained using at least one training sample and corresponding sample labels. A training sample includes a sample search word and a sample rewritten word. The sample label of any training sample is determined based on the posterior data of each word in the corresponding training sample, and the sample label of any training sample is used to indicate whether the sample rewritten word in the corresponding training sample is a valid rewritten word of the corresponding sample search word.
[0019] The N candidate rewritten words are sorted based on the predicted probabilities, and the effective rewritten words of the target search term are selected from the N candidate rewritten words according to the sorting results.
[0020] In another aspect, embodiments of this application provide a computer program product or computer program that includes one or more instructions stored in a computer storage medium, and the processor of a computer device executes the above-mentioned data processing method by calling the one or more instructions.
[0021] This application, after determining N candidate rewritten terms corresponding to the target search term, ranks these N candidate rewritten terms by first constructing N target word pairs with the target search term and the N candidate rewritten terms. A target model is then used to predict the probability that each candidate rewritten term in the target word pair is a valid rewritten term for the target search term. Then, based on the probability of each candidate rewritten term being a valid rewritten term for the target search term, the N candidate rewritten terms are ranked to determine the valid rewritten terms for the target search term from the ranking results. Utilizing the target model allows for automated probability prediction, thereby improving prediction automation and intelligence, increasing prediction efficiency, improving ranking processing efficiency, and ultimately improving the efficiency of selecting valid rewritten terms. Furthermore, the target model is obtained by training the model using training samples and corresponding sample labels. These sample labels can be obtained by labeling the training samples using the posterior data of each word in the training samples. This allows the relative superiority or inferiority of the posterior performance of each word to be taken into account when determining the sample labels, which can improve the reliability of the sample labels to a certain extent, thereby improving the model training effect. This enables the target model to make probability predictions more accurately, and thus improves the accuracy of selecting effective rewritten words. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1a This is a flowchart illustrating a data processing scheme based on a model version provided in an embodiment of this application;
[0024] Figure 1b This is a schematic diagram of the architecture of a data processing system provided in an embodiment of this application;
[0025] Figure 2 This is a flowchart illustrating a data processing method provided in an embodiment of this application;
[0026] Figure 3 This is a schematic diagram illustrating the composition of feature information provided in an embodiment of this application;
[0027] Figure 4 This is a flowchart illustrating another data processing method provided in an embodiment of this application;
[0028] Figure 5a This is a schematic diagram of a weighted bipartite diagram provided in an embodiment of this application;
[0029] Figure 5bThis is a schematic diagram of a combined operation provided in an embodiment of this application;
[0030] Figure 5c This is a schematic diagram of an aggregation operation provided in an embodiment of this application;
[0031] Figure 5d This is a schematic diagram of an automatic training sample mining process provided in an embodiment of this application;
[0032] Figure 6 This is a flowchart illustrating another data processing method provided in an embodiment of this application;
[0033] Figure 7 This is a schematic diagram of a flowchart for calculating a posteriori scores provided in an embodiment of this application;
[0034] Figure 8 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0035] Figure 9 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0036] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0037] With the continuous development of internet technology, artificial intelligence (AI) technology has also seen significant advancements. AI technology refers to the theories, methods, techniques, and application systems that utilize digital computers or computers-controlled machines to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science; it primarily aims to understand the essence of intelligence and produce new intelligent machines that can react in a manner similar to human intelligence, enabling these machines to possess multiple functions such as perception, reasoning, and decision-making. Accordingly, AI technology is a multidisciplinary field, mainly encompassing computer vision (CV), speech processing, natural language processing, and machine learning (ML) / deep learning.
[0038] Natural Language Processing (NLP) is an important area within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP technologies typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.
[0039] Machine learning is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of AI and the fundamental approach to enabling computer devices to possess intelligence. Deep learning, on the other hand, is a technique that utilizes deep neural network systems for machine learning. Machine learning / deep learning typically includes artificial neural networks, reinforcement learning (RL), supervised learning, and unsupervised learning. Supervised learning refers to training models using training samples with known categories (labeled categories), while unsupervised learning refers to training models using training samples with unknown categories (unlabeled categories).
[0040] Based on the aforementioned AI technologies, including natural language processing and machine learning / deep learning, this application proposes a data processing scheme for a large number of candidate rewritten words corresponding to a target search term. This data processing scheme can sort each candidate rewritten word of the target search term, thereby selecting the effective rewritten words of the target search term from a large number of candidate rewritten words based on the sorting results. Among them, ① the target search term can be any search term, also known as a query term, which refers to the text entered when searching for information, such as "exercise" or "how to eat healthily"; ② candidate rewritten terms refer to the rewritten terms obtained through the qrw (query rewrite) service, which refers to the text obtained by rewriting (such as modifying or expanding) the search term. For example, if the search term is "how to eat healthily", the word obtained by rewriting the search term (i.e., the rewritten term) can be "how to eat" or "healthy eating"; ③ effective rewritten terms, also known as positive example rewritten terms or effective expanded terms, refer to the candidate rewritten terms selected from a large number of candidate rewritten terms. The relevance between effective rewritten terms and search terms is usually high, and they can be used together with the target search term for subsequent downstream tasks.
[0041] Specifically, the data processing scheme for candidate rewritten words proposed in the embodiments of this application may include the following two versions:
[0042] (1) A base version that can be quickly deployed. The key technology of this base version is to sort and filter candidate rewritten words based on their posterior performance. The general principle of the data processing scheme of the base version is as follows: After determining a large number of candidate rewritten words corresponding to the target search term, the posterior data corresponding to each candidate rewritten word can be used to calculate the posterior score of each candidate rewritten word; or, the posterior data of the target search term and the posterior data corresponding to each candidate rewritten word can be used to calculate the posterior score of each candidate rewritten word; after calculating each posterior score, the large number of candidate rewritten words can be sorted based on each posterior score, so as to filter out the effective rewritten words of the target search term from the large number of candidate rewritten words according to the sorting results.
[0043] The posterior data for any word (such as candidate paraphrased words or target search terms) can include: data generated based on the object's search behavior for the corresponding word, such as word search volume (i.e., the number of times the corresponding word is searched); and data generated based on the object's actions on each of the pushed feedback messages after one or more feedback messages are pushed to the object based on the corresponding word, such as word clicks, word conversion rates, etc. The word clicks mentioned here can be calculated based on the clicks of each feedback message corresponding to any word; the clicks of a feedback message can refer to the number of times that feedback message is clicked. The word conversion rate mentioned here can be obtained based on the ratio between the word clicks and the word search volume for any word. Feedback information can refer to information used to provide search feedback for the corresponding word, that is, information displayed to the object after the object searches for the corresponding word. The feedback information can vary depending on the search scenario; for example, in a video search scenario, the feedback information can be a video; in a document search scenario, the feedback information can be a document; in an audio search scenario, the feedback information can be audio, and so on.
[0044] (2) A scalable model version, whose data processing scheme mainly involves offline and online components, such as... Figure 1a As shown. The offline part mainly trains the initial model to obtain the target model, while the online part mainly uses the target model to perform online inference on a large number of candidate rewrite words corresponding to the target search term.
[0045] The offline component mainly involves three stages: automatic sample mining, sample feature generation, and offline model training. The automatic sample mining stage involves extracting multiple sample word pairs from historical search behavior logs to train the initial model. Each sample word pair includes a sample search term and a sample rewritten term. For any given sample word pair, automatic labeling is performed based on the posterior performance of each word in that pair. This allows for sample mining of multiple sample word pairs based on their labels and the posterior data of each word, yielding training samples. During sample mining, the correlation between the sample search term and the sample rewritten term can be utilized to identify highly relevant sample word pairs for training. The sample feature generation stage involves using FeatureMaker to generate sample features for each training sample. For a given training sample, the sample features can include word features (or single features) corresponding to each word in the training sample, as well as cross features derived from the feature differences between two word features. During the offline training phase of the model: the sample features and sample labels of the training samples can be used to train the initial model to obtain the target model.
[0046] In the online component: When a target search term is obtained, the QRW service can invoke multiple recall pathways in parallel, such as co-click recall, same-session recall, and semantic recall, generating a large number of candidate rewritten words. Each candidate rewritten word and the target search term can form a target word pair, resulting in a large number of target word pairs. Then, the feature information of each target word pair can be determined. This feature information can be generated by calling FeatureMaker. It should be understood that the logic for generating the feature information of target word pairs in the online component using FeatureMaker and the logic for generating the sample features of each training sample in the offline component can share a common codebase to avoid inconsistencies in feature generation logic between the offline and online components. Finally, the online inference API (Application Programming Interface) of the target model can be used to call the target model to perform online prediction based on the feature information of each word pair to determine whether the candidate rewritten words in each target word pair can be used as valid rewritten words. If the target model can predict the probability that candidate rewritten words in each word pair are valid rewritten words for the search term, then it can sort a large number of candidate rewritten words based on the predicted probabilities, and then select valid rewritten words for the target search term from the large number of candidate rewritten words according to the sorting results.
[0047] Practice has shown that the data processing scheme proposed in this application has at least the following beneficial effects: ① For the base version, effective rewritten words can be selected using the posterior performance of candidate rewritten words. This is simple to implement and can fully utilize posterior data to mine effective rewritten words, improving mining accuracy. ② For the model version, the target model can be used to predict the probability of candidate rewritten words as effective rewritten words for the target search term. Effective rewritten words are selected based on the probability of each candidate rewritten word. The target model allows for automated probability prediction, improving prediction automation and intelligence, increasing prediction efficiency, and thus improving ranking processing efficiency, ultimately improving the efficiency of effective rewritten word selection. The target search term and its corresponding candidate rewritten words can be considered as a target word pair. Using this target word to predict the corresponding feature information enriches the feature representation, improves the probability prediction effect, and thus improves the accuracy of probability prediction, thereby improving the accuracy of ranking results and the accuracy of effective rewritten word selection.
[0048] It should be noted that in practical applications, any of the data processing schemes proposed above can be used to filter candidate rewritten words, without any restrictions. Furthermore, considering that the effective rewritten words selected by the base version of the data processing scheme may exhibit semantic drift, because the posterior score calculation only utilizes the posterior data of the candidate rewritten words and the target search word, i.e., it only considers the posterior relationship between the candidate rewritten words and the target search word, without constraining the semantic relationship between them, the model version of the data processing scheme, in the offline part, is based on the sample features of training samples with high correlation between two words. This allows the trained target model to have the ability to constrain semantic relationships. Therefore, when making probability predictions based on the feature information of each target word pair, it can constrain the semantic relationship between the candidate rewritten words and the target search word in each target word pair, thus mitigating the semantic drift problem of the selected effective rewritten words. Based on this, in specific application scenarios, the model version of the data processing scheme can be given priority. Practice has shown that, in a specific business scenario, using the model version of the data processing solution instead of the base version can improve the core business metrics by approximately 1.6%.
[0049] In practical implementation, any of the data processing solutions mentioned above can be executed by a computer device, which can be a terminal or a server. The terminal mentioned here may include, but is not limited to, smartphones, tablets, laptops, desktop computers, smart TVs, etc. Various clients (apps) can run on the terminal, such as multimedia playback clients, social media clients, browser clients, news feed clients, educational clients, and so on. The server mentioned here can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms, etc.
[0050] Alternatively, the data processing scheme corresponding to any of the versions mentioned above can also be executed jointly by the terminal and the server; in this case, the terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application embodiment does not impose any restrictions. For example, the terminal can obtain the target search term and upload it to the server, so that after obtaining the target search term, the server can determine a large number of candidate rewritten terms corresponding to the search term, and further obtain the ranking results corresponding to the large number of candidate rewritten terms based on the data processing scheme corresponding to any version; after the server obtains the ranking results, it can send the ranking results to the terminal; then the terminal can filter out the effective rewritten terms of the target search term according to the received ranking results, such as Figure 1b As shown. For example, the terminal can obtain the target search term, and after determining a large number of candidate rewritten terms corresponding to the search term, upload the search term and the corresponding large number of candidate rewritten terms to the server. After obtaining the target search term and the large number of candidate rewritten terms, the server can obtain the effective rewritten terms of the target search term based on the data processing scheme corresponding to any version. After obtaining the effective rewritten terms, the server can send the effective rewritten terms to the terminal.
[0051] It is understood that, in the specific implementation of this application, data such as historical search behavior logs, search behavior logs, and post-hoc data are involved. When the above embodiments of this application are applied to specific products or technologies, permission or consent from the subject is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0052] Based on the description of the data processing scheme corresponding to the above model version, this application proposes a data processing method, which is mainly described using a computer device as the execution subject; please refer to Figure 2 The data processing method may include the following steps S201-S203:
[0053] S201, after determining the N candidate rewriting terms corresponding to the target search term, construct N target word pairs using the target search term and the N candidate rewriting terms.
[0054] A target word pair can include a target search term and a candidate rewrite term, and the candidate rewrite terms in different target word pairs are all different, where N is a positive integer. For example, a target word pair can use the form of<p,p'> The representation is based on the form p', where p represents the target search term and p' represents the candidate rewrite term; for different target term pairs...<p,p'> In this context, p is the same, and p' is distinct. That is, for N target word pairs, these N target word pairs can be represented as follows:<p,p'1> ,<p,p'2> … <p,p' N >
[0055] In practice, the N candidate rewritten terms corresponding to the target search term can be obtained by a computer device through one or more recall pathways. These one or more recall pathways may include, but are not limited to: click-based recall pathways, session-based recall pathways, semantic recall pathways, etc. The general principle for obtaining the candidate rewritten terms corresponding to the target search term through each recall pathway is as follows:
[0056] (1) Click on the recall channel
[0057] When the recall path is clicked, the computer device can obtain historical search behavior logs containing the target search term. These historical search behavior logs can refer to search behavior logs within a specific historical time period. The historical time period refers to a period preceding the current time and with a preset time interval (e.g., 30 days) from the current time. The current time can be the moment when the demand for obtaining valid rewritten terms corresponding to the target search term is detected. The search behavior log records a series of object behaviors performed by the object in the search system, such as the object entering a search term on the search page of the search system, and the object's actions on various feedback information on the search page (e.g., viewing, clicking, sharing, etc.). After obtaining these historical search behavior logs, all feedback information corresponding to the target search term can be found from them. It is understood that the same feedback information can be pushed to the object under different search terms, and the same feedback information can correspond to one or more search terms. Therefore, for any feedback information corresponding to the target search term, other search terms besides the target search term corresponding to that feedback information can be used as candidate rewritten terms for the target search term.
[0058] (2) Same-session recall channel
[0059] A "same session" refers to the time period from when an object opens a search page to when it closes it. Understandably, during this time, an object can enter one or more search terms on the search page. For any one of these search terms, other search terms can be considered as candidate rewrite terms. Therefore, in the case of a same session retrieval path, the session to which the target search term belongs can be determined first, and then other search terms within that session can be identified. These other search terms can then be considered as candidate rewrite terms for the target search term. The number of sessions to which the target search term belongs can be one or more, meaning that other search terms within each session can be considered as candidate rewrite terms.
[0060] (3) Semantic Recall Path
[0061] In the case of a semantic recall pathway, an initial set of rewritten words can be determined first. This initial set of rewritten words can be determined by obtaining historical search behavior logs and finding all historical search terms from these logs. For example, all historical search terms found can be used as the initial set of rewritten words. This initial set of rewritten words can also be determined in other ways, which are not specifically limited in this embodiment. After determining the initial set of rewritten words, candidate rewritten words can be further selected from the initial set based on the semantic similarity between the target search term and each initial rewritten word in the initial set. Optionally, the semantic similarity between the target search term and each initial rewritten word can be calculated, and initial rewritten words with a semantic similarity greater than a preset similarity can be identified as candidate rewritten words, thereby selecting candidate rewritten words from the initial set of rewritten words. This preset similarity can be set in advance and is not limited thereto.
[0062] Specifically, for any initial rewritten word, the semantic similarity between the target search word and any initial rewritten word can be determined as follows: First, the word vectors corresponding to the target search word and any initial rewritten word can be determined respectively. These word vectors can be obtained based on the word vector model (Word2vec model). Then, the semantic similarity between these two word vectors can be calculated. This semantic similarity can be obtained by calculating the cosine distance between the two word vectors. That is, this semantic similarity can also be called cosine similarity.
[0063] S202, the target model is invoked to predict the probability of the corresponding candidate rewritten words as effective rewritten words of the target search words based on the feature information of each target word pair.
[0064] The target model can be trained using training samples and corresponding sample labels. A training sample can include a search term and a rewritten term. The sample label is determined based on the posterior data of each word in the corresponding training sample and indicates whether the rewritten term in the corresponding training sample is a valid rewritten term of the corresponding search term. A training sample's label can include a first label or a second label. The first label indicates that the rewritten term in the training sample is a valid rewritten term of the corresponding search term, and the second label indicates that the rewritten term in the training sample is not a valid rewritten term of the corresponding search term. The target model can be a neural network model with probabilistic prediction capabilities, such as a GBDT (Gradient Boosting Decision Tree) tree model (e.g., the XGBoost model), an LR (Logistic Regression) model, a shallow MLP (Multilayer Perceptron) model, and so on.
[0065] In the specific implementation, in order to obtain the probability of each candidate rewritten word being an effective rewritten word of the target search word, the feature information of each target word pair can be used as the input of the target model to call the target model to perform probability prediction based on the feature information of each target word pair, thereby obtaining the required data, that is, the probability of each candidate rewritten word in the target word pair being an effective rewritten word of the target search word.
[0066] Understandably, the construction method of feature information for each target word pair is consistent. Therefore, the following mainly focuses on the construction of feature information for the nth target word pair, where n∈[1,N]. In the specific implementation, the construction of feature information for the nth target word pair may include the following steps s01-s03:
[0067] s01, obtain the word features of the target search term in the nth target word pair, and the word features of the candidate rewritten words in the nth target word pair. Each word feature can include at least one of the following: text features, posterior features, and semantic features of the corresponding word; text features can refer to the text information of the corresponding word itself, such as the number of word segments, the number of stop words, word length, etc.; posterior features can refer to posterior data generated based on the corresponding word, such as the word search volume, word conversion volume, word conversion rate, etc., of the corresponding word within a preset time period, where the preset time period can be a time period before the current time and a preset duration (e.g., 1 day, 3 days, or 7 days) of the current time interval; semantic features can refer to the semantic features of the corresponding word, such as the entity features, classification features, etc., and can also include the semantic features of the corresponding word after NLP processing, such as the entity features, classification features, etc., of the corresponding word after NLP processing.
[0068] Step s02: Based on the feature differences between the two obtained word features, determine the cross features of the nth target word pair. The feature differences can be determined based on the differences between the two word features; that is, the differences between the two word features can be used as the cross features. Since word features can include at least one of the following: text features, posterior features, and semantic features of the corresponding word, the corresponding cross features can also include at least one of these three. For example, in the text feature dimension, cross features can include the difference in the number of word segments between the two words (i.e., the target search term and the candidate rewritten term), the difference in the number of stop words between the two words, the difference in the word length between the two words, the cosine similarity between the two words, etc.; in the posterior feature dimension, cross features can include the difference or ratio between the search volume, conversion volume, and conversion rate of the two words within a preset time period, etc.; in the semantic feature dimension, cross features can include the difference between the entity features of the two words, the difference between the classification features of the two words, etc.
[0069] s03, using the acquired two word features and cross features, construct the feature information of the nth target word pair. For example, the feature information of the nth target word pair may include the two word features and cross features, such as... Figure 3 As shown, the feature information of a target word pair can include the features corresponding to each word in the target word pair, as well as the feature differences between the two words. For example, a feature information can contain 108-dimensional features. It can be seen that the feature information in the embodiments of this application can be a relatively rich feature representation for the target word pair. Therefore, by using such feature information, the model performance of the target model can be improved.
[0070] It should be noted that steps s01-s03 above are merely illustrative of how to construct the feature information of the nth target word pair, and are not intended to limit it. For example, the word features of the target search word and the word features of the candidate rewritten word in the nth target word pair can be used as the feature information; or, the cross features in the nth target word pair can be used as the feature information.
[0071] S203, sort the N candidate rewritten words based on the predicted probabilities, and select the effective rewritten words of the target search term from the N candidate rewritten words according to the sorting results.
[0072] In practical implementation, the N candidate rewrite words can be sorted in descending order of probability; alternatively, they can be sorted in ascending order of probability. Optionally, after sorting the N candidate rewrite words to obtain the corresponding sorting results, effective rewrite words for the target search term can be selected from the N candidate rewrite words in the sorting results. The number of effective rewrite words can be one or more. For example, if the sorting result is obtained in descending order of probability, the effective rewrite word can be the candidate rewrite word located in the first L positions of the sorting result. The value of L can be predefined, such as L being 1, 2, 5, etc. For example, when L is 1, the candidate rewrite word ranked first in the sorting result can be considered the effective rewrite word.
[0073] In this embodiment, the purpose of sorting and filtering candidate rewritten terms is to select effective rewritten terms that maximize the business objectives of the search system. These business objectives may differ across scenarios. For example, in a video search scenario, the business objective could be video clicks or video playback duration; in a document search scenario, it could be document clicks; and in an audio search scenario, it could be audio clicks or audio playback duration. However, these scenarios all share a common goal: to attract clicks from the audience based on the feedback information presented using effective rewritten terms. Therefore, a good effective rewritten term should at least attract more clicks from the audience on the feedback information retrieved by the effective rewritten term. The aforementioned effective rewritten terms can then be applied to various downstream tasks, such as search tasks and relevance calculation tasks. A search task refers to pushing feedback information to an audience using target search terms, while a relevance calculation task refers to calculating the relevance between the target search terms and the target feedback information.
[0074] In one embodiment, during a search task, valid rewritten terms and target search terms can be sent in parallel to the search layer of the search system for recalling relevant information (such as documents, videos, etc.) to supplement and enrich the recall information set of the target search terms, thereby indirectly improving the search experience. Specifically, when a search event initiated based on the target search term is detected, both the target search term and the valid rewritten terms can be used as keywords to search the database for feedback information corresponding to each keyword, and the retrieved feedback information can be used as the search result for the search event.
[0075] In another embodiment, under the relevance calculation task, effective rewritten words can be applied to the relevance model. These effective rewritten words can serve as a semantic extension of the target search term, thereby improving the performance of the relevance model. The relevance model can refer to a model that determines the relevance between the search term and the feedback information. Specifically, when it is necessary to use the relevance model to determine the relevance between the target search term and the target feedback information, a first relevance between the target search term and the target feedback information can be determined, and a second relevance between the effective rewritten words and the target feedback information can be determined. Therefore, based on the first and second relevances, the relevance between the target search term and the target feedback information can be determined.
[0076] In this embodiment, a target model can be used to predict the probability of candidate rewritten words as effective rewritten words for the target search term. Effective rewritten words are then selected based on the probability of each candidate rewritten word. Automated probability prediction using the target model improves prediction automation and intelligence, increases prediction efficiency, improves ranking efficiency, and ultimately improves the efficiency of effective rewritten word selection. The target search term and its corresponding candidate rewritten words can be considered as a target word pair, and this target word can be used to predict the probability of corresponding feature information. This enriches feature representation, improves probability prediction performance, and thus improves the accuracy of probability prediction, which in turn improves the accuracy of ranking results and the accuracy of effective rewritten word selection. Furthermore, by using the posterior data of each word in the training samples to label the training samples, the relative merits of the posterior performance of each word can be considered when determining the sample labels. This improves the reliability of the sample labels to a certain extent, thereby improving the model training effect and enabling the target model to make more accurate probability predictions, ultimately improving the accuracy of effective rewritten word selection.
[0077] Please see Figure 4 This is a flowchart illustrating another data processing method provided in this application. This application primarily describes a computer device as the execution subject; please refer to... Figure 4 The data processing method may include the following steps S401-S404:
[0078] S401, Obtain multiple sample word pairs for training the initial model.
[0079] The initial model can refer to any neural network model with probabilistic prediction capabilities, such as a GBDT tree model (e.g., the XGBoost model), an LR model, a shallow MLP model, etc.; and a sample word pair can include a sample search term and a sample rewritten term. In a specific implementation, step S401 can include the following steps s11-s14:
[0080] s11: Obtain the K first search terms generated within the first historical time period and the feedback information set for each first search term, where K is a positive integer. As previously known, the historical time period refers to the time period preceding the current time and with a preset time interval from the current time. The current time can refer to the moment when the demand for obtaining a valid rewritten term corresponding to the target search term is detected. Therefore, the first historical time period here can refer to the time period preceding the current time and with a first preset time interval from the current time, which can be 30 days, 40 days, etc. Specifically, search behavior logs generated within the first historical time period can be obtained, and these search behavior logs can be aggregated and analyzed to obtain the K first search terms generated within the first historical time period and the feedback information set for each first search term. Among them, these K first search terms are the historical search terms found from the search behavior logs, and the feedback information set for each first search term is the set of all feedback information recalled when a search event is executed using the first search term.
[0081] s12, retrieve the H second search terms generated within the second historical time period and the feedback information set for each second search term, where H is a positive integer. Here, the second historical time period can refer to a time period before the current time and with a second preset time interval from the current time. The second preset time interval can be shorter than the first preset time interval, such as 1 day, 2 days, etc.
[0082] In one implementation, the H second search terms generated within the second historical time period and the feedback information set for each second search term are also obtained by aggregating and analyzing the search behavior logs generated within the second historical time period. In another implementation, the search behavior logs generated within the second historical time period can be obtained first, and then aggregated and analyzed to obtain the H second search terms generated within the second historical time period and the feedback information set for each second search term. The method for determining the H second search terms and the feedback information set for each second search term can refer to the method for determining the K first search terms and the feedback information set for each first search term described above.
[0083] In another implementation, after aggregating and analyzing the search behavior logs generated within the second historical time period, H second search terms and corresponding feedback information for each second search term can be obtained. Furthermore, the feedback information for each second search term can be filtered to obtain the final required set of feedback information for each second search term. Specifically, for the h-th second search term, h∈[1,H], firstly, a sorted list of feedback information pushed to the target by the h-th second search term can be obtained. This sorted list can be determined by the search system when the h-th second search term performs a search event. The sorted list includes all feedback information corresponding to the h-th second search term, and each piece of feedback information has a corresponding sorting position in the sorted list. The higher the sorting of the feedback information, the higher it appears in the search results page of the search event. After obtaining the sorted list, a preset number of feedback information can be selected from the sorted list to construct the set of feedback information for the h-th second search term. For example, the top W pieces of feedback information can be selected from the sorted list to construct the set of feedback information. Where W is the preset quantity, which can be set in advance.
[0084] In summary, determining the feedback information set for a second search term requires performing a complete search and ranking process for each second search term to obtain a sorted list of feedback information. This method of determining the feedback information set is computationally expensive and time-consuming. Furthermore, feedback information ranked higher in the sorted list typically exhibits greater similarity, and the greater the similarity of the feedback information, the greater the similarity between the search terms. In other words, if the differences between the expressions of two search terms are small, it may lead to the problem of search term homogenization, potentially resulting in insufficient information gain.
[0085] In another implementation, to minimize homogenization and insufficient information gain, the information exposure of each feedback message can be used to filter the feedback messages corresponding to each second search term, thus obtaining the final set of feedback messages for each second search term. Typically, when the search system is highly stable, the information exposure of feedback messages at the top of the ranking list for a search term is greater than that at the bottom. Therefore, information exposure can be used to filter the feedback messages. Specifically, for the h-th second search term, the information exposure of each feedback message corresponding to the h-th second search term can be obtained. Then, in descending order of information exposure, a target number of feedback messages are selected from all the feedback messages corresponding to the h-th second search term to construct the feedback message set for the h-th second search term. For example, the feedback messages with the highest information exposure (ranked V) can be selected from all the feedback messages to construct the feedback message set. Here, V is the target number, which can be preset.
[0086] It can be seen that information exposure can be used to filter out feedback information with high exposure from a large amount of feedback information. For feedback information with high exposure, the target audience is more likely to click or view it, and the posterior data corresponding to the feedback information is richer. Therefore, the reliability of subsequent calculations using the posterior data of this feedback information is also higher.
[0087] s13, based on the feedback information sets of each first search term and each second search term, perform a join operation on K first search terms and H second search terms.
[0088] In one specific implementation, when the computer device executes step s13, it can use the same feedback information as an association key to perform association operations on K first search terms and H second search terms. In this case, the associated first and second search terms have the same feedback information; the number of such identical feedback information can be one or more, and is not limited thereto. For example, the feedback information set for the kth first search term includes document 1, document 2, and document 3, and the feedback information set for the hth second search term includes document 1, document 2, document 4, and document 5; since both the kth first search term and the hth second search term contain the same feedback information of document 1 and document 2, the kth first search term and the hth second search term can be associated.
[0089] In another specific implementation, considering that when a first search term and a second search term correspond to the same feedback information, the various feedback information within this same feedback information may or may not be clicked together. A joint click refers to a click occurring when the feedback information is output by the first search term, and also when the feedback information is output by the second search term. Given that the correlation between the first and second search terms with jointly clicked feedback information is usually high, to improve the correlation between the first and second search terms, the computer device, when executing step s13, can use the jointly clicked feedback information as an association key to perform association operations on K first search terms and H second search terms. In this case, there is jointly clicked feedback information between the associated first and second search terms; the number of jointly clicked feedback information can be one or more, without limitation. For example, the common feedback information in the k-th first search term and the h-th second search term includes three identical feedback information: document 1, document 2, and document 3. Among them, document 1 is clicked when the feedback information is output by the k-th first search term, and document 1 and document 2 are clicked when the feedback information is output by the h-th second search term. Since the common clicked feedback information document 1 exists in both the k-th first search term and the h-th second search term, the k-th first search term and the h-th second search term can be associated.
[0090] Furthermore, the implementation method for a computer device to perform association operations on K first search terms and H second search terms based on any association key (taking the same feedback information as an example) can be as follows:
[0091] A first weighted bipartite graph is constructed using K primary search terms and their feedback sets; a second weighted bipartite graph is constructed using H secondary search terms and their feedback sets. (See also...) Figure 5a As shown, any weighted bipartite graph in the first and second weighted bipartite graphs may include: one or more word nodes 11, and one or more information nodes 12 connected to each word node; a word node may store a search term, and an information node connected to any word node may store feedback information corresponding to the search term. The weight of the edge between a word node and an information node is determined based on the target posterior information of the feedback information stored in the corresponding information node. Specifically, when any weighted bipartite graph is the first weighted bipartite graph, the target posterior information may include the number of clicks or historical viewing time of the feedback information, etc.; when any weighted bipartite graph is the second weighted bipartite graph, the target posterior information may include the number of information exposures.
[0092] After constructing the first and second weighted bipartite graphs, association operations can be performed on them based on corresponding association keys (such as identical feedback information) to obtain multiple operation results. Each operation result includes a word pair consisting of a first search term (q) and a second search term (q') (i.e.,...)<q,q'> ), and a common feedback information between the words in the corresponding word pair. See, for example. Figure 5b As shown, the first search terms stored in the first weighted bipartite graph include q1, q2, and q3, and the second search terms stored in the second weighted bipartite graph include Q1 and Q2. The first weighted bipartite graph can be exemplarily referred to [reference needed]. Figure 5b The diagram marked with 13 in the figure, and the second weighted bipartite diagram can be seen by way of example. Figure 5b The image uses the number 14 as a identifier. Among them, [the text abruptly ends here]. Figure 5b Taking q1 as an example, q1 represents a first search term, d1, d2, d3, and d4 represent the various feedback messages in the feedback information set corresponding to q1, and n p,d1 n p,d2 n p,d3 n p,d4 These represent the number of clicks on the corresponding feedback information; Figure 5b Taking Q1 as an example, Q1 represents a second search term, and d1, d3, d5, and d6 represent the various feedback messages in the feedback information set corresponding to Q1, respectively. p,d1 b p,d3 b p,d5 b p,d6 These represent the exposure volume of the corresponding feedback information. Figure 5b After performing an association operation on the first and second weighted bipartite graphs in the diagram, the resulting operation can be exemplarily seen in [reference needed]. Figure 5b Data identified by the number 15.
[0093] After obtaining multiple operation results, a GroupBy operation can be performed on these results in the form of word pairs. The GroupBy operation refers to aggregating operation results containing the same word pairs into a single data entry. For example, following... Figure 5b The multiple operation results shown show that both document 1 and document 3 in the operation results contain word pairs.<q1,Q1> Both document 3 and document 4 contain word pairs.<q1,Q2> Both document 3 and document 5 contain word pairs.<q2,Q1> Therefore, the results of operations on these identical word pairs can be aggregated into a single dataset. For example, the data after a GroupBy operation can be seen in [reference needed]. Figure 5c Data is identified using the 16 identifier. A diagram illustrating the GroupBy operation on this data can be found in [link to diagram]. Figure 5c As shown.
[0094] s14 If the result of the association operation indicates that the k-th first search term is associated with at least one second search term, then the k-th first search term is used as a sample search term, and each of the second search terms associated with the k-th first search term is used as a sample rewritten term to construct multiple sample word pairs, k∈[1,K].
[0095] based on Figure 5c As described in step s12, the result of the association operation obtained in step s12 can include multiple data entries. Each data entry includes a word pair and one or more feedback messages. The first search term and the second search term in the word pair contained in any data entry are associated. Therefore, for the k-th first search term, the computer device can detect whether the k-th first search term is associated with at least one second search term based on the result of the association operation. If it is determined that the k-th first search term is associated with at least one second search term, the k-th first search term can be used as a sample search term, and each of the second search terms associated with the k-th first search term can be used as a sample rewritten term to construct multiple sample word pairs. For example, with Figure 5c Taking the data identified by 16 as an example, if the kth first search term is q1, then it can be determined that q1 is associated with the two second search terms Q1 and Q2.
[0096] It should be understood that the above explanation uses the k-th first search term as an example. In actual processing, the above operation can be performed on each of the k first search terms to obtain the final multiple sample word pairs. For example, taking... Figure 5c Taking data identified by 16 as an example, if the first search term q1 is associated with both the second search terms Q1 and Q2, then the first search term q1 can be used as a sample search term, and the second search terms Q1 and Q2 can be used as sample rewritten terms of the first search term q1. A sample search term and its corresponding sample rewritten term can construct a sample word pair. Therefore, q1 and Q2 can be constructed as a sample word pair, as can be represented as...<q1,Q1> ;q1 and Q2 can also be constructed as a sample word pair, as can be represented as<q1,Q2> .
[0097] S402, based on the posterior data of each word in each sample word pair, label each sample word pair separately to obtain the sample label of each sample word pair.
[0098] The posterior data for any given term may include: the term search volume, term clicks, and standardized view score. For example, for a sample term pair, which includes a sample search term and a corresponding sample rewritten term, the posterior data for the sample search term includes its term search volume, term clicks, and standardized view score. Similarly, the posterior data for the sample rewritten term includes its term search volume, term clicks, and standardized view score. Term search volume can refer to the number of times a given term (such as any sample search term or any sample rewritten term) is used as a search term. Term clicks can be calculated based on the click counts of various feedback messages corresponding to the given term, such as the sum of click counts for all feedback messages. The standardized view score can be calculated based on the view information of various feedback messages corresponding to the given term, which may refer to historical view duration and preset view duration.
[0099] In one implementation, the posterior data here can be posterior data within a third time period. The specific implementation for obtaining this posterior data can be as follows: First, a posterior data table within the third time period can be obtained. This third historical time period refers to a time period preceding the current time and with a third preset time interval (e.g., 7 days) from the current time. This posterior data table can be obtained based on aggregated analysis of search behavior logs within the third time period. The posterior data table can include a large amount of posterior data corresponding to each search term. After obtaining the posterior data table, a Join operation can be performed on the data in the posterior data table. This Join operation can involve two Join operations. The first Join operation uses the sample search term as the association key, and the result of the first Join operation is the posterior data table corresponding to the sample search term in each sample word pair. The second Join operation uses the sample rewritten term as the association key, and the result of the second Join operation is the posterior data table corresponding to the sample rewritten term in each word pair. These two posterior data tables obtained through the two Join operations can combine the posterior data of the sample search term and sample rewritten term in the same sample word pair. This facilitates the subsequent comparison of the relative posterior values of the sample search term and sample rewritten term, i.e., when calculating and comparing the posterior scores (as mentioned later), by quickly retrieving the data needed for the sample search term and sample rewritten term from the Join operation. Specifically, the posterior data of each word in each sample word pair mentioned above can be obtained from these two posterior data tables.
[0100] Optionally, taking any word in a sample word pair as an example, the method for determining the word-standardized view score of that word can be:
[0101] First, the preset viewing duration for each feedback message corresponding to any given word can be obtained. For a single feedback message, the preset viewing duration can refer to the viewing duration of the feedback message itself. For example, if the feedback message is a video, the preset viewing duration can also be understood as the preset playback duration, such as 15 seconds or 30 seconds. Similarly, if the feedback message is a document, the preset viewing duration can also be understood as the preset browsing duration, such as 40 seconds or 3 minutes.
[0102] Then, it's also possible to retrieve the historical viewing duration for each feedback message under the given keyword. This historical viewing duration can refer to the actual time an object spends watching a feedback message. For example, if the feedback message is a video, the historical viewing duration could be the time the object spends playing the video; for instance, if the preset viewing duration of the video is 15 seconds, a historical viewing duration could be 10 seconds. Similarly, if the feedback message is a document, the historical viewing duration could be the time the object spends browsing the document; for instance, if the preset viewing duration of the document is 30 seconds, a historical viewing duration could be 5 seconds.
[0103] Furthermore, the average historical viewing time corresponding to all feedback information can be calculated to obtain the average historical viewing time for a single feedback information.
[0104] Finally, the standardized viewing score corresponding to all feedback information under any given word can be determined using the preset viewing duration and the average historical viewing duration. In one implementation, the preset viewing duration, average historical viewing duration, and standardized viewing score can be preset, and the mapping relationship between these three can be established. After determining the preset viewing duration and average historical viewing duration corresponding to any given word, the corresponding standardized viewing score can be determined using the preset viewing duration, average historical viewing duration, and the mapping relationship. For example, the mapping relationship between the preset viewing duration, average historical viewing duration, and standardized viewing score can be shown in Table 1 below.
[0105] Table 1
[0106] Preset viewing duration Average historical viewing time Standardized Viewing Score T1 t1 S1 T1 t2 S2 … … …
[0107] The specific implementation of step S402 may include: specifically, calculating the posterior score of the corresponding sample search term based on the posterior data of the sample search term in the target sample word pair; and calculating the posterior score of the corresponding sample rewritten term based on the posterior data of the sample rewritten term in the target sample word pair; after calculating these two posterior scores, the target sample word pair may be labeled based on the relative size relationship between the two calculated posterior scores to obtain the sample label of the target sample word pair.
[0108] In a specific implementation, the computer device can traverse each sample word pair in multiple sample word pairs, and determine the sample label of the traversed sample word pair when traversing each sample word pair. For example, the currently traversed sample word pair can be used as the target sample word pair to determine the sample label of the target sample word pair. Specifically, step S402 may include the following steps s21-s23:
[0109] s21, iterate through each of the multiple sample word pairs and take the currently iterated sample word pair as the target sample word pair.
[0110] s22, Calculate the posterior score of the corresponding sample search term based on the posterior data of the sample search term in the target sample word pair; and calculate the posterior score of the corresponding sample rewritten term based on the posterior data of the sample rewritten term in the target sample word pair. The calculation methods for the posterior scores of the sample search term and the sample rewritten term in the target sample word pair are consistent. The following explanation uses the sample search term in the target sample word pair as an example to illustrate the calculation of the posterior score. The specific implementation of calculating the posterior score of the corresponding sample search term based on the posterior data of the sample search term in the target sample word pair can be as follows:
[0111] Based on the word search volume and corresponding standardized view scores of the sample search terms in the target sample word pair, the posterior performance score of the sample search terms in the view dimension can be calculated; and based on the word search volume and corresponding click volume of the sample search terms in the target sample word pair, the posterior performance score of the sample search terms in the click volume dimension can be calculated; then, the calculated posterior performance scores can be weighted and summed to obtain the posterior score of the sample search terms in the target sample word pair.
[0112] Based on the above description, the posterior score of any word (sample search word or sample rewritten word in a sample word pair) can be represented by the following formula (1):
[0113] Score=A*std_score / (search_count+1)+B*conv_count / (search_count+1)(1)
[0114] Where Score represents the posterior score of any word, std_score represents the standardized view score of any word, search_count represents the search volume of any word, and conv_count represents the click volume of any word. std_score / (search_count+1) represents the posterior performance score of any word in the view dimension, and conv_count / (search_count+1) represents the posterior performance score of any word in the click volume dimension. A and B represent the weights corresponding to the two posterior performance scores respectively. It should be understood that the denominator in formula (1) is incremented by 1 to avoid the denominator being 0 when the search volume of any word is 0.
[0115] Step s23: Based on the relative magnitude of the two calculated posterior scores, the target sample word pairs are labeled to obtain sample labels for the target sample word pairs. Specifically, if the calculated posterior score of the sample search term is less than the calculated posterior score of the sample rewritten term, the first label can be used as the sample label for the target sample pair; if the calculated posterior score of the sample search term is greater than or equal to the calculated posterior score of the sample rewritten term, the second label can be used as the sample label for the target sample pair. The first label can be used to indicate that the sample rewritten term is a valid rewritten term of the corresponding sample search term, and the second label can be used to indicate that the sample rewritten term is not a valid rewritten term of the corresponding sample search term. For example, the first label can be represented by the value "1", and the second label can be represented by the value "0".
[0116] As can be seen from the above, when the present application embodiment labels the sample word pairs and obtains the corresponding sample tags, it can refer to the posterior scores corresponding to the sample search terms and sample rewritten terms in the sample word pairs to perform comprehensive labeling. Moreover, when calculating the posterior score, it can be calculated based on data under multiple dimensions, and does not take data under a certain dimension as the only consideration factor, thereby improving the credibility of the sample tags.
[0117] S403, based on the sample labels of each sample word pair and the posterior data of each word in each sample word pair, performs sample mining in multiple sample word pairs to obtain at least one training sample.
[0118] Each posterior data point may include the search volume of the corresponding word. For example, for a sample search word in a sample word pair, the posterior data of the sample search word may include the corresponding search volume; for a sample rewritten word in a sample word pair, the posterior data of the sample rewritten word may include the corresponding search volume.
[0119] As mentioned above, step S401 can obtain a large number of sample word pairs for training the initial model. To further ensure the quality of these sample word pairs, sample mining can be performed on them to extract higher-quality sample word pairs as the final training samples for training the initial model, thereby improving the performance of the trained initial model (i.e., the target model). In this embodiment, positive or negative samples can be extracted from these sample word pairs and used as training samples. Based on this, the specific implementation of step S403 can be as follows:
[0120] (1) Mining positive samples from multiple sample word pairs and using the mined positive samples as training samples. Specifically, this may include the following steps s31-s33:
[0121] s31. Following the principle that sample word pairs containing the same sample search term are grouped into the same group, multiple sample word pairs are grouped to obtain one or more word pair groups. That is, for the same word pair group, the sample search terms in each sample word pair within the same group are the same; or it can be understood that one word pair group corresponds to one sample search term, and different word pair groups correspond to different sample search terms. For example, consider the following sample word pairs:<q1,q'1> ,<q1,q'2> ,<q2,q'1> ,<q1,q'3> ,<q2,q'2> ,<q1,q'4> ,<q2,q'3> ; All sample word pairs with the search term q1 can be grouped into a single word pair group, that is, they can be...<q1,q'1> ,<q1,q'2> ,<q1,q'3> ,<q1,q'4> They can be divided into one word pair group; or all sample word pairs with the search term q2 can be divided into another word pair group, that is, they can be divided into...<q2,q'1> ,<q2,q'2> ,<q2,q'3> It is divided into another word pair.
[0122] s32, based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, determines the position information of each sample word pair within the corresponding word pair group. Any feedback behavior data may include: the number of clicks, the standardized viewing score, or the historical viewing duration of each feedback information in the corresponding feedback information set.
[0123] The click count of any feedback information in the feedback behavior data corresponding to any sample rewritten word can refer to the number of times that feedback information is clicked in the scenario where the feedback information is output based on the sample search term corresponding to the sample rewritten word; or, the click count of any feedback information in the feedback behavior data corresponding to any sample rewritten word can refer to the number of times that feedback information is clicked in the scenario where the feedback information is output based on the sample rewritten word; or, the click count of any feedback information in the feedback behavior data corresponding to any sample rewritten word can refer to the number of times that feedback information is clicked in all scenarios where the feedback information is output.
[0124] The standardized viewing score of a feedback message can be calculated based on the viewing information of that feedback message, which may include historical viewing time and preset viewing time. The method for determining the standardized viewing score of the information can refer to the method for determining the standardized viewing score of the word mentioned above. However, when determining the standardized viewing score of the information, it is calculated based on the viewing information of a single feedback message, while when determining the standardized viewing score of the word, it is calculated based on the viewing information of each feedback message corresponding to the word.
[0125] The location information may include one or more of the following: score percentage and ranking level. For any given sample word pair, the score percentage may refer to the relative size of the feedback behavior score of that sample word pair to the maximum feedback behavior score in the corresponding word pair group; the ranking level of that sample word pair may refer to the relative position of its feedback behavior score within the corresponding word pair group. The feedback behavior score refers to the score of the estimated feedback behavior data generated after rewriting the sample search term in any sample word pair into its corresponding rewritten term.
[0126] When any location information includes a score percentage, the specific implementation of step s22 may include the following steps: First, the feedback behavior score of each sample word pair can be calculated based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair; then, for any sample word pair, the maximum feedback behavior score can be determined from the feedback behavior scores corresponding to each sample word pair in the corresponding word pair group; finally, the ratio between the feedback behavior score of any sample word pair and the maximum feedback behavior score can be determined as the score percentage of any sample word pair in the corresponding word pair group. Under this implementation, the computer device can calculate the score percentage of any sample word pair in the corresponding word pair group using the following formula (2):
[0127]
[0128] Where percent_to_max represents the percentage of the score of any sample word pair in the corresponding word pair group, LDLC<q,q′> This represents the feedback behavior score for any sample word pair. This represents the maximum feedback behavior score among all feedback behavior scores for each sample word pair within its corresponding word pair group. For example, if the feedback behavior score of a sample word pair is A1, and the maximum feedback behavior score in its corresponding word pair group is A, then the score percentage of the sample word pair within the corresponding word pair group is A1 / A.
[0129] When any position information includes a ranking level, the specific implementation of step s22 may include the following steps: Based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, calculate the feedback behavior score of each sample word pair respectively; then, for any sample word pair, according to the feedback behavior score of each sample word pair in the corresponding word pair group, sort each sample word pair in the corresponding word pair group in descending order, wherein the descending order sorting can refer to: sorting according to the feedback behavior score from high to low. It can be seen that after the descending order sorting, each sample word pair has a sorting position in the corresponding word pair group. Further, according to the sorting position of any sample word pair and the number of sample word pairs in the corresponding word pair group, calculate the ranking level of any sample word pair in the corresponding word pair group. Under this implementation, the computer device can calculate the ranking level of any sample word pair in the corresponding word pair group by the following formula (3):
[0130] percent_rank = rank LDLC<q,q′> D (3)
[0131] Where percent_rank represents the rank of any sample word pair within the corresponding word pair group, rank LDLC<q,q′> This indicates the position of any sample word pair, and D represents the number of sample word pairs in the corresponding word pair group to which any sample word pair belongs.
[0132] For example, suppose a word pair is<q1,q'1> Furthermore, the number of sample word pairs included in the word pair group to which this sample word pair belongs is 6, and these 6 sample word pairs are as follows:<q1,q'1> ,<q1,q'2> ,<q1,q'3> ,<q1,q'4> ,<q1,q'5> ,<q1,q'6> The feedback behavior scores for each sample word pair are p1, p2, p3, p4, p5, and p6, respectively. The order of these six feedback behavior scores from highest to lowest is p2, p4, p1, p6, p3, and p5. Therefore, the result of sorting each sample word pair in the corresponding word pair group in descending order is:<q1,q'2> ,<q1,q'4> ,<q1,q'1> ,<q1,q'6> ,<q1,q'3> ,<q1,q'5> It can be seen that the sample word pairs are<q1,q'1> If the arrangement position is 3, then the sample word pair<q1,q'1> Its ranking in the corresponding word pair is 3 / 6.
[0133] It should be noted that, in the above-mentioned determination of the ranking level of sample word pairs, the sample word pairs in the corresponding word pair group are arranged in descending order. In another implementation, the sample word pairs in the corresponding word pair group can also be arranged in ascending order, where ascending order means arranging them in order of feedback behavior scores from low to high. In this case, when the candidate determines that the location information meets the location conditions, the relevant description of the ranking level for the location conditions can be adjusted to the ranking level being greater than the target level, and the target level here is different from the target level in the descending order arrangement. It can be understood that, in the ascending order arrangement, the higher the ranking level of the sample word pair, the higher the feedback behavior score of the sample word pair. In order to ensure that the relevance between the sample search term and the sample rewritten term in the sample word pair is as high as possible, the ranking level of the sample word pair needs to be greater than a value (i.e., the target level), and the larger the value, the better. Here, the target level can also be a value preset based on experience or business needs, and there are no restrictions on it. For example, the target level can be 75%, or other values.
[0134] Based on the above description, the calculation method for the feedback behavior score of any sample word pair is explained below:
[0135] First, the information exposure volume of each feedback information in the feedback information set of the sample rewritten words in any sample word pair can be obtained. The understanding of the feedback information set of the sample rewritten words can refer to the understanding of the feedback information set of the second search term mentioned above. After obtaining the information exposure volume of each feedback information, the feedback information in the corresponding feedback information set can be arranged in descending order of information exposure volume to obtain the arrangement position of each feedback information in the corresponding feedback information set; or, the arrangement position of each feedback information in the corresponding feedback information set can be obtained according to the sorting class of each feedback information in the feedback information sorting list. Next, the feedback behavior score of any sample word pair can be calculated based on the arrangement position of each feedback information in the corresponding feedback information set and the feedback behavior data of the corresponding feedback information set. In this implementation, the computer device can calculate the feedback behavior score of any sample word pair using the following formula (4):
[0136]
[0137] Where LDLCq,q′ represents the feedback behavior score for any sample word pair; I represents the number of feedback messages in the feedback information set of any sample word pair, or the maximum permutation position of the feedback information set; u i This represents the feedback information at the i-th position, or the feedback information at position i. This represents the feedback behavior data for the feedback information at position i.
[0138] For example, suppose we are targeting a certain sample word pair<q1,q'1> The feedback information set of the sample rewritten word q'1 includes information 1, information 2, information 3, information 4, and information 5. The exposure values of these five feedback information are Z1, Z2, Z3, Z4, and Z5, respectively. The order of these five information exposure values from highest to lowest is Z3, Z2, Z4, Z1, and Z5. Therefore, the result of arranging these five feedback information is: information 3, information 2, information 4, information 1, and information 5. From the above arrangement, we can see that the positions of information 3, information 2, information 4, information 1, and information 5 are 1, 2, 3, 4, and 5, respectively. If the feedback behavior data of these five feedback information are c1, c2, c3, c4, and c5, then the sample word pair...<q1,q'1> The feedback behavior score is calculated using the following formula (5):
[0139]
[0140] Based on the aforementioned calculation method for feedback behavior scores, when the information click volume in the feedback behavior data is the number of times any feedback information is clicked in a scenario where any feedback information is output based on the sample search term corresponding to the sample rewritten term; in this case, by using the information search volume of the sample search term as the information search volume of the sample rewritten term, for sample word pairs that are jointly clicked on the same feedback information, the cumulative number of clicks of these jointly clicked feedback information can be used to estimate the feedback behavior score that the sample rewritten term can bring when it is an effective rewritten term of the sample search term. This feedback behavior score can also be used to limit the correlation between the sample search term and the sample rewritten term in the sample word pair; that is, the feedback behavior score can serve as a constraint on whether the sample word pair is related. Simultaneously, to avoid problems such as homogeneity in the expression of sample search terms and sample rewritten terms in positive samples and insufficient information gain, this application embodiment can prioritize using information exposure volume to filter the information feedback set of the second search term and use information exposure volume to rank each feedback information in the information feedback set.
[0141] s33, based on the position information of each sample word pair in the corresponding word pair group, the sample label of each sample word pair and the posterior data of each word in each sample word pair, at least one positive sample is mined from multiple sample word pairs, and each mined positive sample is used as a training sample.
[0142] In the specific implementation, a first set of word pairs can be selected from multiple sample word pairs based on the sample label of each sample word pair. The sample label of each sample word pair in the first set of word pairs is the first label. Then, each sample word pair in the first set of word pairs can be traversed. If the word search volume of each word in the currently traversed sample word pair is greater than a specified threshold, and the position information of the currently traversed sample word pair meets the position condition, then the currently traversed sample word pair can be determined as a positive sample.
[0143] In this application, different location conditions can be set depending on the location information. In one embodiment, when the location information includes a score percentage and a ranking level, the location conditions may include: the score percentage is greater than the target percentage, and the ranking level is less than the target level. In another embodiment, when the location information includes a score percentage, the location conditions may include: the score percentage is greater than the target percentage. In yet another embodiment, when the location information includes a ranking level, the location conditions may include: the ranking level is less than the target level. Here, the target percentage and target level can be pre-set values based on experience or business needs, and are not limited thereto. For example, practice has shown that when both the target percentage and target level are 25%, the positive samples selected from the sample word pairs perform better.
[0144] Understandably, the higher the score percentage of a sample word pair, the higher its feedback behavior score. A higher feedback behavior score indicates a greater relevance between the sample search term and the sample rewritten term within the sample word pair. Conversely, a lower ranking of a sample word pair results in a higher feedback behavior score, further indicating a greater relevance between the sample search term and the sample rewritten term. This greater relevance also helps ensure that the feedback information retrieved by the sample rewritten term is prioritized in the search system's list of feedback information for the sample rewritten term, making it attractive enough for users to click on it.
[0145] As described above, a sample word pair can be considered a positive sample if it meets the following conditions: ① The sample label of the sample word pair is the first label, ensuring that the posterior performance of the modified word in the sample word pair is better than that of the search word. ② The search volume of the search word and the modified word in the sample word pair are both greater than a specified threshold, ensuring that the posterior scores of the search word and the modified word are both confident. ③ The positional information meets the positional conditions, such as a score proportion greater than the target proportion and a ranking level lower than the target level, to ensure the relevance between the search word and the modified word in the sample word pair. This ensures that the feedback information retrieved by the modified word can also be ranked higher in the search system's feedback information list for the modified word, and is sufficiently attractive to users to click on it. By meeting these conditions, high-quality positive samples can be selected from the sample word pairs for training the initial model, resulting in a better performance of the trained initial model (i.e., the target model).
[0146] In summary, when determining the sample labels for sample word pairs, the posterior scores corresponding to the sample search terms and sample rewritten terms in the sample word pairs can be referenced to comprehensively label the sample word pairs. Furthermore, the posterior data of each word in the sample word pair and the positional information determined based on the feedback behavior scores can be used to screen positive samples for the sample word pairs. It can be seen that the embodiments of this application can combine multiple factors to screen positive samples, thereby enhancing the credibility of positive samples and improving the model performance of the initial model.
[0147] (2) Mine negative samples from multiple sample word pairs and use the mined negative samples as training samples.
[0148] First, a second set of word pairs can be selected from multiple sample word pairs based on the sample labels of each sample word pair. The sample labels of each sample word pair in the second set are all second labels. After selecting the second set of word pairs, each sample word pair in the second set can be traversed to determine whether the currently traversed sample word pair can be a negative sample. If the currently traversed sample word pair is determined to be a negative sample, it can be used as a training sample. In one implementation, if the word search volume of each word in the currently traversed sample word pair is greater than a specified threshold (i.e., the word search volume of both the sample search word and the sample rewritten word in the currently traversed sample word pair is greater than the specified threshold), then the currently traversed sample word pair can be determined as a negative sample. After all sample word pairs in the second set have been traversed, the determined negative samples can be used as training samples.
[0149] As described above, a sample word pair can be used as a negative sample if it meets the following conditions: ① The sample label of the sample word pair is the second label, ensuring that the posterior performance of the sample search term in the sample word pair is better than that of the sample rewritten term. ② The search volume of the words corresponding to the sample search term and the sample rewritten term in the sample word pair is greater than a specified threshold, thus ensuring that the posterior scores corresponding to the sample search term and the sample rewritten term are both confident. By meeting these conditions, higher-quality negative samples can be selected from the sample word pairs for training the initial model, resulting in a better performance of the trained initial model (i.e., the target model).
[0150] As can be seen from the above description, the embodiments of this application can achieve automatic mining of training samples through steps S401-S403; and an implementation process for automatically mining training samples can be exemplarily referred to Figure 5d As shown: First, a first weighted bipartite graph can be constructed by aggregating and analyzing the search behavior logs within the first historical time period, and a second weighted bipartite graph can be constructed by aggregating and analyzing the search behavior logs within the second historical time period. Then, the first and second weighted bipartite graphs can be correlated to obtain the corresponding operation results. After obtaining multiple operation results, multiple operation results can be aggregated in the form of word pairs to construct multiple sample word pairs. Next, the feedback behavior score of each sample word pair can be calculated according to formula (4), and multiple sample word pairs can be grouped according to the principle that sample word pairs containing the same sample search terms are divided into the same group to obtain one or more word pair groups. After obtaining one or more word pair groups, the score ratio of each sample word pair in the corresponding word pair group can be calculated based on formula (2), and the ranking level of each sample word pair in the corresponding word pair group can be calculated based on formula (3).
[0151] Furthermore, a posterior data table within the third historical time period can be obtained to perform association operations based on sample search terms and sample rewritten terms on the posterior data table, thereby obtaining the posterior data of each word in the sample word pair; thus, formula (1) can be used to obtain the sample label of each sample word pair based on the posterior data of each word in each sample word pair. Finally, negative samples can be determined from multiple sample word pairs using the posterior data of each word in the sample word pair and the sample label of the sample word pair; and positive samples can be determined from multiple sample word pairs using the posterior data of each word in the sample word pair, the sample label of the sample word pair, the score ratio, and the ranking level.
[0152] The above-described implementation of the automatic training sample mining method is merely an exemplary example. The specific implementation in the implementation method may also include other implementations described in the embodiments of this application, which will not be specifically described here.
[0153] Additionally, it should be noted that the automatic mining process of training samples can be a serial multi-node Spark (a computing engine with a general-purpose in-memory parallel computing framework) task. That is, the determination of a training sample and its corresponding label can be a serial task, while the determination of each training sample and its corresponding label can be parallelized to effectively utilize computing resources and improve computing efficiency.
[0154] S404: Using at least one training sample and the sample label of each training sample, train the initial model to obtain the target model.
[0155] In practice, the initial model can be invoked to predict the labels of each training sample based on its feature information, thus obtaining a predicted label for each training sample. Then, the initial model can be trained based on the predicted label and the corresponding sample label for each training sample, resulting in the trained initial model, i.e., the target model. Optionally, the model loss value of the initial model can be calculated based on the difference between the predicted label and the corresponding sample label for each training sample, and the model parameters in the initial model can be updated in the direction of reducing the model loss value, thereby obtaining the trained initial model.
[0156] The method for determining the feature information of any training sample can refer to the method for determining the feature information of the target word pair in step S202, and will not be repeated here.
[0157] In specific application scenarios, the initial model can be a tree model using GBDT, specifically based on XGBoost. Practical experience shows that the initial model can achieve an AUC of over 0.90 offline, which strongly demonstrates its excellent offline fitting ability.
[0158] In this embodiment, multiple sample word pairs for training the initial model can be mined from the historical search behavior logs of the object. Furthermore, the sample labels for each word pair can be annotated using the posterior data of each word in the sample word pair. This allows the relative superiority or inferiority of the posterior performance of each word to be considered when determining the sample labels, which can improve the reliability of the sample labels to a certain extent, thereby improving the model training effect and enabling the target model to make more accurate probability predictions, thus improving the accuracy of effective word rewriting selection. Moreover, the correlation between sample search terms and sample rewriting terms in the sample word pair can be limited based on the feedback behavior score of each sample word pair. This feedback behavior score can then be used to mine a large number of sample word pairs to select highly correlated sample word pairs as training samples based on relevance. This can minimize problems such as insufficient information gain and homogenization of sample rewriting word expressions, allowing for the extraction of higher-quality sample word pairs as the final training samples for the initial model. This improves the performance of the trained initial model (i.e., the target model) and further enhances the accuracy of effective word rewriting selection using the target model.
[0159] Please see Figure 6 This is a flowchart illustrating another data processing method provided in the embodiments of this application. The embodiments of this application are mainly described using a computer device as the execution subject; please refer to... Figure 6 The data processing method may include the following steps S601-S606:
[0160] S601, after determining the N candidate rewrite terms corresponding to the target search term, determine the sorting mode of the rewrite terms corresponding to the target search term.
[0161] The rewritten word ranking modes can include: model-based ranking modes and posterior score-based ranking modes. Model-based ranking modes refer to using a model to rank N candidate rewritten words; posterior score-based ranking modes refer to using posterior scores to rank N candidate rewritten words.
[0162] In practical implementation, different rewrite word ranking modes can be applied to rank the corresponding candidate rewrite words for different target search terms. For example, the rewrite word ranking mode corresponding to the target search term can be different under different business scenarios. For instance, in business scenarios where the accuracy requirement of effective rewrite words is high, the rewrite word ranking mode corresponding to the target search term is a model-based ranking mode, while in business scenarios where the accuracy requirement of effective rewrite words is low, the rewrite word ranking mode corresponding to the target search term is a posterior score-based ranking mode. It is understandable that the model-based ranking mode can alleviate the semantic drift problem of the selected effective rewrite words, and therefore, the accuracy of the model-based ranking mode may be higher than that of the posterior score-based ranking mode. Alternatively, the rewrite word ranking mode corresponding to the target search term can also be determined in other ways, without restriction.
[0163] After determining the N candidate rewritten terms corresponding to the target search term, we can further determine the rewritten term sorting mode corresponding to the target search term so as to use the appropriate rewritten term sorting mode for subsequent sorting processing.
[0164] S602, if the rewritten word sorting mode is a model-based sorting mode, then construct N target word pairs with the target search word and N candidate rewritten words, and continue to execute steps S603 and S604.
[0165] As mentioned above, if the rewritten word sorting mode is a model-based sorting mode, then the model-based sorting mode can be used to process the N candidate rewritten words. Specifically, this can be implemented using steps S603-S605 below. The detailed description of steps S603-S605 can be found in steps S201-S203 above, and will not be repeated here.
[0166] S603, the target model is invoked to predict the probability of the corresponding candidate rewritten words as effective rewritten words of the target search words based on the feature information of each target word pair.
[0167] S604, sort the N candidate rewritten words based on the predicted probabilities, and select the effective rewritten words of the target search term from the N candidate rewritten words according to the sorting results.
[0168] S605, if the rewritten word sorting mode is a sorting mode based on posterior scores, then calculate the posterior score of each candidate rewritten word according to the posterior data of each candidate rewritten word.
[0169] The posterior data for any candidate rewritten word may include: data for any candidate rewritten word under multiple posterior dimensions; the multiple posterior dimensions may include: search volume dimension, click volume dimension, conversion rate dimension, and viewing score dimension; the data under the search volume dimension may refer to the word search volume, the data under the click volume dimension may refer to the word click volume, the data under the conversion rate dimension may refer to the word conversion rate, which is the ratio between word click volume and word search volume, and the data under the viewing score dimension may refer to the word standardized viewing score.
[0170] In one specific implementation, step S605 can be implemented as follows: for the nth candidate rewriting word among N candidate rewriting words, the posterior score of the nth candidate rewriting word can be calculated based on the posterior data of the nth candidate rewriting word according to the first calculation strategy related to word search volume.
[0171] In another specific implementation, see as follows: Figure 7 As shown, the specific implementation of step S605 may include the following steps:
[0172] First, the search volume of the nth candidate rewritten word can be reliably tested based on the relationship between its search volume and a search volume threshold. Specifically, if the search volume of the nth candidate rewritten word is less than the search volume threshold, it passes the reliability test; if the search volume is greater than or equal to the search volume threshold, it fails the reliability test. The search volume threshold can be a pre-set threshold based on experience or business requirements, and there are no restrictions on its implementation. For example, practice has shown that a search volume threshold of 300 (an empirical value) yields better results in reliability testing.
[0173] If the search volume of the nth candidate rewritten word passes the credibility test, then the posterior score of the nth candidate rewritten word can be calculated based on its posterior data using the first calculation strategy related to search volume. If the search volume of the nth candidate rewritten word fails the credibility test, then the posterior score of the nth candidate rewritten word can be calculated based on its posterior data using the second calculation strategy unrelated to search volume.
[0174] The first calculation strategy can be used to instruct the calculation of the posterior score using data from the search volume dimension, the click volume dimension, and the conversion rate dimension; the second calculation strategy can be used to instruct the calculation of the posterior score using data from the conversion rate dimension and the view score dimension.
[0175] In one implementation, the method for calculating the posterior score of the nth candidate rewritten word based on the posterior data of the nth candidate rewritten word, according to any calculation strategy, may include:
[0176] First, it's possible to iterate through each posterior dimension indicated by any calculation strategy, and use the currently iterated posterior dimension as the current posterior dimension. For example, if any calculation strategy refers to the first calculation strategy, then the iterated posterior dimensions include search volume, click volume, and conversion rate, while the currently iterated posterior dimension can be any one of these dimensions. Similarly, if any calculation strategy refers to the second calculation strategy, then the iterated posterior dimensions include conversion rate and view score, while the currently iterated posterior dimension can be either conversion rate or view score.
[0177] Then, based on the data of the target search term in the current posterior dimension and the data of the nth candidate rewritten term in the current posterior dimension, the performance score of the nth candidate rewritten term in the current posterior dimension can be calculated. In one implementation, the ratio between the data of the nth candidate rewritten term in the current posterior dimension and the data of the target search term in the current posterior dimension can be used as the performance score of the nth candidate rewritten term in the current posterior dimension. For example, if the current posterior dimension is the search volume dimension, then the performance score of the nth candidate rewritten term in the search volume dimension can be the ratio between the search volume of the nth candidate rewritten term and the search volume of the target search term. Similarly, if the current posterior dimension is the conversion rate dimension, then the performance score of the nth candidate rewritten term in the conversion rate dimension can be the ratio between the conversion rate of the nth candidate rewritten term and the conversion rate of the target search term.
[0178] Finally, after traversing multiple posterior dimensions, the posterior score of the nth candidate rewritten word can be obtained by using its performance score in each posterior dimension. Optionally, the posterior score of the nth candidate rewritten word can be obtained by weighted summation of its performance scores in each posterior dimension.
[0179] The specific implementation of calculating the posterior score of the nth candidate rewritten word using the first calculation strategy can be as follows: First, the performance scores of the nth candidate rewritten word can be calculated separately in terms of search volume, click volume, and conversion rate. Specifically, this involves calculating the ratio between the search volume of the nth candidate rewritten word and the target search word, the ratio between the click volume of the nth candidate rewritten word and the target search word, and the ratio between the conversion rate of the nth candidate rewritten word and the target search word. These three ratios represent the performance scores of the nth candidate rewritten word in terms of search volume, click volume, and conversion rate, respectively. Then, based on these performance scores, the posterior score of the nth candidate rewritten word can be calculated. In other words, the posterior score of the nth candidate rewritten word can be calculated based on the three ratios obtained here. In one implementation, the three calculated ratios can be weighted and summed, and the weighted sum can be used as the posterior score of the nth candidate rewritten word. In this implementation, the computer device can calculate the posterior score of the nth candidate rewritten word using the following formula (6):
[0180] score = A × (search q' / search q )+B×(count q' / count q )+C×(rate q' / rate q (6)
[0181] Where, score represents the posterior score of the nth candidate rewritten word, and A, B, and C represent the weights of the three ratios, respectively; search q' The search volume for the nth candidate rewrite word is represented by the word search count. q The count represents the number of searches for the target search term. q' The count represents the number of clicks on the nth candidate rewritten word. q Rate represents the number of clicks for the target search term. q' Rate represents the conversion rate of the nth candidate rewritten word. q Rate represents the conversion rate of the target search term. q' =count q' / search q' rate q =count q / search q .
[0182] In another implementation, the three ratios can be weighted separately to obtain the corresponding first weighted result, second weighted result, and third weighted result; then, the first weighted result and the second weighted result are summed to obtain the summed result; finally, the third weighted result is used to weight the summed result, and the weighted result is used as the posterior score of the nth candidate rewritten word. In this implementation, the computer device can calculate the posterior score of the nth candidate rewritten word using the following formula (7):
[0183] score=(A×search q' / search q +B×count q' / count q )×C×(rate q' / rate q (7)
[0184] For the nth candidate rewritten word, the specific implementation of calculating the posterior score of the nth candidate rewritten word using the second calculation strategy can be as follows: First, the performance scores of the nth candidate rewritten word in the conversion rate dimension and the viewing score dimension can be calculated respectively. That is, the ratio between the word conversion rate of the nth candidate rewritten word and the word conversion rate of the target search word can be calculated, and the ratio between the word standardized viewing score of the nth candidate rewritten word and the word standardized viewing score of the target search word can be calculated. These two ratios are the performance scores of the nth candidate rewritten word in the conversion rate dimension and the viewing score dimension, respectively. Then, based on the performance scores of the nth candidate rewritten word in the conversion rate dimension and the viewing score dimension, the posterior score of the nth candidate rewritten word can be calculated. That is, based on the two ratios calculated here, the posterior score of the nth candidate rewritten word can be calculated. In this implementation method, the computer device can calculate the posterior score of the nth candidate rewritten word using the following formula (8):
[0185] score = D × (rate) q' / rate q )+E×(std_score q' / std_score q (8)
[0186] Where score represents the posterior score of the nth candidate rewritten word, and D and E represent the weights of the two ratios, respectively; std_score q' std_score represents the word-normalized view score of the nth candidate rewritten word. q The standardized view score represents the target search term.
[0187] In summary, when using a ranking mode based on posterior scores to rewrite N candidate words, the posterior score of each candidate word can be pre-calculated. There are two methods for calculating the posterior score of each candidate word among the N candidate words. The first method uses a first calculation strategy to calculate the posterior score of each candidate word. This strategy is based on a posterior formula that calculates the ratio of the target word's search volume, click volume, and conversion rate to the target word's search volume and the candidate word's conversion rate. This posterior formula is either formula (6) or formula (7) mentioned above. In this case, the search volume of the candidate word is the dominant factor, and candidates with high search volumes will be selected when screening effective rewritten words. The second method uses the search volume of the candidate words to segment them, and different calculation strategies are used to calculate the posterior score of the candidate words. This mainly considers whether the conversion posterior of the candidate words is reliable, such as using the search volume of the candidate words as a criterion. In this case, when the word search volume of the candidate rewritten word is less than the search volume threshold, the first calculation strategy (i.e., the above formula (6) or formula (7)) can be used to calculate the posterior score of the candidate rewritten word; when the word search volume of the candidate rewritten word is greater than or equal to the search volume threshold, the second calculation strategy (i.e., the above formula (8)) can be used to calculate the posterior score of the candidate rewritten word.
[0188] S606, based on the calculated posterior scores, sort the N candidate rewritten words, so as to select the effective rewritten words of the target search word from the N candidate rewritten words according to the sorting results.
[0189] In practice, the N candidate rewrite words can be sorted either according to a descending order of posterior scores or an ascending order of posterior scores. After sorting, a ranking result is obtained, and the valid rewrite words can be determined based on this result. For example, if the ranking result is obtained by descending posterior scores, the valid rewrite word can be the first candidate rewrite word in the ranking result, and its corresponding posterior score can be greater than or equal to 1.
[0190] In this embodiment, the target search term can correspond to different rewritten word ranking modes, which can improve the flexibility of selecting the rewritten word ranking mode; it is also possible to first determine the rewritten word ranking mode that is suitable for the target search term, so as to enhance the effectiveness and accuracy of the ranking results of the N candidate rewritten words corresponding to the target search term, thereby improving the accuracy of effective rewritten word selection; furthermore, it is possible to use the posterior performance based on the candidate rewritten words to select effective rewritten words, so as to make full use of the posterior data for effective rewritten word mining; at the same time, it is possible to select different calculation strategies based on the word search volume of the candidate rewritten words, thereby improving the accuracy of the posterior score, and thus improving the accuracy of effective rewritten word selection.
[0191] Based on the description of the relevant embodiments of the above data processing method, this application also proposes a data processing apparatus, which can be a computer program running in a computer device. This data processing apparatus can execute... Figure 2 , Figure 4 as well as Figure 6 The data processing method shown; please refer to [link / reference]. Figure 8 The data processing device can operate the following units:
[0192] The construction unit 801 is used to construct N target word pairs after determining N candidate rewriting words corresponding to the target search word, using the target search word and the N candidate rewriting words; a target word pair includes the target search word and a candidate rewriting word, and the candidate rewriting words in different target word pairs are different from each other, where N is a positive integer;
[0193] The prediction unit 802 is used to call the target model to predict the probability that the candidate rewritten words in each target word pair are valid rewritten words of the target search word based on the feature information of each target word pair. The target model is trained using at least one training sample and corresponding sample labels. A training sample includes a sample search word and a sample rewritten word. The sample label of any training sample is determined based on the posterior data of each word in the corresponding training sample, and the sample label of any training sample is used to indicate whether the sample rewritten word in the corresponding training sample is a valid rewritten word of the corresponding sample search word.
[0194] The sorting unit 803 is used to sort the N candidate rewritten words based on the predicted probabilities, so as to select the effective rewritten words of the target search word from the N candidate rewritten words according to the sorting results.
[0195] In one implementation, the prediction unit 802 can also be used for:
[0196] Obtain the word features of the target search word in the nth target word pair, and the word features of the candidate rewritten words in the nth target word pair; wherein, any word feature includes at least one of the following: the text features, posterior features, and semantic features of the corresponding word, n∈[1,N];
[0197] Based on the feature differences between the two obtained word features, the cross features of the nth target word pair are determined;
[0198] The feature information of the nth target word pair is constructed by using the two word features obtained and the cross features.
[0199] In another embodiment, the device further includes a training unit 804, which can be specifically used for:
[0200] Obtain multiple sample word pairs for training the initial model. Each sample word pair includes a sample search word and a sample rewritten word.
[0201] Based on the posterior data of each word in each sample word pair, each sample word pair is labeled to obtain the sample label of each sample word pair;
[0202] Based on the sample labels of each sample word pair and the posterior data of each word in each sample word pair, sample mining is performed on the multiple sample word pairs to obtain at least one training sample.
[0203] The initial model is trained using at least one training sample and the sample label of each training sample to obtain the target model.
[0204] In another embodiment, when the training unit 804 is used to acquire multiple sample word pairs for training the initial model, it may specifically be used to:
[0205] Get the K first search terms generated in the first historical time period and the feedback information set of each first search term, and get the H second search terms generated in the second historical time period and the feedback information set of each second search term, where K and H are both positive integers;
[0206] Based on the feedback information sets of each first search term and each second search term, an association operation is performed on the K first search terms and the H second search terms, and the associated first search terms and second search terms have the same feedback information.
[0207] If the result of the association operation indicates that the k-th first search term is associated with at least one second search term, then the k-th first search term is used as a sample search term, and each of the second search terms associated with the k-th first search term is used as a sample rewritten term, so as to construct multiple sample word pairs for training the initial model, k∈[1,K].
[0208] In another embodiment, when the training unit 804 is used to obtain the H second search terms generated within the second historical time period and the feedback information set of each second search term, it may specifically be used for:
[0209] By aggregating and analyzing the search behavior logs generated within the second historical time period, we obtained H second search terms and the corresponding feedback information for each second search term.
[0210] For the h-th second search term, obtain the information exposure of each feedback message corresponding to the h-th second search term, where h∈[1,H];
[0211] Based on the information exposure volume from high to low, a target number of feedback information is selected from all the feedback information corresponding to the h-th second search term to construct the feedback information set for the h-th second search term, according to the information exposure volume of each feedback information.
[0212] In another embodiment, the training unit 804, in its function of labeling each sample word pair based on the posterior data of each word in each sample word pair to obtain the sample label for each sample word pair, can specifically be used for:
[0213] Traverse each of the multiple sample word pairs and take the currently traversed sample word pair as the target sample word pair;
[0214] Based on the posterior data of the sample search terms in the target sample word pair, calculate the posterior score of the corresponding sample search terms; and based on the posterior data of the sample rewritten terms in the target sample word pair, calculate the posterior score of the corresponding sample rewritten terms.
[0215] Based on the relative magnitude relationship between the two calculated posterior scores, the target sample word pairs are labeled to obtain the sample labels of the target sample word pairs.
[0216] In another embodiment, any posterior data includes: the word search volume, word click volume, and word standardized view score of the corresponding word; the word click volume is calculated based on the information click volume of each feedback message corresponding to the corresponding word; the word standardized view score is calculated based on the view information of each feedback message corresponding to the corresponding word; correspondingly, the training unit 804, in calculating the posterior score of the corresponding sample search word based on the posterior data of the sample search words in the target sample word pair, can be specifically used for:
[0217] Based on the word search volume and corresponding standardized view score of the sample search terms in the target sample word pair, calculate the posterior performance score of the sample search terms in the view dimension.
[0218] Based on the word search volume and corresponding word click volume of the sample search terms in the target sample word pair, calculate the posterior performance score of the sample search terms in the target sample word pair in terms of click volume dimension.
[0219] The calculated posterior performance scores are weighted and summed to obtain the posterior score of the sample search term in the target sample word pair.
[0220] In another embodiment, when the training unit 804 is used to label the target sample word pair based on the relative magnitude relationship between the calculated two posterior scores to obtain the sample labels of the target sample word pair, it can be specifically used for:
[0221] If the posterior score of the calculated sample search term is less than the posterior score of the calculated sample rewritten term, then the first label is used as the sample label of the target sample pair.
[0222] If the calculated posterior score of the sample search term is greater than or equal to the calculated posterior score of the sample rewritten term, then the second label is used as the sample label of the target sample pair.
[0223] The first label indicates that the sample rewritten word is a valid rewritten word of the corresponding sample search word, and the second label indicates that the sample rewritten word is not a valid rewritten word of the corresponding sample search word.
[0224] In another embodiment, when the training unit 804 performs sample mining on the plurality of sample word pairs based on the sample labels of each sample word pair and the posterior data of each word in each sample word pair to obtain at least one training sample, it may specifically be used to:
[0225] According to the principle that sample word pairs containing the same sample search term are grouped into the same group, the multiple sample word pairs are grouped to obtain one or more word pair groups.
[0226] Based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, the position information of each sample word pair in the corresponding word pair group is determined; any feedback behavior data includes: the number of information clicks, the information standardized viewing score, or the historical viewing duration of each feedback information in the corresponding feedback information set.
[0227] Based on the position information of each sample word pair within the corresponding word pair group, the sample label of each sample word pair, and the posterior data of each word in each sample word pair, at least one positive sample is mined from the multiple sample word pairs, and each mined positive sample is used as a training sample.
[0228] In another embodiment, any location information includes a score percentage; correspondingly, when the training unit 804 determines the location information of each sample word pair within the corresponding word pair group based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, it may specifically be used to:
[0229] Based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, the feedback behavior score of each sample word pair is calculated respectively.
[0230] For any sample word pair, determine the maximum feedback behavior score from the feedback behavior scores corresponding to each sample word pair in the corresponding word pair group; determine the ratio between the feedback behavior score of the any sample word pair and the maximum feedback behavior score as the score proportion of the any sample word pair in the corresponding word pair group.
[0231] In another embodiment, any location information includes a ranking level; correspondingly, when the training unit 804 determines the location information of each sample word pair within the corresponding word pair group based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, it may specifically be used to:
[0232] Based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, the feedback behavior score of each sample word pair is calculated respectively.
[0233] For any given pair of sample words, sort the pairs of sample words in the corresponding pair group in descending order based on the feedback behavior scores of each pair of sample words in the corresponding pair group.
[0234] Based on the arrangement position of any sample word pair and the number of sample word pairs in the corresponding word pair group, calculate the ranking level of any sample word pair in the corresponding word pair group.
[0235] In another embodiment, when the training unit 804 calculates the feedback behavior score for each sample word pair based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, it may specifically be used to:
[0236] For any sample word pair, obtain the information exposure of each feedback information in the feedback information set of the sample rewritten words in the sample word pair, and arrange each feedback information in the corresponding feedback information set in descending order of information exposure to obtain the arrangement position of each feedback information in the corresponding feedback information set.
[0237] Based on the arrangement of each feedback message in the corresponding feedback information set and the feedback behavior data of the corresponding feedback information set, the feedback behavior score of any sample word pair is calculated.
[0238] In another embodiment, any posterior data includes the word search volume of the corresponding word; correspondingly, when the training unit 804 is used to mine at least one positive sample from the plurality of sample word pairs based on the position information of each sample word pair within the corresponding word pair group, the sample label of each sample word pair, and the posterior data of each word in each sample word pair, it can be specifically used to:
[0239] Based on the sample label of each sample word pair, a first word pair set is selected from the plurality of sample word pairs, and the sample label of each sample word pair in the first word pair set is the first label;
[0240] Traverse each sample word pair in the first word pair set. If the word search volume of each word in the currently traversed sample word pair is greater than a specified threshold, and the position information of the currently traversed sample word pair satisfies the position condition, then the currently traversed sample word pair is determined as a positive sample.
[0241] When the location information includes score percentage and ranking level, the location conditions include: score percentage is greater than target percentage and ranking level is less than target level.
[0242] In another embodiment, any posterior data includes the word search volume of the corresponding word; accordingly, when the training unit 804 is used to perform sample mining on the plurality of sample word pairs based on the sample labels of each sample word pair and the posterior data of each word in each sample word pair to obtain at least one training sample, it may be specifically used to:
[0243] Based on the sample label of each sample word pair, a second set of word pairs is selected from the plurality of sample word pairs, and the sample label of each sample word pair in the second set of word pairs is the second label;
[0244] Traverse each sample word pair in the second word pair set. If the word search volume of each word in the currently traversed sample word pair is greater than a specified threshold, then the currently traversed sample word pair is determined as a negative sample.
[0245] After all the sample word pairs in the second word pair set have been traversed, the identified negative samples are used as training samples.
[0246] In another embodiment, the sorting unit 803 can also be used for:
[0247] Determine the rewritten word sorting pattern corresponding to the target search term;
[0248] If the rewritten word sorting mode is a model-based sorting mode, then the step of constructing N target word pairs using the target search word and the N candidate rewritten words is triggered.
[0249] If the rewritten word sorting mode is a posterior score-based sorting mode, then based on the posterior data of each candidate rewritten word, the posterior score of each candidate rewritten word is calculated, and the N candidate rewritten words are sorted based on the calculated posterior scores.
[0250] In another embodiment, when the sorting unit 803 calculates the posterior score of each candidate rewritten word based on the posterior data of each candidate rewritten word, it can be specifically used for:
[0251] For the nth candidate rewriting word among the N candidate rewriting words, according to the first calculation strategy related to word search volume, the posterior score of the nth candidate rewriting word is calculated based on the posterior data of the nth candidate rewriting word, where n∈[1,N];
[0252] Alternatively, when the sorting unit 803 calculates the posterior score of each candidate rewritten word based on the posterior data of each candidate rewritten word, it can be specifically used for:
[0253] Based on the relationship between the word search volume and the search volume threshold of the nth candidate rewritten word, a reliable detection is performed on the word search volume of the nth candidate rewritten word, where n∈[1,N];
[0254] If the word search volume of the nth candidate rewritten word passes the credibility detection, then according to the first calculation strategy related to the word search volume, the posterior score of the nth candidate rewritten word is calculated based on the posterior data of the nth candidate rewritten word.
[0255] If the word search volume of the nth candidate rewritten word fails the credibility test, then according to the second calculation strategy which is independent of the word search volume, the posterior score of the nth candidate rewritten word is calculated based on the posterior data of the nth candidate rewritten word.
[0256] In another embodiment, the posterior data of any candidate rewritten word includes: data of the candidate rewritten word under multiple posterior dimensions; the multiple posterior dimensions include: search volume dimension, click volume dimension, conversion rate dimension, and viewing score dimension; the first calculation strategy is used to indicate: using the data under the search volume dimension, the data under the click volume dimension, and the data under the conversion rate dimension to calculate the posterior score; the second calculation strategy is used to indicate: using the data under the conversion rate dimension and the data under the viewing score dimension to calculate the posterior score; correspondingly, when the sorting unit 803 calculates the posterior score of the nth candidate rewritten word according to any calculation strategy and based on the posterior data of the nth candidate rewritten word, it can be specifically used for:
[0257] Iterate through each posterior dimension indicated by any of the computation strategies, and take the currently traversed posterior dimension as the current posterior dimension;
[0258] Based on the data of the target search term in the current posterior dimension and the data of the nth candidate rewritten term in the current posterior dimension, calculate the performance score of the nth candidate rewritten term in the current posterior dimension;
[0259] After all the posterior dimensions have been traversed, the performance scores of the nth candidate rewritten word under each posterior dimension are weighted and summed to obtain the posterior score of the nth candidate rewritten word.
[0260] In another embodiment, when the sorting unit 803 performs a reliability check on the word search volume of the nth candidate rewritten word based on the relationship between the word search volume and the search volume threshold, it can be specifically used for:
[0261] If the word search volume of the nth candidate rewritten word is less than the search volume threshold, then the word search volume of the nth candidate rewritten word is determined to pass the reliable detection.
[0262] If the word search volume of the nth candidate rewritten word is greater than or equal to the search volume threshold, then it is determined that the word search volume of the nth candidate rewritten word has not passed the reliable detection.
[0263] According to one embodiment of this application, Figure 2 , Figure 4 as well as Figure 6 Each step involved in the method shown can be performed by... Figure 8 This is performed by each unit in the data processing apparatus shown. For example, Figure 2 Step S201 shown can be performed by Figure 8 The building unit 801 shown is executed, and step S202 can be performed by... Figure 8The prediction unit 802 shown is executed, and step S203 can be performed by... Figure 8 The sorting unit 803 shown is executed. For example, Figure 4 Steps S401-S404 shown can all be generated by Figure 8 The training unit 804 shown is executed. For example, Figure 6 Steps S601 and S604-S606 shown can all be generated by... Figure 8 The sorting unit 803 shown is executed, and step S602 can be performed by... Figure 8 The building unit 801 shown is executed, and step S603 can be performed by... Figure 8 The prediction unit 802 shown performs, etc.
[0264] According to another embodiment of this application, Figure 8 The data processing apparatus shown can be composed of individual or combined units into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above-mentioned units are based on logical function division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the data processing apparatus may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.
[0265] According to another embodiment of this application, the following can be achieved by running on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access memory (RAM), and read-only memory (ROM), a device capable of performing operations such as... Figure 2 , Figure 4 or Figure 6 The computer program for each step involved in the corresponding method shown is used to construct, as... Figure 8 The data processing apparatus shown herein, and the data processing method for implementing the embodiments of this application, are described. The computer program may be recorded on, for example, a computer storage medium, loaded onto the aforementioned computing device via the computer storage medium, and run therein.
[0266] This application, after determining N candidate rewritten terms corresponding to the target search term, ranks these N candidate rewritten terms by first constructing N target word pairs with the target search term and the N candidate rewritten terms. A target model is then used to predict the probability that each candidate rewritten term in the target word pair is a valid rewritten term for the target search term. Then, based on the probability of each candidate rewritten term being a valid rewritten term for the target search term, the N candidate rewritten terms are ranked to determine the valid rewritten terms for the target search term from the ranking results. Utilizing the target model allows for automated probability prediction, thereby improving prediction automation and intelligence, increasing prediction efficiency, improving ranking processing efficiency, and ultimately improving the efficiency of selecting valid rewritten terms. Furthermore, the target model is obtained by training the model using training samples and corresponding sample labels. These sample labels can be obtained by labeling the training samples using the posterior data of each word in the training samples. This allows the relative superiority or inferiority of the posterior performance of each word to be taken into account when determining the sample labels, which can improve the reliability of the sample labels to a certain extent, thereby improving the model training effect. This enables the target model to make probability predictions more accurately, and thus improves the accuracy of selecting effective rewritten words.
[0267] Based on the description of the above method and apparatus embodiments, this application also provides a computer device. Please refer to... Figure 9 The computer device includes at least a processor 901, an input interface 902, an output interface 903, and a computer storage medium 904. The processor 901, input interface 902, output interface 903, and computer storage medium 904 within the computer device can be connected via a bus or other means.
[0268] Computer storage medium 904 can be stored in the memory of a computer device. The computer storage medium 904 is used to store computer programs, which include one or more program instructions (hereinafter referred to as instructions). The processor 901 is used to execute the instructions stored in the computer storage medium 904. The processor 901 (or CPU (Central Processing Unit)) is the computing and control core of the computer device, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve corresponding method flows or corresponding functions. In one embodiment, the processor 901 described in this application embodiment can be used to perform a series of data processing steps, specifically including: after determining N candidate rewritten words corresponding to the target search term, constructing N target word pairs using the target search term and the N candidate rewritten words; a target word pair includes the target search term and a candidate rewritten word, the candidate rewritten words in different target word pairs are different, and N is a positive integer; calling the target model based on the feature information of each target word pair. The probability of each candidate rewritten word in each target word pair being a valid rewritten word of the target search term is predicted. The target model is trained using at least one training sample and corresponding sample labels. A training sample includes a sample search term and a sample rewritten word. The sample label of any training sample is determined based on the posterior data of each word in the corresponding training sample, and the sample label of any training sample is used to indicate whether the sample rewritten word in the corresponding training sample is a valid rewritten word of the corresponding sample search term. The N candidate rewritten words are sorted based on the predicted probabilities, so as to select the valid rewritten word of the target search term from the N candidate rewritten words according to the sorting result.
[0269] This application embodiment also provides a computer storage medium (memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer storage medium provides storage space, which stores the operating system of the computer device. Furthermore, the storage space also stores a computer program suitable for loading and execution by the processor 901, which may include one or more instructions. It should be noted that the computer storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device; optionally, it can also be at least one computer storage medium located remotely from the aforementioned processor. In one embodiment, the processor 901 can load and execute one or more instructions stored in the computer storage medium to implement the above-mentioned... Figure 2 , Figure 4 or Figure 6 The various method steps in the embodiments of the data processing method shown.
[0270] This application, after determining N candidate rewritten terms corresponding to the target search term, ranks these N candidate rewritten terms by first constructing N target word pairs with the target search term and the N candidate rewritten terms. A target model is then used to predict the probability that each candidate rewritten term in the target word pair is a valid rewritten term for the target search term. Then, based on the probability of each candidate rewritten term being a valid rewritten term for the target search term, the N candidate rewritten terms are ranked to determine the valid rewritten terms for the target search term from the ranking results. Utilizing the target model allows for automated probability prediction, thereby improving prediction automation and intelligence, increasing prediction efficiency, improving ranking processing efficiency, and ultimately improving the efficiency of selecting valid rewritten terms. Furthermore, the target model is obtained by training the model using training samples and corresponding sample labels. These sample labels can be obtained by labeling the training samples using the posterior data of each word in the training samples. This allows the relative superiority or inferiority of the posterior performance of each word to be taken into account when determining the sample labels, which can improve the reliability of the sample labels to a certain extent, thereby improving the model training effect. This enables the target model to make probability predictions more accurately, and thus improves the accuracy of selecting effective rewritten words.
[0271] It should be noted that, according to one aspect of this application, a computer program product or computer program is also provided, which includes one or more instructions stored in a computer storage medium. The processor of a computer device can invoke the one or more instructions to execute the above-described... Figure 2 , Figure 4 or Figure 6 The methods provided in various alternative ways in the embodiments of the data processing method shown are as follows.
[0272] Furthermore, it should be understood that the above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application are still within the scope of this application.
Claims
1. A data processing method, characterized in that, The method includes: After determining N candidate rewritten terms corresponding to the target search term, N target word pairs are constructed using the target search term and the N candidate rewritten terms. Each target word pair includes the target search term and a candidate rewritten term, and the candidate rewritten terms in different target word pairs are all different. N is a positive integer. The N candidate rewritten terms are obtained through multiple recall paths, including a click recall path and a same-session recall path. In the click recall path, the feedback information corresponding to the target search term is searched from the historical search behavior log containing the target search term, and the search terms other than the target search term corresponding to the found feedback information are used as candidate rewritten terms. In the same-session recall path, other search terms in the session to which the target search term belongs are used as candidate rewritten terms. The target model is invoked to predict the probability that candidate rewritten words in each target word pair are valid rewritten words of the target search word, based on the feature information of each target word pair. The target model is trained using at least one training sample and corresponding sample labels. A training sample includes a sample search word and a sample rewritten word. The sample label of any training sample is determined based on the posterior data of each word in the corresponding training sample, and the sample label of any training sample is used to indicate whether the sample rewritten word in the corresponding training sample is a valid rewritten word of the corresponding sample search word. The posterior data of any word includes: based on The data generated by the operation behavior performed by the object on each feedback information pushed based on the corresponding word; the posterior data of any word is used to calculate the posterior score of the corresponding word. When the posterior score of the sample search word in the training sample is less than the posterior score of the corresponding sample rewritten word, the sample label of the training sample indicates that the sample rewritten word in the training sample is a valid rewritten word of the corresponding sample search word. When the posterior score of the sample search word in the training sample is greater than or equal to the posterior score of the corresponding sample rewritten word, the sample label of the training sample indicates that the sample rewritten word in the training sample is not a valid rewritten word of the corresponding sample search word. The N candidate rewritten words are sorted based on the predicted probabilities, and the effective rewritten words of the target search term are selected from the N candidate rewritten words according to the sorting results.
2. The method as described in claim 1, characterized in that, The method further includes: Obtain the word features of the target search word in the nth target word pair, and the word features of the candidate rewritten words in the nth target word pair; wherein, any word feature includes at least one of the following: the text features, posterior features, and semantic features of the corresponding word, n∈[1,N]; Based on the feature differences between the two obtained word features, the cross features of the nth target word pair are determined; The feature information of the nth target word pair is constructed by using the two word features obtained and the cross features.
3. The method as described in claim 1 or 2, characterized in that, The method further includes: Obtain multiple sample word pairs for training the initial model. Each sample word pair includes a sample search word and a sample rewritten word. Based on the posterior data of each word in each sample word pair, each sample word pair is labeled to obtain the sample label of each sample word pair; Based on the sample labels of each sample word pair and the posterior data of each word in each sample word pair, sample mining is performed on the multiple sample word pairs to obtain at least one training sample. The initial model is trained using at least one training sample and the sample label of each training sample to obtain the target model.
4. The method as described in claim 3, characterized in that, The process of obtaining multiple sample word pairs for training the initial model includes: Get the K first search terms generated in the first historical time period and the feedback information set of each first search term, and get the H second search terms generated in the second historical time period and the feedback information set of each second search term, where K and H are both positive integers; Based on the feedback information sets of each first search term and each second search term, an association operation is performed on the K first search terms and the H second search terms, and the associated first search terms and second search terms have the same feedback information. If the result of the association operation indicates that the k-th first search term is associated with at least one second search term, then the k-th first search term is used as a sample search term, and each of the second search terms associated with the k-th first search term is used as a sample rewritten term, so as to construct multiple sample word pairs for training the initial model, k∈[1,K].
5. The method as described in claim 4, characterized in that, The acquisition of the H second search terms generated within the second historical time period and the feedback information set for each second search term includes: By aggregating and analyzing the search behavior logs generated within the second historical time period, we obtained H second search terms and the corresponding feedback information for each second search term. For the h-th second search term, obtain the information exposure of each feedback message corresponding to the h-th second search term, where h∈[1,H]; Based on the information exposure volume from high to low, a target number of feedback information is selected from all the feedback information corresponding to the h-th second search term to construct the feedback information set for the h-th second search term, according to the information exposure volume of each feedback information.
6. The method as described in claim 3, characterized in that, The step of labeling each sample word pair based on the posterior data of each word in each sample word pair to obtain the sample label for each sample word pair includes: Traverse each of the multiple sample word pairs and take the currently traversed sample word pair as the target sample word pair; Based on the posterior data of the sample search terms in the target sample word pair, calculate the posterior score of the corresponding sample search terms; and based on the posterior data of the sample rewritten terms in the target sample word pair, calculate the posterior score of the corresponding sample rewritten terms. Based on the relative magnitude relationship between the two calculated posterior scores, the target sample word pairs are labeled to obtain the sample labels of the target sample word pairs.
7. The method as described in claim 6, characterized in that, Any posterior data includes: word search volume, word click volume, and word standardized view score; the word click volume is calculated based on the information click volume of each feedback message corresponding to the word; the word standardized view score is calculated based on the view information of each feedback message corresponding to the word. The step of calculating the posterior score of the corresponding sample search term based on the posterior data of the sample search terms in the target sample word pair includes: Based on the word search volume and corresponding standardized view score of the sample search terms in the target sample word pair, calculate the posterior performance score of the sample search terms in the view dimension. Based on the word search volume and corresponding word click volume of the sample search terms in the target sample word pair, calculate the posterior performance score of the sample search terms in the target sample word pair in terms of click volume dimension. The calculated posterior performance scores are weighted and summed to obtain the posterior score of the sample search term in the target sample word pair.
8. The method as described in claim 3, characterized in that, Based on the sample labels of each sample word pair and the posterior data of each word in each sample word pair, sample mining is performed on the multiple sample word pairs to obtain at least one training sample, including: According to the principle that sample word pairs containing the same sample search term are grouped into the same group, the multiple sample word pairs are grouped to obtain one or more word pair groups. Based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, the position information of each sample word pair in the corresponding word pair group is determined; any feedback behavior data includes: the number of information clicks, the information standardized viewing score, or the historical viewing duration of each feedback information in the corresponding feedback information set. Based on the position information of each sample word pair within the corresponding word pair group, the sample label of each sample word pair, and the posterior data of each word in each sample word pair, at least one positive sample is mined from the multiple sample word pairs, and each mined positive sample is used as a training sample.
9. The method as described in claim 8, characterized in that, Any location information includes the score percentage; the determination of the location information of each sample word pair within the corresponding word pair group based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair includes: Based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, the feedback behavior score of each sample word pair is calculated respectively. For any sample word pair, determine the maximum feedback behavior score from the feedback behavior scores corresponding to each sample word pair in the corresponding word pair group; determine the ratio between the feedback behavior score of the any sample word pair and the maximum feedback behavior score as the score proportion of the any sample word pair in the corresponding word pair group.
10. The method as described in claim 8, characterized in that, Any location information includes ranking level; the determination of the location information of each sample word pair within the corresponding word pair group based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair includes: Based on the feedback behavior data of the feedback information set of the sample rewritten words in each sample word pair, the feedback behavior score of each sample word pair is calculated respectively. For any given pair of sample words, sort the pairs of sample words in the corresponding pair group in descending order based on the feedback behavior scores of each pair of sample words in the corresponding pair group. Based on the arrangement position of any sample word pair and the number of sample word pairs in the corresponding word pair group, calculate the ranking level of any sample word pair in the corresponding word pair group.
11. The method as described in claim 9 or 10, characterized in that, The feedback behavior data based on the feedback information set of the sample rewritten words in each sample word pair is used to calculate the feedback behavior score for each sample word pair, including: For any sample word pair, obtain the information exposure of each feedback information in the feedback information set of the sample rewritten words in the sample word pair, and arrange each feedback information in the corresponding feedback information set in descending order of information exposure to obtain the arrangement position of each feedback information in the corresponding feedback information set. Based on the arrangement of each feedback message in the corresponding feedback information set and the feedback behavior data of the corresponding feedback information set, the feedback behavior score of any sample word pair is calculated.
12. The method as described in claim 8, characterized in that, Each posterior data includes the word search volume of the corresponding word; the step of mining at least one positive sample from the multiple sample word pairs based on the position information of each sample word pair within the corresponding word pair group, the sample label of each sample word pair, and the posterior data of each word in each sample word pair includes: Based on the sample label of each sample word pair, a first word pair set is selected from the plurality of sample word pairs, and the sample label of each sample word pair in the first word pair set is the first label; Traverse each sample word pair in the first word pair set. If the word search volume of each word in the currently traversed sample word pair is greater than a specified threshold, and the position information of the currently traversed sample word pair satisfies the position condition, then the currently traversed sample word pair is determined as a positive sample. When the location information includes score percentage and ranking level, the location conditions include: score percentage is greater than target percentage and ranking level is less than target level.
13. The method as described in claim 3, characterized in that, Each posterior data point includes the word search volume of the corresponding word; based on the sample labels of each sample word pair and the posterior data of each word in each sample word pair, sample mining is performed on the multiple sample word pairs to obtain at least one training sample, including: Based on the sample label of each sample word pair, a second set of word pairs is selected from the plurality of sample word pairs, and the sample label of each sample word pair in the second set of word pairs is the second label; Traverse each sample word pair in the second word pair set. If the word search volume of each word in the currently traversed sample word pair is greater than a specified threshold, then the currently traversed sample word pair is determined as a negative sample. After all the sample word pairs in the second word pair set have been traversed, the identified negative samples are used as training samples.
14. The method as described in claim 1, characterized in that, The method further includes: Determine the rewritten word sorting pattern corresponding to the target search term; If the rewritten word sorting mode is a model-based sorting mode, then the step of constructing N target word pairs using the target search word and the N candidate rewritten words is triggered. If the rewritten word sorting mode is a posterior score-based sorting mode, then based on the posterior data of each candidate rewritten word, the posterior score of each candidate rewritten word is calculated, and the N candidate rewritten words are sorted based on the calculated posterior scores.
15. The method as described in claim 14, characterized in that, The step of calculating the posterior score of each candidate rewritten word based on the posterior data of each candidate rewritten word includes: For the nth candidate rewriting word among the N candidate rewriting words, according to the first calculation strategy related to word search volume, the posterior score of the nth candidate rewriting word is calculated based on the posterior data of the nth candidate rewriting word, where n∈[1,N]; Alternatively, the step of calculating the posterior score of each candidate rewritten word based on the posterior data of each candidate rewritten word includes: Based on the relationship between the word search volume and the search volume threshold of the nth candidate rewritten word, a reliable detection is performed on the word search volume of the nth candidate rewritten word, where n∈[1,N]; If the word search volume of the nth candidate rewritten word passes the credibility detection, then according to the first calculation strategy related to the word search volume, the posterior score of the nth candidate rewritten word is calculated based on the posterior data of the nth candidate rewritten word. If the word search volume of the nth candidate rewritten word fails the credibility test, then according to the second calculation strategy which is independent of the word search volume, the posterior score of the nth candidate rewritten word is calculated based on the posterior data of the nth candidate rewritten word.
16. The method as described in claim 15, characterized in that, The posterior data for any candidate rewritten word includes: data for the candidate rewritten word across multiple posterior dimensions; the multiple posterior dimensions include: search volume, click volume, conversion rate, and view score. The first calculation strategy is used to instruct that the posterior score be calculated using data from the search volume dimension, the click volume dimension, and the conversion rate dimension; the second calculation strategy is used to instruct that the posterior score be calculated using data from the conversion rate dimension and the view score dimension. According to any calculation strategy, the posterior score of the nth candidate rewritten word can be calculated based on the posterior data of the nth candidate rewritten word in the following ways: Iterate through each posterior dimension indicated by any of the computation strategies, and take the currently traversed posterior dimension as the current posterior dimension; Based on the data of the target search term in the current posterior dimension and the data of the nth candidate rewritten term in the current posterior dimension, calculate the performance score of the nth candidate rewritten term in the current posterior dimension; After all the posterior dimensions have been traversed, the performance scores of the nth candidate rewritten word under each posterior dimension are weighted and summed to obtain the posterior score of the nth candidate rewritten word.
17. The method as described in claim 15, characterized in that, The step of performing a reliable detection of the word search volume of the nth candidate rewritten word based on the relationship between the word search volume and the search volume threshold of the nth candidate rewritten word includes: If the word search volume of the nth candidate rewritten word is less than the search volume threshold, then the word search volume of the nth candidate rewritten word is determined to pass the reliable detection. If the word search volume of the nth candidate rewritten word is greater than or equal to the search volume threshold, then it is determined that the word search volume of the nth candidate rewritten word has not passed the reliable detection.
18. A computer device, characterized in that, The computer device includes an input interface, an output interface, a processor, and a computer storage medium. The processor is used to invoke one or more instructions stored in the computer storage medium to execute the method as described in any one of claims 1-17.
19. A data processing apparatus, characterized in that, include: The construction unit is used to construct N target word pairs using the target search term and the N candidate rewrite terms after determining the N candidate rewrite terms corresponding to the target search term; A target word pair includes the target search term and a candidate rewritten term. The candidate rewritten terms in different target word pairs are all different. N is a positive integer. The N candidate rewriting terms are obtained through multiple recall paths, including a click recall path and a same-session recall path. Specifically, in the click recall path, feedback information corresponding to the target search term is retrieved from historical search behavior logs containing the target search term, and search terms other than the target search term corresponding to the retrieved feedback information are used as candidate rewriting terms. In the same-session recall path, other search terms within the same session to which the target search term belongs are used as candidate rewriting terms. The prediction unit is used to invoke the target model to predict the probability that candidate rewritten words in each target word pair are valid rewritten words of the target search word, based on the feature information of each target word pair. The target model is trained using at least one training sample and corresponding sample labels. A training sample includes a sample search word and a sample rewritten word. The sample label of any training sample is determined based on the posterior data of each word in the corresponding training sample, and the sample label of any training sample is used to indicate whether the sample rewritten word in the corresponding training sample is a valid rewritten word of the corresponding sample search word. The posterior data of any word includes... The data is generated based on the actions performed by the object on each feedback message pushed based on the corresponding word; the posterior data of any word is used to calculate the posterior score of the corresponding word. When the posterior score of the sample search word in the training sample is less than the posterior score of the corresponding sample rewritten word, the sample label of the training sample indicates that the sample rewritten word in the training sample is a valid rewritten word of the corresponding sample search word. When the posterior score of the sample search word in the training sample is greater than or equal to the posterior score of the corresponding sample rewritten word, the sample label of the training sample indicates that the sample rewritten word in the training sample is not a valid rewritten word of the corresponding sample search word. The sorting unit is used to sort the N candidate rewrite words based on the predicted probabilities, so as to select the effective rewrite words of the target search word from the N candidate rewrite words according to the sorting results.
20. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions, which are adapted for execution by a processor of the method as described in any one of claims 1-17.
21. A computer program product, characterized in that, The computer program product includes one or more instructions, which are invoked by the processor of a computer device to execute the method as described in any one of claims 1-17.
Citation Information
Patent Citations
Synonym expansion method and device for search information
CN108509474A