Data query method, system, device, medium and product

CN123012250APending Publication Date: 2026-10-30CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611370042.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-04
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]然而,上述现有技术仍存在明显缺陷:基于页面解析的方案数据提取与分析的环节相互割裂,操作滞后且丢失了网页上下文信息;基于文本生成的方式缺乏数值精度保障,难以支撑需要准确计算的问数场景;而依赖预置数据库的方案则无法触达浏览器中动态加载或未入库的实时数据,这些缺陷都会导致数据查询结果的精准度下降,影响用户的数据查询体验

Benefits of technology

[0011]本公开实施例提供的数据查询方法、系统、设备、介质和产品,依托浏览器原生能力对当前展示页面完成多模态解析以构建包含字段语义、数据类型及关联关系的页面数据模型,无需预先将页面数据入库即可获得实时完整且保留上下文关联的页面数据基础;通过语义匹配识别自然语言查询中的歧义关键字并依托页面数据模型生成贴合页面真实数据的澄清候选策略,以引导式交互逐层厘清模糊查询意图,规避传统文本问答黑盒输出、数据匹配失准的缺陷,大幅提升查询指令精准度;最终将标准化查询指令集直接编译为DOM的原位可逆操作,在原始页面上完成页面显示内容修改操作可视化渲染,无需跳转新页面、导出搬运数据,实现所见即所查,全程数据处理在浏览器本地完成,兼顾数据实时性、查询精准度、交互直观性与数据隐私安全性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012250A_ABST
    Figure CN123012250A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of data processing, and particularly provides a data query method, system, device, medium and product. The method comprises: performing page analysis on a current display page to obtain a page data model of the current display page, performing semantic analysis on a natural language query input by a user to obtain a query keyword; matching the query keyword with data fields in the page data model to determine ambiguous query keywords, and generating at least one ambiguity decision strategy for each ambiguous query keyword based on the page data model, sequentially displaying the at least one ambiguity decision strategy, and generating a query instruction set according to a target ambiguity decision strategy determined by the user for each ambiguous query keyword, and performing a modification operation on a document object model structure of the current display page according to the query instruction set to display the query result of the natural language query in the current display page differently. The present disclosure improves the data query accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a data query method, system, device, medium and product. Background Technology

[0002] With the continuous development of web application technology, massive amounts of business data are presented directly to users in the form of dynamic tables, lists, etc. However, traditional web browsing modes only support static viewing or simple sorting. Users cannot perform complex queries and dynamic explorations on the data they see as if they were operating a database. As a result, the value of the data is difficult to be fully and timely mined and utilized on the browser side. In order to meet the above needs, intelligent data query systems have emerged.

[0003] The relevant technologies in the intelligent question-and-answer system mainly achieve dynamic data query through three modes: First, by parsing page information and sending it to backend tools for offline analysis to generate the content needed by the user; second, by using a general large language model to perform semantic understanding of web page content and generate natural language text for answering; and third, by building a text-to-structured query language (Text-to-SQL) system to translate user questions into database query statements for data retrieval.

[0004] However, the aforementioned existing technologies still have obvious drawbacks: the data extraction and analysis stages of page parsing-based solutions are disconnected, resulting in operational delays and loss of webpage context information; text-based methods lack numerical accuracy guarantees and are difficult to support scenarios requiring accurate calculations; and solutions relying on pre-built databases cannot access real-time data that is dynamically loaded in the browser or not yet stored in the database. These shortcomings all lead to a decrease in the accuracy of data query results and affect the user's data query experience. Summary of the Invention

[0005] This disclosure was made in view of the above problems. This disclosure provides a data query method, system, device, medium and product that improves the accuracy of data query.

[0006] According to a first aspect of this disclosure, a data query method is provided, comprising: performing page analysis on a currently displayed page to obtain a page data model of the currently displayed page, the page data model being used to characterize the semantic tags, data types, and relationships between data fields in the currently displayed page; performing semantic analysis on a natural language query input by a user to obtain query keywords; matching the query keywords with data fields in the page data model to determine ambiguous query keywords, and generating at least one ambiguity decision strategy for each ambiguous query keyword based on the page data model, wherein the ambiguous query keyword is a query keyword that cannot establish a unique correspondence with a data field in the page data model, and the ambiguity decision strategy refers to a candidate query scheme generated for the ambiguous query keyword and used to present to the user the precise query intent of clarifying the ambiguous query keyword; displaying at least one ambiguity decision strategy one by one, and generating a query instruction set according to the target ambiguity decision strategy determined by the user for each ambiguous query keyword, and performing a modification operation on the document object model structure of the currently displayed page according to the query instruction set, so as to distinguish and display the query results of the natural language query in the currently displayed page.

[0007] According to a second aspect of this disclosure, a data query system is provided, comprising: a page analysis module configured to perform page analysis on a currently displayed page to obtain a page data model of the currently displayed page, the page data model being used to characterize the semantic tags, data types, and relationships between data fields in the currently displayed page; a semantic analysis module configured to perform semantic analysis on a natural language query input by a user to obtain query keywords; and a relationship extraction module configured to match the query keywords with data fields in the page data model to determine ambiguous query keywords, and based on the page data model, generate at least one ambiguous relation for each ambiguous query keyword. Ambiguous decision-making strategies are used to identify query keywords that cannot be uniquely matched with data fields in the page's data model. These strategies are candidate query schemes generated for each ambiguous query keyword to clarify the user's precise query intent. The interaction guidance module is configured to display at least one ambiguous decision-making strategy and generate a query instruction set based on the target ambiguous decision-making strategy determined by the user for each ambiguous query keyword. The visual rendering module is configured to modify the document object model structure of the currently displayed page based on the query instruction set, thereby differentiating the natural language query results displayed on the current page.

[0008] According to a third aspect of this disclosure, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the method of the first aspect.

[0009] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the method of the first aspect.

[0010] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the method of the first aspect.

[0011] The data query method, system, device, medium, and product provided in this disclosure rely on the browser's native capabilities to perform multimodal parsing of the currently displayed page to construct a page data model that includes field semantics, data types, and relationships. This allows for the acquisition of a real-time, complete page data foundation that retains contextual relationships without the need to pre-store page data in a database. By identifying ambiguous keywords in natural language queries through semantic matching and generating clarifying candidate strategies that fit the actual page data based on the page data model, the system clarifies ambiguous query intentions layer by layer through guided interaction. This avoids the shortcomings of traditional text question-and-answer black-box output and inaccurate data matching, significantly improving the accuracy of query commands. Finally, the standardized query command set is directly compiled into in-situ reversible DOM operations, and the page display content modification operations are visualized and rendered on the original page without the need to jump to a new page or export and move data. This achieves what you see is what you get, and all data processing is completed locally in the browser, balancing data real-time performance, query accuracy, intuitive interaction, and data privacy and security.

[0012] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0013] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0014] Figure 1 This is a flowchart of a data query method according to an embodiment of the present disclosure.

[0015] Figure 2 This is a flowchart of a method for obtaining page data model according to an embodiment of this disclosure.

[0016] Figure 3 This is a schematic block diagram of the functional modules of the data query system according to an embodiment of the present disclosure.

[0017] Figure 4 This is a schematic diagram of a computer program product according to an embodiment of the present disclosure.

[0018] Figure 5 This is a hardware block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.

[0020] Intelligent data query systems are a type of human-computer interaction system designed to enable users to conveniently query and analyze data using natural language. With the increasing prevalence of web applications, massive amounts of business data are presented directly on browser pages in the form of dynamic tables and lists. Users, especially business personnel without technical backgrounds, need to quickly filter, analyze, and gain insights from this page data. However, traditional web page interaction modes such as pagination and simple search can no longer meet the needs for timely, complex, and personalized data queries. Users see the data, but cannot obtain answers as easily as they would from a database.

[0021] Among related technologies, the first is a rule-based or script-based web crawling and post-processing method. This method locates and extracts structural data from web pages, or extracts page data information through multimodal information such as the Document Object Model (DOM) structure and visual features. After encapsulation and storage, the data is processed offline by backend tools to generate the content needed by the user. The second is an intelligent question-answering method based on a large language model. Through a specific internal knowledge base, when a user asks a question, the system converts the question into a vector, retrieves the most relevant text fragments from the vector database, and generates natural language text from the large language model to provide the answer. The third is an intelligent question-answering method based on Text-to-SQL. This method translates natural language questions into Structured Query Language (SQL) queries and retrieves pre-stored structured data to provide the answer.

[0022] However, each of the above solutions still has significant shortcomings: the first approach separates data acquisition from analysis, resulting in operational delays and the extracted data being detached from the page context, losing any potential semantic connections; the second approach outputs results in text form, and while data questions require higher accuracy, the black-box, one-step answering method of large language models lacks numerical precision guarantees; the third approach is limited by a pre-configured backend database, making real-time queries impossible for data not yet stored, and the query results are often displayed in separate charts or new pages, detached from the original data environment. Clearly, these shortcomings all contribute to a decline in the accuracy, real-time performance, and user experience of data query results.

