Data acquisition method, device, apparatus and storage medium

By receiving natural language query text on mobile terminals and using knowledge graphs and word segmentation to transform it into structured query language, the problem of low data acquisition efficiency for users on mobile terminals is solved, achieving efficient and accurate data acquisition.

CN115203367BActive Publication Date: 2026-05-29BEIJING SANKUAI ONLINE TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SANKUAI ONLINE TECH CO LTD
Filing Date
2022-06-30
Publication Date
2026-05-29

Smart Images

  • Figure CN115203367B_ABST
    Figure CN115203367B_ABST
Patent Text Reader

Abstract

The application discloses a data acquisition method and device, equipment and a storage medium, and belongs to the field of artificial intelligence. A data query request sent by a terminal based on a search page is received, and the data query request includes a query text based on natural language; synonym replacement is performed on part of words in the query text based on a knowledge graph to obtain a replacement text; multiple word segmentation processing is performed on the replacement text; a word segmentation sequence with a probability value in a front specified number of positions is screened from the obtained multiple word segmentation sequences; the probability value is used to measure the rationality of a word segmentation result of the corresponding word segmentation sequence; the screened word segmentation sequence is subjected to conversion processing to obtain multiple structured sentences; based on the multiple structured sentences, multiple confirmation texts based on natural language are returned to the terminal; data is acquired based on a target structured sentence, and the acquired data is returned to the terminal as a search result; and the target structured sentence is matched with the confirmation text selected by the terminal. The application can improve data acquisition efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, and in particular to a data acquisition method, apparatus, device, and storage medium. Background Technology

[0002] Natural Language Processing (NLP) is an important research area in the field of artificial intelligence. With the rapid development of network technology, NLP technology is being applied in various scenarios. For example, in data analysis, Software-as-a-Service (SaaS) Business Intelligence (SaaSBI) platforms can use NLP technology to retrieve data from databases and return it to users so that they can perform data analysis and make business decisions.

[0003] The relevant technologies predefine a series of reports with different themes for users to view. If the existing reports cannot meet the user's data needs, the SaaS BI platform allows users to select report metrics and report dimensions from the report metric set and report dimension set respectively by checking boxes, and then obtain the data required by the user based on the selected report metrics and report dimensions.

[0004] However, when existing reports fail to meet user data needs, data acquisition efficiency is low because users need to perform a series of complex operations to select report metrics and dimensions. This is especially true for users on mobile devices, where the limited operating area makes it difficult to perform precise selections of report metrics and dimensions. Therefore, a new data acquisition method is urgently needed to improve data acquisition efficiency. Summary of the Invention

[0005] This application provides a data acquisition method, apparatus, device, and storage medium, which can improve data acquisition efficiency. The technical solution is as follows:

[0006] On the one hand, a data acquisition method is provided, the method comprising:

[0007] The receiving terminal sends a data query request based on the search page, and the data query request includes query text based on natural language;

[0008] Based on a knowledge graph of the target domain, synonym replacement is performed on some words in the query text to obtain the replacement text; wherein, the target domain is consistent with the domain to which the query text belongs;

[0009] The replaced text is subjected to various word segmentation processes to obtain multiple word segmentation sequences;

[0010] Among the multiple word segmentation sequences, the word segmentation sequences with the highest probability values ​​ranking within a specified number of positions are selected; wherein, the probability values ​​are used to measure the reasonableness of the word segmentation results of the corresponding word segmentation sequences;

[0011] The word segmentation sequence of the specified number of positions is transformed to obtain multiple structured statements based on the structured query language;

[0012] Based on the multiple structured statements, multiple confirmation texts based on natural language are returned to the terminal;

[0013] Data is obtained based on a target structured statement, and the obtained data is returned to the terminal as a search result; wherein the target structured statement matches the confirmation text selected by the terminal.

[0014] In some possible implementations, the step of filtering the word segmentation sequences whose probability values ​​rank first by a specified number of positions from the plurality of word segmentation sequences includes:

[0015] A report that identifies the associations between each word segmentation sequence in the plurality of word segmentation sequences;

[0016] The probability value of each word segmentation sequence is determined based on the language model and the report associated with each word segmentation sequence; wherein, the language model is obtained by retraining the first pre-trained model based on the first sample corpus, and the first pre-trained model is obtained by pre-training the first model;

[0017] The multiple word segmentation sequences are sorted in descending order of probability value;

[0018] Based on the obtained sorting results, the word segmentation sequences with the highest probability values ​​are selected from the multiple word segmentation sequences.

[0019] In some possible implementations, for any given word segmentation sequence, the report associated with the word segmentation sequence includes one or more of the following:

[0020] In response to a word in the word segmentation sequence matching the report topic of a first report, the first report is a report associated with the word segmentation sequence;

[0021] In response to the matching of words in the word segmentation sequence with the report metrics of the second report, the second report is a report associated with the word segmentation sequence;

[0022] In response to the matching of words in the word segmentation sequence with the report dimensions of the third report, the third report is a report associated with the word segmentation sequence.

[0023] In some possible implementations, the transformation of the segmented sequence of the specified number of bits to obtain multiple structured statements based on a structured query language includes:

[0024] For any given word segmentation sequence, determine the report element category to which the words in the word segmentation sequence belong;

[0025] Replace the words in the word segmentation sequence with the category labels of the corresponding report element categories to obtain the word segmentation sequence template;

[0026] The word segmentation sequence template is transformed based on the structured sentence generation model to obtain a sentence template based on the structured query language; wherein, the structured sentence generation model is obtained by retraining the second pre-trained model based on the second sample corpus, and the second pre-trained model is obtained by pre-training the second model;

[0027] Based on the report associated with the word segmentation sequence, the corresponding report element values ​​are inserted at the respective category label positions in the sentence template to obtain a structured statement based on the structured query language.

[0028] In some possible implementations, the method further includes:

[0029] Return a report associated with each of the multiple segmentation sequences to the terminal; or,

[0030] Return a report associated with the segmented sequence of the specified number of bits to the terminal; or,

[0031] Return a report associated with the word segmentation sequence corresponding to the target structured statement to the terminal.

[0032] In some possible implementations, the step of retrieving data based on the target structured statement and returning the retrieved data as a search result to the terminal includes:

[0033] Based on the target structured statement, data is obtained from the report associated with the word segmentation sequence corresponding to the target structured statement;

[0034] The target report is generated based on the acquired data and the target report template, and the target report is returned to the terminal as a search result.

[0035] On the other hand, a data acquisition method is provided, the method comprising:

[0036] Display a search page, and send a data query request to the server based on the search page. The data query request includes query text based on natural language.

