A model training and information recommendation method, device, storage medium and equipment

CN116662657BActive Publication Date: 2026-06-23ALIPAY (HANGZHOU) INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
Filing Date
2023-05-30
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

In existing technologies, information recommendation relies on semantic similarity matching between user-input search terms and keywords, which leads to inaccurate recommendations that fail to meet user search needs and negatively impact user experience.

Method used

By acquiring search terms and their corresponding domain descriptions, matching keywords are determined from a pre-defined thesaurus, training samples are generated, and an information recommendation model is used to determine the relevance difference. The model training is then optimized to improve the accuracy of the relevance.

Benefits of technology

It improves the accuracy of information recommendation, ensuring that recommended keywords match the search domain corresponding to the search terms, thus meeting users' search needs and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116662657B_ABST
    Figure CN116662657B_ABST
Patent Text Reader

Abstract

The specification discloses a model training and information recommendation method, device, storage medium and equipment for privacy protection. The model training method comprises: acquiring a search word and field description information; determining a first keyword and at least one second keyword matched with the search word in a search field corresponding to the field description information from a word bank; generating a training sample according to the search word, the field description information, the first keyword and each second keyword; inputting the training sample into an information recommendation model to be trained, determining an association degree between each second keyword and the search word in the search field corresponding to the field description information as a reference association degree, and determining a difference between the association degree between the first keyword and the search word in the search field corresponding to the field description information and the reference association degree; and taking minimizing a deviation between the difference and a preset label corresponding to the training sample as an optimization target, and training the information recommendation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a method, apparatus, storage medium, and device for model training and information recommendation. Background Technology

[0002] With the development of deep learning, natural language processing has begun to be widely applied in various fields. In particular, when recommending information to users, natural language processing models can match the user's search content with the keywords in the relevant recommended content, thereby finding information that matches the user's search content and returning it to the user.

[0003] However, current information recommendations to users primarily rely on the semantic similarity between the user's search terms and keywords to match recommended information. This method often results in inaccurate recommendations. In some scenarios, even though keywords may be semantically close to the user's search terms, the content of the recommended information may not meet the user's expectations, failing to satisfy their search needs and compromising their user experience.

[0004] Therefore, accurately determining the recommended information that users expect in order to provide information recommendations to users and ensure a good user experience is an urgent problem to be solved. Summary of the Invention

[0005] This specification provides a method, apparatus, storage medium, and device for model training and information recommendation. It recommends target information based on search terms, domain description information, and multiple keywords.

[0006] The following technical solution is adopted in this specification:

[0007] This manual provides a method for model training, including:

[0008] Obtain the search terms and the domain description information used to describe the search domain corresponding to the search terms;

[0009] Determine a first keyword and at least one second keyword that match the search term in the search domain corresponding to the domain description information from a preset thesaurus;

[0010] Training samples are generated based on the search terms, the domain description information, the first keyword, and each of the second keywords.

[0011] The training samples are input into the information recommendation model to be trained, and the correlation degree between each second keyword and the search term in the search domain corresponding to the domain description information is determined as a reference correlation degree. The difference between the correlation degree between the first keyword and the search term in the search domain corresponding to the domain description information and the reference correlation degree is also determined.

[0012] The information recommendation model is trained with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample.

[0013] Optionally, before inputting the training samples into the information recommendation model to be trained, the method further includes:

[0014] Obtain a pre-trained base model;

[0015] The information recommendation model is constructed based on the aforementioned basic model and the preset output layer.

[0016] Optionally, the information recommendation model is trained with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample, specifically including:

[0017] Among the network layers included in the basic model, the network layer that has a data transmission relationship with the output layer is identified as the target network layer;

[0018] With the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample, the parameters of the target network layer and the output layer in the information recommendation model are adjusted.

[0019] This specification provides a method for information recommendation, including:

[0020] Obtain the search terms entered by the user and determine the search domain corresponding to the search terms;

[0021] Determine the domain description information used to describe the search domain;

[0022] From each piece of information to be recommended, candidate keywords associated with the search term are identified, and reference terms associated with the search term in the search domain are identified from a preset thesaurus.

[0023] The domain description information, the search term, the candidate keywords, and the reference terms are input into a pre-trained information recommendation model to determine the relevance between the reference terms and the search term in the search domain, which is used as the reference relevance. For each candidate keyword, the difference between the relevance between the candidate keyword and the search term in the search domain and the reference relevance is determined. The information recommendation model is trained using the above model training method.

