Data query method and device, computer equipment, readable storage medium and program product

By using the text analysis model and label prediction layer in the intellectual property data search query system to generate label sequences and combining vector space models to determine label weights, the problem of insufficient semantic understanding of the existing system is solved, and more accurate data query and improved search efficiency are achieved.

CN119513333APending Publication Date: 2025-02-25SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411645665.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing artificial intelligence-based intellectual property data search query system has insufficient semantic understanding and lack of depth and breadth, which leads to the inability to accurately grasp the user's query intention, return results that do not match user needs, and affect search efficiency.

Method used

By obtaining the data query request, input the characterization model in the text analysis model for feature extraction, and generate high-dimensional representations; input the high-dimensional representation into the tag prediction layer to generate a tag sequence; use the vector space model to determine the weight of each tag in the tag sequence, generate the initial query results, and evaluate and optimize the results to generate the final data query results.

Benefits of technology

It realizes more accurate data query, improves search efficiency, can more accurately grasp user intentions, and returns accurate data that meets user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513333A_ABST
    Figure CN119513333A_ABST
Patent Text Reader

Abstract

The invention relates to a data query method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: acquiring a data query request; inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating high-dimensional representation; inputting the high-dimensional representation into a tag prediction layer in a text analysis model to generate a tag sequence; determining the weight of each label in the label sequence through a vector space model; generating an initial query result according to the weight and the tag sequence; and evaluating and optimizing the initial query result to generate a data query result. By adopting the method, the required data can be accurately searched, and the search efficiency of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data query method, device, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] An intellectual property information search and query system is a software or online platform specifically designed for retrieving and managing intellectual property, mainly including but not limited to patents, trademarks, copyrights and other related data. These systems are crucial to individuals and organizations engaged in research and development, innovation and intellectual property management because they provide the necessary tools to find prior art, avoid infringement, monitor competitor activities and develop intellectual property strategies.

[0003] The existing AI-based intellectual property information search and query system has insufficient semantic understanding and lacks sufficient depth and breadth during use, which makes the system unable to accurately grasp the actual intention of the user's query, and thus returns results that do not fully match the user's needs, resulting in the inability to provide accurate data that meets user needs, affecting the system's search efficiency. Summary of the invention

[0004] Based on this, it is necessary to provide a data query method, device, computer equipment, computer-readable storage medium and computer program product that can query more accurate data in response to the above technical problems.

[0005] In a first aspect, the present application provides a data query method, comprising:

[0006] Get information query request;

[0007] Inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0008] Inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0009] Determine the weight of each tag in the tag sequence by using a vector space model; generate an initial query result according to the weight and the tag sequence;

[0010] The initial query results are evaluated and optimized to generate data query results.

[0011] In one embodiment, the high-dimensional representation is input into a label prediction layer in a text analysis model to generate a label sequence, including:

[0012] Based on the high-dimensional representation, a conditional probability corresponding to the high-dimensional representation is generated; based on the conditional probability, a label sequence is generated.

[0013] In one embodiment, determining the weight of each tag in the tag sequence by using a vector space model includes:

[0014] Perform a query based on the tag sequence to obtain an initial document; determine the word frequency of all tags in the tag sequence in the initial document; determine the inverse document frequency of all tags in the tag sequence in the initial document; and determine the weight of each tag in the tag sequence based on the word frequency and the inverse document frequency.

[0015] In one embodiment, generating an initial query result according to the weight and the tag sequence includes:

[0016] According to the weights, each tag in the tag sequence is integrated to generate an integrated result; according to the integrated result, a tag statement is generated in combination with a Boolean operator; according to the tag statement, an initial query result is generated.

[0017] In one embodiment, generating an initial query result according to the label statement includes:

[0018] Based on the Boolean operators in the label statement and the labels corresponding to the Boolean operators, the documents are queried; the Boolean search operators include at least one of an AND operator, an OR operator and a NOT operator; the queried documents are sorted according to the weights of the labels as initial query results.