[0037] The server is used to perform synonym replacement on some words in the query text based on a knowledge graph of the target domain to obtain replacement text; wherein the target domain is consistent with the domain to which the query text belongs; the replacement text is subjected to various word segmentation processes to obtain multiple word segmentation sequences; the word segmentation sequences with the highest probability values ​​among the multiple word segmentation sequences are selected; wherein the probability values ​​are used to measure the rationality of the word segmentation results of the corresponding word segmentation sequences; the word segmentation sequences with the highest probability values ​​are transformed to obtain multiple structured statements based on a structured query language;

[0038] Receive multiple confirmation texts based on natural language returned by the server, wherein the multiple confirmation texts are obtained based on the multiple structured statements;

[0039] Display the plurality of confirmation texts; in response to the selection operation of any confirmation text among the plurality of confirmation texts, send the selected confirmation text to the server;

[0040] The data returned by the server based on the target structured statement is displayed; wherein the target structured statement matches the selected confirmation text.

[0041] On the other hand, a data acquisition device is provided, the device comprising:

[0042] The receiving module is configured to receive data query requests sent by the terminal based on the search page, wherein the data query requests include query text based on natural language.

[0043] The first processing module is configured to perform synonym replacement on some words in the query text based on the knowledge graph of the target domain to obtain the replacement text; wherein the target domain is consistent with the domain to which the query text belongs;

[0044] The second processing module is configured to perform various word segmentation processes on the replacement text to obtain multiple word segmentation sequences; and to filter the word segmentation sequences with the highest probability values ​​among the multiple word segmentation sequences; wherein the probability values ​​are used to measure the rationality of the word segmentation results of the corresponding word segmentation sequences.

[0045] The third processing module is configured to transform the word segmentation sequence of the specified number of positions to obtain multiple structured statements based on the structured query language.

[0046] The sending module is configured to return multiple confirmation texts based on natural language to the terminal based on the multiple structured statements;

[0047] The retrieval module is configured to retrieve data based on the target structured statement;

[0048] The sending module is further configured to return the acquired data as a search result to the terminal; wherein the target structured statement matches the confirmation text selected by the terminal.

[0049] In some possible implementations, the second processing module is configured as follows:

[0050] A report that identifies the associations between each word segmentation sequence in the plurality of word segmentation sequences;

[0051] The probability value of each word segmentation sequence is determined based on the language model and the report associated with each word segmentation sequence; wherein, the language model is obtained by retraining the first pre-trained model based on the first sample corpus, and the first pre-trained model is obtained by pre-training the first model;

[0052] The multiple word segmentation sequences are sorted in descending order of probability value;

[0053] Based on the obtained sorting results, the word segmentation sequences with the highest probability values ​​are selected from the multiple word segmentation sequences.

[0054] In some possible implementations, for any given word segmentation sequence, the report associated with the word segmentation sequence includes one or more of the following:

[0055] In response to a word in the word segmentation sequence matching the report topic of a first report, the first report is a report associated with the word segmentation sequence;

[0056] In response to the matching of words in the word segmentation sequence with the report metrics of the second report, the second report is a report associated with the word segmentation sequence;

[0057] In response to the matching of words in the word segmentation sequence with the report dimensions of the third report, the third report is a report associated with the word segmentation sequence.

[0058] In some possible implementations, the third processing module is configured as follows:

[0059] For any given word segmentation sequence, determine the report element category to which the words in the word segmentation sequence belong;

[0060] Replace the words in the word segmentation sequence with the category labels of the corresponding report element categories to obtain the word segmentation sequence template;

[0061] The word segmentation sequence template is transformed based on the structured sentence generation model to obtain a sentence template based on the structured query language; wherein, the structured sentence generation model is obtained by retraining the second pre-trained model based on the second sample corpus, and the second pre-trained model is obtained by pre-training the second model;

[0062] Based on the report associated with the word segmentation sequence, the corresponding report element values ​​are inserted at the respective category label positions in the sentence template to obtain a structured statement based on the structured query language.

[0063] In some possible implementations, the sending module is further configured as follows:

[0064] Return a report associated with each of the multiple segmentation sequences to the terminal; or,

[0065] Return a report associated with the segmented sequence of the specified number of bits to the terminal; or,

[0066] Return a report associated with the word segmentation sequence corresponding to the target structured statement to the terminal.

[0067] In some possible implementations, the acquisition module is configured to acquire data from a report associated with the word segmentation sequence corresponding to the target structured statement, based on the target structured statement; and generate a target report based on the acquired data and the target report template.

[0068] The sending module is configured to return the target report as a search result to the terminal.

[0069] On the other hand, a data acquisition device is provided, the device comprising:

[0070] The display module is configured to display the search page;

[0071] The sending module is configured to send a data query request to the server based on the search page, wherein the data query request includes query text based on natural language.

[0072] The server is used to perform synonym replacement on some words in the query text based on a knowledge graph of the target domain to obtain replacement text; wherein the target domain is consistent with the domain to which the query text belongs; the replacement text is subjected to various word segmentation processes to obtain multiple word segmentation sequences; the word segmentation sequences with the highest probability values ​​among the multiple word segmentation sequences are selected; wherein the probability values ​​are used to measure the rationality of the word segmentation results of the corresponding word segmentation sequences; the word segmentation sequences with the highest probability values ​​are transformed to obtain multiple structured statements based on a structured query language;

[0073] The receiving module is configured to receive multiple confirmation texts based on natural language returned by the server, the multiple confirmation texts being obtained based on the multiple structured statements;

[0074] The display module is also configured to display the plurality of confirmation texts;

[0075] The sending module is further configured to send the selected confirmation text to the server in response to the selection operation of any confirmation text among the plurality of confirmation texts;

[0076] The display module is further configured to display data returned by the server based on a target structured statement; wherein the target structured statement matches the selected confirmation text.

[0077] On the other hand, a computer device is provided, the device including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to implement the above-described data acquisition method.

[0078] On the other hand, a computer-readable storage medium is provided, wherein at least one piece of program code is stored in the storage medium, the at least one piece of program code being loaded and executed by a processor to implement the above-described data acquisition method.

[0079] On the other hand, a computer program product is provided, which includes computer program code stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to perform the data acquisition method described above.

[0080] In this embodiment, data acquisition requires only a user to input natural language query text and perform a simple confirmation operation on the search page, eliminating the need for complex and nuanced operations such as selecting report metrics and dimensions, resulting in high data acquisition efficiency. In other words, this embodiment provides a search engine-like data acquisition method, avoiding complex steps and allowing users to quickly and easily acquire data, even on mobile devices, ensuring high data acquisition efficiency.