[0024] Based on the reference relevance and the difference, the relevance between the candidate keyword and the search term in the search domain is determined as the target relevance.

[0025] Based on the target relevance of each candidate keyword, select the target keyword from the candidate keywords;

[0026] Based on the target keywords, target information is selected from the information to be recommended, and the target information is recommended to the user.

[0027] Optionally, before inputting the domain description information, the search term, the candidate keywords, and the reference terms into a pre-trained information recommendation model to determine the relevance between the reference terms and the search term in the search domain, and using this as a reference relevance, the method further includes:

[0028] For each candidate keyword, generate model input data corresponding to that candidate keyword. Each model input data corresponding to the candidate keyword contains the candidate keyword, the search term, and the domain description term. The reference terms contained in different model input data corresponding to the candidate keyword are different.

[0029] The domain description information, the search term, the candidate keywords, and the reference terms are input into a pre-trained information recommendation model to determine the relevance between the reference terms and the search term in the search domain, which is used as the reference relevance. Furthermore, for each candidate keyword, the difference between the relevance between the candidate keyword and the search term in the search domain and the reference relevance is determined, specifically including:

[0030] For each candidate keyword, the model input data corresponding to the candidate keyword are input into at least two information recommendation models to determine the reference relevance between different reference words and the search term in the search domain output by each information recommendation model, and for each information recommendation model, the difference between the relevance between the candidate keyword and the search term output by the information recommendation model in the search domain and the reference relevance output by the information recommendation model is determined, wherein the model input data input into different information recommendation models are not completely the same.

[0031] Optionally, based on the reference relevance and the difference, the relevance between the candidate keyword and the search term in the search domain is determined as the target relevance, specifically including:

[0032] The correlation between the candidate keyword and the search term is determined based on the reference relevance output by each information recommendation model based on the model input data corresponding to the candidate keyword, the difference output by each information recommendation model based on the model input data corresponding to the candidate keyword, and the number of the information recommendation models.

[0033] This specification provides a model training apparatus, comprising:

[0034] The acquisition module acquires search terms and domain description information used to describe the search domain corresponding to the search terms;

[0035] The determining module determines, from a preset thesaurus, a first keyword and at least one second keyword that match the search term in the search domain corresponding to the domain description information;

[0036] The generation module generates training samples based on the search terms, the domain description information, the first keyword, and each of the second keywords.

[0037] The input module inputs the training samples into the information recommendation model to be trained, determines the degree of correlation between each second keyword and the search term in the search domain corresponding to the domain description information, as a reference degree of correlation, and determines the difference between the degree of correlation between the first keyword and the search term in the search domain corresponding to the domain description information and the reference degree of correlation.

[0038] The training module trains the information recommendation model with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample.

[0039] Optionally, before inputting the training samples into the information recommendation model to be trained, the device further includes:

[0040] A construction module is used to obtain a pre-trained base model; and to construct the information recommendation model based on the base model and a preset output layer.

[0041] Optionally, the training module is specifically used to determine, among the network layers included in the basic model, the network layer that has a data transmission relationship with the output layer as the target network layer; and to adjust the parameters of the target network layer and the output layer in the information recommendation model with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample.

[0042] This specification provides an information recommendation device, comprising:

[0043] The acquisition module acquires the search terms input by the user and determines the search domain corresponding to the search terms;

[0044] The first determining module determines the domain description information used to describe the search domain;

[0045] The second determining module determines each candidate keyword associated with the search term from each piece of information to be recommended, and determines each reference word associated with the search term in the search domain from a preset thesaurus.

[0046] The input module inputs the domain description information, the search term, the candidate keywords, and the reference terms into a pre-trained information recommendation model to determine the degree of relevance between the reference terms and the search term in the search domain, which is used as the reference relevance. For each candidate keyword, the module determines the difference between the degree of relevance between the candidate keyword and the search term in the search domain and the reference relevance.

[0047] The third determining module determines the relevance between the candidate keyword and the search term in the search domain based on the reference relevance and the difference, and uses it as the target relevance.

[0048] The selection module selects target keywords from the candidate keywords based on the target relevance corresponding to each candidate keyword;

[0049] The recommendation module selects target information from the information to be recommended based on the target keywords, and recommends the target information to the user.

[0050] Optionally, the input module is further configured to generate model input data corresponding to each candidate keyword for each candidate keyword. Each model input data corresponding to the candidate keyword contains the candidate keyword, the search term, and the domain description term. The reference terms contained in different model input data corresponding to the candidate keyword are different.

