Method, device and equipment for constructing keyword scheme generation model

By constructing a keyword scheme generation model, using pre-trained language model and data set training, the problems of low network information retrieval efficiency and inaccurate results are solved, and efficient and accurate search results are achieved.

CN120181222APending Publication Date: 2025-06-20SHANGHAI MIDU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510227817.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

In the prior art, network information retrieval efficiency is low and the search results are difficult to meet the requirements of high accuracy and comprehensiveness.

Method used

By obtaining network information of different types of topics, determining basic information, determining keyword schemes based on preset keyword setting rules, forming sample data, building data sets, training pre-trained language models, verifying models, and obtaining keyword scheme generation models.

Benefits of technology

It improves the efficiency and accuracy of keyword scheme generation, realizes comprehensive search, and obtains high-precision search results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120181222A_ABST
    Figure CN120181222A_ABST
Patent Text Reader

Abstract

The invention provides a method, a device and equipment for constructing a keyword scheme generation model. The method comprises the following steps: acquiring network information of different types of themes, and determining basic information corresponding to the themes according to the network information of each theme; based on a preset keyword setting rule, determining a keyword scheme of each piece of basic information, forming sample data by the basic information and the keyword schemes, traversing each piece of basic information, and taking a plurality of obtained sample data as a data set; and based on the data set, training a pre-training language model, and verifying the trained pre-training language model to obtain a keyword scheme generation model. By means of the method, the model can be constructed to be used for automatically generating the keyword scheme of the subject to be retrieved, and the keyword scheme generation efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and in particular, to a technology for constructing a keyword scheme generation model. Background Art

[0002] With the rapid development of the Internet, the network information has grown explosively and shows highly unstructured characteristics, which brings many challenges to users when searching and monitoring information on the Internet. For example, if the retrieval keywords are not properly selected, problems such as low relevance of retrieval results, insufficient information coverage, and limited retrieval accuracy will occur. Moreover, the results of information retrieval and monitoring are the basis for multi-dimensional data statistics and analysis. Therefore, the keyword scheme for retrieval or monitoring will directly affect the accuracy of the network information obtained, and further affect the statistical and analysis results based on the obtained network information, and affect the decision-making based on the statistical and analysis results. For example, brand marketing, new media operation, public opinion response and disposal based on network information.

[0003] Existing traditional methods often determine one or more keywords manually according to the theme to be retrieved or monitored, and combine them into a keyword scheme for retrieving network information related to the theme. The efficiency is low, and the obtained retrieval results are also difficult to meet the requirements of high precision and comprehensiveness. Summary of the Invention

[0004] The purpose of this application is to provide a method, device and equipment for constructing a keyword scheme generation model, so as to at least partially solve the technical problems in the prior art that the network information retrieval efficiency is low and the retrieval results are also difficult to meet the requirements of high precision and comprehensiveness.

[0005] According to one aspect of this application, a method for constructing a keyword scheme generation model is provided, wherein the method includes:

[0006] Obtain network information of different types of themes, and determine the basic information corresponding to the theme according to the network information of each theme;

[0007] Based on the preset keyword setting rules, determine the keyword scheme of each piece of basic information, and form a sample data with the basic information and the keyword scheme. Traverse each piece of basic information, and use the obtained several sample data as a data set;

[0008] Based on the data set, train a pre-trained language model, and verify the trained pre-trained language model to obtain a keyword scheme generation model.

[0009] Optionally, wherein the training of the pre-trained language model based on the data set includes:

[0010] Train a pre-trained language model based on the data set and a preset prompt template.

[0011] Optionally, the method for constructing a keyword scheme generation model by validating a pre-trained language model includes:

[0012] Based on the data set, determine a validation data set;

[0013] Adopt the edit distance method to calculate the similarity between the output obtained by inputting the sample data of the validation data set into the trained pre-trained language model and the keyword scheme in the sample data. Traverse each sample data in the validation data set. When the proportion of the number of samples meeting the similarity requirement meets a preset threshold, obtain the keyword scheme generation model.