[0081] In detail, after receiving a data query request from the terminal based on the search page, a series of processes are performed, including word segmentation, word sequence sorting, structured statement conversion, and returning multiple confirmation texts based on natural language to the terminal. This allows for the parsing of the target structured statement that matches the user's data retrieval intent based on the user's input query text, thereby enabling data retrieval based on the target structured statement. Specifically, the target structured statement matches the confirmation text selected by the user; that is, this embodiment returns multiple confirmation texts for user confirmation, and data retrieval is completed based on the user's confirmation results. This data acquisition method improves data acquisition efficiency while ensuring data accuracy. Furthermore, before word segmentation, a knowledge graph is used to perform synonym replacement on the query text to bridge the understanding gap between the user and the platform, better understanding the diverse expressions of the user. This processing method can accurately retrieve the data that the user cares about. Attached Figure Description

[0082] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0083] Figure 1 This is a schematic diagram illustrating the implementation environment of a data acquisition method according to an exemplary embodiment;

[0084] Figure 2 This is a flowchart illustrating a data acquisition method according to an exemplary embodiment;

[0085] Figure 3 This is a flowchart illustrating another data acquisition method according to an exemplary embodiment;

[0086] Figure 4 This is a schematic diagram of a report according to an exemplary embodiment;

[0087] Figure 5 This is a schematic diagram illustrating a word segmentation sequence sorting according to an exemplary embodiment;

[0088] Figure 6 This is a schematic diagram illustrating an SQL prediction according to an exemplary embodiment;

[0089] Figure 7 This is a schematic diagram illustrating a search page according to an exemplary embodiment;

[0090] Figure 8 This is a schematic diagram illustrating another search page according to an exemplary embodiment;

[0091] Figure 9 This is a schematic diagram illustrating another search page according to an exemplary embodiment;

[0092] Figure 10 This is a schematic diagram of the structure of a data acquisition device according to an exemplary embodiment;

[0093] Figure 11 This is a schematic diagram of the structure of another data acquisition device according to an exemplary embodiment;

[0094] Figure 12 This is a schematic diagram of the structure of a computer device according to an exemplary embodiment. Detailed Implementation

[0095] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0096] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items that have essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor does it limit the quantity or execution order. It should also be understood that although the following description uses the terms "first," "second," etc., to describe various elements, these elements should not be limited by the terms.

[0097] These terms are simply used to distinguish one element from another. For example, without departing from the various examples, the first element can be referred to as the second element, and similarly, the second element can be referred to as the first element. Both the first and second elements can be elements, and in some cases, they can be separate and distinct elements.

[0098] "At least one" refers to one or more elements. For example, at least one element can be one element, two elements, three elements, or any integer number of elements greater than or equal to one. "Multiple" refers to two or more elements. For example, multiple elements can be two elements, three elements, or any integer number of elements greater than or equal to two.

[0099] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0100] The implementation environment of the data acquisition method provided in the embodiments of this application is described below.

[0101] Figure 1 This is a schematic diagram illustrating the implementation environment of a data acquisition method according to an exemplary embodiment.

[0102] The implementation environment includes a terminal 101 and a server 102. The terminal 101 and server 102 are connected via a network. For example, the terminal 101 displays a search page, which includes a search box and a search control. After a user enters natural language-based query text in the search box, the search control is triggered. In response to the triggering of the search control, the terminal 101 sends a data query request to the server 102, which includes the natural language-based query text. Upon receiving the query text, the server 102 queries relevant data and returns it to the terminal 101.

[0103] In some possible implementations, terminal 101 can be a smartphone, an in-vehicle terminal integrated with the vehicle, etc., but is not limited to these. Figure 1 This example uses the 101 smartphone as an illustration.

[0104] In other possible implementations, terminal 101 generally refers to one of multiple devices; this application embodiment only uses terminal 101 as an example. Those skilled in the art will understand that the number of terminals 101 can be greater. For example, there may be dozens or hundreds, or even more, terminals 101. In this case, the implementation environment of the data acquisition method also includes other terminals. This application embodiment does not limit the number or type of terminals.

[0105] In some other possible implementations, server 102 can be a standalone physical server or a server cluster consisting of multiple physical servers; this application does not impose any restrictions on this.

[0106] In some other possible implementations, server 102 is a SaaS BI platform. This application proposes a data acquisition method applied to a SaaS BI platform. The user asks a question in natural language, that is, the user inputs a query text based on natural language. The SaaS BI platform can help the user find relevant reports among many reports and recommend relevant reports to the user by parsing the query text; or, it can flexibly extract data according to the conditions described in the query text and generate reports on demand based on the extracted data. This application does not impose any restrictions here.

[0107] In this application embodiment, report search is implemented, which provides a data acquisition method similar to a search engine. Users can locate the corresponding report by searching for report indicators, report dimensions or report topics of interest, just like using a search engine.

[0108] In addition, this application embodiment also realizes self-service data retrieval. Even users who do not understand the relevant technical expertise can retrieve data from the report database by entering query text based on natural language, avoiding complicated operation steps, making it convenient for users to retrieve data quickly. It can also be easily operated on mobile terminals, with high data acquisition efficiency.

[0109] Furthermore, this application's embodiments can also understand ambiguous terms. Typically, there are differences between the user's language system and the SaaS BI platform's language system. For example, the commonly used term "flow rate" corresponds to "actual revenue" in the SaaS BI platform. Moreover, the report database of the SaaS BI platform often contains a massive number of reports, making it difficult for users to quickly locate the data they are interested in. Therefore, this application's embodiments utilize accumulated industry knowledge graphs to bridge the understanding gap between users and the platform, in order to correctly retrieve the data that users care about.

[0110] In summary, the data acquisition method provided in this application can efficiently help users locate the required report among numerous reports or flexibly retrieve data based on user-described conditions, thereby facilitating quick data acquisition, such as quickly obtaining daily operational indicators. Furthermore, the data acquisition method provided in this application can be applied to report search and self-service data retrieval scenarios across various industries.

[0111] The data acquisition method provided in the embodiments of this application will be explained in detail below.

[0112] Figure 2 This is a flowchart illustrating a data acquisition method according to an exemplary embodiment, wherein the execution subject of the data acquisition method is a computer device, such as... Figure 1 The server in [the context]. See [the source]. Figure 2 The data acquisition method includes the following steps:

[0113] 201. The server receives a data query request sent by the terminal based on the search page. The data query request includes query text based on natural language.

[0114] Natural language (NL) usually refers to a language that evolves naturally with culture; for example, Chinese, English, and Japanese are all examples of natural languages.

[0115] In this embodiment, the terminal displays a search page, which includes a search box and a search control. The user enters natural language-based query text in the search box, triggering the search control. In response to the triggering of the search control, the terminal sends a data query request to the server, which includes the user-input query text. That is, the user can complete report searches and self-service data retrieval simply by entering query text, just like using a search engine. The query text can be a word or a sentence, etc., and this application does not impose any limitations. For example, if the query text is a sentence, it could be "Which stores had operating revenue exceeding 1000 yesterday?"