[0051] The input module is specifically used to input the model input data corresponding to each candidate keyword into at least two information recommendation models for each candidate keyword, so as to determine the reference relevance between different reference words and the search term in the search domain output by each information recommendation model, and to determine the difference between the relevance between the candidate keyword and the search term output by the information recommendation model and the reference relevance output by the information recommendation model for each information recommendation model, wherein the model input data input into different information recommendation models are not completely the same.

[0052] Optionally, the third determining module is specifically used to determine the correlation between the candidate keyword and the search term based on the reference correlation degree output by each information recommendation model based on the model input data corresponding to the candidate keyword, the difference output by each information recommendation model based on the model input data corresponding to the candidate keyword, and the number of models of the information recommendation model.

[0053] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described methods for model training and information recommendation.

[0054] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method for model training and information recommendation.

[0055] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0056] In the model training method provided in this specification, search terms and domain description information are obtained; a first keyword and at least one second keyword that match the search terms in the search domain corresponding to the domain description information are determined from the lexicon; training samples are generated based on the search terms, domain description information, first keyword, and each second keyword; the training samples are input into the information recommendation model to be trained, and the relevance between each second keyword and the search terms in the search domain corresponding to the domain description information is determined as a reference relevance, and the difference between the relevance between the first keyword and the search terms in the search domain corresponding to the domain description information and the reference relevance is determined; the information recommendation model is trained with the optimization objective of minimizing the deviation between the difference and the preset labels corresponding to the training samples.

[0057] As can be seen from the above method, during the model training process, this scheme can determine the difference between the relevance between the first keyword and the search term and the reference relevance in the search domain corresponding to the domain description information. This minimizes the deviation between this difference and the preset label. In this way, the final relevance between the first keyword and the search term can be determined by the above deviation and the reference relevance of the second keyword in the same domain. This allows the determined relevance to more accurately reflect the correlation between the search term and the keyword. Furthermore, the above relevance is jointly determined by the search term, multiple keywords, and domain description information. Thus, in practical applications, the target keyword determined can match the search domain corresponding to the search term, thereby meeting the user's search needs and improving the user's search experience. Attached Figure Description

[0058] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and their descriptions, serving to explain this specification and do not constitute an undue limitation thereof.

[0059] In the picture:

[0060] Figure 1 This is a flowchart illustrating a model training method provided in this specification;

[0061] Figure 2 This is a flowchart illustrating one of the information recommendation methods provided in this specification;

[0062] Figure 3 A schematic diagram of a model training apparatus provided in this specification;

[0063] Figure 4 A schematic diagram of an information recommendation device provided in this specification;

[0064] Figure 5 This specification provides a corresponding Figure 1 or Figure 2 A schematic diagram of an electronic device. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0066] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0067] Figure 1 This is a flowchart illustrating a model training method provided in this specification, including the following steps:

[0068] S100: Obtain the search term and the domain description information used to describe the search domain corresponding to the search term.

[0069] When users search for literature on business platforms such as academic paper websites and patent websites, the business platform can match the search terms with keywords extracted from relevant articles to determine the literature that is related to the user's search content.

[0070] In practical applications, the same concept may be expressed using different terms in different documents. Similarly, the keywords entered by users may also have similar issues. This can lead to an incomplete range of documents when a user searches using a particular keyword, potentially missing documents containing synonyms but different expressions. For example, "Television Set" and "TV set" are two synonyms (both meaning television set), and the search results should ideally be similar, but this is not always the case.

[0071] Besides keywords, the field of the user's search query also affects the search results. For example, although "strong material" and "steel" are semantically similar, if a user wants to search for literature related to the textile field, "strong material" and "steel" are obviously unrelated in that field. If the user enters "strong material" and is then recommended literature with the keyword "steel", the recommended content will not match the literature the user wants to search for.

[0072] Based on this, this specification provides a method for model training, which determines the training samples of the information recommendation model by taking the first keyword, the search term, the domain description information, and at least one second keyword, and determines the difference between the correlation degree between the first keyword and the search term and the reference correlation degree between the second keyword and the search term in the search domain corresponding to the domain description information through the information recommendation model, and then trains the model based on the difference and preset labels.

[0073] In this specification, the execution entity used to implement a method for model training and information recommendation can be a specified device such as a server. For ease of description, this specification only uses a server as the execution entity as an example to illustrate the information recommendation method provided in this specification.