[0014] Optionally, the method for constructing a keyword scheme generation model further includes:

[0015] Input the basic information of the to-be-retrieved topic into the keyword scheme generation model to output the keyword scheme corresponding to the basic information of the to-be-retrieved topic.

[0016] Optionally, the method for constructing a keyword scheme generation model further includes:

[0017] Based on the keyword scheme and a preset time period, perform a retrieval to obtain a retrieval result corresponding to the basic information of the to-be-retrieved topic.

[0018] According to another aspect of the present application, there is provided an apparatus for constructing a keyword scheme generation model, wherein the apparatus includes:

[0019] A first module, configured to obtain network information of different types of topics, and determine the basic information corresponding to the topic according to the network information of each topic;

[0020] A second module, configured to determine a keyword scheme for each piece of basic information based on a preset keyword setting rule, and form a sample data by combining the basic information and the keyword scheme. Traverse each piece of basic information and use the obtained several sample data as a data set;

[0021] A third module, configured to train a pre-trained language model based on the data set, and validate the trained pre-trained language model to obtain a keyword scheme generation model.

[0022] Optionally, the apparatus for constructing a keyword scheme generation model further includes:

[0023] A fourth module, configured to input the basic information of the to-be-retrieved topic into the keyword scheme generation model to output the keyword scheme corresponding to the basic information of the to-be-retrieved topic.

[0024] Optionally, the apparatus for constructing a keyword scheme generation model further includes:

[0025] A fifth module, configured to perform a retrieval based on the keyword scheme and a preset time period to obtain a retrieval result corresponding to the basic information of the to-be-retrieved topic.

[0026] Compared with the prior art, the present application provides a method, apparatus, and device for constructing a keyword scheme generation model. The method includes: obtaining network information of different types of topics, and determining the basic information corresponding to each topic according to the network information of each topic; determining a keyword scheme for each piece of basic information based on a preset keyword setting rule, and forming a sample data by combining the basic information and the keyword scheme, traversing each piece of basic information, and using the obtained plurality of sample data as a data set; training a pre-trained language model based on the data set, and verifying the trained pre-trained language model to obtain a keyword scheme generation model. Further, the method further includes: inputting the basic information of the to-be-retrieved topic into the keyword scheme generation model to output a keyword scheme corresponding to the basic information of the to-be-retrieved topic. Further, the method further includes: performing a retrieval based on the keyword scheme and a preset time period to obtain a retrieval result corresponding to the basic information of the to-be-retrieved topic. Through this method, a model can be constructed to automatically generate a keyword scheme for a to-be-retrieved topic, improving the efficiency and accuracy of keyword scheme generation. The keyword scheme generated by the model can achieve comprehensive retrieval and obtain high-precision retrieval results. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Other features, objects, and advantages of the present invention will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings:

[0028] Figure 1 A schematic flowchart of a method for constructing a keyword scheme generation model according to an aspect of the present application is shown;

[0029] Figure 2 A schematic diagram of an apparatus for constructing a keyword scheme generation model according to another aspect of the present application is shown;

[0030] Identical or similar reference numerals in the drawings represent identical or similar components. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] The present invention will be further described in detail below with reference to the drawings.

[0032] In a typical configuration of each embodiment of the present application, each trusted party of the device, system, and / or each module of the apparatus may include one or more processors (CPUs), an input / output interface, a network interface, and a memory.

[0033] The memory may include non - permanent memory in the form of computer - readable media, random access memory (RAM) and / or non - volatile memory such as read - only memory (ROM) or flash RAM. The memory is an example of computer - readable media.

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

[0035] Pre - trained language models are pre - trained on large - scale data and can deeply understand complex natural language semantics and context associations. By fine - tuning the pre - trained language model with a dataset in an actual application scenario, a model more suitable for the actual application scenario can be obtained. When used for processing information retrieval tasks, large language models can not only accurately identify the core concepts of the retrieval topics provided by users, but also further broaden the retrieval scope to avoid missing important information. At the same time, pre - trained language models have the ability to automatically identify and link topics. For the topics to be retrieved by users, the model can quickly associate with the topic name or other synonyms, aliases, etc. related to the topic, and generate a keyword scheme with precise matching, greater richness, and comprehensiveness.

