Search term generation model training method, search term generation method and device
By training the search term generation model and using a large language model to generate search terms that match the visual content, the problem of advertisers selecting search terms on their own is solved, thereby improving advertising matching and user satisfaction.
Patent Information
- Application Number
- CN202411687541.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-11-22
AI Technical Summary
In traditional advertising delivery systems, advertisers need to select search terms on their own, resulting in a waste of human resources and a low match between search terms and product advertisements, which reduces user search satisfaction and increases the risk of user churn.
By obtaining target training data, using a large language model to generate search term inference results, and training a search term generation model based on the target search term labels, we ensure that the generated search terms have a high degree of match with the visual content.
Reduce human resource consumption, avoid human bias, improve the matching degree between search terms and visual content, and enhance advertising coverage and user satisfaction.
Smart Images

Figure CN119808866B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to application fields such as machine learning, large language models, multimodal models, generative search, search engines, information retrieval, and visual content search, and specifically to a training method for a search term generation model, a search term generation method, and a device. Background Art
[0002] Search engine advertising refers to a marketing method in which advertisers utilize the advertising platforms provided by search engines to display product advertisements to users. Its primary purpose is to intelligently display relevant product advertisements associated with a specific search term when a user enters it. This increases product market exposure and drives sales growth. In traditional advertising systems, advertisers typically need to select search terms and then establish a correlation between these terms and their product advertisements. Summary of the Invention
[0003] The present disclosure provides a training method for a search term generation model, a search term generation method, and a device.
[0004] According to a first aspect of the present disclosure, a method for training a search term generation model is provided, comprising:
[0005] Obtain target training data; wherein the target training data includes target visual content description text and target search term labels;
[0006] Using the search term generation model, the text is described based on the target visual content to obtain the search term inference results;
[0007] Based on the target search term label and the search term inference result, the search term generation model is trained to obtain a trained search term generation model.
[0008] According to a second aspect of the present disclosure, a search term generation method is provided, comprising:
[0009] Get the visual content description text;
[0010] A trained search term generation model is used to obtain a search term generation result based on the visual content description text.
[0011] According to a third aspect of the present disclosure, a training device for a search term generation model is provided, comprising:
[0012] A training data acquisition unit, configured to acquire target training data; wherein the target training data includes target visual content description text and target search term labels;
[0013] An inference result acquisition unit, configured to obtain a search term inference result based on a target visual content description text by using a search term generation model;
[0014] The model training unit is used to train the search term generation model based on the target search term label and the search term inference result to obtain a trained search term generation model.
[0015] According to a fourth aspect of the present disclosure, a search term generating device is provided, comprising:
[0016] A description text acquisition unit, used to acquire a description text of the visual content;
[0017] The search term generation unit is used to obtain a search term generation result based on the visual content description text by using a trained search term generation model.
[0018] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:
[0019] at least one processor;
[0020] a memory communicatively coupled to the at least one processor;
[0021] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method provided by the first aspect of the present disclosure.
[0022] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method provided according to the first aspect of the present disclosure.
[0023] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program, which implements the method provided according to the first aspect of the present disclosure when executed by a processor.
[0024] The present disclosure can realize automatic generation of search terms and ensure the matching degree between the search term generation results and specific visual content (eg, online advertisements).
[0025] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0027] Figure 1A flowchart of a method for training a search term generation model provided in an embodiment of the present disclosure;
[0028] Figure 2 A diagram illustrating a process of selecting candidate training data provided by an embodiment of the present disclosure;
[0029] Figure 3 A diagram illustrating another process of selecting candidate training data provided by an embodiment of the present disclosure;
[0030] Figure 4 A diagram illustrating another process of selecting candidate training data provided by an embodiment of the present disclosure;
[0031] Figure 5 A flowchart of a search term generation method provided by an embodiment of the present disclosure;
[0032] Figure 6 A diagram illustrating a method for training a search term generation model and an application process of the trained search term generation model provided in an embodiment of the present disclosure;
[0033] Figure 7 A schematic diagram of an application scenario of a training method for a search term generation model provided in an embodiment of the present disclosure;
[0034] Figure 8 A schematic diagram of an application scenario of a search term generation method provided by an embodiment of the present disclosure;
[0035] Figure 9 A schematic structural block diagram of a training device for a search term generation model provided in an embodiment of the present disclosure;
[0036] Figure 10 A schematic structural block diagram of a search term generating device provided in an embodiment of the present disclosure;
[0037] Figure 11 A schematic structural block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0039] As mentioned in the background, search engine advertising refers to a marketing method in which advertisers utilize the advertising platforms provided by search engines to display product advertisements to users. Its primary purpose is to: when a user enters a specific search term into a search engine, the advertising delivery system intelligently displays highly relevant product advertisements associated with that specific search term using built-in content recommendation strategies, thereby increasing product market exposure and boosting sales.
[0040] In traditional advertising systems, advertisers typically need to select search terms themselves in order to establish a correlation between these search terms and their product ads. This not only consumes a significant amount of human resources, but also, in an effort to increase ad reach, some advertisers resort to random and / or multiple search terms, significantly reducing the match between search terms and product ads. When the match between search terms and product ads is low, user search satisfaction decreases, ultimately leading to the risk of losing search engine users.
[0041] In response to the above problems, the present disclosure provides a method for training a search term generation model, which can be applied to electronic devices. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer (e.g., a desktop computer, a laptop computer, a car computer, etc.), a personal digital assistant or other similar computing device. Figure 1 The flowchart shown in the figure illustrates a method for training a search term generation model provided by an embodiment of the present disclosure. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described in the flowchart may be performed in other orders.
[0042] Step S101: Obtain target training data.
[0043] The target training data may include target visual content description text and target search term labels. Here, the target visual content description text may be text content used to describe the target visual content sample; the target search term label may be a predetermined search term that has a high degree of match with the target visual content sample.
[0044] In addition, in the embodiments of the present disclosure, the target visual content samples may be online advertisements, video resources, graphic resources, etc. Among them, online advertisements may be static advertisements, animated image advertisements, video advertisements, etc.; graphic resources may be static graphics, animated graphics, etc., which are not limited in the embodiments of the present disclosure.
[0045] Step S102: using the search term generation model to obtain the search term inference result based on the target visual content description text.
[0046] The search term generation model can be a large language model. Here, the large language model can be a pre-trained neural network model that incorporates general language knowledge, world knowledge, and domain expertise, all stored as parameters within the model. In one example, the large language model can be an autoregressive generative model using a Transformer architecture.
[0047] Step S103: Based on the target search term label and the search term inference result, the search term generation model is trained to obtain a trained search term generation model.
[0048] In one example, after obtaining the target search term label and the search term inference result, a target loss value between the target search term label and the search term inference result can be calculated, and the search term generation model can be trained based on the target loss value to obtain a trained search term generation model. For example, model parameters of the search term generation model can be adjusted based on the target loss value to obtain a trained search term generation model.
[0049] By adopting the training method of the search term generation model provided by the embodiment of the present disclosure, it is possible to obtain target training data including target visual content description text and target search term labels, and use the search term generation model to obtain search term inference results based on the target visual content description text, and then train the search term generation model based on the target search term labels and the search term inference results to obtain a trained search term generation model. Thereafter, the trained search term generation model can be used to obtain search term generation results. For example, visual content description text can be obtained, and the trained search term generation model can be used to obtain search term generation results based on the visual content description text. Compared with the prior art method of manually selecting keywords, this method can not only save a lot of human resources, but also avoid human bias, thereby ensuring the matching degree of the search term generation results with specific visual content (for example, online advertisements).
[0050] It should be noted that in the embodiment of the present disclosure, steps S101, S102, and S103 may be executed repeatedly until the search term generation model meets the convergence condition, thereby obtaining the final trained search term generation model. The convergence condition may be that the target loss value is less than or equal to a preset loss value. The preset loss value may be set based on actual business needs or application scenarios, and the embodiment of the present disclosure does not impose any restrictions on this.
[0051] Furthermore, in some optional implementations, step S101, i.e., “obtaining target training data”, may include:
[0052] Acquire multiple original training data; wherein each of the multiple original training data includes original visual content description text and original search term label;
[0053] Selecting a plurality of candidate training data from the plurality of original training data according to a relevance selection strategy and / or a diversity selection strategy; wherein each candidate training data in the plurality of candidate training data includes a candidate visual content description text and a candidate search term label;
[0054] Based on the plurality of candidate training data, target training data is determined.
[0055] Among them, the original visual content description text and the candidate visual content description text have the same data structure as the target visual content description text, which is not described in detail in the present embodiment; correspondingly, the original search term label and the candidate search term label have the same data structure as the target search term label, which is not described in detail in the present embodiment.
[0056] Furthermore, it should be noted that, in the disclosed embodiments, historical visual content samples and original search term labels having corresponding relationships can be obtained from the advertising delivery system, and the historical visual content samples can be summarized to obtain original visual content description text, which can then be used together with the original search term labels as original training data. The "summarizing the historical visual content samples to obtain the original visual content description text" can include: utilizing a large language model to summarize the historical visual content samples based on the summary prompt words to obtain the original visual content description text.
[0057] Repeat the above steps to obtain multiple original training data.
[0058] It should also be noted that in the embodiment of the present disclosure, the relevance selection strategy is intended to ensure that each of the multiple candidate training data selected has a high content relevance. The content relevance of the candidate training data is used to characterize the relevance between the candidate visual content description text and the candidate search term label in the candidate training data. The diversity selection strategy is intended to ensure that the multiple candidate training data selected have data diversity in a specified dimension. The specified dimension can be a search term performance evaluation result and / or a search term field.
[0059] After selecting multiple candidate training data from multiple original training data according to the relevance selection strategy and / or the diversity selection strategy, target training data can be determined based on the multiple candidate training data. For example, each candidate training data in the multiple candidate training data can be used as the target training data.
[0060] Through the above method, in the embodiment of the present disclosure, multiple original training data can be obtained, and multiple candidate training data can be selected from the multiple original training data according to the relevance selection strategy and / or diversity selection strategy, and then the target training data can be determined based on the multiple candidate training data. In this way, at least it can be ensured that each of the multiple candidate training data selected has a greater content relevance, or that the multiple candidate training data selected have data diversity of a specified dimension, that is, at least the quality of the multiple candidate training data can be ensured, or the diversity of the multiple candidate training data can be ensured. In this case, after determining the target training data based on the multiple candidate training data and using it to train the search term generation model to obtain a trained search term generation model, the performance and / or generalization of the trained search term generation model can be ensured. In this way, when the search term generation result is obtained using the trained search term generation model, the matching degree of the search term generation result with the specific visual content (for example, online advertising) can be further ensured.
[0061] In the above embodiment, “selecting multiple candidate training data from multiple original training data according to a relevance selection strategy and / or a diversity selection strategy” may include:
[0062] According to the relevance selection strategy, a plurality of first preliminary selected training data are selected from the plurality of original training data; wherein each of the plurality of first preliminary selected training data includes a first preliminary selected visual content description text and a first preliminary selected search term label;
[0063] According to the diversity selection strategy, a plurality of candidate training data are selected from the plurality of first preliminary selected training data.
[0064] Among them, the first preliminary visual content description text has the same data structure as the target visual content description text, which is not described in detail in this embodiment of the present disclosure; correspondingly, the first preliminary search term label has the same data structure as the target search term label, which is not described in detail in this embodiment of the present disclosure.
[0065] Through the above method, in the embodiment of the present disclosure, a plurality of first preliminary training data can be selected from a plurality of original training data according to the relevance selection strategy, and then a plurality of candidate training data can be selected from the plurality of first preliminary training data according to the diversity selection strategy. That is to say, the relevance selection strategy and the diversity selection strategy can be implemented in series. In this way, it can be ensured that each of the plurality of candidate training data selected has a greater content relevance, and it can be ensured that the plurality of candidate training data selected has diversity in a specified dimension. Therefore, after determining the target training data based on the plurality of candidate training data and using it to train the search term generation model to obtain the trained search term generation model, the performance and generalization of the trained search term generation model can be further ensured.
[0066] In one example, “selecting a plurality of first preliminary selected training data from a plurality of original training data according to a relevance selection strategy” may include:
[0067] Obtaining content relevance of each original training data from a plurality of original training data;
[0068] A plurality of first preliminary selected training data with the greatest content relevance is selected from the plurality of original training data; or a plurality of first preliminary selected training data with content relevance meeting a preset relevance requirement is selected from the plurality of original training data.
[0069] The content relevance of the original training data is used to characterize the relevance between the original visual content description text and the original search term label in the original training data.
[0070] In a specific example, the content relevance of each of the multiple original training data can be obtained by using a similarity algorithm, where the similarity algorithm can be a cosine similarity algorithm.
[0071] In another specific example, a similarity discrimination model can be used to obtain the content relevance of each piece of original training data among multiple pieces of original training data. The similarity discrimination model can be a large language model or a trained dedicated similarity discrimination model. Here, the dedicated similarity discrimination model can be an autoregressive generative model with a Transformer architecture or a twin neural network, such as a Siamese model.
[0072] After obtaining the content relevance of each original training data from a plurality of original training data, N original training data with the largest content relevance can be selected from the plurality of original training data as the first preliminary training data. Wherein, N ≥ 2 and is a positive integer. Here, the specific value of N can be set according to actual business needs or application scenarios, and the embodiments of the present disclosure do not limit this. After obtaining the content relevance of each original training data from a plurality of original training data, multiple original training data whose content relevance meets the preset relevance requirement can also be selected from the plurality of original training data as the first preliminary training data. Wherein, the preset relevance requirement can be that the content relevance is greater than or equal to a preset relevance threshold. Here, the preset relevance threshold can be set according to actual business needs or application scenarios, and the embodiments of the present disclosure do not limit this.
[0073] In the above example, after obtaining the content relevance of each piece of raw training data, multiple first-selected training data with the greatest content relevance can be selected from the multiple pieces of raw training data, or multiple first-selected training data with content relevance that meets preset relevance requirements can be selected from the multiple pieces of raw training data. In other words, in the above example, a specific relevance selection strategy can be selected based on actual business needs or application scenarios to ensure the applicability and effectiveness of the resulting multiple candidate training data.
[0074] In another example, “selecting a plurality of candidate training data from a plurality of first preliminary selected training data according to a diversity selection strategy” may include:
[0075] According to the first diversity selection strategy and / or the second diversity selection strategy, a plurality of candidate training data are selected from the plurality of first preliminary selected training data.
[0076] The first diversity selection strategy is based on the search term performance evaluation results, while the second diversity selection strategy is based on the search term domain. The search term performance evaluation results can be the search term performance scores corresponding to the first preliminary training data. The search term domain can be used to represent the business domain related to the first preliminary training data, such as home improvement, home appliances, computers and office supplies, mobile devices, women's apparel, men's apparel, or beauty and skincare.
[0077] In the above examples, multiple candidate training data can be selected from multiple first-selected training data according to the first diversity selection strategy and / or the second diversity selection strategy. In other words, in the above examples, a specific diversity selection strategy can be selected based on actual business needs or application scenarios to ensure the applicability and effectiveness of the resulting multiple candidate training data.
[0078] In a specific example, “selecting a plurality of candidate training data from a plurality of first preliminary selected training data according to the first diversity selection strategy and / or the second diversity selection strategy” may include:
[0079] According to the first diversity selection strategy, a plurality of second preliminary selected training data are selected from the plurality of first preliminary selected training data; wherein each second preliminary selected training data in the plurality of second preliminary selected training data includes a second preliminary selected visual content description text and a second preliminary selected search term label;
[0080] According to the second diversity selection strategy, a plurality of candidate training data are selected from the plurality of second preliminary selected training data.
[0081] Among them, the second preliminary visual content description text has the same data structure as the target visual content description text, which is not described in detail in this embodiment of the present disclosure; correspondingly, the second preliminary search term label has the same data structure as the target search term label, which is not described in detail in this embodiment of the present disclosure.
[0082] In the above example, a plurality of second preliminary training data can be first selected from a plurality of first preliminary training data according to the first diversity selection strategy, and then a plurality of candidate training data can be selected from the plurality of second preliminary training data according to the second diversity selection strategy. In other words, the first diversity selection strategy and the second diversity selection strategy can be implemented serially. In this way, it can be ensured that the plurality of selected candidate training data have data diversity in the specified dimension of the search term performance evaluation results, and it can also be ensured that the plurality of selected candidate training data have data diversity in the specified dimension of the search term field. Therefore, after determining the target training data based on the plurality of candidate training data and using it to train the search term generation model to obtain the trained search term generation model, the generalization of the trained search term generation model can be further ensured.
[0083] Furthermore, in a more specific example, “selecting a plurality of second preliminary selected training data from a plurality of first preliminary selected training data according to a first diversity selection strategy” may include:
[0084] Obtaining a search term performance evaluation result for each of the plurality of first preliminary selected training data;
[0085] A probability sampling algorithm is used to select a plurality of second preliminary selected training data from the plurality of first preliminary selected training data based on a search term performance evaluation result of each first preliminary selected training data.
[0086] As mentioned above, the search term performance evaluation result may be a search term performance score corresponding to the first preliminary training data. In actual implementation, the search term performance score corresponding to the first preliminary training data may be obtained by:
[0087] Obtaining the total number of times the user enters the first preliminary search term label in the first preliminary training data through the search engine as the total number of searches;
[0088] Obtaining a total number of visual content impressions and a total number of visual content clicks related to the first preliminary selected visual content description text in the first preliminary selected training data after a user inputs a first preliminary selected search term tag in the first preliminary selected training data through a search engine;
[0089] Based on the total number of searches, the total number of visual content displays, and the total number of visual content clicks, a search term performance score corresponding to the first preliminary training data is obtained.
[0090] For example, the ratio of the total number of visual content displays to the total number of searches can be calculated as the first scoring parameter, and the ratio of the total number of visual content clicks to the total number of searches can be calculated as the second scoring parameter. The first scoring parameter and the second scoring parameter are fused to obtain the search term performance score corresponding to the first preliminary training data.
[0091] Here, "fusing the first scoring parameter and the second scoring parameter to obtain a search term performance score corresponding to the first preliminary training data" may include: calculating the product of the first scoring parameter and the first weight value as the first parameter to be fused, calculating the product of the second scoring parameter and the second weight value as the second parameter to be fused, and calculating the sum of the first parameter to be fused and the second parameter to be fused as the search term performance score corresponding to the first preliminary training data. The first weight value and the second weight value can be set according to actual business needs or application scenarios, and are not limited in this regard in the present embodiment.
[0092] Exemplarily, there is first preliminary selected training data A, which includes first preliminary selected search term labels A1 and first preliminary selected visual content description text A2. After user B enters the first preliminary search term label A1 through the search engine, the advertising delivery system does not display the visual content sample corresponding to the first preliminary visual content description text A2 to user B, and the recorded search count is 1, the visual content display count is 0, and the recorded visual content click count is 0; after user C enters the first preliminary search term label A1 through the search engine, the advertising delivery system displays the visual content sample corresponding to the first preliminary visual content description text A2 to user C, but user C does not click on the visual content sample corresponding to the first preliminary visual content description text A2, and the recorded search count is 1, the visual content display count is 1, and the recorded visual content click count is 0; after user D enters the first preliminary search term label A1 through the search engine, the advertising delivery system displays the visual content sample corresponding to the first preliminary visual content description text A2 to user D, and user D clicks on the visual content sample corresponding to the first preliminary visual content description text A2, and the recorded search count is 1, the visual content display count is 1, and the recorded visual content click count is 1.
[0093] After that, the ratio of the total number of visual content displays to the total number of searches can be calculated as the first scoring parameter, that is, 2 / 3 can be used as the first scoring parameter, and the ratio of the total number of visual content clicks to the total number of searches can be calculated as the second scoring parameter, that is, 1 / 3 can be used as the second scoring parameter. The first scoring parameter and the second scoring parameter are then fused to obtain the search term performance score corresponding to the first preliminary training data. Assuming that the first weight value is 1 / 3 and the second weight value is 2 / 3, the search term performance score corresponding to the first preliminary training data can be obtained as: 2 / 3*1 / 3+1 / 3*2 / 3=4 / 9=0.44.
[0094] After obtaining the search term performance evaluation results for each of the plurality of first preliminary training data, a probabilistic sampling algorithm can be used to select a plurality of second preliminary training data from the plurality of first preliminary training data based on the search term performance evaluation results for each of the plurality of first preliminary training data. The probabilistic sampling algorithm can be implemented using a probabilistic sampling function obtained from the Python Numpy library. Here, the probabilistic sampling function can be Np.random.choice().
[0095] In the above example, the search term performance evaluation results of each of the multiple first preliminary training data can be obtained, and a probability sampling algorithm can be used to select multiple second preliminary training data from the multiple first preliminary training data based on the search term performance evaluation results of each of the multiple first preliminary training data. In this way, the multiple second preliminary training data selected will include most of the first preliminary training data with relatively good search term performance evaluation results, and a small part of the first preliminary training data with relatively poor search term performance evaluation results. In this way, while ensuring the quality of the multiple candidate training data finally obtained, it is possible to ensure that the multiple candidate training data selected have data diversity in the specified dimension of the search term performance evaluation results, so that after the target training data is determined based on the multiple candidate training data and used to train the search term generation model to obtain the trained search term generation model, the performance and generalization of the trained search term generation model can be further ensured.
[0096] In another more specific example, “selecting a plurality of candidate training data from a plurality of second preliminary selected training data according to a second diversity selection strategy” may include:
[0097] determining a search term field for each of the plurality of second preliminary selected training data;
[0098] Grouping the plurality of second preliminary selected training data according to the search term field of each second preliminary selected training data in the plurality of second preliminary selected training data to obtain a plurality of preliminary selected training data groups;
[0099] Selecting multiple high-quality training data from multiple preliminary training data groups;
[0100] Based on multiple high-quality training data, multiple candidate training data are obtained.
[0101] In actual implementation, for each of the multiple second preliminary training data, the second preliminary training data (for example, the second preliminary search term label in the second preliminary training data) can be processed by word segmentation and named entity recognition to obtain subject information related to the second preliminary training data (for example, product name), and based on the subject information related to the second preliminary training data, the search term field of the second preliminary training data is obtained.
[0102] In addition, in the above example, the high-quality training data can be the second preliminary training data with relatively good search term performance evaluation results. Based on this, here, a first implementation method for "selecting multiple high-quality training data from multiple preliminary training data groups" in the above example can be provided:
[0103] Taking the plurality of preliminary selected training data groups as target data groups, obtaining search term performance evaluation results of each second preliminary selected training data in the target data groups;
[0104] Select multiple high-quality training data with the best search term performance evaluation results from the target data group; or select multiple high-quality training data with the search term performance evaluation results that meet preset evaluation requirements from the target data group.
[0105] Exemplarily, after determining the search term field of each second preliminary training data in a plurality of second preliminary training data, and grouping the plurality of second preliminary training data according to the search term field of each second preliminary training data in a plurality of second preliminary training data, to obtain a plurality of preliminary training data groups, M second preliminary training data with the best search term performance evaluation results can be selected from the target data group as high-quality training data. Wherein, M ≥ 2 and is a positive integer. Here, the specific value of M can be set according to actual business needs or application scenarios, and the embodiments of the present disclosure are not limited to this. After determining the search term field of each second preliminary training data in a plurality of second preliminary training data, and grouping the plurality of second preliminary training data according to the search term field of each second preliminary training data in a plurality of second preliminary training data, to obtain a plurality of preliminary training data groups, second preliminary training data whose search term performance evaluation results meet the preset evaluation requirements can also be selected from the target data group as high-quality training data. Wherein, the preset evaluation requirement can be that the search term performance evaluation result is greater than or equal to the preset performance score threshold. Here, the preset performance score threshold can be set according to actual business needs or application scenarios, and the embodiments of the present disclosure do not limit this.
[0106] The first implementation of “selecting a plurality of high-quality training data from a plurality of preliminary training data groups” will be further described below through specific examples.
[0107] Assume that there are second preliminary training data E1, second preliminary training data E2, second preliminary training data E3, second preliminary training data E4, second preliminary training data E5, second preliminary training data E6, second preliminary training data E7, second preliminary training data E8, second preliminary training data E9 and second preliminary training data E10.
[0108] Assume again that the search term field of the second preliminary training data E1 is the home appliance field, and its search term performance evaluation result is 0.90, the search term field of the second preliminary training data E2 is the computer office supplies field, and its search term performance evaluation result is 0.56, the search term field of the second preliminary training data E3 is the computer office supplies field and the mobile device field (for example, the subject information related to the second preliminary training data E3 is a laptop computer, which can be attributed to both the computer office supplies field and the mobile device field), and its search term performance evaluation result is 0.66, the search term field of the second preliminary training data E4 is the home appliance field, and its search term performance evaluation result is 0.87, and the search term field of the second preliminary training data E5 is 0.90. 5, the search term field is the mobile device field, and its search term performance evaluation result is 0.91, the search term field of the second preliminary training data E6 is the home appliance field, and its search term performance evaluation result is 0.48, the search term field of the second preliminary training data E7 is the computer office supplies field, and its search term performance evaluation result is 0.76, the search term field of the second preliminary training data E8 is the computer office supplies field, and its search term performance evaluation result is 0.85, the search term field of the second preliminary training data E9 is the mobile device field, and its search term performance evaluation result is 0.69, and the search term field of the second preliminary training data E10 is the home appliance field, and its search term performance evaluation result is 0.80.
[0109] Then, by grouping the above 10 second primary training data, we can get 3 primary training data groups:
[0110] The first preliminary training data group (home appliance field): the second preliminary training data E1, the second preliminary training data E4, the second preliminary training data E6, and the second preliminary training data E10, and the search term performance evaluation results are ranked as follows: the second preliminary training data E1> the second preliminary training data E4> the second preliminary training data E10> the second preliminary training data E6;
[0111] Second preliminary training data group (computer and office supplies field): second preliminary training data E2, second preliminary training data E3, second preliminary training data E7, second preliminary training data E8, and the ranking of search term performance evaluation results is: second preliminary training data E8 > second preliminary training data E7 > second preliminary training data E3 > second preliminary training data E2;
[0112] The third preliminary training data group (mobile device field): second preliminary training data E3, second preliminary training data E5, and second preliminary training data E9, and the search term performance evaluation results are ranked as follows: second preliminary training data E5>second preliminary training data E9>second preliminary training data E3.
[0113] Please combine Figure 2After determining the search term field of each second preliminary training data in the multiple second preliminary training data, and grouping the multiple second preliminary training data according to the search term field of each second preliminary training data in the multiple second preliminary training data to obtain multiple preliminary training data groups, if the data selection strategy of "taking the multiple preliminary training data groups as the target data groups, obtaining the search term performance evaluation results of each second preliminary training data in the target data group, and selecting multiple high-quality training data with the best search term performance evaluation results from the target data group" is adopted, then, when the number of high-quality training data with the best search term performance evaluation results selected from the target data group is specifically 2, finally, the second preliminary training data E1, the second preliminary training data E4, the second preliminary training data E5, the second preliminary training data E6, the second preliminary training data E8 and the second preliminary training data E9 can be selected as high-quality training data and used to form multiple candidate training data.
[0114] Please combine Figure 3 After determining the search term field of each second preliminary training data in the multiple second preliminary training data, and grouping the multiple second preliminary training data according to the search term field of each second preliminary training data in the multiple second preliminary training data to obtain multiple preliminary training data groups, if the data selection strategy of "taking the multiple preliminary training data groups as the target data groups, obtaining the search term performance evaluation results of each second preliminary training data in the target data groups, and selecting multiple high-quality training data whose search term performance evaluation results meet the preset evaluation requirements from the target data groups" is adopted, then, when the preset evaluation requirement is that the search term performance evaluation result is greater than or equal to the preset performance score threshold, and the preset performance score threshold is 0.75, finally, the second preliminary training data E1, the second preliminary training data E4, the second preliminary training data E5, the second preliminary training data E7, the second preliminary training data E8 and the second preliminary training data E10 can be selected as high-quality training data and used to form multiple candidate training data.
[0115] Here, a second implementation method can also be provided for the above example of "selecting multiple high-quality training data from multiple preliminary training data groups":
[0116] Obtaining the inter-group selection order of multiple preliminary training data groups;
[0117] Traverse multiple preliminary training data groups according to the order of group selection;
[0118] Each time a preliminary training data group is traversed to a plurality of preliminary training data groups, a target number of high-quality training data with the best search term performance evaluation results are selected from the preliminary training data group until the selected high-quality training data meet the preset quantity requirement.
[0119] The target number can be set based on actual business needs or application scenarios, and the embodiments of the present disclosure do not impose any restrictions on this. The preset number requirement can be that the selected high-quality training data is greater than or equal to a preset number threshold. Here, the preset number threshold can be set based on actual business needs or application scenarios, and the embodiments of the present disclosure do not impose any restrictions on this.
[0120] In addition, in actual implementation, the inter-group selection order of multiple preliminary training data groups can be obtained by the following methods:
[0121] Taking the multiple preliminary training data groups as the data groups to be processed, obtaining the mean values of the search term performance evaluations of the data groups to be processed, so as to obtain the mean values of the search term performance evaluations corresponding to the multiple preliminary training data groups one by one;
[0122] Based on a plurality of search term performance evaluation means corresponding one-to-one to the plurality of preliminary training data groups, an inter-group selection order of the plurality of preliminary training data groups is obtained.
[0123] Among them, the mean value of the search term performance evaluation of the data group to be processed can be the average value of the search term performance evaluation results of multiple second preliminary training data in the data group to be processed; "based on multiple search term performance evaluation means corresponding one-to-one to multiple preliminary training data groups, obtaining the inter-group selection order of multiple preliminary training data groups" can be: obtaining the inter-group selection order of multiple preliminary training data groups by descending order of multiple search term performance evaluation means.
[0124] The second implementation of “selecting multiple high-quality training data from multiple preliminary training data groups” will be further explained below through specific examples.
[0125] First, suppose that Figure 2 and Figure 3 Multiple preliminary training data sets are shown.
[0126] Please combine Figure 4After determining the search term field of each second preliminary training data in the plurality of second preliminary training data, and grouping the plurality of second preliminary training data according to the search term field of each second preliminary training data in the plurality of second preliminary training data to obtain a plurality of preliminary training data groups, if the method of "obtaining an inter-group selection order for the plurality of preliminary training data groups, and traversing the plurality of preliminary training data groups according to the inter-group selection order" is adopted, so as to select a target number of high-quality training data with the best search term performance evaluation result from the preliminary training data group each time one of the plurality of preliminary training data groups is traversed, According to the data selection strategy of "until the selected high-quality training data meets the preset number requirement", when the target number is 1, the preset number requirement is that the selected high-quality training data is greater than or equal to the preset number threshold, and the preset number threshold is 8, finally, the second preliminary training data E1, the second preliminary training data E3, the second preliminary training data E4, the second preliminary training data E5, the second preliminary training data E7, the second preliminary training data E8, the second preliminary training data E9 and the second preliminary training data E10 can be selected as high-quality training data and used to form a plurality of candidate training data.
[0127] In the above example, the plurality of second preliminary training data can be grouped according to the search term domain of each of the plurality of second preliminary training data, and a plurality of candidate training data can be selected from the plurality of second preliminary training data using a group selection method. This further ensures that the plurality of selected candidate training data has data diversity in the specified dimension of the search term domain. This allows, after determining target training data based on the plurality of candidate training data and using it to train the search term generation model to obtain a trained search term generation model, to further ensure the performance and generalization of the trained search term generation model.
[0128] In some optional implementations, step S102, i.e., "using the search term generation model to obtain the search term inference result based on the target visual content description text," may include:
[0129] Obtain entity organization logo samples related to the target visual content description text;
[0130] Get a sample of the expected number of search terms;
[0131] Splicing the entity organization logo sample, the expected search word quantity sample and the target visual content description text to obtain a data splicing result sample;
[0132] The search term generation model is used to obtain the search term inference results based on the data splicing result samples.
[0133] The entity identification sample can be a company name; the specific value of the expected number of search terms sample can be set according to actual business needs or application scenarios, and is not limited in this embodiment of the present disclosure. Here, the expected number of search terms sample is used to represent the number of search terms included in the expected search term inference results.
[0134] In one example, the entity organization identification sample, the expected search word number sample and the target visual content description text are spliced, and the obtained data splicing result sample can be: entity organization identification sample-target visual content description text-expected search word number sample.
[0135] Through the above method, in the disclosed embodiments, it is possible to obtain entity organization identification samples related to the target visual content description text, as well as a sample of the expected number of search terms. These entity organization identification samples, the sample of the expected number of search terms, and the target visual content description text are then concatenated to obtain a data concatenation result sample. The search term generation model is then used to obtain search term inference results based on the data concatenation result sample. This provides the search term generation model with richer, more valuable learning data, further ensuring the performance of the trained search term generation model.
[0136] The embodiment of the present disclosure provides a visual search term generation method, which can be applied to electronic devices. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer (e.g., a desktop computer, a laptop computer, a car computer, etc.), a personal digital assistant or other similar computing device. Figure 5 The flowchart shown in the figure illustrates a search term generation method provided by an embodiment of the present disclosure. It should be noted that although the flowchart shows a logical order, in some cases, the steps shown or described in the flowchart can also be performed in other orders.
[0137] Step S501: Obtain visual content description text.
[0138] The visual content description text may be textual content describing the visual content sample to be processed. The visual content sample to be processed may include online advertisements, video resources, graphic resources, and the like. Online advertisements may include static advertisements, animated image advertisements, and video advertisements, and graphic resources may include static graphics and text, animated graphics and text, and the embodiments of the present disclosure do not limit this.
[0139] Step S502: Using the trained search term generation model, based on the visual content description text, obtain a search term generation result.
[0140] The trained search term generation model may be a search term generation model trained using the aforementioned search term generation model training method.
[0141] The visual search term generation method provided in the embodiments of this disclosure can obtain visual content description text and, using a trained search term generation model, generate search term generation results based on the visual content description text. Compared to existing solutions that manually select keywords, this method not only significantly saves human resources but also avoids human bias, thereby ensuring that the search term generation results match specific visual content (e.g., online advertisements).
[0142] In some optional implementations, “using a trained search term generation model to obtain a search term generation result based on the visual content description text” may include:
[0143] Obtaining entity organization identifiers associated with the visual content description text;
[0144] Get the expected number of search terms;
[0145] Splicing the entity organization logo, the expected number of search terms, and the visual content description text to obtain a data splicing result;
[0146] The trained search term generation model is used to obtain a search term generation result based on the data splicing result.
[0147] The entity organization identifier can be a company name; the specific value of the expected number of search terms can be set according to actual business needs or application scenarios, and the embodiments of the present disclosure do not limit this. Here, the expected number of search terms is used to represent the number of search terms included in the expected search term generation results.
[0148] In one example, the entity organization identifier, the expected number of search terms, and the visual content description text are spliced, and the obtained data splicing result may be: entity organization identifier-visual content description text-expected number of search terms.
[0149] Through the above method, in the disclosed embodiments, it is possible to obtain entity organization identifiers associated with the visual content description text, as well as the expected number of search terms. The entity organization identifiers, the expected number of search terms, and the visual content description text are then concatenated to obtain a data concatenation result. The trained search term generation model is then used to generate a search term generation result based on the data concatenation result. This provides the trained search term generation model with richer, more valuable reference data, further ensuring that the search term generation result matches specific visual content (e.g., online advertisements).
[0150] In some optional implementations, “using a trained search term generation model to obtain a search term generation result based on the visual content description text” may include:
[0151] The trained search term generation model is used to obtain search term generation results based on the visual content description text according to the kernel sampling strategy and / or the repetition penalty strategy.
[0152] Among them, the core sampling strategy is the Top-p sampling strategy, which is used to limit the words considered in each step of generation, making the generated search term generation results more diverse and reasonable; the repetition penalty strategy is used to reduce the probability of selecting used words to reduce the repetitive content in the search term generation results, so as to further ensure the diversity of the search term generation results.
[0153] In addition, it should be understood that in the embodiments of the present disclosure, when "using a trained search term generation model to obtain a search term generation result based on the visual content description text" includes "obtaining an entity organization identifier related to the visual content description text, and obtaining the expected number of search terms, and splicing the entity organization identifier, the expected number of search terms and the visual content description text to obtain a data splicing result, and then using the trained search term generation model to obtain a search term generation result based on the data splicing result", the trained search term generation model can be used to obtain a search term generation result based on the data splicing result in accordance with the core sampling strategy and / or the repetition penalty strategy.
[0154] Through the above method, in the embodiment of the present disclosure, a trained search term generation model can be used to obtain search term generation results based on the visual content description text according to the core sampling strategy and / or the repetition penalty strategy to ensure the diversity and rationality of the search term generation results.
[0155] The following, combined with Figure 6 , a training method for a search term generation model and an application process of the trained search term generation model provided in an embodiment of the present disclosure are described.
[0156] First, historical visual content samples and original search term labels with corresponding relationships are obtained from the advertising delivery system. The historical visual content samples may include visual content landing pages (for example, if the visual content sample is an online advertisement, the visual content landing page may be the advertisement landing page) and entity identification samples. The entity identification samples may be company names.
[0157] Using a large language model and inductive cues, we summarize visual content landing pages to generate raw visual content descriptions. This raw visual content description and the original search term labels are then used as raw training data. Table 1 shows a visual content landing page (Table 1 only shows its text content; actual visual content landing pages can also include images) and the raw visual content descriptions generated by summarizing it.
[0158] Table 1
[0159]
[0160] Repeat the above steps to obtain multiple original training data.
[0161] Thereafter, multiple first-selected training data can be selected from the multiple original training data according to a relevance selection strategy. Specifically, the content relevance of each original training data in the multiple original training data can be obtained, and multiple first-selected training data with the greatest content relevance can be selected from the multiple original training data, or multiple first-selected training data whose content relevance meets preset relevance requirements can be selected from the multiple original training data. Each of the multiple first-selected training data includes first-selected visual content description text and first-selected search term labels.
[0162] Next, a plurality of second preliminary training data can be selected from the plurality of first preliminary training data according to the first diversity selection strategy, and then a plurality of candidate training data can be selected from the plurality of second preliminary training data according to the second diversity selection strategy, and each candidate training data in the plurality of candidate training data can be used as the target training data. The first diversity selection strategy is a diversity selection strategy set for the search term performance evaluation results; each second preliminary training data in the plurality of second preliminary training data includes a second preliminary visual content description text and a second preliminary search term label; the second diversity selection strategy is a diversity selection strategy set for the search term field; each candidate training data in the plurality of candidate training data includes a candidate visual content description text and a candidate search term label; and the target training data includes a target visual content description text and a target search term label.
[0163] In one example, the target training data may be as shown in Table 2.
[0164] Table 2
[0165]
[0166] Finally, we can obtain entity organization identification samples related to the target visual content description text, as well as samples of the expected number of search terms, and splice the entity organization identification samples, the expected number of search terms, and the target visual content description text to obtain data splicing result samples. We then use the search term generation model to obtain search term inference results based on the data splicing result samples, and train the search term generation model based on the target search term label and the search term inference results to obtain a trained search term generation model.
[0167] In one example, the trained search term generation model is tested to obtain the search term inference results shown in Table 3.
[0168] Table 3
[0169]
[0170]
[0171]
[0172] During the application of the trained search term generation model, visual content description text may be obtained, and the trained search term generation model may be used to obtain a search term generation result based on the visual content description text.
[0173] The specific functions and examples of the above steps can be found in the relevant descriptions of the corresponding steps in the aforementioned search term generation model training method embodiment and the search term generation method embodiment, which will not be repeated here.
[0174] See also Figure 7 , which is a schematic diagram of an application scenario of a training method for a search term generation model provided in an embodiment of the present disclosure.
[0175] The training method for a search term generation model provided in the embodiments of the present disclosure is applied to an electronic device. The electronic device may be a server or a terminal device. The terminal device may be a workstation, a mainframe computer, a conventional computer (e.g., a desktop computer, a laptop computer, an in-vehicle computer, etc.), a personal digital assistant (PDA), or other similar computing device.
[0176] Here, electronic devices are used to:
[0177] Obtain target training data; wherein the target training data includes target visual content description text and target search term labels;
[0178] Using the search term generation model, the text is described based on the target visual content to obtain the search term inference results;
[0179] Based on the target search term label and the search term inference result, the search term generation model is trained to obtain a trained search term generation model.
[0180] It should be noted that, in the embodiments of the present disclosure, Figure 7 The application scenario diagram shown is only illustrative and not restrictive. Those skilled in the art can Figure 7 Various obvious changes and / or substitutions may be made to the examples, and the obtained technical solutions still fall within the scope of the disclosure of the embodiments of the present disclosure.
[0181] See also Figure 8 , which is a schematic diagram of an application scenario of a search term generation method provided in an embodiment of the present disclosure.
[0182] The search term generation method provided in the embodiments of the present disclosure is applied to an electronic device. The electronic device may be a server or a terminal device. The terminal device may be a workstation, a mainframe computer, a conventional computer (e.g., a desktop computer, a laptop computer, an in-vehicle computer, etc.), a personal digital assistant (PDA), or other similar computing device.
[0183] Here, electronic devices are used to:
[0184] Get the visual content description text;
[0185] Using the trained search term generation model, the search term generation results are obtained based on the visual content description text.
[0186] It should be noted that, in the embodiments of the present disclosure, Figure 8 The application scenario diagram shown is only illustrative and not restrictive. Those skilled in the art can Figure 8 Various obvious changes and / or substitutions may be made to the examples, and the obtained technical solutions still fall within the scope of the disclosure of the embodiments of the present disclosure.
[0187] In order to better implement the aforementioned training method for the search term generation model, the embodiment of the present disclosure further provides a training device 900 for the search term generation model, which can be integrated into an electronic device. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer (e.g., a desktop computer, a laptop computer, a car computer, etc.), a personal digital assistant or other similar computing device. Figure 9 The schematic structural block diagram shown illustrates a training device 900 for a search term generation model provided by the disclosed embodiment.
[0188] The training device 900 for the search term generation model includes:
[0189] The training data acquisition unit 901 is used to acquire target training data; wherein the target training data includes target visual content description text and target search term label;
[0190] An inference result acquisition unit 902 is configured to obtain a search term inference result based on the target visual content description text by using the search term generation model;
[0191] The model training unit 903 is used to train the search term generation model based on the target search term label and the search term inference result to obtain a trained search term generation model.
[0192] In some optional implementations, the training data acquisition unit 901 is configured to:
[0193] Acquire multiple original training data; wherein each of the multiple original training data includes original visual content description text and original search term label;
[0194] Selecting a plurality of candidate training data from the plurality of original training data according to a relevance selection strategy and / or a diversity selection strategy; wherein each candidate training data in the plurality of candidate training data includes a candidate visual content description text and a candidate search term label;
[0195] Based on the plurality of candidate training data, target training data is determined.
[0196] In some optional implementations, the training data acquisition unit 901 is configured to:
[0197] According to the relevance selection strategy, a plurality of first preliminary selected training data are selected from the plurality of original training data; wherein each of the plurality of first preliminary selected training data includes a first preliminary selected visual content description text and a first preliminary selected search term label;
[0198] According to the diversity selection strategy, a plurality of candidate training data are selected from the plurality of first preliminary selected training data.
[0199] In some optional implementations, the training data acquisition unit 901 is configured to:
[0200] Obtaining content relevance of each original training data from a plurality of original training data;
[0201] A plurality of first preliminary selected training data with the greatest content relevance is selected from the plurality of original training data; or a plurality of first preliminary selected training data with content relevance meeting a preset relevance requirement is selected from the plurality of original training data.
[0202] In some optional implementations, the training data acquisition unit 901 is configured to:
[0203] According to the first diversity selection strategy and / or the second diversity selection strategy, multiple candidate training data are selected from multiple first preliminary training data; wherein the first diversity selection strategy is a diversity selection strategy set for the search term performance evaluation results; and the second diversity selection strategy is a diversity selection strategy set for the search term field.
[0204] In some optional implementations, the training data acquisition unit 901 is configured to:
[0205] According to the first diversity selection strategy, a plurality of second preliminary selected training data are selected from the plurality of first preliminary selected training data; wherein each second preliminary selected training data in the plurality of second preliminary selected training data includes a second preliminary selected visual content description text and a second preliminary selected search term label;
[0206] According to the second diversity selection strategy, a plurality of candidate training data are selected from the plurality of second preliminary selected training data.
[0207] In some optional implementations, the training data acquisition unit 901 is configured to:
[0208] Obtaining a search term performance evaluation result for each of the plurality of first preliminary selected training data;
[0209] A probability sampling algorithm is used to select a plurality of second preliminary selected training data from the plurality of first preliminary selected training data based on a search term performance evaluation result of each first preliminary selected training data.
[0210] In some optional implementations, the training data acquisition unit 901 is configured to:
[0211] determining a search term field for each of the plurality of second preliminary selected training data;
[0212] Grouping the plurality of second preliminary selected training data according to the search term field of each second preliminary selected training data in the plurality of second preliminary selected training data to obtain a plurality of preliminary selected training data groups;
[0213] Selecting multiple high-quality training data from multiple preliminary training data groups;
[0214] Based on multiple high-quality training data, multiple candidate training data are obtained.
[0215] In some optional implementations, the training data acquisition unit 901 is configured to:
[0216] Taking the plurality of preliminary selected training data groups as target data groups, obtaining search term performance evaluation results of each second preliminary selected training data in the target data groups;
[0217] Select multiple high-quality training data with the best search term performance evaluation results from the target data group; or select multiple high-quality training data with the search term performance evaluation results that meet preset evaluation requirements from the target data group.
[0218] In some optional implementations, the training data acquisition unit 901 is configured to:
[0219] Obtaining the inter-group selection order of multiple preliminary training data groups;
[0220] Traverse multiple preliminary training data groups according to the order of group selection;
[0221] Each time a preliminary training data group is traversed to a plurality of preliminary training data groups, a target number of high-quality training data with the best search term performance evaluation results are selected from the preliminary training data group until the selected high-quality training data meet the preset quantity requirement.
[0222] In some optional implementations, the inference result acquisition unit 902 is configured to:
[0223] Obtain entity organization logo samples related to the target visual content description text;
[0224] Get a sample of the expected number of search terms;
[0225] Splicing the entity organization logo sample, the expected search word quantity sample and the target visual content description text to obtain a data splicing result sample;
[0226] A search term generation model is used to obtain a search term inference result based on the data splicing result.
[0227] In the embodiment of the present disclosure, the specific functions and examples of each unit in the training device 900 for the search term generation model can be found in the relevant descriptions of the corresponding steps in the aforementioned training method embodiment for the search term generation model, and will not be repeated here.
[0228] In order to better implement the aforementioned search term generation method, the embodiment of the present disclosure further provides a search term generation device 1000, which can be integrated into an electronic device. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer (e.g., a desktop computer, a laptop computer, a car computer, etc.), a personal digital assistant or other similar computing device 1000. Figure 10 The schematic structural block diagram shown illustrates a training device 1000 for a search term generation model provided by the disclosed embodiment.
[0229] The training device 1000 for the search term generation model includes:
[0230] Description text acquisition unit 1001, used to acquire visual content description text;
[0231] The search term generation unit 1002 is configured to obtain a search term generation result based on the visual content description text using a trained search term generation model.
[0232] In some optional implementations, the search term generating unit 1002 is configured to:
[0233] Obtaining entity organization identifiers associated with the visual content description text;
[0234] Get the expected number of search terms;
[0235] Splicing the entity organization logo, the expected number of search terms, and the visual content description text to obtain a data splicing result;
[0236] The trained search term generation model is used to obtain the search term generation results based on the data splicing results.
[0237] In some optional implementations, the search term generating unit 1002 is configured to:
[0238] The trained search term generation model is used to obtain search term generation results based on the visual content description text according to the kernel sampling strategy and / or the repetition penalty strategy.
[0239] In the embodiment of the present disclosure, the specific functions and examples of each unit in the training device 1000 of the search term generation model can be found in the relevant descriptions of the corresponding steps in the embodiment of the search term generation method, and will not be repeated here.
[0240] In the technical solutions disclosed herein, the acquisition, storage, and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0241] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0242] Figure 11 A schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as vehicle-mounted computing devices, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0243] like Figure 11 As shown, electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes based on a computer program stored in a read-only memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a random access memory (RAM) 1103. RAM 1103 may also store various programs and data required for the operation of electronic device 1100. Computing unit 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to bus 1104.
[0244] Multiple components in the electronic device 1100 are connected to the I / O interface 1105, including: an input unit 1106, such as a keyboard, a mouse, etc.; an output unit 1107, such as various types of renderers, speakers, etc.; a storage unit 1108, such as a magnetic disk, an optical disk, etc.; and a communication unit 1109, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1109 allows the electronic device 1100 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0245] The computing unit 1101 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as the method for training a search term generation model and / or the method for generating search terms. For example, in some embodiments, the method for training a search term generation model and / or the method for generating search terms can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 1108. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1100 via the ROM 1102 and / or the communication unit 1109. When the computer program is loaded into RAM 1103 and executed by computing unit 1101, one or more steps of the search term generation model training method and / or search term generation method described above may be performed. Alternatively, in other embodiments, computing unit 1101 may be configured to perform the search term generation model training method and / or search term generation method in any other appropriate manner (e.g., via firmware).
[0246] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0247] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data optimization device so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0248] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, Erasable Programmable Read-Only Memory (EPROM) or flash memory, optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0249] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a rendering device (e.g., a cathode ray tube (CRT) renderer or a liquid crystal display (LCD) renderer) for rendering information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices are also used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0250] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), a computing system that includes middleware components (e.g., an application server), a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0251] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. The client-server relationship arises through computer programs running on the respective computers and establishing a client-server relationship. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0252] An embodiment of the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute a training method for a search term generation model and / or a search term generation method.
[0253] An embodiment of the present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements a training method for a search term generation model and / or a search term generation method.
[0254] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this. In addition, in this disclosure, relational terms such as "first", "second", "third", etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. In addition, "multiple" in this disclosure can be understood as at least two.
[0255] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A method for training a search term generation model, comprising: Obtain target training data; wherein the target training data includes target visual content description text and target search term labels; Using a search term generation model, based on the target visual content description text, obtain a search term inference result; Training the search term generation model based on the target search term label and the search term inference result to obtain a trained search term generation model; The method of using the search term generation model to obtain the search term inference result based on the target visual content description text includes: Obtaining entity organization identification samples related to the target visual content description text; Get a sample of the expected number of search terms; Splicing the entity organization identification sample, the expected search word quantity sample, and the target visual content description text to obtain a data splicing result sample; A search term generation model is used to obtain a search term inference result based on the data splicing result.
2. The method according to claim 1, wherein The acquiring target training data includes: Acquire a plurality of original training data; wherein each of the plurality of original training data includes an original visual content description text and an original search term label; Selecting a plurality of candidate training data from the plurality of original training data according to a relevance selection strategy and / or a diversity selection strategy; wherein each candidate training data in the plurality of candidate training data includes a candidate visual content description text and a candidate search term label; Based on the plurality of candidate training data, target training data is determined.
3. The method according to claim 2, wherein: The selecting a plurality of candidate training data from the plurality of original training data according to the relevance selection strategy and / or the diversity selection strategy includes: According to the relevance selection strategy, a plurality of first preliminary selected training data are selected from the plurality of original training data; wherein each of the plurality of first preliminary selected training data includes a first preliminary selected visual content description text and a first preliminary selected search term label; According to the diversity selection strategy, a plurality of candidate training data are selected from the plurality of first preliminary selected training data.
4. The method according to claim 3, wherein: The step of selecting a plurality of first preliminary training data from the plurality of original training data according to the relevance selection strategy includes: Obtaining content relevance of each original training data among the plurality of original training data; A plurality of first preliminary selected training data with the greatest content relevance are selected from the plurality of original training data; or a plurality of first preliminary selected training data with content relevance meeting a preset relevance requirement are selected from the plurality of original training data.
5. The method according to claim 3, wherein The step of selecting a plurality of candidate training data from the plurality of first preliminary selected training data according to the diversity selection strategy includes: According to the first diversity selection strategy and / or the second diversity selection strategy, multiple candidate training data are selected from the multiple first preliminary training data; wherein the first diversity selection strategy is a diversity selection strategy set for the search term performance evaluation results; and the second diversity selection strategy is a diversity selection strategy set for the search term field.
6. The method according to claim 5, wherein: The selecting a plurality of candidate training data from the plurality of first preliminary selected training data according to the first diversity selection strategy and / or the second diversity selection strategy includes: According to the first diversity selection strategy, a plurality of second preliminary selected training data are selected from the plurality of first preliminary selected training data; wherein each second preliminary selected training data in the plurality of second preliminary selected training data includes a second preliminary selected visual content description text and a second preliminary selected search term label; According to the second diversity selection strategy, a plurality of candidate training data are selected from the plurality of second preliminary selected training data.
7. The method according to claim 6, wherein: The selecting a plurality of second preliminary selected training data from the plurality of first preliminary selected training data according to the first diversity selection strategy includes: Obtaining a search term performance evaluation result of each first preliminary selected training data among the plurality of first preliminary selected training data; A plurality of second preliminary selected training data are selected from the plurality of first preliminary selected training data by using a probabilistic sampling algorithm based on a search term performance evaluation result of each first preliminary selected training data in the plurality of first preliminary selected training data.
8. The method according to claim 6, wherein: The step of selecting a plurality of candidate training data from the plurality of second preliminary selected training data according to the second diversity selection strategy includes: determining a search term field for each of the plurality of second preliminary selected training data; Grouping the plurality of second preliminary selected training data according to the search term field of each second preliminary selected training data in the plurality of second preliminary selected training data to obtain a plurality of preliminary selected training data groups; Selecting a plurality of high-quality training data from the plurality of preliminary training data groups respectively; Based on the plurality of high-quality training data, a plurality of candidate training data are obtained.
9. The method according to claim 8, wherein The selecting of a plurality of high-quality training data from the plurality of preliminary training data groups comprises: Taking the plurality of preliminary selected training data groups as target data groups, obtaining search term performance evaluation results of each second preliminary selected training data in the target data groups; A plurality of high-quality training data with the best search term performance evaluation results are selected from the target data group; or a plurality of high-quality training data with the search term performance evaluation results meeting preset evaluation requirements are selected from the target data group.
10. The method according to claim 8, wherein The selecting of a plurality of high-quality training data from the plurality of preliminary training data groups comprises: Obtaining an inter-group selection order of the plurality of preliminary training data groups; Traversing the plurality of preliminary selected training data groups according to the inter-group selection order; Each time a preliminary selected training data group is traversed to, a target number of high-quality training data with the best search term performance evaluation results are selected from the preliminary selected training data group until the selected high-quality training data meet the preset quantity requirement.
11. A method for generating a search term, comprising: Get the visual content description text; Using a trained search term generation model, based on the visual content description text, to obtain a search term generation result; The method of using the trained search term generation model to obtain a search term generation result based on the visual content description text includes: Obtaining an entity organization identifier related to the visual content description text; Get the expected number of search terms; splicing the entity organization identifier, the expected number of search terms, and the visual content description text to obtain a data splicing result; The trained search term generation model is used to obtain a search term generation result based on the data splicing result.
12. The method according to claim 11, wherein The method of using the trained search term generation model to obtain a search term generation result based on the visual content description text includes: The trained search term generation model is used to obtain search term generation results based on the visual content description text according to a kernel sampling strategy and / or a repetition penalty strategy.
13. A training device for a search term generation model, comprising: A training data acquisition unit, configured to acquire target training data; wherein the target training data includes target visual content description text and target search term labels; an inference result acquisition unit, configured to obtain a search term inference result based on the target visual content description text by using a search term generation model; A model training unit, configured to train the search term generation model based on the target search term label and the search term inference result to obtain a trained search term generation model; The inference result acquisition unit is specifically used to: Obtaining entity organization identification samples related to the target visual content description text; Get a sample of the expected number of search terms; Splicing the entity organization identification sample, the expected search word quantity sample, and the target visual content description text to obtain a data splicing result sample; A search term generation model is used to obtain a search term inference result based on the data splicing result.
14. The device according to claim 13, wherein The training data acquisition unit is used to: Acquire a plurality of original training data; wherein each of the plurality of original training data includes an original visual content description text and an original search term label; Selecting a plurality of candidate training data from the plurality of original training data according to a relevance selection strategy and / or a diversity selection strategy; wherein each candidate training data in the plurality of candidate training data includes a candidate visual content description text and a candidate search term label; Based on the plurality of candidate training data, target training data is determined.
15. The device according to claim 14, wherein The training data acquisition unit is used to: According to the relevance selection strategy, a plurality of first preliminary selected training data are selected from the plurality of original training data; wherein each of the plurality of first preliminary selected training data includes a first preliminary selected visual content description text and a first preliminary selected search term label; According to the diversity selection strategy, a plurality of candidate training data are selected from the plurality of first preliminary selected training data.
16. The device according to claim 15, wherein The training data acquisition unit is used to: Obtaining content relevance of each original training data among the plurality of original training data; Selecting a plurality of first preliminary selected training data with the greatest content relevance from the plurality of original training data; Alternatively, a plurality of first preliminary selected training data whose content relevance meets a preset relevance requirement is selected from the plurality of original training data.
17. The device according to claim 15, wherein The training data acquisition unit is used to: According to the first diversity selection strategy and / or the second diversity selection strategy, multiple candidate training data are selected from the multiple first preliminary training data; wherein the first diversity selection strategy is a diversity selection strategy set for the search term performance evaluation results; and the second diversity selection strategy is a diversity selection strategy set for the search term field.
18. The device according to claim 17, wherein The training data acquisition unit is used to: According to the first diversity selection strategy, a plurality of second preliminary selected training data are selected from the plurality of first preliminary selected training data; wherein each second preliminary selected training data in the plurality of second preliminary selected training data includes a second preliminary selected visual content description text and a second preliminary selected search term label; According to the second diversity selection strategy, a plurality of candidate training data are selected from the plurality of second preliminary selected training data.
19. The device according to claim 18, wherein The training data acquisition unit is used to: Obtaining a search term performance evaluation result of each first preliminary selected training data among the plurality of first preliminary selected training data; A plurality of second preliminary selected training data are selected from the plurality of first preliminary selected training data by using a probabilistic sampling algorithm based on a search term performance evaluation result of each first preliminary selected training data in the plurality of first preliminary selected training data.
20. The apparatus according to claim 18, wherein The training data acquisition unit is used to: determining a search term field for each of the plurality of second preliminary selected training data; Grouping the plurality of second preliminary selected training data according to the search term field of each second preliminary selected training data in the plurality of second preliminary selected training data to obtain a plurality of preliminary selected training data groups; Selecting a plurality of high-quality training data from the plurality of preliminary training data groups respectively; Based on the plurality of high-quality training data, a plurality of candidate training data are obtained.
21. The device according to claim 20, wherein The training data acquisition unit is used to: Taking the plurality of preliminary selected training data groups as target data groups, obtaining search term performance evaluation results of each second preliminary selected training data in the target data groups; Selecting a plurality of high-quality training data with the best search term performance evaluation results from the target data group; Alternatively, a plurality of high-quality training data whose search term performance evaluation results meet preset evaluation requirements are selected from the target data group.
22. The device according to claim 20, wherein The training data acquisition unit is used to: Obtaining an inter-group selection order of the plurality of preliminary training data groups; Traversing the plurality of preliminary selected training data groups according to the inter-group selection order; Each time a preliminary selected training data group is traversed to, a target number of high-quality training data with the best search term performance evaluation results are selected from the preliminary selected training data group until the selected high-quality training data meet the preset quantity requirement.
23. A search term generating device, comprising: A description text acquisition unit, used to acquire a description text of the visual content; A search term generation unit, configured to obtain a search term generation result based on the visual content description text using a trained search term generation model; The search term generating unit is specifically configured to: Obtaining an entity organization identifier related to the visual content description text; Get the expected number of search terms; splicing the entity organization identifier, the expected number of search terms, and the visual content description text to obtain a data splicing result; The trained search term generation model is used to obtain a search term generation result based on the data splicing result.
24. The device according to claim 23, wherein The search term generating unit is used for: The trained search term generation model is used to obtain search term generation results based on the visual content description text according to a kernel sampling strategy and / or a repetition penalty strategy.
25. An electronic device comprising: at least one processor; a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 12.
26. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 12.
27. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Object abstract determination method and device, electronic equipment and storage medium
CN114817634A
Training method of search term generation model and search reverse recall method
CN118277648A