[0074] The server can obtain search terms and domain description information to describe the corresponding search field. In practical applications, different fields have their corresponding standard descriptions or introductions. The server can obtain summaries of the standard descriptions or introductions corresponding to the search field from relevant websites, literature, or local server data, and use them as domain description information. The search fields mentioned above may include: biology, chemistry, electricity, industry, textiles, agriculture, etc., but this specification does not specifically limit them.

[0075] S102: Determine a first keyword and at least one second keyword that match the search term in the search domain corresponding to the domain description information from a preset thesaurus.

[0076] S104: Generate training samples based on the search terms, the domain description information, the first keyword, and each of the second keywords.

[0077] S106: Input the training samples into the information recommendation model to be trained, determine the degree of correlation between each second keyword and the search term in the search domain corresponding to the domain description information, as a reference degree of correlation, and determine the difference between the degree of correlation between the first keyword and the search term in the search domain corresponding to the domain description information and the reference degree of correlation.

[0078] The server can determine from a preset thesaurus a first keyword and at least one second keyword that match the search term within the search domain corresponding to the aforementioned domain description information. It then generates training samples based on the search term, domain description information, the first keyword, and each second keyword. The first and second keywords can be extracted from historical information recommended to the user. The training samples can be represented as follows:

[0079] [anchor[SEP]target[SEP]context[SEP]target_x1[SEP]……[SEP]target_xn]

[0080] Where anchor is the search term, target is the first keyword, context is the domain description information, and target_x1[SEP]……[SEP]target_xn are the second keywords.

[0081] The server can then input the training samples into the information recommendation model to be trained, so as to determine the degree of relevance between the second keyword and the search term through the information recommendation model, which serves as the reference relevance, and determine the difference between the degree of relevance between the first keyword and the search term and the reference relevance in the search domain corresponding to the domain description information.

[0082] During the training of the information recommendation model, the relevance between the first keyword and the search term can be labeled in advance. Alternatively, the information recommendation model can be used to calculate and determine the difference between the relevance between the first keyword and the search term and the reference relevance in the search domain corresponding to the domain description information.

[0083] It should be noted that when there are multiple secondary keywords, the server can determine the final output based on the average of the differences between the relevance between the primary keyword and the search term and the relevance of each reference keyword.

[0084] S108: The information recommendation model is trained with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample.

[0085] The server can train the information recommendation model with the optimization objective of minimizing the deviation between the aforementioned difference and the preset labels corresponding to the training samples, until the training objective is met. Here, the aforementioned preset labels can be pre-labeled differences between the relevance between the first keyword and the search term in the search domain corresponding to the domain description information, and the reference relevance.

[0086] In this specification, the training objective can be that the information recommendation model converges to a preset range or reaches a preset number of training iterations. The preset range and the preset number of training iterations can be set according to the actual situation, and this specification does not make specific limitations on them.

[0087] In addition, before training the feature extraction model, the server can first obtain a pre-trained base model (such as the BERT model), and then build an information recommendation model based on the base model and the preset output layer.

[0088] Since the base model has been pre-trained, the server can identify the network layer (i.e., the last layer of the base model) that has a data transmission relationship with the output layer as the target network layer. The server can extract the latent vector of the target network layer, reduce it from sequence embedding to word embedding through pooling, and then input it into a linear layer (output layer) to obtain the final reference correlation and difference.

[0089] The server can then fine-tune the parameters of the target network layer and the output layer in the information recommendation model with the optimization objective of minimizing the deviation between the difference between the output of the information recommendation model and the preset label corresponding to the training sample, thereby improving training efficiency.

[0090] It should be noted that, in this specification, the server can train multiple information recommendation models, thereby performing multi-task inputs and outputs through each trained model.

[0091] After fine-tuning the information recommendation model, the server can deploy the model to recommend information.

[0092] The above describes a model training method provided in this specification from the perspective of model training. The following section will discuss an information recommendation method based on an information recommendation model trained using the above method, from a practical application perspective. Figure 2 As shown.

[0093] Figure 2 This is a flowchart illustrating a model training method provided in this specification, including the following steps:

[0094] S200: Obtain the search term input by the user and determine the search field corresponding to the search term.

[0095] S202: Determine the domain description information used to describe the search domain.

[0096] After receiving a recommendation request from a client, the server can obtain the search terms entered by the user in the client and determine the search field corresponding to those search terms.

[0097] In this manual, the client can also display a drop-down menu or pop-up window containing multiple search categories, allowing users to select the appropriate search category through methods such as clicking or long-pressing. Alternatively, the search category can be directly entered by the user in the client. To distinguish it from search terms, users can add specified characters (such as parentheses, quotation marks, etc.) to the description of the search category.