[0023] To address the aforementioned problems, this disclosure provides a data query scheme. Figure 1 A flowchart illustrating an exemplary embodiment of the present disclosure is shown. This data query method can be applied to electronic devices or data query systems including display devices, such as computers, tablets, or mobile phones. Figure 1 As shown, the method includes: Step S101: Perform page analysis on the currently displayed page to obtain the page data model of the currently displayed page. The page data model is used to represent the semantic tags, data types, and relationships between the data fields in the currently displayed page. Step S102: Perform semantic analysis on the natural language query input by the user to obtain query keywords; Step S103: Match the query keywords with the data fields in the page data model to determine ambiguous query keywords, and generate at least one ambiguous decision strategy for each ambiguous query keyword based on the page data model. Ambiguous query keywords are query keywords that cannot be uniquely matched with data fields in the page data model. Ambiguous decision strategies refer to candidate query schemes generated for ambiguous query keywords, which are used to show users the precise query intent of the ambiguous query keywords. Step S104: Display at least one ambiguity decision strategy one by one, generate a query instruction set based on the target ambiguity decision strategy determined by the user for each ambiguous query keyword, and perform modification operations on the document object model structure of the currently displayed page according to the query instruction set, so as to distinguish and display the query results of natural language queries in the current display page.

[0024] In summary, the data query method provided in this disclosure relies on the browser's native capabilities to perform multimodal parsing of the currently displayed page to construct a page data model that includes field semantics, data types, and relationships. This allows for the acquisition of a real-time, complete, and context-preserving page data foundation without pre-loading the page data into a database. By identifying ambiguous keywords in natural language queries through semantic matching and generating clarifying candidate strategies that fit the actual page data based on the page data model, the method uses guided interaction to clarify ambiguous query intentions layer by layer. This avoids the shortcomings of traditional text-based question-and-answer systems, such as black-box output and inaccurate data matching, significantly improving the accuracy of query commands. Finally, the standardized query command set is directly compiled into in-situ reversible DOM operations, enabling visual rendering of page content modification operations on the original page without requiring page redirection or data export / transfer. This achieves "what you see is what you get," with all data processing completed locally in the browser, balancing data real-time performance, query accuracy, intuitive interaction, and data privacy and security.

[0025] The following are Figure 1 The specific implementation methods of each step in the illustrated embodiment are described in detail below: In step S101, page analysis is performed on the currently displayed page to obtain the page data model of the currently displayed page.

[0026] In this embodiment of the disclosure, the currently displayed page is the web page currently displayed on the screen of an electronic device or a data query system. The page contains business data carried in the form of dynamic tables, lists, etc. The page data model is a model obtained by structurally abstracting the data in the currently displayed page. It is used to represent the semantic tags, data types, and relationships between the data fields in the currently displayed page.

[0027] In one alternative implementation, such as Figure 2 As shown, the process of performing page analysis on the currently displayed page to obtain the page data model of the currently displayed page includes: Step S201: Visually segment the currently displayed page to obtain multiple page partitions.

[0028] In this embodiment of the disclosure, the segmentation process of the currently displayed page can be based on the Vision-based Page Segmentation (VIPS) algorithm, the Vision-based Web Optimal Segmentation (VWOS) algorithm based on the idea of ​​graph optimal partitioning, the segmentation method of document object model tree structure, or a segmentation method combining visual features and document object model tree structure. Specifically, it can be determined based on actual needs, and this embodiment of the disclosure does not limit it. Page partitioning refers to: page region blocks that are visually coherent and semantically relatively independent after visual region segmentation of the currently displayed page.

[0029] In one optional implementation, the process of visually segmenting the currently displayed page using the VIPS algorithm to obtain multiple page partitions includes: traversing the document object model tree of the currently displayed page, creating a basic visual module for each visible node, and merging adjacent plain text or inline elements; obtaining all horizontal or vertical dividing lines within the current visual block, calculating the weight of each dividing line, and selecting the dividing line with the highest weight as the segmentation criterion; normalizing the weights according to the size of the current visual block to obtain the segmentation degree; and determining the segmentation degree (DOC) when it exceeds the segmentation degree threshold. At this point, the current visual block is divided into several sub-blocks along the dividing line with the highest weight, and the above segmentation process is recursively performed on each sub-block until the segmentation degree (DOC) of each sub-block is not greater than the segmentation degree threshold. This process yields multiple page partitions. Based on the VIPS algorithm, which simulates the human visual perception mechanism, the page is segmented according to visual continuity based on visual dividing lines, making the partitioning results more consistent with the user's intuitive understanding of content blocks. Simultaneously, by normalizing the segmentation degree and comparing it with a segmentation degree threshold, adaptive control of the segmentation granularity is achieved, avoiding over-segmentation or under-segmentation. Furthermore, recursive segmentation creates a hierarchical structure for the partitions, preserving the visual hierarchy of the page from the whole to the parts, providing a high-quality input foundation for subsequent multimodal feature extraction and semantic tag recognition.

[0030] It should be noted that, in this embodiment of the disclosure, the document object model tree is automatically parsed and generated by the browser based on the HyperText Markup Language (HTML) document structure when loading a webpage; specifically, after the browser requests and receives the HTML document of a webpage from the server, the browser's rendering engine parses the tags (such as <html>, <body>, <body>) in the HTML code line by line. (etc.), and according to the nesting relationship between tags, a tree structure is constructed in memory, which is the document object model tree; inline elements refer to page elements in the document object model tree that are displayed inline, do not force line breaks, and usually only occupy the width required for their own content; the preset segmentation threshold can be determined based on actual needs, and this disclosure embodiment does not limit it.

[0031] Step S202: Extract features from each page partition to obtain a fusion feature composed of at least two of the following: text features, visual features, and structural features. Based on the fusion feature of each page partition, determine the semantic label and corresponding data type of each data field in each page partition.

[0032] In this embodiment of the disclosure, structural features are used to characterize the position of page elements in the document object model tree and their structural relationships with other page elements; page elements are content carriers that display different types of information within a webpage, and can be various visual content units such as table cells, list items, and text blocks.

[0033] In an optional implementation, when the fusion features consist of text features, visual features, and structural features, the process of determining the semantic labels and corresponding data types of each data field in each page partition based on the fusion features of each page partition may include: extracting text features from page elements within each page partition. Visual features and structural features The features of the three modalities are then fused to obtain the fused features. The fused features are input into a classifier, which outputs semantic labels and corresponding data types for each data field within the page partition. Text features are extracted from the text content of the page partition, visual features are extracted from page color and font weight, and structural features are extracted from the document object model tree structure. By fusing features from these three modalities (text, visual, and structural), the business meaning of page elements can be comprehensively determined from multiple dimensions, improving the accuracy of semantic label recognition.

[0034] It should be noted that, in the embodiments of this disclosure, the classifier can be a machine learning classification model with low computational resource consumption and fast processing speed. For example, it can be a classifier based on logistic regression, a classifier based on decision trees, or a classifier model based on random forests. Specifically, it can be determined based on actual needs, and this embodiment of the disclosure does not limit it in this regard. The semantic tags of data fields refer to the results of naming and labeling the business meaning of each data field in the currently displayed page, which are used to explain the specific meaning that the data field represents in the business scenario.

[0035] Step S203: Extract the relationships between data fields in each page partition; In this embodiment of the disclosure, the association relationship includes at least one of computational association relationship, hierarchical association relationship, and operational association relationship; wherein, computational association relationship refers to the functional dependency relationship formed between data fields in the page through mathematical operations (such as addition, subtraction, multiplication, and division); hierarchical association relationship refers to the parent-child relationship formed between data fields or page elements in the page through visual indentation or DOM nesting structure; and operational association relationship refers to the correspondence between summary rows and detailed data rows in the page through aggregation operations (such as summation and average).

[0036] In one optional implementation, the process of extracting the relationships between data fields in each page partition may include: combining all numerical fields within the page partition to obtain multiple field groups, each field group including at least three fields; then, for each field group, taking each field in the field group as a result field and the other fields in the field group except for the result fields as relation fields, and constructing multiple candidate relation functions with the relation fields as input and the result fields as output using a variety of preset candidate function types; further, randomly selecting several rows of data, and matching the selected rows of data with the fields in the field groups. The corresponding field values ​​are used as a set of validation data for this field group. For each candidate relation function, the field values ​​of the relation fields in each set of validation data are substituted into the candidate relation function to obtain the field values ​​to be validated. Based on the field values ​​to be validated and the actual result field values ​​in the validation data, the error value of the candidate relation function on each set of validation data is determined, and the average relative error and standard deviation of the error associated with the candidate relation function are determined based on multiple error values. The relation confidence score is calculated based on the average relative error and standard deviation of the error. When the relation confidence score is greater than the relation confidence score threshold, the candidate relation function is determined as the calculated association relationship of this field group and stored.