[0036] The present application provides a method, apparatus, and device for constructing a keyword scheme generation model. By collecting network information of different types of topics, extracting basic information related to the topics therefrom, and annotating corresponding keyword schemes, the basic information of each topic and its keyword scheme are combined into sample data to construct a data set for training a pre-trained language model, and the trained pre-trained language model is verified to obtain a keyword scheme generation model. Using this model, a keyword scheme can be generated according to the basic information of the topic to be retrieved, for precise matching query of the network of the topic to be retrieved, and the obtained retrieval results can provide a basis for statistics, analysis, and decision-making. The efficiency of keyword scheme generation is improved, and high-precision and comprehensive retrieval can be achieved based on the generated keyword scheme.

[0037] To further elaborate on the technical means adopted by the present application and the achieved effects, the technical solutions of the present application will be clearly and completely described below in conjunction with the accompanying drawings and preferred embodiments.

[0038] Figure 1 The schematic flowchart of a method for constructing a keyword scheme generation model according to an aspect of the present application is shown, wherein the method of one embodiment includes:

[0039] S101 Obtain network information of different types of topics, and determine the basic information corresponding to the topic according to the network information of each topic;

[0040] S102 Based on a preset keyword setting rule, determine the keyword scheme of each piece of basic information, and combine the basic information and the keyword scheme into a sample data. Traverse each piece of basic information, and use the obtained several sample data as a data set;

[0041] S103 Based on the data set, train a pre-trained language model, and verify the trained pre-trained language model to obtain a keyword scheme generation model.

[0042] In the present application, each method embodiment / optional embodiment can be implemented or executed by the device 100, wherein the device 100 is a computer device with corresponding software and hardware environments. Among them, the computer device includes, but is not limited to, a personal computer, a laptop computer, an industrial computer, a server, a network host, a single network server, or a network server cluster. Here, the computer device is only an example, and other existing or future possible devices and / or resource platforms applicable to the present application should also be included in the protection scope of the present application, and are hereby included by reference.

[0043] In this embodiment, in step S101, the device 100 can obtain network information of different types of topics, and determine the basic information corresponding to the topic according to the network information of each topic.

[0044] With the rapid development of the Internet, the information on it has grown explosively, and there is a vast amount of network information on the Internet with different topics. In order to more accurately determine the keyword schemes for different topics, different topics on the Internet can be classified. For example, topics can be classified into types such as events, topics / phenomena, enterprises / institutions / departments, brands / products / figures, etc. Among them, the keyword scheme of a topic is a set of each keyword and its combination that matches the basic information of the topic.

[0045] Among them, several different types of historical topics can be selected, and network information for each topic can be collected from the Internet. Among them, the sources of network information can cover search engines, news websites, social media platforms, forums, blogs, etc. Among them, the network information collected from different information sources on the Internet includes text information, and can also include multimedia information such as pictures and videos. If it is multimedia information, it needs to be converted into text information first before it can be used for subsequent screening. Among them, for each topic, according to the collected network information, the basic information corresponding to the topic is determined. Among them, one topic corresponds to one piece of basic information. Among them, the basic information includes the topic name, topic type, and basic information. Among them, the content of the basic information is related to the type of the topic. For example, for a topic of the event type, its basic information usually comes from media reports and can include report titles, abstracts, texts, sources, timestamps, etc.; while for a topic of the enterprise / institution / department type, its basic information usually comes from the introduction on its official website and can include texts, sources, timestamps, etc. Among them, the basic information is the text information that has been vectorized.

[0046] Continuing in this embodiment, in step S102, the device 100 can determine the keyword scheme for each piece of basic information according to the preset keyword setting rules, and form a sample data with the basic information and the keyword scheme. Traverse each piece of basic information, and use the obtained several sample data as a data set.