[0098] In addition, when users browse information, they can select words that appear on the information page and use them as search terms. In this scenario, the client can identify the information content on the information page to determine the search field corresponding to the search term.

[0099] After obtaining the search domain, the server can further determine the domain description information corresponding to the search domain. In practical applications, different domains will have their corresponding standard descriptions or introductions. The server can obtain the summary of the standard description or introduction text corresponding to the above search domain from relevant websites, literature or the server's local storage, and use it as the domain description information.

[0100] S204: Determine each candidate keyword associated with the search term from each piece of information to be recommended, and determine each reference word associated with the search term in the search domain from a preset thesaurus.

[0101] The server can identify candidate keywords that are related to the search term (e.g., semantically similar) and belong to the same search domain from each piece of information to be recommended. These candidate keywords can be extracted by the server from the information to be recommended, or they can be pre-set by the author or editor of the information to be recommended (e.g., literature).

[0102] At the same time, the server can determine from the preset thesaurus each reference word associated with the search term in the above search domain.

[0103] S206: Input the domain description information, the search term, the candidate keywords, and the reference terms into a pre-trained information recommendation model to determine the degree of relevance between the reference terms and the search term in the search domain, as a reference relevance degree; and, for each candidate keyword, determine the difference between the degree of relevance between the candidate keyword and the search term in the search domain and the reference relevance degree.

[0104] In this specification, the information recommendation model can be constructed using a natural language processing model such as BERT, which supports multi-segment input separated by special symbols. The server can construct the model input data for the information recommendation model based on search terms, domain description information, candidate keywords, and reference terms. This model input data can be represented as follows:

[0105] [anchor[SEP]target[SEP]context[SEP]target_xn]

[0106] [SEP] is a special symbol used to separate the search term (anchor), context, candidate keyword (target), and reference term target_xn.

[0107] In this specification, since the server pre-trains multiple information recommendation models, for each candidate keyword, the server can generate model input data corresponding to that candidate keyword. Each model input data corresponding to the candidate keyword contains the candidate keyword, the search term, and the domain description term. The reference terms contained in different model input data corresponding to the candidate keyword are different. The model input data containing the candidate keyword (target) can be represented as follows:

[0108] [anchor[SEP]target[SEP]context[SEP]target_x1]

[0109] [anchor[SEP]target[SEP]context[SEP]target_x2]

[0110] ...

[0111] [anchor[SEP]target[SEP]context[SEP]target_xn]

[0112] The server can use ensemble learning to input model data containing the candidate keyword into multiple information recommendation models.

[0113] Taking the input data [anchor[SEP]target[SEP]context[SEP]target_x1] as an example, after the server inputs this input data into the information recommendation model, the information recommendation model can determine the degree of relevance between the reference word and the search word, which is used as the reference relevance score_x1.

[0114] The information recommendation model can then determine and output the difference between the relevance between the candidate keyword target and the search term and the reference relevance score_x1 in the above search domain, which is score_diff_1.

[0115] S208: Based on the reference relevance and the difference, determine the relevance between the candidate keyword and the search term in the search domain, and use it as the target relevance.

[0116] For the aforementioned multi-task output, the server can determine the reference relevance between different reference terms and the search term in the search domain for each information recommendation model output. Furthermore, for each information recommendation model, the server can determine the difference between the relevance between the candidate keyword and the search term output by the information recommendation model in the search domain and the reference relevance output by the information recommendation model. Then, based on the reference relevance output by each information recommendation model based on the model input data corresponding to the candidate keyword, the difference between the outputs of each information recommendation model based on the model input data corresponding to the candidate keyword, and the number of information recommendation models, the server determines the relevance between the candidate keyword and the search term as the target relevance. This target relevance can be expressed as:

[0117] SCORE=(score_diff_1+score_x1+score_diff_2+score_x2+……+score_diff_n+score_xn) / n

[0118] Where score_diff_n+score_n represents the difference between target and anchor, and the reference correlation between target_xn and anchor, output by information recommendation model n for the model input data [anchor[SEP]target[SEP]context[SEP]target_xn], SCORE is the target correlation, and n is the total number of information recommendation models.

[0119] In this specification, for each model input data containing the candidate keyword, the model input data may also contain two or more reference words. It should be noted that the reference words in the model input data of different information recommendation models are not completely the same. In other words, each model input data containing the candidate keyword has at least one reference word that is different from other model input data containing the candidate keyword.