[0037] In the process of extracting and calculating relationships described above, on the one hand, by combining all numerical fields within the page partitions and constructing candidate relationship functions one by one using multiple candidate function types for each field group, the hidden mathematical dependencies in the page data are proactively discovered and automatically extracted. On the other hand, by randomly selecting several rows of data for verification and calculating the average relative error and error standard deviation, the reliability of each candidate relationship function can be quickly evaluated with limited computational overhead. Furthermore, through quantitative evaluation and threshold screening of relationship confidence scores, it is ensured that only highly reliable computational relationships are stored, effectively avoiding the incorrect storage of false relationships caused by data coincidence. The automatic identification and storage of computational relationships between data fields in the page is realized, providing a basis for the calculation of derived indicators involved in subsequent user queries, without the need for manual pre-configuration or reliance on external business knowledge bases, thus improving the automation level of data model construction and the accuracy of intelligent querying.

[0038] The confidence score of the relationship is calculated based on the mean relative error and the standard deviation of the error. ;(Formula 1) In Formula 1, The average relative error, The standard deviation of the error. The confidence score for the relationship.

[0039] It should be noted that, in this embodiment of the disclosure, the relationship confidence score threshold can be determined based on actual needs, and this embodiment of the disclosure does not limit it; the relationship confidence score refers to: a quantitative score of the degree of confidence in a certain assumed mathematical operation relationship between page data fields. The higher the score, the greater the probability that the assumed relationship is true.

[0040] For example, in a sales data table, if there are three numeric fields within a page section: "Unit Price," "Sales Volume," and "Total Price," these three fields are combined into a field group. "Total Price" is used as the result field, and "Unit Price" and "Sales Volume" are used as relation fields. A candidate relation function is constructed using a multiplication function type: Total Price = Unit Price × Sales Volume. Five rows of data are randomly selected as validation data. The values ​​of "Unit Price" and "Sales Volume" in each row are substituted into the candidate relation function to obtain the total value to be validated, which is then compared with the actual total value. The average relative error of the five rows of data is considered as a factor. Approaching 0, standard deviation of error If the score also approaches 0, then the confidence score of the relationship is... If the value approaches 1 and exceeds the relationship confidence score threshold, the candidate relationship function: total price = unit price × sales volume is determined as the relationship to be calculated and stored.

[0041] Understandably, it is also necessary to use "unit price" as the result field, "total price" and "sales volume" as the relation fields, and "sales volume" as the result field, "unit price" and "total price" as the relation fields, and perform the above verification process to determine the true and reliable calculation relationship between the three fields of "unit price", "sales volume" and "total price".

[0042] In one optional implementation, the process of extracting the relationships between data fields in each page partition may include: obtaining the nesting depth of each page element in the document object model tree and the visual indentation of each page element; then, based on the visual indentation of each page element, clustering the page elements with the same parent node in the page partition by indentation value to obtain the indentation level to which each page element belongs, and the indentation cluster center depth corresponding to each indentation level; wherein, when among multiple page elements in the page partition, the indentation cluster center depth of the indentation level to which the first page element belongs is greater than the indentation cluster center depth of the indentation level to which the second page element belongs, and it is determined based on the nesting depth that the first page element belongs to the descendant of the second page element in the document object model tree, the second page element is determined as the parent page element, and the first page element is determined as the descendant of the second page element. A page element is identified as a child element, and a hierarchical relationship between parent and child page elements is established. By combining visual indentation clustering of page elements with nesting depth of the Document Object Model (DOM) tree for dual verification, accurate identification of parent-child hierarchical relationships in page data is achieved. Visual indentation reflects the visual hierarchy of page elements, while nesting depth verifies the parent-child relationship between elements from a document structure perspective. The two mutually corroborate each other, and a hierarchical relationship is established only when the indentation cluster center depth comparison result is consistent with the DOM descendant relationship, effectively avoiding misjudgments caused by relying solely on visual styles or document structure. This achieves accurate identification of hierarchical relationships in page data, providing precise data range definition for subsequent queries involving hierarchical aggregation, and improving the page data model's ability to express complex hierarchical data structures.

[0043] It should be noted that, in the embodiments disclosed herein, nesting depth refers to the hierarchical depth of a page element in the document object model tree, that is, the number of nodes traversed from the root node of the document object model tree to the page element node; visual indentation refers to the horizontal offset distance of a page element relative to its parent container or sibling elements after the page element is rendered by the browser, which is usually quantized in pixels.

[0044] For example, in a regional sales table, there are three page elements: "East China," "Shanghai," and "Nanjing" within the page partition. After obtaining the visual indentation of each page element, it is found that the visual indentation of "East China" is 0px, while the visual indentation of "Shanghai" and "Nanjing" is 20px. Clustering the indentation values ​​of these three page elements with the same parent node, it is found that "East China" belongs to indentation level 0 (indentation cluster center depth is 0px), while "Shanghai" and "Nanjing" belong to indentation level 1 (indentation cluster center depth is 20px). At the same time, the DOM nesting depth of each page element is obtained to determine that "Shanghai" is a descendant of "East China" in the DOM tree. Since the indentation cluster center depth of "Shanghai" (20px) is greater than that of "East China" (0px), and "Shanghai" is a descendant of "East China" in the DOM tree, "East China" is determined as the parent page element and "Shanghai" is determined as the child page element. The hierarchical relationship between "East China" and "Shanghai" is constructed and stored.

[0045] In one optional implementation, the process of extracting the relationships between data fields in each page partition may include: for each page partition, detecting whether the cell text in the table within that page partition contains an operation keyword field (such as "total", "sum", or "Average"); determining the keyword hit parameter based on the detection results of the operation keyword fields in the table within the page partition; and, if the table contains an operation keyword field, performing calculations on the field values ​​of all other field value rows in each column of the table except for the row containing the operation keyword field, using the operation method indicated by the operation keyword field (such as summation, average, etc.) to obtain the data to be verified; then, based on the relationship between the data fields in the table and the table... The data consistency parameter value for each column is determined by considering the data to be verified associated with each column in the table, as well as the field value of the row containing the operation keyword field. Furthermore, a visual style difference parameter is determined based on the visual comparison results (such as differences in background color, font weight, and border style) between the row containing the operation keyword field and other rows in the table. A weighted calculation is then performed based on the keyword hit parameter, the data consistency parameter value for each column, and the visual style difference parameter to obtain the relationship confidence score. If the relationship confidence score is greater than the relationship confidence score threshold, an operational relationship is generated based on the operation method indicated by the operation keyword field, the columns in the table where the operation method can be applied, and the rows in the columns where the operation method can be applied.

[0046] In the process of extracting operational relationships, a triple verification mechanism of keyword detection, numerical consistency verification, and visual style difference comparison was used to achieve automatic identification and storage of relationships in summary rows on the page. Keyword detection provides initial semantic clues, numerical consistency verification verifies the authenticity of operational relationships from a data logic perspective, and visual style difference comparison provides auxiliary judgment criteria from a presentation perspective. The three mechanisms corroborate and complement each other, effectively avoiding misjudgments caused by single-dimensional judgments and significantly improving the accuracy and robustness of summary row identification. In particular, when the relationship confidence exceeds the threshold, the corresponding operation method, applicable columns, and applicable rows in each column of the summary row are accurately recorded, enabling subsequent operation queries to correctly distinguish between summary data and detailed data, providing accurate data source guidance for data queries, and ensuring the correctness of operation results.

[0047] The process of determining the relationship confidence based on the keyword hit parameter, the data consistency parameter value of each column, and the visual style difference parameter refers to the weighted summation of the keyword hit parameter, the data consistency parameter value of each column, and the visual style difference parameter to obtain the relationship confidence. The weights of the keyword hit parameter, the numerical consistency parameter, and the visual style difference parameter can be determined based on actual needs, and this embodiment does not limit this. For example, the keyword hit parameter has the highest weight, the numerical consistency parameter has the second highest weight, and the visual style difference parameter has the lowest weight.

[0048] It should be noted that, in this embodiment of the disclosure, the keyword hit parameter refers to a parameter value determined based on the detection result of whether the text in the cells of the table contains a preset operational keyword field. The operational keyword field can be an aggregate keyword, including but not limited to "total", "sum", "Average", etc. When the table is detected to contain a preset operational keyword field, the keyword hit parameter takes the first parameter value; when the table is detected not to contain a preset operational keyword field, the keyword hit parameter takes the second parameter value; the first parameter value is greater than the second parameter value.

[0049] The data consistency parameter value is used to characterize the degree of consistency between the data to be verified associated with a column in the table and the actual field value of the row containing the operation key field in that column. Specifically, when the data to be verified is completely consistent with the actual field value, the data consistency parameter value is the third parameter value; when there is a deviation between the data to be verified and the actual field value but the deviation is within the preset error range, the data consistency parameter value is the fourth parameter value; when the data to be verified is completely inconsistent with the actual field value, the data consistency parameter value is the fifth parameter value, wherein the third parameter value is greater than the fourth parameter value, and the fourth parameter value is greater than the fifth parameter value.

[0050] The visual style difference parameter is used to characterize the degree of difference in visual style between the row containing the operation keyword field and other rows in the table. Visual styles include, but are not limited to, background color, font weight, border style, and font color. When the row containing the operation keyword field has significant differences from other rows in the table in multiple visual style dimensions (such as different background color, bold font, double horizontal border, etc.), the visual style difference parameter takes the sixth parameter value, indicating that the row containing the operation keyword field has the typical characteristics of a summary row in visual presentation. When the row containing the operation keyword field does not have significant differences in visual style from other rows in the table, the visual style difference parameter takes the seventh parameter value, indicating that the row containing the operation keyword field does not have the typical characteristics of a summary row in visual presentation. The sixth parameter value is greater than the seventh parameter value.