[0019] In one embodiment, training the representation model includes:

[0020] Acquire text data; randomly block words in the text data, and use the blocked text data as model input; use the unblocked text data as true labels; pre-train a representation model based on the model input and the labels; obtain a pre-trained representation model; acquire a data set; re-train the pre-trained representation model according to the data set to obtain a trained representation model.

[0021] In a second aspect, the present application also provides a data query device, comprising:

[0022] An acquisition module, used to obtain a data query request;

[0023] A representation module, used for inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0024] A prediction module, used to input the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0025] A query module, used to determine the weight of each tag in the tag sequence through a vector space model; and generate an initial query result according to the weight and the tag sequence;

[0026] The optimization module is used to evaluate and optimize the initial query results to generate data query results.

[0027] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0028] Get information query request;

[0029] Inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0030] Inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0031] Determine the weight of each tag in the tag sequence by using a vector space model; generate an initial query result according to the weight and the tag sequence;

[0032] The initial query results are evaluated and optimized to generate data query results.

[0033] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0034] Get information query request;

[0035] Inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0036] Inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0037] Determine the weight of each tag in the tag sequence by using a vector space model; generate an initial query result according to the weight and the tag sequence;

[0038] The initial query results are evaluated and optimized to generate data query results.

[0039] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0040] Get information query request;

[0041] Inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0042] Inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0043] Determine the weight of each tag in the tag sequence by using a vector space model; generate an initial query result according to the weight and the tag sequence;

[0044] The initial query results are evaluated and optimized to generate data query results.

[0045] The above-mentioned data query method, device, computer equipment, computer-readable storage medium and computer program product first obtain a data query request; then input the data query request into the representation model in the text analysis model, perform feature extraction, and generate a high-dimensional representation; input the high-dimensional representation into the label prediction layer in the text analysis model to generate a label sequence; then determine the weight of each label in the label sequence through a vector space model; generate an initial query result based on the weight and the label sequence; finally, evaluate and optimize the initial query result to generate a data query result. By generating a key label sequence through the text analysis model and the label prediction layer, and then using the vector space model to assign weights to each label in the label sequence, the required information can be accurately searched, thereby improving search efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0047] FIG1 is a schematic diagram of a flow chart of a data query method in one embodiment;

[0048] Figure 2 A flowchart of a data query method in one embodiment;

[0049] Figure 3 A schematic diagram of the structure of a data query device in one embodiment;

[0050] FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] In one embodiment, as shown in FIG1 , a data query method is provided. This embodiment is illustrated by applying the method to a terminal. It is understandable that the method can also be applied to a server, or to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0053] Step 102: Obtain a data query request.

[0054] The data query request is a data query statement input by the user.

[0055] Optionally, the material can be a document.

[0056] Exemplarily, a data query request input by a user is obtained.

[0057] Step 104: input the data query request into the representation model in the text analysis model to perform feature extraction and generate a high-dimensional representation.

[0058] Among them, the high-dimensional representation is the feature extracted by the representation model according to the data query request.

[0059] Optionally, the representation model in the text analysis model may be a BERT model (Bidirectional Encoder Representation from Transformers).

[0060] Exemplarily, the data query request is preprocessed, and then the preprocessed data query request is input into the BERT model in the text analysis model to perform feature extraction and generate a high-dimensional representation.

[0061] Step 106: input the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence.

[0062] Optionally, the label prediction layer in the text analysis model may be a discriminant probability model CRF (Conditional Random Field).

[0063] Exemplarily, the high-dimensional representation is input into the discriminant probability model CRF of the text analysis model to generate a label sequence.

[0064] Step 108: Determine the weight of each tag in the tag sequence through a vector space model; and generate an initial query result according to the weight and the tag sequence.

[0065] Exemplarily, a vector space model is used to generate a weight for each tag in a tag sequence, relevant documents are queried and the tags are sorted according to their importance, and an initial query result is generated.

[0066] Step 110, evaluating and optimizing the initial query results to generate data query results.