[0047] Among them, through the device 100, according to the keyword setting rules preset by experts, professionals can label each piece of basic information to determine its corresponding keyword scheme, and form a sample data with the keyword scheme and this piece of basic information. Among them, the keyword scheme corresponding to the basic information of a topic can accurately reflect the key information points of the topic, and can also be used to fine-tune how to train the pre-trained language model to generate a keyword scheme for accurate matching retrieval. Traverse the basic information of each topic determined in step S101, obtain several sample data, and use the obtained several sample data as a data set. Among them, in order to achieve accurate matching, corresponding keyword setting rules can be preset for different types of topics.

[0048] Continuing with this embodiment, in step S103, device 100 can train a pre-trained language model based on the dataset and verify the trained pre-trained language model to obtain a keyword scheme generation model.

[0049] Among them, given that the language model pre-trained on a large scale without supervision has context understanding ability, entity recognition ability, and sentiment analysis ability, it can be fine-tuned for specific tasks in the actual application scenario. In this application, based on the pre-trained language model, for the task of determining the keyword scheme for precise matching retrieval in this application, the constructed dataset can be used to perform supervised fine-tuning training on the selected pre-trained language model, and a model can be constructed to automatically generate the keyword scheme of the topic to be retrieved, improving the efficiency and accuracy of keyword scheme generation.

[0050] Among them, an existing pre-trained language model can be selected as the model to be fine-tuned. For example, existing pre-trained language models such as Wenxin Yiyan, Tongyi Qianwen, T5, and Shusheng Puyu can be selected.

[0051] Among them, the dataset can be divided into a training dataset and a validation dataset, and the training dataset is used to perform fine-tuning training on the selected model to be fine-tuned.

[0052] Before performing fine-tuning training, first, a cross-entropy loss function can be selected to measure the training effect. Among them, the calculation of the cross-entropy loss function can adopt the following formula (1),

[0053] L = -logp M (X|P) (1)

[0054] Among them, P is the model input, X is the model output, and p M (X|P) represents the probability distribution of obtaining output X when the input P is given and X is the true value, which can be obtained according to formula (2),

[0055] p M (X|P) = ∏ i p M (x i |X 0,...,i-1 ,P) (2)

[0056] Among them, i represents the i-th output in X, and X 0,...,i-1 is the output before x i .

[0057] Secondly, in the fine-tuning training of the pre-trained language model, hyperparameters such as the training batch size, the number of training iterations, the maximum sequence length, and the learning rate have a direct impact on the training effect and efficiency of the model. Hyperparameters such as a reasonable batch size, the number of iterations, the maximum sequence length, the learning rate, the early stopping condition, and the regularization method can be set, and a suitable optimizer can be selected. For example, the AdamW optimizer based on weight decay. An exemplary partial hyperparameter configuration is shown in Table 1 below.

[0058] Table 1

[0059]

[0060] Given the huge number of parameters in the pre-trained language model, the LoRA (Low-Rank Adaptation) method can be used to fine-tune the model.

[0061] Among them, after each fine-tuning training of the selected model to be fine-tuned, metrics can be determined in combination with the requirements of the actual application scenario, and the trained model to be fine-tuned can be verified using the validation dataset. If the metric value of the trained model to be fine-tuned for the validation dataset meets the preset threshold, the trained model to be fine-tuned meets the requirements and can be used as a keyword scheme generation model. If the metric value of the trained model to be fine-tuned for the validation dataset does not meet the preset threshold, relevant hyperparameters can be adjusted in combination with the validation results, and / or the training process can be improved (for example, adding DPO (Direct Preference Optimization) learning, interactive learning, etc.), and training and validation can be continuously iterated until the validation result of the trained model to be fine-tuned meets the requirements, thereby obtaining a keyword scheme generation model.

[0062] Optionally, to further improve the accuracy of the model in generating keyword schemes, step S103 includes:

[0063] Training the pre-trained language model based on the dataset and the preset prompt template, and validating the trained pre-trained model to obtain a keyword scheme generation model.