[0051] For example, suppose the preset operation keyword field is "Total" or "Amount"; in a product sales table, if the text of the cell in the first column of the last row contains the keyword "Total", then the operation keyword field is determined to be hit, and the keyword hit parameter is determined to be the first parameter value. Specifically, in the row containing the keyword "Total", the value in the "Sales Amount" column is 180000. Summing the sales amounts (50000, 60000, 70000) of all data rows above the "Sales Amount" column yields the data to be verified, 180000, which matches the actual value of 180000 in the "Total" row. Therefore, the data consistency parameter for the "Sales Amount" column is determined to be the third parameter value. Simultaneously, it is detected that the background color of the row containing "Total" is gray and the font is bold, showing a significant visual difference from other data rows. Therefore, the visual style difference parameter is determined to be the sixth parameter value.

[0052] Next, the relationship confidence score is obtained by weighting the three parameters mentioned above. Assuming confidence level of the relationship If the relationship confidence threshold is exceeded, the row containing "Total" will be determined as the total row, and an operational relationship will be generated.

[0053] Understandably, if the product sales table also includes a "Cost" column and / or a "Profit" column, then "Cost" and / or "Profit" will be the columns that can be used with the "Total" keyword. In addition, all other data rows in the "Cost" and / or "Profit" columns, except for the row containing the "Total" keyword, will be the rows that can be used, and the calculation method will be summation.

[0054] Step S204: Combine the semantic tags of each data field in each page partition, the data type of each data field, and the relationships between each data field in each page partition to obtain the page data model.

[0055] In this embodiment, a cluttered webpage is broken down into regular, independent page partitions through visual region segmentation, reducing the computational complexity and interference of subsequent feature extraction. By integrating text, visual, and DOM structure features to identify semantic tags and data types of data fields, compared to relying solely on single DOM or text extraction methods, multimodal information such as page fonts, color schemes, and layout nesting can be fully utilized, significantly improving the accuracy and adaptability of field semantic recognition. Simultaneously, computational, hierarchical, and aggregation relationships between fields are mined and incorporated into the model, overcoming the shortcomings of traditional webpage data extraction that only extracts isolated values ​​and loses the inherent logic of the data, allowing the model to fully bear the contextual logic of the page data. Finally, the semantics, types, and multi-class relationships of the partitioned fields are integrated to form a complete page data model, providing richer underlying data support that aligns with the actual business logic of the page and offers richer information dimensions for subsequent natural language ambiguity matching and guided interactive clarification, ensuring the accuracy and completeness of subsequent query intent parsing and question-and-answer result generation.

[0056] In step S102, semantic analysis is performed on the natural language query input by the user to obtain query keywords.

[0057] In this embodiment of the disclosure, a natural language query is a data query request entered by the user in everyday spoken language, such as "find high-profit products in East China" or "find best-selling products with prices below average." Query keywords are key information extracted from the natural language query and used for subsequent matching with the page data model.

[0058] In one optional implementation, the process of semantically analyzing a user-input natural language query to obtain query keywords includes: performing shallow syntactic analysis and semantic role labeling on the natural language query to obtain the core predicates and their arguments. The arguments include the query object and query conditions, and the query object and query conditions are then identified as query keywords. Through shallow syntactic analysis and semantic role labeling, the user-input natural language query is decomposed into structured core predicates and their arguments, clarifying the core action intent, query target, and query conditions. This structured information is then transformed into query keywords, enabling the user's ambiguous colloquial expression to be accurately understood and used for subsequent matching with data fields in the page data model. This provides a structured and computable input foundation for subsequent identification of ambiguous query keywords and interactive guidance, improving the accuracy of natural language query parsing.

[0059] For example, for the user-input query "find best-selling products with prices below average", shallow syntax analysis is performed to identify the core predicate as "find", semantic role labeling is performed to identify the query object as "products", and the query conditions include "prices below average" (numerical condition) and "best-selling" (attribute condition). Thus, the query keywords can be determined to be "products", "prices below average", and "best-selling".

[0060] In step S103, the query keywords are matched with the data fields in the page data model to determine ambiguous query keywords, and based on the page data model, at least one ambiguous decision strategy is generated for each ambiguous query keyword.

[0061] In this embodiment of the disclosure, ambiguous query keywords refer to query keywords that cannot establish a unique correspondence with data fields in the page data model. Here, a unique correspondence means that a one-to-one precise mapping relationship can be established between the query keyword and the data fields in the page data model at the semantic level. Ambiguity decision strategy refers to the candidate query scheme generated for ambiguous query keywords and used to show the user to clarify the true query intent of the ambiguous query keyword.

[0062] It should be noted that, in this embodiment of the disclosure, ambiguous query keywords include, but are not limited to, the following situations: No corresponding query keyword can be matched in the semantic tags of any data field in the page data model, such as a user query keyword including "inventory quantity," but the fields in the page data model include "sales amount," "cost," and "profit"; At least two corresponding query keywords are matched in the semantic tags of each data field in the page data model, such as a user query keyword including "price," and the fields related to "price" in the page data model including "unit price," "discount price," and "total price"; Ambiguous query keywords in the semantic tags of each data field in the page data model... The semantic tags contain corresponding fields, but the semantic scope of the query keyword exceeds or differs from the business meaning of the corresponding field. For example, the user's query keyword includes "best-selling", but the field in the page data model is "sales volume"; or, no corresponding field can be matched in the semantic tags of the data fields in the page data model, but the query keyword can be derived from the relationship between the data fields to obtain the derived indicator related to the semantics of the query keyword. For example, the user's query keyword includes "profit margin", while the fields in the page data model include: "sales revenue" and "cost"; Relationship: Calculate the relationship "profit = sales revenue - cost".

[0063] In one optional implementation, the process of generating at least one ambiguity decision strategy for each ambiguous query keyword based on the page data model includes: for each ambiguous query keyword, searching the page data model for data fields that semantically match the ambiguous query keyword, and / or associations that semantically match the ambiguous query keyword; and generating at least one ambiguity decision strategy for each ambiguous query keyword based on the search results. By searching the page data model for semantically matching data fields and / or associations for each ambiguous query keyword, and converting the search results into ambiguity decision strategies available for user selection, automatic conversion from the user's fuzzy expression to candidate query solutions is achieved. By using structured information (semantic labels of fields or descriptions of associations) in the page data model as the source of strategy options, each strategy option is generated based on the actual data structure of the page rather than a preset template, ensuring a high degree of relevance and usability of the strategy options with the current page data. This provides accurate, highly relevant, and understandable selection criteria for subsequent interactive guidance, improving the efficiency and accuracy of ambiguity resolution.

[0064] It should be noted that, in this embodiment of the disclosure, the association relationship that matches the semantics of the ambiguous query keyword refers to the business meaning or descriptive information of the computational association relationship, hierarchical association relationship or operational association relationship recorded in the page data model, which is the same as or similar to the semantics of the ambiguous query keyword.

[0065] For example, if a user's query contains "high profit", but the page data model does not have a "profit" field, but there is a calculation relationship "profit = sales revenue - cost", then the calculation relationship "profit = sales revenue - cost" can be identified as a relationship that matches the semantics of the ambiguous query keyword "high profit".

[0066] In one optional implementation, the process of generating at least one ambiguity decision strategy for each ambiguous query keyword based on the search results includes: for each ambiguous query keyword, searching for a data field in the page data model that semantically matches the ambiguous query keyword, obtaining the semantic label of the matched data field, and generating an ambiguity decision strategy corresponding to the data field based on the semantic label.

[0067] The process of generating ambiguous decision-making strategies corresponding to data fields based on semantic tags includes: using semantic tags as candidate terms for ambiguous decision-making strategies, and combining semantic tags into complete strategy description statements according to a preset strategy template; the preset strategy template includes at least one of filtering by the field value of semantic tags and sorting by the field value of semantic tags.

[0068] For example, if the ambiguous query keyword is "high profit", the data model searches for data fields that match the semantics of "high profit". The "sales amount" field is matched (because "sales amount" and "profit" both belong to the financial revenue category, and their semantic distance is the closest). The semantic label of the "sales amount" field is obtained as "sales amount". According to the preset strategy template "by [semantic label] high and low", the ambiguous decision strategy "by sales amount high and low" is generated and displayed to the user as one of the candidate options.

[0069] In one optional implementation, the process of generating at least one ambiguity decision strategy for each ambiguous query keyword based on the search results includes: searching for associations in the page data model that semantically match the ambiguous query keyword, obtaining descriptive information of the matched associations, and generating an ambiguity decision strategy corresponding to the associations based on the descriptive information.

[0070] The process of generating ambiguous decision-making strategies corresponding to the relationships based on the descriptive information includes: extracting key elements from the descriptive information of the relationships, where the key elements include at least one of the relationship type, participating fields, and calculation methods; and combining the key elements according to a preset description template to generate a strategy description statement for display to the user.