[0067] Exemplarily, the documents in the query results are sorted according to the user's previous access to the documents in the query results, and the documents that better meet the user's requirements are placed at the top.

[0068] The above-mentioned data query method, device, computer equipment, computer-readable storage medium and computer program product first obtain a data query request; then input the data query request into the representation model in the text analysis model, perform feature extraction, and generate a high-dimensional representation; input the high-dimensional representation into the label prediction layer in the text analysis model to generate a label sequence; then determine the weight of each label in the label sequence through a vector space model; generate an initial query result based on the weight and the label sequence; finally, evaluate and optimize the initial query result to generate a data query result. By generating a key label sequence through the text analysis model and the label prediction layer, and then using the vector space model to assign weights to each label in the label sequence, the required information can be accurately searched, thereby improving search efficiency.

[0069] In an exemplary embodiment, the high-dimensional representation is input into a label prediction layer in a text analysis model to generate a label sequence, including:

[0070] Based on the high-dimensional representation, a conditional probability corresponding to the high-dimensional representation is generated; based on the conditional probability, a label sequence is generated.

[0071] For example, based on high-dimensional representation , generating the corresponding conditional probability , based on the conditional probability, generate a label sequence.

[0072] in, The tags extracted to represent the model, i.e. keywords, are the labels corresponding to The conditional probability of .

[0073] In this embodiment, by assigning a probability to each tag, removing irrelevant tags, retaining relevant tags, and generating a tag sequence, the scope of the query can be narrowed and the search efficiency can be increased.

[0074] In an exemplary embodiment, determining the weight of each tag in the tag sequence by using a vector space model includes:

[0075] Perform a query based on the tag sequence to obtain an initial document; determine the word frequency of all tags in the tag sequence in the initial document; determine the inverse document frequency of all tags in the tag sequence in the initial document; and determine the weight of each tag in the tag sequence based on the word frequency and the inverse document frequency.

[0076] Exemplarily, all documents containing at least one tag in the tag sequence are queried to generate an initial document set; the term frequency (TF) of each tag in the tag sequence in the initial document set is calculated as follows:

[0077]

[0078] Where t represents a tag in the tag sequence. The inverse document frequency (IDF) of each tag in the tag sequence in the initial document set is calculated as follows:

[0079]

[0080] Determine the weight of each tag based on word frequency and inverse document frequency The calculation of is as follows:

[0081]

[0082] This determines the weight of each label in the label sequence.

[0083] In this embodiment, the weight of each tag is calculated by the word frequency and inverse document frequency of each tag, which can further distinguish the importance of different tags in the tag sequence, making it easier to find the required documents accurately in the subsequent search.

[0084] In an exemplary embodiment, generating an initial query result according to the weight and the tag sequence includes:

[0085] According to the weights, each tag in the tag sequence is integrated to generate an integrated result; according to the integrated result, a tag statement is generated in combination with a Boolean operator; according to the tag statement, an initial query result is generated.

[0086] Exemplarily, based on the weights and the meanings of each tag, the importance of different tags is distinguished and it is identified whether different tags have the same meaning; the distinction results, identification results and Boolean operators are combined to generate a tag statement for query; based on the tag statement, the initial document is queried to generate initial results, and the initial results are sorted according to the weights of each tag, placing documents that the user needs more in the front position, and the sorted initial results are used as the initial query results.

[0087] In this embodiment, initial results are generated by using tag sequences and tag weights and are sorted according to the weights to obtain initial query results, so that more accurate and important documents can be obtained, thereby improving the user's information query efficiency.

[0088] In an exemplary embodiment, generating an initial query result according to the label statement includes:

[0089] Based on the Boolean operators in the label statement and the labels corresponding to the Boolean operators, the documents are queried; the Boolean search operators include at least one of an AND operator, an OR operator and a NOT operator; the queried documents are sorted according to the weights of the labels as initial query results.