[0120] S210: Select the target keyword from the candidate keywords based on the target relevance corresponding to each candidate keyword.

[0121] S212: Based on the target keywords, select target information from the information to be recommended, and recommend the target information to the user.

[0122] The server can select the target keyword from the candidate keywords based on the target relevance corresponding to each candidate keyword. For example, the server can use candidate keywords with a target relevance greater than a preset relevance as the target keyword. The preset relevance can be set according to the actual situation, and this manual does not make specific limitations on it.

[0123] The server can then select target information from the list of recommended information based on the target keywords and recommend the target information to the user. When multiple target keywords and target information are determined, the server can sort the target information according to the order of target relevance of each keyword from highest to lowest, and recommend information to the user according to this sorting.

[0124] As can be seen from the above method, during the model training process, this scheme can determine the difference between the relevance between the first keyword and the search term and the reference relevance in the search domain corresponding to the domain description information. This minimizes the deviation between this difference and the preset label. In this way, the final relevance between the first keyword and the search term can be determined by the above deviation and the reference relevance of the second keyword in the same domain. This allows the determined relevance to more accurately reflect the correlation between the search term and the keyword. Furthermore, the above relevance is determined by the search term, multiple keywords, and domain description information. Thus, in practical applications, the target keyword determined can match the search domain corresponding to the search term, thereby meeting the user's search needs and improving the user's search experience.

[0125] Furthermore, multiple keywords (targets) with the same anchor term (anchor) and context term (context) can generate multiple samples, meaning that only a small number of labels need to be applied to the same anchor term (anchor) and context term (context).

[0126] The above describes one or more methods for implementing model training or information recommendation in this specification. Based on the same idea, this specification also provides corresponding devices for information recommendation or model training, such as... Figure 3 or Figure 4 As shown.

[0127] Figure 3 A schematic diagram of a model training apparatus provided in this specification includes:

[0128] The acquisition module 300 is used to acquire search terms and domain description information for describing the search domain corresponding to the search terms;

[0129] The determining module 302 is used to determine, from a preset thesaurus, a first keyword and at least one second keyword that match the search term in the search domain corresponding to the domain description information;

[0130] The generation module 304 is used to generate training samples based on the search term, the domain description information, the first keyword, and each of the second keywords.

[0131] The input module 306 is used to input the training samples into the information recommendation model to be trained, determine the degree of correlation between each second keyword and the search term in the search domain corresponding to the domain description information, as a reference degree of correlation, and determine the difference between the degree of correlation between the first keyword and the search term in the search domain corresponding to the domain description information and the reference degree of correlation.

[0132] The training module 308 is used to train the information recommendation model with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample.

[0133] Optionally, the device further includes:

[0134] The construction module 310 is used to obtain a pre-trained base model; and to construct the information recommendation model based on the base model and a preset output layer.

[0135] Optionally, the training module 308 is specifically used to determine, among the network layers included in the basic model, the network layer that has a data transmission relationship with the output layer as the target network layer; and to adjust the parameters of the target network layer and the output layer in the information recommendation model with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample.

[0136] Figure 4 A schematic diagram of an information recommendation device provided in this specification includes:

[0137] The acquisition module 400 is used to acquire the search terms input by the user and determine the search field corresponding to the search terms;

[0138] The first determining module 402 is used to determine domain description information used to describe the search domain;

[0139] The second determining module 404 is used to determine each candidate keyword associated with the search term from each piece of information to be recommended, and to determine each reference word associated with the search term in the search domain from a preset thesaurus.

[0140] Input module 406 is used to input the domain description information, the search term, the candidate keywords and the reference terms into a pre-trained information recommendation model to determine the degree of correlation between the reference terms and the search term in the search domain, as a reference correlation degree, and, for each candidate keyword, to determine the difference between the degree of correlation between the candidate keyword and the search term in the search domain and the reference correlation degree.

[0141] The third determining module 408 is used to determine the relevance between the candidate keyword and the search term in the search domain based on the reference relevance and the difference, and use it as the target relevance.

[0142] The selection module 410 is used to select a target keyword from the candidate keywords based on the target relevance corresponding to each candidate keyword;

[0143] The recommendation module 412 is used to select target information from the information to be recommended based on the target keywords, and recommend the target information to the user.

[0144] Optionally, the input module 406 is further configured to generate model input data corresponding to each candidate keyword for each candidate keyword, wherein each model input data corresponding to the candidate keyword contains the candidate keyword, the search term and the domain description term, and the reference terms contained in different model input data corresponding to the candidate keyword are different;