[0071] For example, the ambiguous query keyword is "high profit". No "profit" field is matched in the page's data model, but the calculated relationship "profit = sales revenue - cost" is found. The description of this relationship is "profit is calculated by subtracting cost from sales revenue". Key elements are extracted (relationship type: calculated relationship; participating fields: sales revenue, cost; operation method: subtraction). Following the preset description template "based on the difference between [field A] and [field B]", an ambiguous decision strategy "based on the difference between sales revenue and cost" is generated and presented to the user as one of the candidate options. By transforming the semantic tags or relationship descriptions of data fields in the page's data model into user-understandable strategy options, the user's ambiguous expression can be guided to a clear choice based on the actual data structure of the page, providing a foundation for generating a precise set of query instructions.

[0072] In step S104, at least one ambiguity decision strategy is displayed one by one, and a query instruction set is generated based on the target ambiguity decision strategy determined by the user for each ambiguous query keyword. The document object model structure of the currently displayed page is modified according to the query instruction set so as to distinguish and display the query results of natural language queries on the current display page.

[0073] In this embodiment of the disclosure, the target ambiguity decision strategy determined by the user for each ambiguous query keyword refers to the ambiguity decision strategy selected by the user among at least one ambiguity decision strategy for each ambiguous query keyword; the query instruction set is a structured set of instructions consisting of a series of atomic operation declarations, used to indicate what modification operation to perform on the document object model structure of the currently displayed page. The query instruction set may include at least one of filtering instructions, sorting instructions, highlighting instructions, and aggregation instructions.

[0074] It is understood that, in the embodiments of this disclosure, when there is one ambiguity decision strategy for the ambiguous query keyword, this ambiguity decision strategy for the ambiguous query keyword is directly determined as the target ambiguity decision strategy.

[0075] In one optional implementation, the process of generating a query instruction set based on the target ambiguity decision strategy determined by the user for each ambiguous query keyword may include: compiling the target data fields and / or target associations associated with the target ambiguity decision strategy into atomic operation declarations; and generating a query instruction set based on the atomic operation declarations. The query instruction set consists of a series of atomic operation declarations, including at least one of filtering, sorting, highlighting, and aggregation instructions. By compiling the target data fields and / or target associations associated with the target ambiguity decision strategy into atomic operation declarations, and generating a query instruction set containing filtering, sorting, and / or highlighting instructions based on the atomic operation declarations, the explicit intent confirmed by the user during the interactive guidance phase is converted into precise, computer-executable operation instructions. This achieves the final conversion from natural language intent to structured query instructions, ensuring that each decision confirmed by the user is accurately mapped to the corresponding data operation, and providing standardized, executable instruction input for subsequent modification operations on the document object model structure.

[0076] Atomic operation declarations refer to the smallest and indivisible basic operation instructions performed on data. Each atomic operation declaration corresponds to an independent operation information, which includes two parts: operation type and operation parameters. The operation type includes at least one of filtering, sorting, and highlighting. The operation parameters include the target data field or target relationship targeted by the operation, as well as the execution method of the operation (such as filter condition value, sorting order, highlighting style, etc.). Multiple atomic operation declarations are combined to form a query instruction set, which together describe the complete sequence of operations performed on the data of the currently displayed page. For example, the atomic operation declaration of the filtering instruction can be represented as {operation type: filter, target field: "region", condition value: "East China"}, which means filtering out data rows with the value "East China" from the "region" field.

[0077] In one optional implementation, the process of generating a query instruction set based on the target ambiguity decision strategy determined by the user for each ambiguous query keyword may include: compiling the target data fields and / or target associations associated with the target ambiguity decision strategy into a first atomic operation declaration; and compiling the matching results of unambiguous query keywords and data fields into a second atomic operation declaration; and generating a query instruction set based on the first and second atomic operation declarations. By compiling the target data fields and / or target associations associated with the target ambiguity decision strategy, as well as the matching results of unambiguous query keywords and data fields, into atomic operation declarations respectively, the ambiguity resolution results and explicit matching results confirmed by the user can be uniformly integrated into a complete query instruction set. This ensures that the query instruction set can completely and accurately reflect the user's full query intent, even when the natural language input by the user contains both unambiguous and ambiguous keywords, thereby improving the accuracy of the subsequently determined query results.

[0078] For example, when a user selects strategy two, "based on the difference between sales revenue and cost," from two ambiguous decision strategies for the ambiguous query keyword "high profit," this strategy is compiled into a sorting instruction with "profit" as the sorting object field and "descending order" as the order requirement, indicating that products are sorted from highest to lowest profit. At the same time, the unambiguous keyword "East China" in the query is compiled into a filtering instruction with the filtering condition "region equals East China." The final generated query instruction set includes both filtering and sorting instructions.

[0079] It should be noted that, in this embodiment of the disclosure, during the process of modifying the document object model structure of the currently displayed page according to the query instruction set to differentiate the display of natural language query results on the currently displayed page, the modification operation may include at least one of the following: performing filtering operation, sorting operation, highlighting operation, and aggregation result display operation; differentiating the display of natural language query results on the currently displayed page is achieved by modifying the style attributes of the target object in the document object model tree of the currently displayed page; wherein, style attributes are Cascading Style Sheets (CSS) properties or sets of properties used to control the visual presentation of page elements on the page; style attributes include, but are not limited to, the following types: display control properties: such as the display property, used to control whether an element is displayed on the page, wherein the display:none property indicates that the element is hidden; position and layout properties; visual style properties: such as background color, border, font weight, font color, etc., used to control the appearance style of the element; size and spacing properties: such as width, height, margin, padding, etc.

[0080] In one optional implementation, the process of modifying the document object model structure of the currently displayed page according to the query instruction set to differentiate the display of natural language query results on the currently displayed page may include: if the query instruction set contains a filtering instruction, traversing the data row nodes or list item nodes in the document object model tree of the currently displayed page, and determining the data row nodes or list item nodes that do not meet the filtering conditions according to the filtering conditions contained in the filtering instruction; then, setting a data hiding attribute for the data row nodes or list item nodes to be hidden in the document object model tree to hide the data row nodes or list item nodes corresponding to the data row nodes or list item nodes to be hidden on the currently displayed page. By traversing the data row nodes or list item nodes in the Document Object Model (DOM) tree, nodes that do not meet the filtering criteria are accurately identified and their data hiding attributes are set to hide them on the page. This achieves instant filtering of query results on the currently displayed page. This data filtering process operates directly on the original DOM tree, without needing to extract data to external tools or reload the page. This eliminates the disconnect between data acquisition and analysis in traditional solutions, achieving in-situ integration of query results with the original page context. At the same time, by hiding nodes by setting data hiding attributes instead of deleting them, the reversibility of the page display content is ensured. There is no need to request the page again or reload the data, allowing users to obtain the filtering results instantly in the original page environment and making it easy to restore the initial page, thus improving the efficiency of data query and the interactive experience.

[0081] It should be noted that, in this embodiment of the disclosure, a data row node refers to a data row in the document object model tree that corresponds to a table structure. ), card container nodes in card layout ( There are multiple formats, such as ) and each data item node corresponds to an independent data record entry, containing information about all data fields in that entry.

[0085] The process of obtaining the field value corresponding to the sorting object field in each data item node includes: extracting the specific data value stored in each node under the sorting object field from the data item nodes that are to be sorted, based on the sorting object field.

[0086] For example, if the user enters a query statement of "sort by sales amount from highest to lowest", and the sorting object field in the sorting instruction generated by the query is "sales amount" and the order requirement field is "descending", then the data item nodes to be sorted (i.e., all data row nodes containing sales data in the table, each data row node corresponding to one product) and the parent nodes of each data item node (i.e., the parent node that wraps all data rows) are determined from the document object model tree of the currently displayed page. Then, the cell value corresponding to the "sales amount" field in each data row node is obtained (e.g., 50000 for phone A, 60000 for phone B, and 70000 for phone C) is obtained. Next, according to the size relationship of the "sales amount" field values ​​in each data item node to be sorted, the data item nodes are sorted according to the "descending" requirement, and the target order is determined as: phone C (70000), phone B (60000), phone A (50000).

[0087] Furthermore, by calling the parent node's `appendChild` method, each data row node is moved sequentially to the end of the parent node according to the target order. First, the data row node corresponding to phone C is moved to the end, then phone B is moved to the end, and finally phone A is moved to the end, so that the data rows in the currently displayed page are rearranged in the order of phone C, phone B, and phone A. Alternatively, the CSS `order` property can be set for each data row node, setting phone C to 0, phone B to 1, and phone A to 2. The browser will automatically render according to the `order` value from smallest to largest, similarly achieving the display order of phone C, phone B, and phone A, so that users can see products arranged from highest to lowest sales volume on the current display page, realizing the real-time sorting of query results.