[0090] Among them, the label statement includes any number of Boolean operators; the AND operator indicates that the two words connected by AND must exist in the retrieved document at the same time; the OR operator indicates that any one of the two words connected by OR must exist in the retrieved document; the NOT operator indicates that the retrieved document cannot contain the word after NOT.

[0091] When searching for documents, the search is performed in order of priority of the Boolean operators, with NOT having the highest priority, followed by AND, and finally OR.

[0092] Exemplarily, according to the priority of the Boolean operators in the tag statement and the related tags, the related documents are searched as the initial query result.

[0093] In this embodiment, by searching for documents through Boolean operators in tag statements, more accurate document search results can be obtained.

[0094] In an exemplary embodiment, the training of the representation model includes:

[0095] Acquire text data; randomly block words in the text data, and use the blocked text data as model input; use the unblocked text data as true labels; pre-train a representation model based on the model input and the labels; obtain a pre-trained representation model; acquire a data set; re-train the pre-trained representation model according to the data set to obtain a trained representation model.

[0096] Exemplarily, a large amount of text data is obtained, and some words are blocked by random masking of the text data. The masked text data is used as the input of the model, and the unmasked text data is used as the true label to pre-train the representation model to obtain a pre-trained representation model; then a data set is obtained, and the representation model is retrained according to the data set to obtain a trained representation model.

[0097] In this embodiment, pre-training is performed by using a large amount of random text data, and then the pre-trained model is retrained according to specific tasks, which can effectively solve the problem of weak model performance caused by insufficient data.

[0098] In an exemplary embodiment, a document query request input by a user is obtained. The document query request is preprocessed, and then the preprocessed document query request is input into a representation model in a text analysis model to extract features and generate a high-dimensional representation. The high-dimensional representation is input into a prediction layer of the text analysis model. , generating the corresponding conditional probability , generate a tag sequence based on conditional probability. Query all documents that contain at least one tag in the tag sequence to generate an initial document set; calculate the term frequency (TF) of each tag in the tag sequence in the initial document set, as shown below:

[0099]

[0100] Where t represents a tag in the tag sequence. The inverse document frequency (IDF) of each tag in the tag sequence in the initial document set is calculated as follows:

[0101]

[0102] Determine the weight of each tag based on word frequency and inverse document frequency The calculation of is as follows:

[0103]

[0104] Thus, the weight of each label in the label sequence is determined. According to the weight and the meaning of each label, the importance of different labels is distinguished and whether different labels have the same meaning is identified; the distinction result, the identification result and the Boolean operator are combined to generate a label statement for query, and the label statement includes any number of AND operators, OR operators and NOT operators; according to the Boolean operators and labels in the label statement, the search conditions are determined, and documents that meet the search conditions are generated as initial results. The initial results are sorted according to the weights of each label, and the documents that the user needs more are placed in the front position, and the sorted initial results are used as the initial query results. Among them, the training method of the representation model is: obtain a large amount of text data, and use a random masking method to mask part of the vocabulary of the text data, use the masked text data as the input of the model, use the unmasked text data as the real label, pre-train the representation model, and obtain a pre-trained representation model; then obtain a data set, retrain the representation model according to the data set, and obtain a trained representation model.

[0105] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0106] In an exemplary embodiment, Figure 3 As shown, a data query device is provided, including: an acquisition module, a characterization module, a prediction module, a query module and an optimization module, wherein:

[0107] An acquisition module, used to obtain a data query request;

[0108] A representation module, used for inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0109] A prediction module, used to input the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0110] A query module, used to determine the weight of each tag in the tag sequence through a vector space model; and generate an initial query result according to the weight and the tag sequence;

[0111] The optimization module is used to evaluate and optimize the initial query results to generate data query results.

[0112] In one embodiment, the prediction module is further configured to:

[0113] Based on the high-dimensional representation, a conditional probability corresponding to the high-dimensional representation is generated; based on the conditional probability, a label sequence is generated.

[0114] In one embodiment, the query module is further used to:

[0115] Perform a query based on the tag sequence to obtain an initial document; determine the word frequency of all tags in the tag sequence in the initial document; determine the inverse document frequency of all tags in the tag sequence in the initial document; and determine the weight of each tag in the tag sequence based on the word frequency and the inverse document frequency.

[0116] In one embodiment, the query module is further used to:

[0117] According to the weights, each tag in the tag sequence is integrated to generate an integrated result; according to the integrated result, a tag statement is generated in combination with a Boolean operator; according to the tag statement, an initial query result is generated.

[0118] In one embodiment, the query module is further used to:

[0119] Based on the Boolean operators in the label statement and the labels corresponding to the Boolean operators, the documents are queried; the Boolean search operators include at least one of an AND operator, an OR operator and a NOT operator; the queried documents are sorted according to the weights of the labels as initial query results.

[0120] In one embodiment, the characterization module is further configured to:

[0121] Acquire text data; randomly block words in the text data, and use the blocked text data as model input; use the unblocked text data as true labels; pre-train a representation model based on the model input and the labels; obtain a pre-trained representation model; acquire a data set; re-train the pre-trained representation model according to the data set to obtain a trained representation model.

[0122] Each module in the above-mentioned data query device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0123] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG4. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store document query result data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data query method is implemented.

[0124] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0125] Get information query request;

[0126] Inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0127] Inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0128] Determine the weight of each tag in the tag sequence by using a vector space model; generate an initial query result according to the weight and the tag sequence;

[0129] The initial query results are evaluated and optimized to generate data query results.

[0130] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0131] Based on the high-dimensional representation, a conditional probability corresponding to the high-dimensional representation is generated; based on the conditional probability, a label sequence is generated.

[0132] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0133] Perform a query based on the tag sequence to obtain an initial document; determine the word frequency of all tags in the tag sequence in the initial document; determine the inverse document frequency of all tags in the tag sequence in the initial document; and determine the weight of each tag in the tag sequence based on the word frequency and the inverse document frequency.

[0134] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0135] According to the weights, each tag in the tag sequence is integrated to generate an integrated result; according to the integrated result, a tag statement is generated in combination with a Boolean operator; according to the tag statement, an initial query result is generated.

[0136] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0137] Based on the Boolean operators in the label statement and the labels corresponding to the Boolean operators, the documents are queried; the Boolean search operators include at least one of an AND operator, an OR operator and a NOT operator; the queried documents are sorted according to the weights of the labels as initial query results.

[0138] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0139] Acquire text data; randomly block words in the text data, and use the blocked text data as model input; use the unblocked text data as true labels; pre-train a representation model based on the model input and the labels; obtain a pre-trained representation model; acquire a data set; re-train the pre-trained representation model according to the data set to obtain a trained representation model.

[0140] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0141] Get information query request;

[0142] Inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0143] Inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0144] Determine the weight of each tag in the tag sequence by using a vector space model; generate an initial query result according to the weight and the tag sequence;

[0145] The initial query results are evaluated and optimized to generate data query results.

[0146] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0147] Based on the high-dimensional representation, a conditional probability corresponding to the high-dimensional representation is generated; based on the conditional probability, a label sequence is generated.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0149] Perform a query based on the tag sequence to obtain an initial document; determine the word frequency of all tags in the tag sequence in the initial document; determine the inverse document frequency of all tags in the tag sequence in the initial document; and determine the weight of each tag in the tag sequence based on the word frequency and the inverse document frequency.

[0150] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0151] According to the weights, each tag in the tag sequence is integrated to generate an integrated result; according to the integrated result, a tag statement is generated in combination with a Boolean operator; according to the tag statement, an initial query result is generated.

[0152] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0153] Based on the Boolean operators in the label statement and the labels corresponding to the Boolean operators, the documents are queried; the Boolean search operators include at least one of an AND operator, an OR operator and a NOT operator; the queried documents are sorted according to the weights of the labels as initial query results.