[0116] 202. The server performs synonym replacement on some words in the query text based on the knowledge graph of the target domain to obtain the replacement text; wherein the target domain is consistent with the domain to which the query text belongs.

[0117] This step involves preprocessing the query text input by the user. Typically, there is a difference between the user's language system and the SaaS BI platform's language system. To help users quickly locate the data they are interested in, this embodiment utilizes accumulated industry knowledge graphs to bridge the understanding gap between users and the platform, thereby accurately retrieving the data the user cares about.

[0118] The aforementioned terms refer to words with corresponding synonyms in the knowledge graph of the target domain. This step converts industry terms understood by the user into professional terminology that can be understood by the platform. After identifying these terms in the query text, the corresponding synonyms in the knowledge graph are used to replace these terms, thus completing the synonym replacement and obtaining the replaced text.

[0119] In some possible implementations, preprocessing the user-input query text may also include removing spaces and punctuation marks, etc., which is not limited in this application. Furthermore, if none of the words in the query text have synonyms in the knowledge graph of the target domain, then step 202 can be skipped and step 203 can be executed directly.

[0120] 203. The server performs various word segmentation processes on the replacement text, resulting in multiple word segmentation sequences.

[0121] In some possible implementations, the replacement text can be segmented in multiple ways based on different word segmentation algorithms to obtain multiple word segmentation sequences. This application does not impose any restrictions on this.

[0122] The first point to clarify is that regardless of the word segmentation algorithm used, the replacement text is divided into a sequence of words (also called word segments) through word segmentation. For example, if the replacement text is "Which stores had operating revenue exceeding 1000 yesterday?", one possible word segmentation result would be: yesterday, operating, revenue, greater than, 1000, of, stores, have, which.

[0123] In some other possible implementations, after obtaining the word segmentation sequence, this embodiment of the application will also perform Named Entity Recognition (NER) on the words in each word segmentation sequence to identify the words obtained after word segmentation as predefined categories. For example, the predefined categories include [report, metric, dimension, dimension value, condition], where the above categories are also referred to as report element categories in this document, meaning that each of the above [report, metric, dimension, dimension value, condition] belongs to a report element. Furthermore, "report" here usually refers to the report topic, i.e., identifying whether the words obtained after word segmentation belong to the report topic; "metric" and "dimensional" refer to report metrics and report dimensions. The reason for listing "dimensional" and "dimensional value" separately is that in some scenarios, both "dimensional" and "dimensional value" appear simultaneously in a sentence. For example, for the sentence "How is the operating income of each store in City A?", City A belongs to the dimension value, while "stores" belongs to the dimension. Additionally, the "dimensional" category includes the time dimension; and the value greater than 1000 is considered a condition.

[0124] The second point to note is that NER identification can extract the report information associated with the above-mentioned word segmentation sequences, thus associating each word segmentation sequence with a relevant report. That is, for each word segmentation sequence, this embodiment of the application groups the [reports, metrics, dimensions, dimension values, conditions] identified in the word segmentation sequence according to their respective reports, thereby associating the word segmentation sequence with the relevant report.

[0125] In other possible implementations, for any given word segmentation sequence, in response to a word in the segmentation sequence matching the report topic of a first report in the report database, the first report is identified as the report associated with the word segmentation sequence; or, in response to a word in the segmentation sequence matching the report metrics of a second report in the report database, the second report is identified as the report associated with the word segmentation sequence; or, in response to a word in the segmentation sequence matching the report dimensions of a third report in the report database, the third report is identified as the report associated with the word segmentation sequence. Here, "first," "second," and "third" are merely used to distinguish different reports and do not constitute any other limitation.

[0126] In some other possible implementations, after performing NER recognition on the segmented sequence, the corresponding category labels can be used to replace the corresponding segments, thus obtaining another form of segmented sequence, which is also referred to as a segmented sequence template in this paper. For example, for any segmented sequence, the report element category to which the words in the segmented sequence belong is determined; the words in the segmented sequence are replaced with the category labels of the corresponding report element categories to obtain the segmented sequence template.

[0127] Taking the sentence "How is the operating income of each store in City A?" as an example, one possible word segmentation method is "How is the operating income of each store in City A?", where "City A" is a dimension value, "stores" is a dimension, and "operating income" is an indicator. The category label of the dimension value can be "dimension.value", the category label of the dimension can be "dimension", and the category label of the indicator can be "measure". Therefore, the corresponding word segmentation sequence template can be "[dimension.value]how is the [measure] of each [dimension]?", which is not limited in this application.

[0128] 204. The server selects the word segmentation sequences with the highest probability values ​​from multiple word segmentation sequences, where the probability value is used to measure the rationality of the word segmentation results of the corresponding word segmentation sequences.

[0129] This step involves sorting the aforementioned multiple word segmentation sequences. For example, in this embodiment, the word segmentation results are filtered based on their reasonableness to obtain several word segmentation sequences. These filtered word segmentation sequences correspond to the word segmentation sequences whose probability values ​​rank within a specified number of positions.

[0130] 205. The server performs transformation processing on the segmented sequence of the first specified number of characters to obtain multiple structured statements based on the structured query language.

[0131] This step involves predicting the Structured Query Language (SQL) statement, which means feeding the segmented word sequences with higher probability values ​​into a structured statement generation model to predict the corresponding SQL statement. For example, this structured statement generation model is a deep learning model, such as the Text2SQL model.

[0132] 206. The server returns multiple confirmation texts based on natural language to the terminal based on multiple structured statements.

[0133] This step translates the SQL statements generated in the previous step into natural language confirmation text that the user can understand. Multiple confirmation texts are generated based on multiple SQL statements; that is, one confirmation text corresponds to one structured statement. The terminal, after receiving multiple confirmation texts from the server, is responsible for displaying these texts so that the user can select the one that best suits their needs.

[0134] For example, the terminal may display these confirmation texts as a pop-up window on the search page; or, the terminal may also display these confirmation texts in the target area of ​​the search page, which is not limited herein.

[0135] 207. The server retrieves data based on the target structured statement and returns the retrieved data as a search result to the terminal; wherein the target structured statement matches the confirmation text selected by the terminal.

[0136] This step involves determining the confirmation text selected by the user, executing the corresponding SQL statement to retrieve data, and returning the data results to the terminal. For example, the retrieved data could be data from a specific report metric, which may appear in one or more reports.

[0137] In this embodiment, data acquisition requires only a user to input natural language query text and perform a simple confirmation operation on the search page, eliminating the need for complex and nuanced operations such as selecting report metrics and dimensions, resulting in high data acquisition efficiency. In other words, this embodiment provides a search engine-like data acquisition method, avoiding complex steps and allowing users to quickly and easily acquire data, even on mobile devices, ensuring high data acquisition efficiency.