[0088] In one optional implementation, the process of modifying the document object model structure of the currently displayed page according to the query instruction set to differentiate the query results of the natural language query on the currently displayed page may include: if the query instruction set contains a highlight instruction, determining the data row node or list item node to be highlighted corresponding to the highlight instruction from the document object model tree of the currently displayed page; then, setting visual enhancement attributes for the data row node or list item node to be highlighted in the document object model tree to highlight the corresponding data row or list item on the currently displayed page; wherein, the visual enhancement attributes may include adding background color, widening borders, etc. Style attributes such as bold font are implemented; by determining the data row node or list item node to be highlighted corresponding to the highlighting instruction from the Document Object Model (DOM) tree and setting visual enhancement attributes for it, the query results are instantly visually emphasized on the currently displayed page; this data highlighting process operates directly on the original DOM tree, without needing to extract data to external tools or reload the page. The highlighting effect can be achieved by modifying the visual enhancement attributes without modifying the original page content, making the operation lightweight and reversible; it achieves the goal of highlighting rows or items that meet the conditions on the original page through visual enhancement attributes, allowing users to quickly locate the query results, thus improving the readability of data query results and user experience.

[0089] For example, if the user enters the query "select the product with the highest profit margin", the data row containing the product with the highest profit margin is determined based on the profit field in the highlighting instruction generated from the query. Then, the data row node containing the product with the highest profit margin is determined as the data row node to be highlighted, and visual enhancement attributes (such as background-color:yellow, font-weight:bold) are set for this node. This row is then displayed in the current display page with a yellow background and bold font, forming a sharp contrast with other rows in the current display page, allowing the user to quickly locate the query result.

[0090] In one optional implementation, the process of modifying the document object model structure of the currently displayed page according to the query instruction set to differentiate the display of natural language query results on the currently displayed page may include: if the query instruction set contains an aggregation instruction, parsing the aggregation instruction to obtain the data field to be aggregated and the aggregation operation type corresponding to the aggregation instruction; then, according to the data field to be aggregated, obtaining the field value corresponding to the data field to be aggregated from the document object model tree of the currently displayed page, and performing an aggregation operation on the obtained field value according to the aggregation operation type to obtain an aggregate value; and according to the aggregate value, creating a semi-transparent floating layer node or footnote node in the document object model tree of the currently displayed page, and writing the aggregate value into the floating layer node or footnote node; finally, anchoring the floating layer node or footnote node to the data area corresponding to the data field to be aggregated on the currently displayed page. The data aggregation is displayed near the original document object model tree. It parses the aggregation instructions to obtain the data fields to be aggregated and the aggregation operation type. The field values ​​are directly retrieved from the document object model tree of the currently displayed page, and the aggregation operation is performed locally. The results are written to newly created floating layer nodes or footnote nodes and anchored near the data area corresponding to the data fields to be aggregated. This data aggregation process operates directly on the original document object model tree, and the aggregation calculation is completed locally in the browser. Data does not need to be uploaded to a remote server, ensuring data security and privacy. Furthermore, the aggregation results are displayed as a semi-transparent floating layer or footnote near the original data area, neither obscuring the original data nor hindering the immediate annotation of the query results. This avoids the problem of data being detached from the original context caused by displaying aggregation results in independent charts or new pages in traditional solutions, thus improving data readability and user experience in data aggregation scenarios.

[0091] It should be noted that, in the embodiments of this disclosure, "near the data area corresponding to the data field to be aggregated" refers to a position that is spatially close to or adjacent to the data area corresponding to the data field to be aggregated, including but not limited to the bottom, top, right, left or inner edge of the data area. The specific anchor position can be dynamically determined according to the page layout and visual aesthetics.

[0092] For example, if the user enters the query "What is the total sales revenue of all products?", an aggregation instruction is generated based on the query and parsed to obtain the data field to be aggregated as "sales revenue" and the aggregation operation type as "sum". Next, all cell values ​​corresponding to the "sales revenue" field (such as 50000, 60000, 70000) are obtained from the Document Object Model tree, and the summation operation is performed on the above values ​​to obtain the aggregated value of 180000. Further, a semi-transparent floating layer node is created in the Document Object Model tree, "Total sales revenue: 180000" is written into the floating layer node, and the floating layer node is anchored below the sales revenue column or near the upper right corner of the table for display.

[0093] This disclosure provides an exemplary embodiment of a data query system, which may be an electronic device or a data query system. Figure 3 A schematic block diagram of the functional modules of a data query system according to an exemplary embodiment of the present disclosure is shown. Figure 3 As shown, the data query system 300 includes: The page analysis module 301 is configured to perform page analysis on the currently displayed page to obtain the page data model of the currently displayed page. The page data model is used to represent the semantic tags, data types, and relationships between the data fields in the currently displayed page. The semantic analysis module 302 is configured to perform semantic analysis on the natural language query input by the user to obtain the query keywords; The association extraction module 303 is configured to match query keywords with data fields in the page data model, determine ambiguous query keywords, and generate at least one ambiguous decision strategy for each ambiguous query keyword based on the page data model. The ambiguous query keyword is a query keyword that cannot establish a unique correspondence with the data fields in the page data model. The ambiguous decision strategy refers to the candidate query scheme generated for the ambiguous query keyword, which is used to show the user the accurate query intent to clarify the ambiguous query keyword. The interactive guidance module 304 is configured to display at least one ambiguous decision-making strategy one by one, and generate a set of query instructions based on the target ambiguous decision-making strategy determined by the user for each ambiguous query keyword. The visual rendering module 305 is configured to perform modification operations on the document object model structure of the currently displayed page according to the query instruction set, so as to distinguish and display the query results of natural language queries on the currently displayed page.

[0094] Optionally, page analysis module 301 is configured as follows: The currently displayed page is visually segmented to obtain multiple page partitions; Feature extraction is performed on each page partition to obtain a fusion feature composed of at least two of the following: text features, visual features, and structural features. Based on the fusion feature of each page partition, the semantic labels and corresponding data types of each data field in each page partition are determined. Among them, the structural features are used to characterize the position of page elements in the document object model tree and the structural relationship between page elements and other page elements. Extract the relationships between data fields in each page partition. These relationships include at least one of the following: computational relationships, hierarchical relationships, and operational relationships. By combining the semantic tags, data types, and relationships between data fields in each page partition, a page data model is obtained.

[0095] Optionally, page analysis module 301 is configured as follows: Traverse the document object model tree of the currently displayed page, create a basic visual module for each visible node, and merge adjacent plain text or inline elements; Within the current visual block, obtain all horizontal or vertical dividing lines, calculate the weight of each dividing line, and select the dividing line with the highest weight as the dividing line. The weights are normalized based on the size of the current visual block to obtain the segmentation degree. When the segmentation degree is greater than the preset segmentation threshold, the current visual block is divided into several sub-blocks along the dividing line with the highest weight, and the above segmentation process is recursively performed on each sub-block until the segmentation degree of each sub-block is not greater than the preset segmentation threshold, resulting in multiple page partitions.

[0096] Optionally, page analysis module 301 is configured as follows: Combine all numeric fields within the page partition to obtain multiple field groups, each containing at least three fields; For each field group, each field in the field group is used as the result field in turn, and the other fields in the field group except for the result fields are used as relation fields. Multiple candidate relation functions are constructed using preset candidate function types, with the relation fields as input and the result fields as output. Randomly select several rows of data, and take the field values ​​in each selected row of data that correspond to the fields in the field group as a set of validation data for the field group. For each candidate relation function, substitute the field values ​​of the relation fields in each set of validation data into the candidate relation function to obtain the field values ​​of the results to be validated. Based on the field values ​​of the results to be verified and the actual field values ​​of the results in the verification data, the error value of the candidate relation function on each set of verification data is determined, and the average relative error and error standard deviation associated with the candidate relation function are determined based on multiple error values; The confidence score of the relationship is determined based on the mean relative error and the standard deviation of the error. Candidate relationship functions whose confidence scores are greater than the relationship confidence score threshold are identified as the calculated association relationships of the field group.

[0097] Optionally, page analysis module 301 is configured as follows: Get the nesting depth of each page element in the document object model tree within each page section and the visual indentation of each page element; Based on the visual indentation of each page element, page elements with the same parent node within the page partition are clustered by indentation value to obtain the indentation level of each page element and the indentation cluster center depth corresponding to each indentation level. When, among multiple page elements within a page partition, the indentation cluster depth of the first page element's indentation level is greater than the indentation cluster depth of the second page element's indentation level, and the first page element is determined to be a descendant of the second page element in the document object model tree based on the nesting depth, the second page element is identified as the parent page element, the first page element is identified as the child page element, and a hierarchical relationship is established between the parent page element and the child page element.

[0098] Optionally, page analysis module 301 is configured as follows: For each page section, the keyword hit parameters are determined based on the results of checking the keyword fields in the tables within the page section. When a table contains an operation key field, the field values ​​of all other fields in each column of the table, except for the row containing the operation key field, are calculated using the operation system indicated by the operation key field to obtain the data to be verified. Based on the data to be verified associated with each column in the table, and the field value of the operation key field, determine the data consistency parameter value for each column; Based on the visual comparison results between the row containing the operation keyword field and other rows in the table, determine the visual style difference parameters; The relationship confidence level is determined based on the keyword hit parameters, the data consistency parameter values ​​of each column, and the visual style difference parameters. When the relation confidence is greater than the relation confidence threshold, an operational relationship is generated based on the operational system indicated by the operational key field, the operational system's operable columns in the table, and the operational system's operable rows in the operable columns.