[0145] The input module 406 is specifically used to input the model input data corresponding to each candidate keyword into at least two information recommendation models for each candidate keyword, so as to determine the reference relevance between different reference words and the search term in the search domain output by each information recommendation model, and to determine the difference between the relevance between the candidate keyword and the search term output by the information recommendation model and the reference relevance output by the information recommendation model for each information recommendation model, wherein the model input data input into different information recommendation models are not completely the same.

[0146] Optionally, the third determining module 408 is specifically used to determine the correlation between the candidate keyword and the search term based on the reference correlation degree output by each information recommendation model based on the model input data corresponding to the candidate keyword, the difference output by each information recommendation model based on the model input data corresponding to the candidate keyword, and the number of models of the information recommendation model.

[0147] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 or Figure 2 This provides a method for model training or information recommendation.

[0148] This instruction manual also provides Figure 5 One of the corresponding Figure 1 or Figure 2 A schematic diagram of the structure of an electronic device. (e.g.) Figure 5 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 or Figure 2The methods for model training or information recommendation described herein. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0149] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0150] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0151] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0152] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0153] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0154] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0155] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0156] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0157] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0158] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0159] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0160] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0161] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0162] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0163] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0164] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for training a model, the method comprising: Obtain the search terms and the domain description information used to describe the search domain corresponding to the search terms; Determine a first keyword and at least one second keyword that match the search term in the search domain corresponding to the domain description information from a preset thesaurus; Training samples are generated based on the search terms, the domain description information, the first keyword, and each of the second keywords. The training samples are input into the information recommendation model to be trained, and the correlation degree between each second keyword and the search term in the search domain corresponding to the domain description information is determined as a reference correlation degree. The difference between the correlation degree between the first keyword and the search term in the search domain corresponding to the domain description information and the reference correlation degree is also determined. The information recommendation model is trained with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample. When multiple trained information recommendation models are used to perform information recommendation, the reference words input into different information recommendation models are not completely the same. The reference correlation degree between the search term and the reference words obtained by each information recommendation model is determined through different information recommendation models. Based on the determined reference correlation degree, the target keyword associated with the search term is determined from the candidate keywords extracted from the information to be recommended, and information recommendation is performed based on the target keyword.

2. The method as described in claim 1, wherein before inputting the training samples into the information recommendation model to be trained, the method further comprises: Obtain a pre-trained base model; The information recommendation model is constructed based on the aforementioned basic model and the preset output layer.

3. The method as described in claim 2, wherein the information recommendation model is trained with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample, specifically including: Among the network layers included in the basic model, the network layer that has a data transmission relationship with the output layer is identified as the target network layer; With the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample, the parameters of the target network layer and the output layer in the information recommendation model are adjusted.

4. An information recommendation method, comprising: Obtain the search terms entered by the user and determine the search domain corresponding to the search terms; Determine the domain description information used to describe the search domain; From each piece of information to be recommended, candidate keywords associated with the search term are identified, and reference terms associated with the search term in the search domain are identified from a preset thesaurus. The domain description information, the search term, the candidate keywords, and the reference terms are input into a pre-trained information recommendation model to determine the relevance between the reference terms and the search term in the search domain, which is used as the reference relevance. For each candidate keyword, the difference between the relevance between the candidate keyword and the search term in the search domain and the reference relevance is determined. The information recommendation model is trained by the method described in any one of claims 1 to 3. Based on the reference relevance and the difference, the relevance between the candidate keyword and the search term in the search domain is determined as the target relevance. Based on the target relevance of each candidate keyword, select the target keyword from the candidate keywords; Based on the target keywords, target information is selected from the information to be recommended, and the target information is recommended to the user.

5. The method of claim 4, further comprising, before inputting the domain description information, the search term, the candidate keywords, and the reference terms into a pre-trained information recommendation model to determine the relevance between the reference terms and the search term in the search domain, as a reference relevance, the method further comprising: For each candidate keyword, generate model input data corresponding to that candidate keyword. Each model input data corresponding to the candidate keyword contains the candidate keyword, the search term, and the domain description term. The reference terms contained in different model input data corresponding to the candidate keyword are different. The domain description information, the search term, the candidate keywords, and the reference terms are input into a pre-trained information recommendation model to determine the relevance between the reference terms and the search term in the search domain, which is used as the reference relevance. Furthermore, for each candidate keyword, the difference between the relevance between the candidate keyword and the search term in the search domain and the reference relevance is determined, specifically including: For each candidate keyword, the model input data corresponding to the candidate keyword are input into at least two information recommendation models to determine the reference relevance between different reference words and the search term in the search domain output by each information recommendation model, and for each information recommendation model, the difference between the relevance between the candidate keyword and the search term output by the information recommendation model in the search domain and the reference relevance output by the information recommendation model is determined, wherein the model input data input into different information recommendation models are not completely the same.