[0138] In detail, after receiving a data query request from the terminal based on the search page, a series of processes are performed, including word segmentation, word sequence sorting, structured statement conversion, and returning multiple confirmation texts based on natural language to the terminal. This allows the system to parse the user's query text using a combination of rule-based algorithms and deep learning to extract a target structured statement that matches the user's data retrieval intent, thereby enabling data retrieval based on the target structured statement. Specifically, the target structured statement matches the confirmation text selected by the user; that is, this embodiment returns multiple confirmation texts for user confirmation, and data retrieval is completed based on the user's confirmation results. This data acquisition method improves data acquisition efficiency while ensuring data accuracy. Furthermore, before word segmentation, a knowledge graph is used to perform synonym replacement on the query text to bridge the understanding gap between the user and the platform, better understanding the diverse expressions of the user. This processing method can accurately retrieve the data that the user cares about.

[0139] The above has been approved. Figure 2 The corresponding embodiments briefly describe the data acquisition method provided in the embodiments of this application. The following is a brief description of the data acquisition method provided in the embodiments of this application. Figure 3 The corresponding embodiments provide a detailed description of the data acquisition method provided in the embodiments of this application.

[0140] Figure 3 This is a flowchart illustrating another data acquisition method according to an exemplary embodiment, taking the interaction between a terminal and a server as an example. See [link to flowchart]. Figure 3 The data acquisition method includes the following steps:

[0141] 301. The terminal displays a search page and sends a data query request to the server based on the search page. The data query request includes query text based on natural language.

[0142] This step is the same as step 201 above, and will not be repeated here.

[0143] 302. The server performs synonym replacement on some words in the query text based on the knowledge graph of the target domain to obtain the replacement text; wherein the target domain is consistent with the domain to which the query text belongs.

[0144] This step is the same as step 202 above, and will not be repeated here.

[0145] 303. The server performs various word segmentation processes on the replacement text, resulting in multiple word segmentation sequences.

[0146] This step is the same as step 203 above, and will not be repeated here.

[0147] 304. The server selects the word segmentation sequence with the highest probability value from multiple word segmentation sequences, where the probability value is used to measure the rationality of the word segmentation result of the corresponding word segmentation sequence.

[0148] This step involves selecting the word segmentation sequences with the highest probability values ​​from a report linking the language model and the segmentation sequences. In some possible implementations, this involves filtering the word segmentation sequences from multiple sequences based on their probability values, ranking within a specified number of positions. This includes, but is not limited to, the following methods:

[0149] 3041. Determine the reports associated with each word segmentation sequence; determine the probability value of each word segmentation sequence based on the language model and the reports associated with each word segmentation sequence.

[0150] In this embodiment of the application, the language model is used to give the probability that each word segmentation sequence conforms to the user's language habits. In layman's terms, the language model is responsible for giving the probability that each word segmentation sequence speaks like a human.

[0151] For example, the language model is obtained by retraining the first pre-trained model based on the first sample corpus. Here, retraining means fine-tuning the first pre-trained model using its own dataset (the first sample corpus), while the first pre-trained model is a model pre-trained on a general dataset. In addition, to distinguish it from model pre-training mentioned later, the model pre-training here is also referred to as the first model pre-training.

[0152] In some other possible implementations, reports associated with the segmented sequences are used to adjust the probability values ​​of the corresponding segmented sequences output by the language model. For example, assuming a segmented sequence is not associated with any report, the probability value of that segmented sequence output by the language model is reduced.

[0153] 3042. Sort multiple word segmentation sequences in descending order of probability value; based on the sorting results, select the word segmentation sequences with the highest probability values ​​among the multiple word segmentation sequences.

[0154] The following example illustrates the sorting of word segmentation sequences.

[0155] For example, taking the sentence "Which stores had operating revenue exceeding 1000 yesterday?" as an example, during the word segmentation process, "operating revenue," as a report indicator, is likely to be segmented into two words: "operating" and "revenue." Both "operating" and "revenue" are identified as report indicators, and "operating" is associated with two reports, namely... Figure 4 The reports shown are 1 and 2, and the "Revenue" section is associated with... Figure 4 Taking Report 2 as an example, since both are related to the "Operating Revenue" indicator in Report 1, the reasonable segmentation method should be "Operating Revenue," that is, segmenting "Operating Revenue" as a single word. Correspondingly, the language model will adjust the ranking of related word segments accordingly, increasing the probability value of the word segments segmented as "Operating Revenue," so that they are ranked higher. For example, Figure 5 One possible sorting method is given. That is, the probability of [Dimension][Report 1.Indicator] appearing is greater than the probability of [Dimension][Report 1.Indicator][Report 2.Indicator]. Here, [Report 1.Indicator] and [Report 2.Indicator] refer to the report information related to "Sales" and "Revenue". Figure 5 In the process, one word segmentation sequence segments "operating revenue" as a single word and associates it with Report 1; the other word segmentation sequence segments "operating revenue" as two separate words and associates them with two reports, namely Report 1 and Report 2.

[0156] In other possible implementations, if the user-input query text is only associated with one report—for example, if the query text matches the topic of that report—then that report is returned to the terminal for the user to view. If the query text is only associated with one report metric, then the report containing that metric is returned to the terminal for the user to view. If the query text is only associated with one report dimension, then the report containing that dimension is returned to the terminal for the user to view. For example, suppose the query text is "Sales," and it locates a report called "Sales Overview," then the "Sales Overview" report is returned to the terminal.

[0157] 305. The server performs transformation processing on the segmented sequence of the first specified number of characters to obtain multiple structured statements based on the structured query language.

[0158] This step involves SQL prediction. In some possible implementations, the segmented sequence of the first specified number of characters is transformed to obtain multiple structured statements based on a structured query language, including but not limited to the following methods:

[0159] 3051. For any word segmentation sequence, determine the report element category to which the words in the word segmentation sequence belong; replace the words in the word segmentation sequence with the category labels of the corresponding report element categories to obtain the word segmentation sequence template.

[0160] The first point to note is that if the word segmentation sequence template has already been obtained before executing step 305, this step can be skipped and step 3052 can be executed directly below.

[0161] 3052. Based on the structured sentence generation model, the word segmentation sequence template is transformed to obtain a sentence template based on the structured query language.

[0162] For example, the structured sentence generation model is obtained by retraining the second pre-trained model based on the second sample corpus. Here, retraining means fine-tuning the second pre-trained model using its own dataset (the second sample corpus), while the second pre-trained model is a model pre-trained on a general dataset. In addition, to distinguish it from the model pre-training mentioned earlier, the model pre-training here is also referred to as the second model pre-training.