[0099] Optionally, the semantic analysis module 302 is configured as follows: We perform shallow syntactic analysis and semantic role labeling on natural language queries to obtain the core predicates and arguments of the core predicates. The arguments include the query object and the query conditions. Define the query objects and query conditions as query keywords.

[0100] Optionally, the relationship extraction module 303 is configured as follows: For each ambiguous query keyword, find data fields in the page data model that match the semantics of the ambiguous query keyword, and / or associations that match the semantics of the ambiguous query keyword; Generate at least one ambiguity decision strategy for each ambiguous query keyword based on the search results.

[0101] Optionally, the interactive guidance module 304 is configured as follows: Compile the target data fields and / or target associations associated with the target ambiguity decision-making strategy into atomic operation declarations; A query instruction set is generated based on the atomic operation declaration. The query instruction set includes at least one of the following: filtering instruction, sorting instruction, aggregation instruction, and highlighting instruction.

[0102] Optionally, the visual rendering module 305 is configured as follows: If the query instruction set contains a filter instruction, then traverse the data row nodes or list item nodes in the document object model tree of the currently displayed page, and determine the data row nodes or list item nodes that do not meet the filter conditions to be hidden based on the filter conditions contained in the filter instruction. Set the data hiding property for the data row node or list item node to be hidden in the Document Object Model tree, so as to hide the data row or list item corresponding to the data row node or list item node to be hidden in the currently displayed page.

[0103] Optionally, the visual rendering module 305 is configured as follows: If the query instruction set contains sorting instructions, then the sorting instructions are parsed to obtain sorting requirement information, which includes the sorting object field and the order requirement field. Based on the sorting object field, determine the data item nodes to be sorted and the parent nodes of each data item node from the document object model tree, and obtain the field values ​​in each data item node that correspond to the sorting object field. Based on the size relationship of the field values ​​corresponding to the sorting object field in each data item node, sort each data item node according to the order requirement field to determine the target order of each data item node after sorting. Based on the target order, by calling the parent node's node rearrangement system, each data item node is moved sequentially to the end of the parent node in the target order, so as to rearrange the data item nodes in the target order on the current display page; or, layout style properties are set for each data item node to rearrange the data item nodes in the target order on the current display page.

[0104] Optionally, the visual rendering module 305 is configured as follows: If the query instruction set contains a highlight instruction, then determine the data row node or list item node to be highlighted corresponding to the highlight instruction from the document object model tree of the currently displayed page; Set visual enhancement properties for the data row node or list item node to be highlighted in the Document Object Model tree, so that the data row or list item corresponding to the data row node or list item node to be highlighted is highlighted in the current display page.

[0105] Optionally, the visual rendering module 305 is configured as follows: If the query instruction set contains aggregation instructions, then the aggregation instructions are parsed to obtain the data field to be aggregated and the aggregation operation type corresponding to the aggregation instructions; Based on the data field to be aggregated, retrieve the corresponding field value from the Document Object Model tree of the currently displayed page, and perform aggregation operation on the retrieved field value according to the aggregation operation type to obtain the aggregated value; Based on the aggregate value, create a floating layer node or footnote node in the document object model tree of the currently displayed page, and write the aggregate value into the floating layer node or footnote node. Anchor floating layer nodes or footnote nodes to the current display page, and display them in the relevant position of the data area corresponding to the data field to be aggregated.

[0106] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform a method according to an embodiment of this disclosure.

[0107] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.

[0108] like Figure 4 As shown, an exemplary embodiment of this disclosure also provides a computer program product 400, including a computer program 401, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to an embodiment of this disclosure.

[0109] refer to Figure 5 The following description serves as a structural block diagram of the electronic device or data retrieval system 500 of this disclosure, which is an example of hardware devices applicable to various aspects of this disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the disclosure described and / or claimed herein.

[0110] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the electronic device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0111] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information to electronic device 500. Input unit 506 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 507 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, disk and optical disk. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0112] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the methods of the exemplary embodiments of this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. In some embodiments, the computing unit 501 can be configured to perform the methods of the exemplary embodiments of this disclosure by any other suitable means (e.g., by means of firmware).

[0113] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0114] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0115] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0117] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0118] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions of the embodiments of this disclosure are performed, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, a computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).