[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0155] Acquire text data; randomly block words in the text data, and use the blocked text data as model input; use the unblocked text data as true labels; pre-train a representation model based on the model input and the labels; obtain a pre-trained representation model; acquire a data set; re-train the pre-trained representation model according to the data set to obtain a trained representation model.

[0156] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0157] Get information query request;

[0158] Inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation;

[0159] Inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence;

[0160] Determine the weight of each tag in the tag sequence by using a vector space model; generate an initial query result according to the weight and the tag sequence;

[0161] The initial query results are evaluated and optimized to generate data query results.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0163] Based on the high-dimensional representation, a conditional probability corresponding to the high-dimensional representation is generated; based on the conditional probability, a label sequence is generated.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] Perform a query based on the tag sequence to obtain an initial document; determine the word frequency of all tags in the tag sequence in the initial document; determine the inverse document frequency of all tags in the tag sequence in the initial document; and determine the weight of each tag in the tag sequence based on the word frequency and the inverse document frequency.

[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0167] According to the weights, each tag in the tag sequence is integrated to generate an integrated result; according to the integrated result, a tag statement is generated in combination with a Boolean operator; according to the tag statement, an initial query result is generated.

[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0169] Based on the Boolean operators in the label statement and the labels corresponding to the Boolean operators, the documents are queried; the Boolean search operators include at least one of an AND operator, an OR operator and a NOT operator; the queried documents are sorted according to the weights of the labels as initial query results.

[0170] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0171] Acquire text data; randomly block words in the text data, and use the blocked text data as model input; use the unblocked text data as true labels; pre-train a representation model based on the model input and the labels; obtain a pre-trained representation model; acquire a data set; re-train the pre-trained representation model according to the data set to obtain a trained representation model.

[0172] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0173] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0174] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A data query method, characterized in that: The method comprises: Get information query request; Inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation; Inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence; Determine the weight of each tag in the tag sequence by using a vector space model; generate an initial query result according to the weight and the tag sequence; The initial query results are evaluated and optimized to generate data query results.

2. The method according to claim 1, characterized in that The step of inputting the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence includes: Based on the high-dimensional representation, a conditional probability corresponding to the high-dimensional representation is generated; based on the conditional probability, a label sequence is generated.

3. The method according to claim 1, characterized in that Determining the weight of each tag in the tag sequence by using a vector space model includes: Perform a query based on the tag sequence to obtain an initial document; Determine the word frequency of all tags in the tag sequence in the initial document; determine the inverse document frequency of all tags in the tag sequence in the initial document; Based on the term frequency and the inverse document frequency, a weight of each tag in the tag sequence is determined.

4. The method according to claim 1, characterized in that Generating an initial query result according to the weight and the tag sequence includes: Integrate each tag in the tag sequence according to the weight to generate an integration result; Generate a label statement based on the integration result and in combination with Boolean operators; An initial query result is generated according to the label statement.

5. The method according to claim 4, characterized in that Generating an initial query result according to the label statement includes: Querying documents based on the Boolean operators in the tag statement and the tags corresponding to the Boolean operators; the Boolean search operators include at least one of an AND operator, an OR operator, and a NOT operator; According to the weight of the tag, the queried documents are sorted as the initial query result.

6. The method according to claim 1, characterized in that The training of the representation model includes: Acquire text data; randomly block words in the text data, and use the blocked text data as model input; use the unblocked text data as true labels; pre-train a representation model based on the model input and the labels; and obtain a pre-trained representation model; Acquire a data set; and retrain the pre-trained representation model according to the data set to obtain a trained representation model.

7. A data query device, characterized in that: The device comprises: An acquisition module, used to obtain a data query request; A representation module, used for inputting the data query request into a representation model in a text analysis model, performing feature extraction, and generating a high-dimensional representation; A prediction module, used to input the high-dimensional representation into a label prediction layer in a text analysis model to generate a label sequence; A query module, used to determine the weight of each tag in the tag sequence through a vector space model; and generate an initial query result according to the weight and the tag sequence; The optimization module is used to evaluate and optimize the initial query results to generate data query results.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.