[0163] In other possible implementations, generative models can be used to complete the Text2SQL task, requiring only corresponding training. For example, this generative model is the T5 model with an encoder-decoder structure, but this application does not impose any limitations. Using an encoder-decoder structure for SQL prediction allows for better utilization of the generalization capabilities of deep learning.

[0164] The following example illustrates the SQL prediction process.

[0165] As Figure 6 shown, the input of the model is a tokenized sequence template, and the output of the model is the corresponding SQL structure. Exemplarily, taking the sentence "Which stores had operating income exceeding 1000 yesterday" as an example, after tokenization, the corresponding tokenized sequence template can be "[dimension.value] each [dimension]". After the model performs the Text2SQL conversion process, the model can predict an SQL structure similar to the following: SELECT [measure], [dimension] WHERE

[0166] ${dimension.value}.name = [dimension.value] GROUP BY dimension

[0167] 3053. According to the report associated with the tokenized sequence, insert the corresponding report element values at the positions of each category label in the sentence pattern template to obtain a structured statement based on the Structured Query Language.

[0168] Among them, after obtaining the SQL structure, the next step is to combine it with the report associated with the tokenized sequence to assign specific report element values to the positions belonging to the category labels in the SQL structure. Exemplarily, in the associated report, the city is specifically City A. Therefore, in the above SQL structure, measure = operating income, dimension = store, dimension.value = City A. Therefore, the above SQL structure can be transformed into the finally executable SQL statement "SELECT operating income, store WHERE city = City A GROUP BY store"

[0169] 306. The server returns multiple confirmation texts based on natural language to the terminal based on multiple structured statements.

[0170] This step is the same as step 206 above, and will not be elaborated here.

[0171] 307. The terminal displays multiple confirmation texts; in response to a selection operation on any of the multiple confirmation texts, send the selected confirmation text to the server.

[0172] This step is the same as step 207 above, and will not be elaborated here.

[0173] 308. The server obtains data based on the target structured statement and returns the obtained data as a search result to the terminal; where the target structured statement matches the confirmation text selected by the terminal.

[0174] In some possible implementations, reports can be generated on demand based on the acquired data, and the acquired data can be returned to the terminal in report form. Alternatively, data can be acquired based on a target structured statement, and the acquired data can be returned to the terminal as search results. This includes: acquiring data from reports associated with the word segmentation sequence corresponding to the target structured statement; generating a target report based on the acquired data and a target report template; and returning the target report as a search result to the terminal. The target report template can be a template automatically matched by the server based on the acquired data; this application does not impose any restrictions on this.

[0175] 309. The terminal displays data returned by the server in the form of search results.

[0176] For example, the terminal may display search results as a pop-up window on the search page; or the terminal may display search results in the target area of ​​the search page, which is not limited herein.

[0177] in, Figure 7 The self-service data retrieval process is illustrated. After the user enters the query text "What was yesterday's operating revenue?", the server retrieves the data through steps 301-308 and returns the data under the relevant indicators to the terminal. The terminal then displays the data under the relevant indicators, thus ending the data retrieval process.

[0178] The self-service data retrieval process has been described above. In addition, this application embodiment can also realize report search and return relevant reports to the terminal, that is, realize report location. As mentioned above, NER recognition can parse out the report information associated with the segmented sequences obtained after word segmentation processing, so that each segmented sequence is associated with a relevant report. Exemplarily, this application embodiment also includes: returning reports associated with each segmented sequence in multiple segmented sequences to the terminal; or, returning reports associated with the segmented sequences of a specified number of positions to the terminal; or, returning reports associated with the segmented sequence corresponding to the target structured statement to the terminal. Exemplarily, Figure 8 The diagram illustrates the report locating process. After the user enters the query text "in-store orders," the server locates the relevant reports and returns them to the terminal, which then displays the reports. This completes the report locating process. Figure 9 This demonstrates the report locating and self-service data retrieval process. After the user enters the query text "average revenue per order before discount," the server locates the relevant report and retrieves the data under the relevant indicators, then returns it to the terminal, which displays the relevant report and the data under the relevant indicators. Here, "average revenue per order before discount" refers to the average revenue per order before the discount.

[0179] In this embodiment, data acquisition requires only a user to input natural language query text and perform a simple confirmation operation on the search page, eliminating the need for complex and nuanced operations such as selecting report metrics and dimensions, resulting in high data acquisition efficiency. In other words, this embodiment provides a search engine-like data acquisition method, avoiding complex steps and allowing users to quickly and easily acquire data, even on mobile devices, ensuring high data acquisition efficiency.

[0180] In detail, after receiving a data query request from the terminal based on the search page, a series of processes are performed, including word segmentation, word sequence sorting, structured statement conversion, and returning multiple confirmation texts based on natural language to the terminal. This allows the system to parse the user's query text using a combination of rule-based algorithms and deep learning to extract a target structured statement that matches the user's data retrieval intent, thereby enabling data retrieval based on the target structured statement. Specifically, the target structured statement matches the confirmation text selected by the user; that is, this embodiment returns multiple confirmation texts for user confirmation, and data retrieval is completed based on the user's confirmation results. This data acquisition method improves data acquisition efficiency while simultaneously ensuring data acquisition accuracy.

[0181] In addition, before performing word segmentation, the query text is replaced with synonyms using a knowledge graph to bridge the gap in understanding between users and the platform, and to better understand the diverse ways users express themselves. This approach can accurately retrieve the data that users care about.

[0182] In addition, the embodiments of this application implement report search, that is, provide a data acquisition method similar to a search engine. Users can locate the corresponding report by searching for report indicators, report dimensions or report topics of interest, just like using a search engine.

[0183] In summary, this application's embodiments decompose the final goal into multi-stage tasks using a pipeline approach, and incorporate a knowledge graph accumulated with industry knowledge into the process. This enables data acquisition through a combination of rule-based algorithms and deep learning, resulting in stronger interpretability and transferability. This data acquisition method can efficiently help users locate the required reports among numerous reports or flexibly retrieve data based on user-described conditions, thus facilitating quick and easy data acquisition.

[0184] Figure 10 This is a schematic diagram illustrating the structure of a data acquisition device according to an exemplary embodiment. See also: Figure 10 The device includes:

[0185] The receiving module 1001 is configured to receive a data query request sent by the terminal based on the search page, wherein the data query request includes query text based on natural language.

[0186] The first processing module 1002 is configured to perform synonym replacement on some words in the query text based on the knowledge graph of the target domain to obtain the replacement text; wherein the target domain is consistent with the domain to which the query text belongs;

[0187] The second processing module 1003 is configured to perform various word segmentation processes on the replacement text to obtain multiple word segmentation sequences; and to filter the word segmentation sequences with the probability values ​​ranking first by a specified number of positions from the multiple word segmentation sequences; wherein, the probability value is used to measure the rationality of the word segmentation results of the corresponding word segmentation sequences.