[0119] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents. 、 Tag nodes, where each data row node contains cell child nodes corresponding to multiple data fields in that row ( A data row node is used to hold a complete data record in a table. In filtering operations, the data row node is the basic unit for traversal and hiding; setting the data hiding attribute on the data row node allows you to hide entire rows of data that do not meet the filtering criteria. A list item node refers to the item in the document object model tree that corresponds to the list structure. Tag nodes; each list item node contains the specific content of that entry (such as text, images, or nested elements), used to carry an independent data entry in the list; in filtering operations, list item nodes are the basic unit of traversal and hiding, and the entire list item that does not meet the filtering criteria can be hidden by setting the data hiding attribute of the list item node.

[0082] For example, if a user inputs the query "Display products in East China", the filter condition in the generated filter instruction is "Region equals East China". Then, in the table page, each data row node in the Document Object Model tree is traversed, checking if the cell text corresponding to the "Region" field in that data row is "East China". Assuming the table has 5 rows of data, where the first row is "East China", the second row is "North China", the third row is "East China", the fourth row is "South China", and the fifth row is "East China", then rows 2 and 4 are determined to be data rows that do not meet the filter condition and should be hidden. The data hiding attribute (display:none) is set for these two data row nodes, and they are then hidden from the page, displaying only the three rows with the region "East China". By setting the data hiding attribute for nodes that do not meet the condition instead of deleting them, it is ensured that the page only displays the content the user needs to query, and the operation is reversible; for example, the user can refresh the page to restore the original state.

[0083] In one optional implementation, the process of modifying the document object model structure of the currently displayed page according to the query instruction set to differentiate the display of natural language query results on the currently displayed page may include: if the query instruction set contains a sorting instruction, parsing the sorting instruction to obtain sorting requirement information, which includes a sorting object field and an order requirement field; then, based on the sorting object field, determining the data item nodes to be sorted and the parent nodes of each data item node from the document object model tree, and obtaining the field values ​​in each data item node corresponding to the sorting object field; and sorting each data item node according to the order requirement field based on the size relationship of the field values ​​in each data item node corresponding to the sorting object field, and determining the target order of each data item node after sorting; finally, based on the target order, moving each data item node to the end of the parent node in sequence according to the target order by calling the node rearrangement method of the parent node, so as to rearrange each data item node in the target order on the currently displayed page; or, setting layout style attributes for each data item node to rearrange each data item node in the target order on the currently displayed page. By parsing sorting instructions to obtain the fields and order requirements of the sorting object, the data item nodes to be sorted and their parent nodes are determined from the Document Object Model (DOM) tree. After determining the target order based on the size relationship of the field values, the data item nodes are rearranged in their original container by calling the node rearrangement method of the parent node or setting layout style properties. This achieves real-time sorting of query results on the currently displayed page. This data sorting process operates directly on the original DOM tree without extracting data to external tools or reloading the page. The data does not leave the original container, maintaining the in-situ integration of query results with the original page context. At the same time, sorting is achieved through node rearrangement methods or layout style properties without rebuilding the DOM structure. The operation is lightweight and reversible, allowing users to obtain sorting results instantly in the original page environment, improving the efficiency of data querying and user interaction experience.

[0084] It should be noted that, in this embodiment of the disclosure, the data item node to be sorted refers to a data row node or list item node in the document object model tree that has the same semantic meaning as the sorting object field in the sorting instruction; the layout style attribute is a CSS layout style attribute used to control the arrangement position, display order, alignment, and space allocation of page elements in the document flow or layout container; the data item node refers to the container node in the document object model tree that corresponds to a single data entry in the currently displayed page; the data item node includes data row nodes in a table structure ( ), list item nodes in the list structure (

Claims

1. A data query method, characterized in that, include: Perform page analysis on the currently displayed page to obtain the page data model of the currently displayed page. The page data model is used to characterize the semantic tags, data types, and relationships between the data fields in the currently displayed page. Semantic analysis is performed on the natural language query input by the user to obtain the query keywords; The query keywords are matched with the data fields in the page data model to determine ambiguous query keywords. Based on the page data model, at least one ambiguity decision strategy is generated for each ambiguous query keyword. The ambiguous query keywords are query keywords that cannot be uniquely matched with the data fields in the page data model. The ambiguity decision strategy refers to the candidate query scheme generated for the ambiguous query keywords, which is used to show the user the accurate query intent of the ambiguous query keywords. The at least one ambiguity decision strategy is displayed one by one, and a query instruction set is generated based on the target ambiguity decision strategy determined by the user for each ambiguity query keyword. The document object model structure of the currently displayed page is modified according to the query instruction set so as to distinguish and display the query results of the natural language query on the currently displayed page.

2. The method according to claim 1, characterized in that, The step of performing page analysis on the currently displayed page to obtain the page data model of the currently displayed page includes: The currently displayed page is visually segmented to obtain multiple page partitions; Feature extraction is performed on each page partition to obtain a fusion feature composed of at least two of the following: text features, visual features, and structural features. Based on the fusion feature of each page partition, the semantic label and corresponding data type of each data field in each page partition are determined. The structural feature is used to characterize the position of the page element in the document object model tree and the structural relationship between it and other page elements. Extract the relationships between the data fields in each page partition, wherein the relationships include at least one of computational relationships, hierarchical relationships, and operational relationships; The page data model is obtained by combining the semantic tags of each data field in each page partition, the data type of each data field, and the relationships between the data fields in each page partition.

3. The method according to claim 2, characterized in that, The visual region segmentation of the currently displayed page results in multiple page partitions, including: Traverse the document object model tree of the currently displayed page, create a basic visual module for each visible node, and merge adjacent plain text or inline elements; Within the current visual block, obtain all horizontal or vertical dividing lines, calculate the weight of each dividing line, and select the dividing line with the highest weight as the dividing basis. The weights are normalized based on the size of the current visual block to obtain the segmentation degree; When the segmentation degree is greater than the preset segmentation threshold, the current visual block is divided into several sub-blocks along the dividing line with the highest weight, and the above segmentation process is recursively performed on each sub-block until the segmentation degree of each sub-block is not greater than the preset segmentation threshold, resulting in multiple page partitions.

4. The method according to claim 2, characterized in that, The step of extracting the relationships between the data fields in each of the page partitions includes: All numerical fields within a page partition are combined to obtain multiple field groups, each field group containing at least three fields; For each of the field groups, each field in the field group is sequentially used as a result field, and the other fields in the field group except for the result fields are used as relation fields. Multiple candidate relation functions are constructed using preset candidate function types, with the relation fields as input and the result fields as output. Randomly select several rows of data, and take the field values ​​in each selected row of data that correspond to each field in the field group as a set of verification data for the field group. Then, for each candidate relation function, substitute the field values ​​of the relation fields in each set of verification data into the candidate relation function to obtain the field values ​​of the verification result. Based on the value of the field to be verified and the actual value of the field in the verification data, the error value of the candidate relation function on each set of verification data is determined, and the average relative error and error standard deviation associated with the candidate relation function are determined based on multiple error values; The relationship confidence score is determined based on the mean relative error and the error standard deviation, and the candidate relationship functions whose relationship confidence scores are greater than the relationship confidence score threshold are determined as the calculated association relationships of the field group.

5. The method according to claim 2, characterized in that, The step of extracting the relationships between the data fields in each of the page partitions includes: Obtain the nesting depth of each page element within each page partition in the document object model tree and the visual indentation of each page element; Based on the visual indentation of each page element, page elements with the same parent node within the page partition are clustered by indentation value to obtain the indentation level of each page element and the indentation cluster center depth corresponding to each indentation level. When, among multiple page elements within the page partition, the indentation cluster center depth of the first page element's indentation level is greater than the indentation cluster center depth of the second page element's indentation level, and the first page element is determined to be a descendant of the second page element in the document object model tree based on the nesting depth, the second page element is determined as the parent page element, the first page element is determined as the child page element, and a hierarchical association relationship is constructed between the parent page element and the child page element.

6. The method according to claim 2, characterized in that, The step of extracting the relationships between the data fields in each of the page partitions includes: For each page partition, the keyword hit parameters are determined based on the check results of the calculated keyword fields in the tables within the page partition; If the table contains an operation keyword field, the field values ​​of the other field value rows in each column of the table, except for the row containing the operation keyword field, are calculated using the operation method indicated by the operation keyword field to obtain the data to be verified. Based on the data to be verified associated with each column in the table and the field value of the operation key field, determine the data consistency parameter value for each column; Based on the visual comparison results between the row containing the operation keyword field and other rows in the table, determine the visual style difference parameters; The relationship confidence level is determined based on the keyword hit parameters, the data consistency parameter values ​​of each column, and the visual style difference parameters. When the relationship confidence is greater than the relationship confidence threshold, an operational association relationship is generated based on the operation method indicated by the operation keyword field, the column in which the operation method can be applied in the table, and the row in which the operation method can be applied in the column.

7. The method according to claim 1, characterized in that, The semantic analysis of the natural language query input by the user yields query keywords, including: The natural language query is subjected to shallow syntactic analysis and semantic role labeling to obtain the core predicate and arguments of the core predicate in the natural language query. The arguments include the query object and the query conditions. The query object and the query conditions are determined as query keywords.

8. The method according to claim 1, characterized in that, The step of generating at least one ambiguity decision strategy for each ambiguous query keyword based on the page data model includes: For each ambiguous query keyword, find data fields in the page data model that match the semantics of the ambiguous query keyword, and / or associations that match the semantics of the ambiguous query keyword; Generate at least one ambiguity decision strategy for each of the ambiguous query keywords based on the search results.

9. The method according to claim 1, characterized in that, The step of generating a query instruction set based on the target ambiguity decision strategy determined by the user for each of the ambiguous query keywords includes: Compile the target data fields and / or target associations associated with the target ambiguity decision-making strategy into atomic operation declarations; The query instruction set is generated based on the atomic operation declaration, and the query instruction set includes at least one of filtering instructions, sorting instructions, aggregation instructions, and highlighting instructions.

10. The method according to claim 9, characterized in that, The step of modifying the document object model structure of the currently displayed page according to the query instruction set, so as to differentiate the display of the query results of the natural language query on the currently displayed page, includes: If the query instruction set contains the filtering instruction, then traverse the data row nodes or list item nodes in the document object model tree of the currently displayed page, and determine the data row nodes or list item nodes that do not meet the filtering conditions according to the filtering conditions contained in the filtering instruction. Set a data hiding attribute for the data row node or list item node to be hidden in the document object model tree, so as to hide the data row or list item corresponding to the data row node or list item node to be hidden in the currently displayed page.

11. The method according to claim 9, characterized in that, The step of modifying the document object model structure of the currently displayed page according to the query instruction set, so as to differentiate the display of the query results of the natural language query on the currently displayed page, includes: If the query instruction set contains a sorting instruction, then the sorting instruction is parsed to obtain sorting requirement information, which includes a sorting object field and an order requirement field. Based on the sorting object field, determine the data item nodes to be sorted and the parent nodes of each data item node from the document object model tree, and obtain the field values ​​in each data item node that correspond to the sorting object field; Based on the size relationship of the field values ​​corresponding to the sorting object field in each data item node, sort each data item node according to the order requirement field to determine the target order of each data item node after sorting. According to the target order, by calling the node rearrangement method of the parent node, each data item node is moved sequentially to the end of the parent node in the target order, so as to rearrange each data item node in the target order in the current display page; or, a layout style attribute is set for each data item node, so as to rearrange each data item node in the target order in the current display page.

12. The method according to claim 9, characterized in that, The step of modifying the document object model structure of the currently displayed page according to the query instruction set, so as to differentiate the display of the query results of the natural language query on the currently displayed page, includes: If the query instruction set contains a highlight instruction, then the data row node or list item node corresponding to the highlight instruction is determined from the document object model tree of the currently displayed page. Set visual enhancement attributes for the data row node or list item node to be highlighted in the document object model tree, so as to highlight the data row or list item corresponding to the data row node or list item node to be highlighted on the current display page.

13. The method according to claim 9, characterized in that, The step of modifying the document object model structure of the currently displayed page according to the query instruction set, so as to differentiate the display of the query results of the natural language query on the currently displayed page, includes: If the query instruction set contains an aggregation instruction, then the aggregation instruction is parsed to obtain the data field to be aggregated and the aggregation operation type corresponding to the aggregation instruction; Based on the data field to be aggregated, the field value corresponding to the data field to be aggregated is obtained from the document object model tree of the currently displayed page, and the obtained field value is aggregated according to the aggregation operation type to obtain the aggregated value; Based on the aggregated value, a floating layer node or footnote node is created in the document object model tree of the currently displayed page, and the aggregated value is written into the floating layer node or footnote node. The floating layer node or footnote node is anchored to the current display page, and the data area corresponding to the data field to be aggregated is displayed in the relevant position.

14. A data query system, characterized in that, include: The page analysis module is configured to perform page analysis on the currently displayed page to obtain the page data model of the currently displayed page. The page data model is used to characterize the semantic tags, data types, and relationships between the data fields in the currently displayed page. The semantic analysis module is configured to perform semantic analysis on the natural language query input by the user to obtain the query keywords; The association extraction module is configured to match the query keywords with the data fields in the page data model to determine ambiguous query keywords, and based on the page data model, generate at least one ambiguity decision strategy for each ambiguous query keyword. The ambiguous query keywords are query keywords that cannot establish a unique correspondence with the data fields in the page data model. The ambiguity decision strategy refers to the candidate query scheme generated for the ambiguous query keywords, which is used to show the user the accurate query intent of the ambiguous query keywords. The interactive guidance module is configured to display the at least one ambiguity decision-making strategy one by one, and generate a set of query instructions based on the target ambiguity decision-making strategy determined by the user for each of the ambiguity query keywords. The visual rendering module is configured to perform modification operations on the document object model structure of the currently displayed page according to the query instruction set, so as to distinguish and display the query results of the natural language query in the currently displayed page.

15. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the method according to any one of claims 1 to 13.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 13.

17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 13.