[0064] Among them, according to the task requirements of accurately and comprehensively generating keyword schemes in this application, a fine-tuning strategy can be formulated, a preset prompt template can be designed according to the fine-tuning strategy, and the model to be fine-tuned can be guided to complete the keyword scheme generation task by inserting prompt words and / or constructing specific sentence patterns.

[0065] Among them, in the basic information of different types of topics, their basic information structures are different, and the keyword scheme generation rules should be set correspondingly. Through the pre-design of the prompt template, the keyword generation model obtained after fine-tuning training can be more comprehensive while ensuring accuracy. An exemplary preset prompt template is as follows:

[0066] Prompt:

[0067] "Task background: As an online public opinion monitor, before monitoring the online information of a certain topic, it is necessary to first construct a rigorous keyword scheme to accurately and comprehensively obtain the online information related to the monitored topic that conforms to the keyword relationship in the scheme. The monitored topics include four categories: events, topics / phenomena, enterprises / institutions / departments, and brands / products / figures.

[0068] Task description: The generated scheme follows specific rules. Use half-angle brackets () to distinguish different keyword groups and / or types, use the | symbol to represent the logical "or" relationship, and use the + symbol to represent the "and" relationship; keywords should not be repeated. For example, for A City and A City B District, keep "A City and B District" in the scheme, and "A City and A City B District" is incorrect; the scheme should not use symbols, spaces, or single characters; keywords should not be time-related keywords; the number of keyword groups and / or types does not exceed 5 groups.

[0069] Examples of keyword scheme generation rules:

[0070] - Events: (Region|Unit)+(Subject Identity|Subject Name|Subject Feature)+(Event Keyword)+(Event Result);

[0071] - Topics / Phenomena: (Name|Abbreviation|Synonym|Other Common Expressions) or (Region|Subject|Scope)+(Description of Topic or Phenomenon);

[0072] - Enterprises / Institutions / Departments: (Name|Abbreviation|Other Common Expressions) or (Name|Abbreviation|Brand|Key Figure)+(Business|Industry|Product|Service|Project);

[0073] - Brands / Products / Figures: (Name|Abbreviation|Other Common Expressions) or (Name|Abbreviation|Other Common Expressions)+(Business|Industry|Service|Project|Feature)."

[0074] Among them, the dataset can be divided into a training dataset and a validation dataset. Using the training dataset and the preset prompt template, fine-tuning training is performed on the selected model to be fine-tuned.

[0075] Optionally, in step S103, validating the pre-trained language model after training to obtain the keyword scheme generation model includes:

[0076] Based on the dataset, determine the validation dataset;

[0077] Using the edit distance method, calculate the similarity between the output obtained by inputting the sample data of the validation dataset into the trained pre-trained language model and the keyword scheme in the sample data. Traverse each sample data in the validation dataset. When the proportion of the number of samples that meet the similarity requirement meets a preset threshold, a keyword scheme generation model is obtained.

[0078] Among them, the device 100 can divide the dataset into a training dataset and a validation dataset, and use this validation dataset to verify the trained pre-trained language model (i.e., the trained model to be fine-tuned). The edit distance method can be used to calculate the similarity between the output obtained by inputting each sample data of the validation dataset into the trained pre-trained language model and the keyword scheme marked in this sample data. Traverse each sample data in the validation dataset, calculate the similarity between the output of the trained pre-trained language model corresponding to each sample data and the keyword scheme marked therein, and count the similarities corresponding to all sample data in this validation dataset. When the proportion of the number of samples that meet the similarity requirement among all sample data in the validation dataset meets a preset threshold (such as 80%), a keyword scheme generation model is obtained. Among them, the edit distance can be the Levenshtein distance, the LCS (Longest Common Subsequence) distance, or the Hamming distance, which is not limited in this application.

[0079] Optionally, the method for constructing a keyword scheme generation model further includes:

[0080] S104 Input the basic information of the subject to be retrieved into the keyword scheme generation model to output the keyword scheme corresponding to the basic information of the subject to be retrieved.