6. The method as described in claim 5, wherein the relevance between the candidate keyword and the search term in the search domain is determined based on the reference relevance and the difference, as the target relevance, specifically includes: The correlation between the candidate keyword and the search term is determined based on the reference relevance output by each information recommendation model based on the model input data corresponding to the candidate keyword, the difference output by each information recommendation model based on the model input data corresponding to the candidate keyword, and the number of the information recommendation models.

7. An apparatus for model training, comprising: The acquisition module acquires search terms and domain description information used to describe the search domain corresponding to the search terms; The determining module determines, from a preset thesaurus, a first keyword and at least one second keyword that match the search term in the search domain corresponding to the domain description information; The generation module generates training samples based on the search terms, the domain description information, the first keyword, and each of the second keywords. The input module inputs the training samples into the information recommendation model to be trained, determines the degree of correlation between each second keyword and the search term in the search domain corresponding to the domain description information, as a reference degree of correlation, and determines the difference between the degree of correlation between the first keyword and the search term in the search domain corresponding to the domain description information and the reference degree of correlation. The training module trains the information recommendation model with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample. When using multiple trained information recommendation models to perform information recommendation, the reference words input into different information recommendation models are not completely the same. The reference correlation degree between the search term and the reference words obtained by each information recommendation model is determined through different information recommendation models. Based on the determined reference correlation degree, the target keyword associated with the search term is determined from each candidate keyword extracted from the information to be recommended, and information recommendation is performed based on the target keyword.

8. The apparatus of claim 7, wherein before inputting the training samples into the information recommendation model to be trained, the apparatus further comprises: Build modules are used to obtain pre-trained base models; The information recommendation model is constructed based on the aforementioned basic model and the preset output layer.

9. The apparatus of claim 8, wherein the training module is specifically configured to: determine, among the network layers included in the base model, a network layer that has a data transmission relationship with the output layer, as a target network layer; and adjust the parameters of the target network layer and the output layer in the information recommendation model with the optimization objective of minimizing the deviation between the difference and the preset label corresponding to the training sample.

10. An information recommendation device, comprising: The acquisition module acquires the search terms input by the user and determines the search domain corresponding to the search terms; The first determining module determines the domain description information used to describe the search domain; The second determining module determines each candidate keyword associated with the search term from each piece of information to be recommended, and determines each reference word associated with the search term in the search domain from a preset thesaurus. The input module inputs the domain description information, the search term, the candidate keywords, and the reference terms into a pre-trained information recommendation model to determine the relevance between the reference terms and the search term in the search domain, as a reference relevance. For each candidate keyword, the module determines the difference between the relevance between the candidate keyword and the search term in the search domain and the reference relevance. The information recommendation model is trained using the method described in any one of claims 1 to 3. The third determining module determines the relevance between the candidate keyword and the search term in the search domain based on the reference relevance and the difference, and uses it as the target relevance. The selection module selects target keywords from the candidate keywords based on the target relevance corresponding to each candidate keyword; The recommendation module selects target information from the information to be recommended based on the target keywords, and recommends the target information to the user.

11. The apparatus of claim 10, wherein the input module is further configured to generate model input data corresponding to each candidate keyword for each candidate keyword, wherein each model input data corresponding to the candidate keyword includes the candidate keyword, the search term and the domain description term, and the reference terms included in different model input data corresponding to the candidate keyword are different; The input module is specifically used to, for each candidate keyword, input the model input data corresponding to that candidate keyword into at least two information recommendation models, to determine the reference relevance between different reference words and the search term output by each information recommendation model in the search domain, and, for each information recommendation model, to determine the difference between the relevance between the candidate keyword and the search term output by that information recommendation model in the search domain and the reference relevance output by that information recommendation model. The input data to different information recommendation models are not entirely the same.

12. The apparatus of claim 11, wherein the third determining module is specifically configured to determine the degree of association between the candidate keyword and the search term based on the reference relevance output by each information recommendation model based on the model input data corresponding to the candidate keyword, the difference output by each information recommendation model based on the model input data corresponding to the candidate keyword, and the number of models of the information recommendation model.

13. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 6.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1 to 6.