[0188] The third processing module 1004 is configured to perform transformation processing on the word segmentation sequence of the specified number of positions to obtain multiple structured statements based on the structured query language.

[0189] The sending module 1005 is configured to return multiple confirmation texts based on natural language to the terminal based on the multiple structured statements;

[0190] Module 1006 is configured to retrieve data based on the target structured statement.

[0191] The sending module 1005 is also configured to return the acquired data as a search result to the terminal; wherein the target structured statement matches the confirmation text selected by the terminal.

[0192] In this embodiment, data acquisition requires only a user to input natural language-based query text and perform a simple confirmation operation through the search page, eliminating the need for complex and detailed operations such as selecting report indicators and dimensions, resulting in high data acquisition efficiency. In other words, this embodiment provides a search engine-like data acquisition method, avoiding complex operational steps and allowing users to quickly and easily complete data acquisition, even on mobile terminals, ensuring high efficiency. Specifically, upon receiving a data query request from the terminal via the search page, a series of processes are performed, including word segmentation, word sequence sorting, structured statement conversion, and returning multiple confirmation texts based on natural language to the terminal. This allows for the parsing of the user's input query text to extract a target structured statement that matches the user's data retrieval intent, thereby enabling data retrieval based on the target structured statement. The target structured statement matches the user-selected confirmation text; that is, this embodiment returns multiple confirmation texts for user confirmation, and data retrieval is completed based on the user's confirmation results. This data acquisition method improves efficiency while ensuring accuracy. In addition, before performing word segmentation, the query text is replaced with synonyms using a knowledge graph to bridge the gap in understanding between users and the platform, and to better understand the diverse ways users express themselves. This approach can accurately retrieve the data that users care about.

[0193] In some possible implementations, the second processing module 1003 is configured as follows:

[0194] A report that identifies the associations between each word segmentation sequence in the plurality of word segmentation sequences;

[0195] The probability value of each word segmentation sequence is determined based on the language model and the report associated with each word segmentation sequence; wherein, the language model is obtained by retraining the first pre-trained model based on the first sample corpus, and the first pre-trained model is obtained by pre-training the first model;

[0196] The multiple word segmentation sequences are sorted in descending order of probability value;

[0197] Based on the obtained sorting results, the word segmentation sequences with the highest probability values ​​are selected from the multiple word segmentation sequences.

[0198] In some possible implementations, for any given word segmentation sequence, the report associated with the word segmentation sequence includes one or more of the following:

[0199] In response to a word in the word segmentation sequence matching the report topic of a first report, the first report is a report associated with the word segmentation sequence;

[0200] In response to the matching of words in the word segmentation sequence with the report metrics of the second report, the second report is a report associated with the word segmentation sequence;

[0201] In response to the matching of words in the word segmentation sequence with the report dimensions of the third report, the third report is a report associated with the word segmentation sequence.

[0202] In some possible implementations, the third processing module 1004 is configured as follows:

[0203] For any given word segmentation sequence, determine the report element category to which the words in the word segmentation sequence belong;

[0204] Replace the words in the word segmentation sequence with the category labels of the corresponding report element categories to obtain the word segmentation sequence template;

[0205] The word segmentation sequence template is transformed based on the structured sentence generation model to obtain a sentence template based on the structured query language; wherein, the structured sentence generation model is obtained by retraining the second pre-trained model based on the second sample corpus, and the second pre-trained model is obtained by pre-training the second model;

[0206] Based on the report associated with the word segmentation sequence, the corresponding report element values ​​are inserted at the respective category label positions in the sentence template to obtain a structured statement based on the structured query language.

[0207] In some possible implementations, the sending module 1005 is also configured as follows:

[0208] Return a report associated with each of the multiple segmentation sequences to the terminal; or,

[0209] Return a report associated with the segmented sequence of the specified number of bits to the terminal; or,

[0210] Return a report associated with the word segmentation sequence corresponding to the target structured statement to the terminal.

[0211] In some possible implementations, the acquisition module 1006 is configured to acquire data from the report associated with the word segmentation sequence corresponding to the target structured statement based on the target structured statement; and generate a target report based on the acquired data and the target report template.

[0212] The sending module 1005 is configured to return the target report as a search result to the terminal.

[0213] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.

[0214] Figure 11 This is a schematic diagram illustrating the structure of another data acquisition device according to an exemplary embodiment. See also... Figure 11 The device includes:

[0215] Display module 1101 is configured to display the search page;

[0216] The sending module 1102 is configured to send a data query request to the server based on the search page, wherein the data query request includes query text based on natural language.

[0217] The server is used to perform synonym replacement on some words in the query text based on a knowledge graph of the target domain to obtain replacement text; wherein the target domain is consistent with the domain to which the query text belongs; the replacement text is subjected to various word segmentation processes to obtain multiple word segmentation sequences; the word segmentation sequences with the highest probability values ​​among the multiple word segmentation sequences are selected; wherein the probability values ​​are used to measure the rationality of the word segmentation results of the corresponding word segmentation sequences; the word segmentation sequences with the highest probability values ​​are transformed to obtain multiple structured statements based on a structured query language;

[0218] The receiving module 1103 is configured to receive multiple confirmation texts based on natural language returned by the server, the multiple confirmation texts being obtained based on the multiple structured statements;

[0219] Display module 1101 is also configured to display the plurality of confirmation texts;

[0220] The sending module 1102 is also configured to send the selected confirmation text to the server in response to a selection operation of any confirmation text among the plurality of confirmation texts;

[0221] The display module 1101 is also configured to display data returned by the server based on a target structured statement; wherein the target structured statement matches the selected confirmation text.

[0222] In this embodiment, data acquisition requires only a user to input natural language-based query text and perform a simple confirmation operation through the search page, eliminating the need for complex and detailed operations such as selecting report indicators and dimensions, resulting in high data acquisition efficiency. In other words, this embodiment provides a search engine-like data acquisition method, avoiding complex operational steps and allowing users to quickly and easily complete data acquisition, even on mobile terminals, ensuring high efficiency. Specifically, upon receiving a data query request from the terminal via the search page, a series of processes are performed, including word segmentation, word sequence sorting, structured statement conversion, and returning multiple confirmation texts based on natural language to the terminal. This allows for the parsing of the user's input query text to extract a target structured statement that matches the user's data retrieval intent, thereby enabling data retrieval based on the target structured statement. The target structured statement matches the user-selected confirmation text; that is, this embodiment returns multiple confirmation texts for user confirmation, and data retrieval is completed based on the user's confirmation results. This data acquisition method improves efficiency while ensuring accuracy. In addition, before performing word segmentation, the query text is replaced with synonyms using a knowledge graph to bridge the gap in understanding between users and the platform, and to better understand the diverse ways users express themselves. This approach can accurately retrieve the data that users care about.