[0081] Among them, the device 100 can determine the subject to be retrieved according to the input information. For example, when the user inputs information such as a hot topic or a phrase, determine the subject to be retrieved related thereto, and then, according to the subject to be retrieved, through an online search engine, determine the basic information of this subject to be retrieved based on the search results. Among them, if there are multiple search results, the basic information can be determined according to the source of the search results, and the basic information can be determined in the following source order: the official website of the subject to be retrieved, news websites, public accounts, social platforms such as Weibo, and then input the basic information of the subject to be retrieved into the deployed keyword generation model to output a keyword scheme with high accuracy corresponding to the basic information of this subject to be retrieved.

[0082] Optionally, the method for constructing a keyword scheme generation model further includes:

[0083] S105 performs a retrieval based on the keyword scheme and a preset time period to obtain a retrieval result corresponding to the basic information of the subject to be retrieved.

[0084] Among them, the keyword scheme obtained in step S104 can be used for applications such as public opinion monitoring. In the public opinion monitoring task, by using the keyword scheme corresponding to the subject to be retrieved to construct an exact match query, according to the retrieval task of the preset time period (such as the last 24 hours, 3 days, 7 days, etc.) of the public opinion monitoring task, the retrieval task can be performed using the keyword scheme to obtain accurate and comprehensive network information related to the subject to be retrieved within the preset time period.

[0085] Among them, professional personnel can also be arranged to manually annotate the basic information of the subject to be retrieved, and compare the labeled true value tags with the output results of the keyword generation model to evaluate the prediction effect of the model. And it can be sorted, marked and used as new sample data to supplement the data set to maintain and update the model, so as to further improve the accuracy and comprehensiveness of the model.

[0086] Figure 2 The schematic diagram of a device for constructing a keyword scheme generation model according to another aspect of the present application is shown. Among them, the device in one embodiment includes:

[0087] The first module 210 is configured to obtain network information of different types of subjects, and determine the basic information corresponding to the subject according to the network information of each subject;

[0088] The second module 220 is configured to determine the keyword scheme of each piece of basic information based on a preset keyword setting rule, form a sample data with the basic information and the keyword scheme, traverse each piece of basic information, and use the obtained several sample data as a data set;

[0089] The third module 230 is configured to train a pre-trained language model based on the data set, and verify the trained pre-trained language model to obtain a keyword scheme generation model.

[0090] In this embodiment, the device is deployed or integrated in the device 100 in the foregoing method embodiment and / or optional embodiment.

[0091] In this embodiment, through the first module 210 of the device, network information of different types of topics can be obtained, and based on the network information of each topic, the basic information corresponding to the topic can be determined. Among them, several different types of historical topics can be selected, and the network information of each topic is collected from the Internet. Among them, the sources of network information can cover search websites, news websites, social media platforms, forums, blogs, etc. Among them, the network information collected from different Internet sources includes text information, and can also include multimedia information such as pictures and videos. If it is multimedia information, it needs to be converted into text information first before it can be used for subsequent screening. Among them, for each topic, based on the collected network information, the basic information corresponding to the topic is determined. Among them, one topic corresponds to one piece of basic information. The basic information includes the topic name, topic type, and basic information. The content of the basic information is related to the type of the topic. For example, for a topic of the event type, its basic information usually comes from media reports and can include report titles, abstracts, texts, sources, timestamps, etc.; while for a topic of the enterprise / institution / department type, its basic information usually comes from the introduction on its official website and can include texts, sources, timestamps, etc. The basic information is the text information that has been vectorized.

[0092] Continuing in this embodiment, through the second module 220 of the device, according to the preset keyword setting rules, the keyword scheme for each piece of basic information can be determined, and the basic information and the keyword scheme are combined into a sample data. Traverse each piece of basic information, and use the obtained several sample data as a data set. Among them, according to the keyword setting rules preset by experts, through the first module 210 of the device, each piece of basic information can be annotated to determine its corresponding keyword scheme, and the keyword scheme and this piece of basic information are combined together to form a sample data. The keyword scheme corresponding to the basic information of one topic can accurately reflect the key information points of the topic, and can also be used to fine-tune the training of the pre-trained language model on how to generate keyword schemes for precise matching retrieval. Traverse the basic information of each topic determined by module 210 to obtain several sample data, and use the obtained several sample data as a data set. Among them, in order to achieve precise matching, corresponding keyword setting rules can be preset for different types of topics.

[0093] Continuing with this embodiment, through the third module 230 of the device, a pre-trained language model can be trained based on the dataset, and the trained pre-trained language model can be verified to obtain a keyword scheme generation model. Among them, based on the pre-trained language model, for the task of determining the keyword scheme for precise matching retrieval in this application, the constructed dataset can be used to perform supervised fine-tuning training on the selected pre-trained language model to further improve the accuracy and comprehensiveness of the model in the keyword generation task. Among them, the dataset can be divided into a training dataset and a validation dataset, and the training dataset can be used to perform fine-tuning training on the selected model to be fine-tuned. Among them, after each fine-tuning training on the selected model to be fine-tuned, the metrics can be determined in combination with the requirements of the actual application scenario, and the trained model to be fine-tuned can be verified using the validation dataset. If the metric value of the trained model to be fine-tuned for the validation dataset meets the preset threshold, the trained model to be fine-tuned meets the requirements and can be used as the keyword scheme generation model. If the metric value of the trained model to be fine-tuned for the validation dataset does not meet the preset threshold, the relevant hyperparameters can be adjusted in combination with the verification results, and / or the training process can be improved, and training and verification can be continuously iterated until the verification result of the trained model to be fine-tuned meets the requirements, thereby obtaining the keyword scheme generation model.

[0094] Optionally, the device for constructing a keyword scheme generation model further includes:

[0095] A fourth module 240, configured to input the basic information of the subject to be retrieved into the keyword scheme generation model to output a keyword scheme corresponding to the basic information of the subject to be retrieved.

[0096] In this optional embodiment, the subject to be retrieved can be determined according to the input information. For example, when the user inputs information such as a hot topic or a phrase, the subject to be retrieved related thereto can be determined, and then according to the subject to be retrieved, through an online search engine, based on the search results, the basic information of the subject to be retrieved can be determined. Among them, if there are multiple search results, the basic information can be determined according to the source of the search results, and the source order can be as follows: the official website of the subject to be retrieved, news websites, public accounts, social platforms such as Weibo, and then through the fourth module 240 of the device, the basic information of the subject to be retrieved is input into the deployed keyword generation model to output a keyword scheme corresponding to the basic information of the subject to be retrieved.

[0097] Optionally, the device for constructing a keyword scheme generation model further includes:

[0098] A fifth module 250, configured to perform a search based on the keyword scheme and a preset time period to obtain a search result corresponding to the basic information of the subject to be retrieved.

[0099] In this optional embodiment, the keyword scheme obtained in step S104 can be used in applications such as public opinion monitoring. In the public opinion monitoring task, through the fifth module 250 of this device, a precise matching query is constructed using the keyword scheme corresponding to the to-be-searched topic. The retrieval task can be performed using the keyword scheme according to the preset time period (such as the recent 24 hours, 3 days, 7 days, etc.) of the public opinion monitoring task, and accurate and comprehensive network information related to the to-be-searched topic within the preset time period can be obtained.

[0100] In each embodiment and / or optional embodiment of the above device, for the parts not mentioned in the method steps executed by each module, they are the same as the relevant method embodiments and / or optional embodiments described above, and will not be elaborated here.

[0101] According to another aspect of the present application, a computer-readable medium is further provided. The computer-readable medium stores computer-readable instructions, and the computer-readable instructions can be executed by a processor to implement the foregoing method embodiments.