[0223] It should be noted that the data acquisition device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the data acquisition device and the data acquisition method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0224] Figure 12This is a schematic diagram of the structure of a computer device 1200 provided in an embodiment of this application. The computer 1200 can be a server. The computer device 1200 can vary significantly due to differences in configuration or performance, and may include one or more Central Processing Units (CPUs) 1201 and one or more memories 1202. The memories 1202 store at least one line of program code, which is loaded and executed by the processor 1201 to implement the data acquisition methods provided in the various method embodiments described above. Of course, the computer device 1200 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The computer device 1200 may also include other components for implementing device functions, which will not be elaborated upon here.

[0225] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including program code that can be executed by a processor in a computer device to complete the data acquisition method in the above embodiments. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0226] In an exemplary embodiment, a computer program product is also provided, which includes computer program code stored in a computer-readable storage medium. A processor of a computer device reads the computer program code from the computer-readable storage medium and executes the computer program code, causing the computer device to perform the data acquisition method described above.

[0227] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0228] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A data acquisition method, characterized in that, The method includes: The receiving terminal sends a data query request based on the search page, and the data query request includes query text based on natural language; Based on a knowledge graph of the target domain, synonym replacement is performed on some words in the query text to obtain the replacement text; wherein, the target domain is consistent with the domain to which the query text belongs; The replaced text is subjected to various word segmentation processes to obtain multiple word segmentation sequences; Among the multiple word segmentation sequences, the word segmentation sequences with the highest probability values ​​ranking within a specified number of positions are selected; wherein, the probability values ​​are used to measure the reasonableness of the word segmentation results of the corresponding word segmentation sequences; The word segmentation sequence of the specified number of positions is transformed to obtain multiple structured statements based on the structured query language; Based on the multiple structured statements, multiple confirmation texts based on natural language are returned to the terminal; Data is obtained based on a target structured statement, and the obtained data is returned to the terminal as a search result; wherein the target structured statement matches the confirmation text selected by the terminal; The step of filtering the word segmentation sequences whose probability values ​​rank within the first specified number of positions from the plurality of word segmentation sequences includes: A report that identifies the associations between each word segmentation sequence in the plurality of word segmentation sequences; The probability value of each word segmentation sequence is determined based on the language model and the report associated with each word segmentation sequence; wherein, the language model is obtained by retraining the first pre-trained model based on the first sample corpus, and the first pre-trained model is obtained by pre-training the first model; The multiple word segmentation sequences are sorted in descending order of probability value; based on the sorting results, the word segmentation sequences with the highest probability values ​​are selected from the multiple word segmentation sequences. For any given word segmentation sequence, the report associated with the word segmentation sequence includes one or more of the following: in response to a word in the word segmentation sequence matching the report topic of a first report, the first report is a report associated with the word segmentation sequence; in response to a word in the word segmentation sequence matching the report metrics of a second report, the second report is a report associated with the word segmentation sequence; in response to a word in the word segmentation sequence matching the report dimensions of a third report, the third report is a report associated with the word segmentation sequence.

2. The method according to claim 1, characterized in that, The transformation process of the segmented sequence of the specified number of positions yields multiple structured statements based on a structured query language, including: For any given word segmentation sequence, determine the report element category to which the words in the word segmentation sequence belong; Replace the words in the word segmentation sequence with the category labels of the corresponding report element categories to obtain the word segmentation sequence template; The word segmentation sequence template is transformed based on the structured sentence generation model to obtain a sentence template based on the structured query language; wherein, the structured sentence generation model is obtained by retraining the second pre-trained model based on the second sample corpus, and the second pre-trained model is obtained by pre-training the second model; Based on the report associated with the word segmentation sequence, the corresponding report element values ​​are inserted at the respective category label positions in the sentence template to obtain a structured statement based on the structured query language.

3. The method according to claim 1, characterized in that, The method further includes: Return a report associated with each of the multiple segmentation sequences to the terminal; or, return a report associated with the segmentation sequences preceding the specified number of positions to the terminal; or, return a report associated with the segmentation sequences corresponding to the target structured statement to the terminal.

4. The method according to claim 1, characterized in that, The process of acquiring data based on the target structured statement and returning the acquired data as a search result to the terminal includes: Based on the target structured statement, data is obtained from the report associated with the word segmentation sequence corresponding to the target structured statement; The target report is generated based on the acquired data and the target report template, and the target report is returned to the terminal as a search result.

5. A data acquisition device, characterized in that, The device includes: The receiving module is configured to receive data query requests sent by the terminal based on the search page, wherein the data query requests include query text based on natural language. The first processing module is configured to perform synonym replacement on some words in the query text based on the knowledge graph of the target domain to obtain the replacement text; wherein the target domain is consistent with the domain to which the query text belongs; The second processing module is configured to perform various word segmentation processes on the replacement text to obtain multiple word segmentation sequences; and to filter the word segmentation sequences with the highest probability values ​​among the multiple word segmentation sequences; wherein the probability values ​​are used to measure the rationality of the word segmentation results of the corresponding word segmentation sequences. The third processing module is configured to transform the word segmentation sequence of the specified number of positions to obtain multiple structured statements based on the structured query language. The sending module is configured to return multiple confirmation texts based on natural language to the terminal based on the multiple structured statements; The retrieval module is configured to retrieve data based on the target structured statement; The sending module is further configured to return the acquired data as a search result to the terminal; wherein the target structured statement matches the confirmation text selected by the terminal. The step of filtering the word segmentation sequences whose probability values ​​rank within the first specified number of positions from the plurality of word segmentation sequences includes: A report that identifies the associations between each word segmentation sequence in the plurality of word segmentation sequences; The probability value of each word segmentation sequence is determined based on the language model and the report associated with each word segmentation sequence; wherein, the language model is obtained by retraining the first pre-trained model based on the first sample corpus, and the first pre-trained model is obtained by pre-training the first model; The multiple word segmentation sequences are sorted in descending order of probability value; based on the sorting results, the word segmentation sequences with the highest probability values ​​are selected from the multiple word segmentation sequences. For any given word segmentation sequence, the report associated with the word segmentation sequence includes one or more of the following: in response to a word in the word segmentation sequence matching the report topic of a first report, the first report is a report associated with the word segmentation sequence; in response to a word in the word segmentation sequence matching the report metrics of a second report, the second report is a report associated with the word segmentation sequence; in response to a word in the word segmentation sequence matching the report dimensions of a third report, the third report is a report associated with the word segmentation sequence.

6. A computer device, characterized in that, The device includes a processor and a memory, the memory storing at least one line of program code, the at least one line of program code being loaded and executed by the processor to implement the data acquisition method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the data acquisition method as described in any one of claims 1 to 4.