[0102] It should be noted that in the method embodiments and / or optional embodiments of the present application, the order of execution of each step may not be strictly limited. As long as the method embodiments and / or optional embodiments can solve the defects existing in the prior art, achieve the invention purpose of the present application, and obtain beneficial effects. The method embodiments and / or optional embodiments of the present application can be implemented in software and / or a combination of software and hardware. The software programs involved in the present application can be executed by a processor to implement the steps or functions of the foregoing embodiments. Similarly, the software programs (including related data structures) of the present application can be stored in a computer-readable recording medium.

[0103] In addition, a part or all of the present application can be applied as a computer program product. For example, computer program instructions, when executed by a computer, can call or provide the methods and / or technical solutions according to the present application through the operations of the computer. The program instructions for calling the methods of the present application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in the working memory of a computer device running according to the program instructions.

[0104] According to still another aspect of the present application, a device for constructing a keyword scheme generation model is further provided. The device includes: a memory storing computer program instructions and one or more processors for executing the program instructions. When the computer program instructions are executed by the processor, the device is triggered to run the methods and / or technical solutions of the foregoing embodiments.

[0105] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be included in the present invention. Any reference signs in the claims should not be construed as limiting the claims concerned. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or devices stated in the apparatus claims can also be implemented by one unit or device through software and / or hardware. The words such as first and second are used to denote names and do not denote any particular order.

Claims

1. A method for constructing a keyword scheme generation model, characterized in that: The method comprises: Obtain network information of different types of topics, and determine basic information corresponding to each topic based on the network information of the topic; Based on the preset keyword setting rules, determine the keyword scheme for each basic information, and combine the basic information and the keyword scheme into a sample data, traverse each basic information, and use the obtained sample data as a data set; Based on the data set, a pre-trained language model is trained, and the trained pre-trained language model is verified to obtain a keyword scheme generation model.

2. The method according to claim 1, characterized in that The training of the pre-trained language model based on the data set includes: Based on the data set and the preset prompt template, a pre-trained language model is trained, and the trained pre-trained model is verified to obtain a keyword scheme generation model.

3. The method according to claim 1, characterized in that The pre-trained language model after verification training is used to obtain a keyword scheme generation model, including: Based on the data set, determining a validation data set; The edit distance method is used to calculate the similarity between the output obtained by inputting the sample data of the verification data set into the trained pre-trained language model and the keyword scheme in the sample data, and each sample data of the verification data set is traversed. When the proportion of the number of samples that meet the similarity requirements meets the preset threshold, the keyword scheme generation model is obtained.

4. The method according to claim 1, characterized in that The method further comprises: The basic information of the subject to be searched is input into the keyword scheme generation model to output the keyword scheme corresponding to the basic information of the subject to be searched.

5. The method according to claim 4, characterized in that The method further comprises: Based on the keyword scheme and the preset time period, a search is performed to obtain a search result corresponding to the basic information of the subject to be searched.

6. A device for constructing a keyword scheme generation model, characterized in that: The device comprises: The first module is used to obtain network information of different types of topics and determine basic information corresponding to each topic based on the network information of the topic; The second module is used to determine the keyword scheme of each basic information based on the preset keyword setting rule, and combine the basic information and the keyword scheme into a sample data, traverse each basic information, and use the obtained sample data as a data set; The third module is used to train a pre-trained language model based on the data set, and verify the trained pre-trained language model to obtain a keyword scheme generation model.

7. The device according to claim 6, characterized in that The device also includes: The fourth module is used to input the basic information of the subject to be searched into the keyword scheme generation model to output the keyword scheme corresponding to the basic information of the subject to be searched.

8. The device according to claim 7, characterized in that The device also includes: The fifth module is used to perform a search based on the keyword scheme and a preset time period to obtain a search result corresponding to the basic information of the subject to be searched.

9. A computer-readable medium, characterized in that Computer readable instructions are stored thereon, and the computer readable instructions are executed by a processor to implement the method according to any one of claims 1 to 5.

10. A device for constructing a keyword scheme generation model, characterized in that: The device comprises: one or more processors; and A memory storing computer readable instructions which, when executed, cause the processor to perform the operations of the method as claimed in any one of claims 1 to 5.