A Data Multimodal Query Enhancement Method and System Based on Syntax Tree Slot Correction

CN121167000BActive Publication Date: 2026-08-14ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-16
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0004]本申请的目的旨在至少能解决上述的技术缺陷之一,特别是现有技术中插槽粒度若设定不当,容易导致查询性能劣化的技术缺陷

Benefits of technology

本申请提供的基于语法树插槽修正的数据多模态查询增强方法及系统,通过引入历史查询记录与工作人员作业记录作为参考基础,能够客观量化每个工作人员在各条历史查询记录中的可靠度,从而为插槽粒度的确定提供了客观依据,避免了传统依赖人工设定所导致的主观性问题。在此基础上,结合目标人员的复查结果进一步筛选目标记录,使得用于插槽修正的参考信息更加准确可信,避免了因历史数据噪声带来的干扰。进一步地,通过对待插槽语句中关键词集的分析,结合关键词的数据类型及其在目标记录中的插槽位置进行关联建模,不仅能够揭示不同关键词在同槽与分槽场景下的变化规律,而且能够基于规律量化计算关键词之间的关联程度,据此对插槽位置进行动态修正,从而确保插槽划分与实际语义关系更为契合。由此,本方法通过对语法树插槽位置的动态修正,实现了插槽粒度的自适应调节,使得插槽划分既能够避免粒度过粗时查询灵活性不足的问题,又能够避免粒度过细时链路冗长和性能下降的情况,从而保证查询结构与实际语义需求高度契合,提高生产数据查询效率和灵活性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121167000B_ABST
    Figure CN121167000B_ABST
Patent Text Reader

Abstract

This application provides a data multimodal query enhancement method and system based on syntax tree slot correction. The method first acquires historical query records of multiple production data entries and historical work records of each employee. It calculates the total reliability of each employee in each query record to determine the target personnel and generates multiple target records based on the review results of the target personnel. Subsequently, it groups every two keywords in the statement to be slotted into a keyword set and determines the corresponding record set from the target records. For each keyword set, based on the data type of the keywords, it locates the slot position of the keywords in the syntax tree, analyzes the changing relationship between the same slot and separate slots, calculates the degree of association between keywords, and corrects the syntax tree slot position of the statement to be slotted accordingly. Thus, through dynamic correction of the syntax tree slot position, it achieves adaptive adjustment of the slot granularity, improving the efficiency and flexibility of production data querying.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data analysis technology, and in particular to a data multimodal query enhancement method and system based on syntax tree slot correction. Background Technology

[0002] The core capabilities of a power transmission and distribution production command center include production operation monitoring, operation analysis and decision-making, and production collaborative command. Managing production data plays a crucial role in ensuring the safe and stable operation of the power system, improving power supply reliability, optimizing operational efficiency, and promoting the digital transformation of the power industry. Production data queries need to balance real-time performance and accuracy; however, traditional query methods are often inefficient and unreliable when the production environment and business needs dynamically change. Therefore, introducing syntax tree slot technology to optimize production data queries has become a key technical path to improve query adaptability, efficiency, and reliability, and is also an important guarantee for the efficient implementation of the command center's core capabilities.

[0003] A syntax tree (SLT) is a tree-like data structure representing the logical relationships of structured information. It consists of nodes and edges; nodes represent information elements, and edges represent the relationships between elements. SLT slots are reserved, populated locations where child nodes or data conforming to rules can be dynamically inserted, thus improving the flexibility and reusability of the syntax tree. Slot granularity refers to the fineness of the slot division, determining the syntax tree's ability to adapt to dynamic scenarios. Currently, slot granularity is usually set manually, but this is highly subjective and does not incorporate historical query records, easily leading to granularity that is too coarse or too fine. Coarse granularity reduces flexibility and makes it difficult to adapt to dynamic scenarios; excessively fine granularity lengthens the query chain, reduces efficiency, and affects query performance and reliability. Therefore, in existing technologies, improperly set slot granularity can easily lead to degraded query performance. Summary of the Invention

[0004] The purpose of this application is to at least solve one of the above-mentioned technical defects, especially the technical defect in the prior art where improper setting of slot granularity can easily lead to degraded query performance.

[0005] Firstly, this application provides a data multimodal query enhancement method based on syntax tree slot correction, the method comprising: Obtain multiple historical query records of production data and historical work records of each employee, calculate the total reliability of each employee in each historical query record, and determine the target personnel for each historical query record; By reviewing the historical query records of each target individual, multiple target records can be identified. Form a keyword set from every two keywords in the statement to be slotted, and determine the record set corresponding to each keyword set from each target record; For each keyword set, based on the data type of the two keywords in the keyword set, locate the syntax tree slot positions of the two keywords in the corresponding record set, analyze the relationship between the two keywords in the same slot and in separate slots, and calculate the degree of association between the two keywords. Based on the degree of correlation between each pair of keywords, the syntax tree slot position of the statement to be slotted is adjusted.

[0006] In one embodiment, historical query records include query statements, which include time range, equipment number, and equipment anomaly type; historical work records include clock-in records, inspection records, and equipment anomaly analysis records. The steps for calculating the overall reliability of each worker in each historical query record include: For each historical query record, the clock-in record of each employee is compared with the time range of the historical query record to obtain the overlap time of each employee, and the ratio of each overlap time to the total time of the time range is calculated to obtain the first reliability of each employee. For each historical query record, based on each staff member's inspection record, the number of inspection days for each staff member in the area where the device number in the historical query record is located is counted to obtain the maximum number of inspection days. The ratio of each number of inspection days to the maximum number of inspection days is then calculated to obtain the second reliability of each staff member. For each historical query record, determine the total number of equipment anomaly types in that historical query record, as well as the number of times that equipment anomaly type is matched in each equipment anomaly analysis record. Calculate the ratio of each match to the total number to obtain the third reliability of each staff member. The total reliability of each employee in each historical query record is obtained by weighting the first, second, and third reliability of each employee in each historical query record.

[0007] In one embodiment, historical query records include query statements and their query results; The steps for identifying multiple target records by reviewing the historical query records of each target individual include: For each historical query record, obtain the review results and the first total number of entries obtained by the target personnel in the production data through the query statement of the historical query record, and count the second total number of entries of the query results in the historical query record, as well as the number of entries that are the same as the query results in the review results. Based on the first total number of entries, the second total number of entries, and the number of identical entries for each historical query record, calculate the difference ratio and overlap rate for each historical query record. The difference ratio is used to represent the error ratio of the query results, and the overlap rate is used to represent the similarity between the review results and the query results. For each historical query record, if the difference ratio of the historical query record is less than the preset first ratio threshold and the overlap rate is greater than the preset second ratio threshold, then the historical query record is used as the target record.

[0008] In one embodiment, the step of calculating the difference ratio and overlap rate of each historical query record based on the first total number of entries, the second total number of entries, and the number of identical entries includes: For each historical query record, calculate the first difference between the first total number of entries and the number of identical entries in the historical query record, and then use the ratio of the first difference to the first total number of entries as the difference ratio. For each historical query record, calculate the sum of the first total number of entries and the second total number of entries in that historical query record, then calculate the second difference between the sum and the number of identical entries, and take the ratio of the number of identical entries to the second difference as the overlap rate.

[0009] In one embodiment, the step of determining the record set corresponding to each keyword set from each target record includes: Determine the data types corresponding to the two keywords in each keyword set; For each keyword set, among all target records, select those that also contain the data type corresponding to that keyword set and summarize them to obtain the record set for that keyword set.

[0010] In one embodiment, the step of locating the syntax tree slot positions of the two keywords in the record set corresponding to the keyword set includes: In the record set corresponding to the keyword set, select multiple target record pairs that are adjacent in query time and generated based on the same syntax tree template. The target record pairs include the previous record with an earlier query time and the next record with a later query time. For each target record pair, in the previous and next records, determine the matching words with the same data type for each keyword in the keyword set, and determine the syntax tree slot position of each keyword in the previous and next records according to the position of each matching word in the syntax tree template.

[0011] In one embodiment, the step of analyzing the relationship between the two keywords under the same-slot and separate-slot conditions includes: For each target record pair, compare the positions of the corresponding syntax tree slots for the two keywords in the previous and next records. In each target record pair, count the number of times the content of the two keywords changes in the previous and next records, including the first number of times they change simultaneously in the same slot, the second number of times they change inconsistently in the same slot, the third number of times they change simultaneously in different slots, and the fourth number of times they change inconsistently in different slots.

[0012] In one embodiment, the step of calculating the degree of association between the two keywords includes: Calculate the sum of the first number and the second number to obtain the total number of changes in the same slot, and use the ratio of the first number to the total number of changes in the same slot as the correlation degree of the same slot; Calculate the sum of the third number and the fourth number to obtain the total number of changes in the slotting, and use the ratio of the third number to the total number of changes in the slotting as the slotting correlation degree; The correlation between the same slot and the sub-slot is weighted to obtain the degree of correlation between the two keywords.

[0013] In one embodiment, the step of correcting the syntax tree slot position of the statement to be slotted based on the degree of association between each pair of keywords includes: Obtain the syntax tree slot position for each keyword in the statement to be slotted, and adjust the syntax tree slot positions for two keywords whose relevance is lower than the relevance threshold.

[0014] Secondly, this application provides a data multimodal query enhancement system based on syntax tree slot correction, the system comprising: The target personnel identification module is used to obtain multiple historical query records of production data and the historical work records of each worker, calculate the total reliability of each worker in each historical query record, and identify the target personnel for each historical query record. The target record determination module is used to determine multiple target records by reviewing the historical query records corresponding to each target person. The record set determination module is used to form a keyword set from every two keywords in the statement to be slotted, and to determine the record set corresponding to each keyword set from each target record; The correlation degree calculation module is used to locate the syntax tree slot positions of the two keywords in the record set corresponding to the keyword set for each keyword set, based on the data type of the two keywords in the keyword set, analyze the changing relationship between the two keywords in the same slot and in separate slots, and calculate the correlation degree between the two keywords. The slot position correction module is used to correct the syntax tree slot position of the statement to be slotted based on the degree of association between each pair of keywords.

[0015] As can be seen from the above technical solutions, the embodiments of this application have the following advantages: The data multimodal query enhancement method and system based on syntax tree slot correction provided in this application introduces historical query records and staff work records as a reference basis. This allows for the objective quantification of the reliability of each staff member in each historical query record, thus providing an objective basis for determining slot granularity and avoiding the subjectivity problems caused by traditional reliance on manual settings. Furthermore, by combining the review results of the target personnel, target records are further filtered, making the reference information used for slot correction more accurate and reliable, avoiding interference from historical data noise. Moreover, by analyzing the keyword set in the statement to be slotted, and combining the data type of the keywords with their slot positions in the target records for correlation modeling, it is possible not only to reveal the changing patterns of different keywords in the same slot and slotted scenarios, but also to quantify the degree of correlation between keywords based on these patterns. This allows for dynamic correction of slot positions, ensuring that slot division is more consistent with actual semantic relationships. Therefore, this method achieves adaptive adjustment of slot granularity by dynamically modifying the position of the syntax tree slots. This ensures that slot partitioning avoids both insufficient query flexibility when the granularity is too coarse and redundant links and performance degradation when the granularity is too fine. As a result, the query structure is highly consistent with the actual semantic requirements, improving the efficiency and flexibility of production data query. Attached Figure Description

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

[0017] Figure 1 A flowchart illustrating the data multimodal query enhancement method based on syntax tree slot correction provided in this application embodiment; Figure 2 A schematic diagram of the structure of the data multimodal query enhancement device based on syntax tree slot correction provided in the embodiments of this application; Figure 3 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] It should be noted that in the process of managing and querying power transmission and distribution production data, users often need to frequently adjust query conditions to obtain data for different time periods, equipment, or anomaly types. However, query efficiency and ease of operation are often affected by the design of the syntax tree slots. Taking the query statement "Historical fault data of temperature exceedance records in M1-L2 on June 10, 2024" as an example, this statement includes equipment information, time information, and anomaly information. The time range SR is June 10, 2024, the equipment number ER is M1 (where M1-L2 represents the equipment number and L2 represents the equipment channel), and the equipment anomaly type CR is temperature exceedance. During the syntax tree construction process, if the slot granularity is too coarse, placing all information in the same slot, then when a user wants to change the query conditions, such as changing the time from "June 10, 2024" to "June 12, 2024," they must re-enter the time information, as well as time-independent equipment information and anomaly type information, leading to operational inconvenience. If the slot granularity is appropriate, placing time information, equipment information, and exception information into their respective slots, users only need to modify the information in the relevant slots without re-entering other information, thus improving the flexibility and efficiency of queries. However, if the slot granularity is too fine, further splitting the slots into multiple independent slots such as year, month, date, equipment number, channel, and exception type, the system needs to perform more database calls and logical checks when executing queries, increasing the complexity of the query chain and maintenance costs. Therefore, the core of slot granularity lies in balancing flexibility and efficiency. Too coarse a granularity will lead to system rigidity, while too fine a granularity will result in inefficiency. Only by adopting a medium granularity approach, splitting core conditions according to business logic, can dynamic adaptability and result reliability be balanced in power transmission and distribution production data queries.

[0020] Based on this, this application provides a data multimodal query enhancement method based on syntax tree slot correction. The following embodiments illustrate this method by applying it to a computer device. It is understood that the computer device can be any device with data processing capabilities, including but not limited to a single server, server cluster, personal laptop, desktop computer, etc. Figure 1 As shown, the method includes: S101: Obtain multiple historical query records of production data and historical work records of each worker, calculate the total reliability of each worker in each historical query record, and determine the target personnel for each historical query record.

[0021] Historical query records refer to archived information of queries or requests submitted by staff in the production command center system regarding production data. Historical work records refer to the work processes and results data completed by staff in the production environment, including records such as inspection, maintenance, and operation logs. Reliability is a statistical indicator used to measure the correctness and stability of staff in historical query records, and can be calculated comprehensively based on factors such as the accuracy of work record results and the consistency between queries and work. Target personnel refer to staff members who, after reliability calculation, are identified as the main responsible person or the most trustworthy executor of a particular historical query record.

[0022] Specifically, computer equipment can obtain multiple historical query records of production data and historical work records of each worker from the query log library and work management system of the production command center, and perform standardized processing on the data to ensure the consistency and reliability of the calculation.

[0023] After acquiring the data, for each historical query record, the candidate staff members involved are identified, and the overall reliability is calculated by combining the corresponding historical work records of that staff member. The overall reliability can be obtained based on a combination of multiple factors, such as the correctness of the work results, the consistency between the query and the work results, the time weight of the operation, and the prior weight of the job role. These factors can be weighted, aggregated, and normalized to form a comparable reliability index.

[0024] Subsequently, the computer system sorts the candidate staff in each historical query record according to their reliability values. It can select the staff member with the highest overall reliability for each historical query record, or determine the target staff member for that record based on preset thresholds and difference judgment rules. For example, if a staff member's reliability value is significantly higher than others, they are directly identified as the target staff member. If there are staff members with similar reliability values ​​or whose reliability values ​​do not meet the threshold, alternative strategies can be triggered, such as combining job priority or reviewing records for further confirmation, to ensure the selection of the target staff member is reasonable and credible.

[0025] In this embodiment, the computer equipment, by acquiring multiple historical query records of production data and the historical work records of each worker, can comprehensively grasp the correspondence between queries and tasks, thus providing a complete data foundation for reliability assessment. Furthermore, by calculating the overall reliability of each worker in each historical query record, the contribution and credibility of different workers in the same query task can be quantified and compared, avoiding the subjectivity problems caused by relying on human experience. Based on this, the computer equipment determines the target personnel for each historical query record according to the reliability results, thereby automatically identifying the most representative and credible executor. This not only improves the objectivity and accuracy of target personnel selection but also provides reliable data support for the production data query optimization process.

[0026] S102: Using the review results of the historical query records corresponding to each target person, identify multiple target records.

[0027] The review results refer to the data generated by the target personnel confirming, verifying, or correcting the historical query records involved, reflecting the correctness and consistency of the query. The target record refers to the set of historical query records that have been reviewed and confirmed by the target personnel. It represents highly reliable sample data from the existing query history and can serve as a reliable basis for slot correction and model optimization.

[0028] Specifically, after completing a query task in the production command center system, personnel often need to conduct a secondary verification of the historical query execution process and results to confirm their consistency and accuracy with actual production operations. Through data interaction with the review management module, computer equipment can automatically collect and store these review results and associate them with corresponding historical query records.

[0029] After linking the review results with historical query records, the review data undergoes consistency verification and result filtering. For example, when the target personnel confirm that the query results match the actual production data, the query record is marked as "passed"; when the target personnel modify the query logic or results, the modified record overwrites or supplements the original results. Through this process, the review results can be effectively filtered and standardized, ensuring that the final generated data is authentic, accurate, and traceable.

[0030] Ultimately, the computer automatically generates multiple target records based on the reviewed historical query records and stores them in the results database. This set of target records provides a highly reliable reference sample for syntax tree slot correction, avoiding the error propagation that may result from directly relying on the original query records and improving adaptability in dynamic business scenarios.

[0031] In this embodiment, the computer device utilizes the review results of the historical query records corresponding to each target person to introduce manual verification information onto the original query data. This confirms the consistency between the query results and the actual production situation, thereby ensuring the authenticity and reliability of the data. Based on this, multiple target records are further identified according to the review results. The generated target records not only contain information from the query process itself but also incorporate confirmation or correction information from the review process, thus forming a higher-quality and more reliable data set. This effectively prevents the propagation of potential deviations or errors in the original historical query records, providing validated, high-quality samples for syntax tree slot correction, thereby improving the accuracy and stability of slot correction.

[0032] S103: Form a keyword set from every two keywords in the statement to be slotted, and determine the record set corresponding to each keyword set from each target record.

[0033] The query statement to be slotted refers to the query statement or command text currently awaiting application to the syntax tree slot for structured parsing or query optimization, containing several keywords to be analyzed. Keywords are words or phrases extracted from the query statement to be slotted that possess the core semantics of a query or instruction, used to represent the query object, operation type, or constraint. The keyword set is a collection formed by combining any two keywords from the query statement to be slotted, used to analyze the semantic or positional relationships between keywords in historical target records. The record set is the set of historical query entries associated with a specific keyword set in each target record, used to analyze the distribution and correlation of keywords in the syntax tree slot.

[0034] Specifically, the process begins by extracting all keywords from the query statement to be slotted, and then combining them in pairs to form multiple keyword sets. During keyword extraction, the statement can be segmented, tagged with parts of speech, and semantically filtered using a natural language processing module or rule base to ensure that the extracted keywords accurately reflect the query semantics and operational intent. By forming keyword sets, a basic data structure can be provided for analyzing the semantic relationships between keywords and the location of the syntax tree slots.

[0035] Subsequently, for each keyword set, the computer equipment determines the corresponding record set from each target record. By matching the keyword set with the keyword information in the target records, entries in the historical query records that simultaneously contain the keyword combination can be identified and aggregated into a record set. During the matching process, the semantic type, positional relationship, or contextual information of the keywords can be incorporated to ensure that the record set accurately reflects the co-occurrence and association characteristics of the keywords in the historical query environment. Finally, each generated record set is associated with its corresponding keyword set, providing a highly reliable data foundation for analyzing the distribution and association degree of keywords in the syntax tree slots.

[0036] In this embodiment, by combining keywords in pairs, the relationships between keywords can be effectively captured, rather than relying solely on a single keyword for analysis. Furthermore, by identifying the record set corresponding to the keyword set in the target records, it can be ensured that the extracted relationships originate from highly reliable data that has been verified through review. This not only improves the accuracy and reliability of keyword association analysis but also provides a more realistic and stable reference for syntax tree slot correction, thereby ensuring higher effectiveness and reliability in the query optimization process.

[0037] S104: For each keyword set, based on the data type of the two keywords in the keyword set, locate the syntax tree slot positions of the two keywords in the corresponding record set, analyze the relationship between the two keywords in the same slot and in separate slots, and calculate the degree of association between the two keywords.

[0038] Here, "data type" refers to the attribute category of a keyword in a production data query scenario, such as representing time, equipment number, or operating status, used to guide the matching and comparison of slot positions. "Slot position" refers to the specific node position reserved in the syntax tree structure for filling keywords, reflecting the keyword's embedding point in semantic parsing and the query structure. "Same slot" refers to the behavior when two keywords are located in the same slot node, while "different slot" refers to the behavior when two keywords are located in different slot nodes. "Change relationship" refers to the differences in position, dependency, or semantics between two keywords under different slot conditions (same slot and different slot). "Association degree" quantifies the strength of the relationship between two keywords based on the analysis results of same slot and different slots.

[0039] Specifically, based on the data types of the two keywords in the keyword set, the corresponding record sets are preprocessed and normalized to ensure that heterogeneous data from the production environment can be parsed and matched in a unified format. For example, time fields in different formats can be converted into a unified timestamp, device numbers can be transformed into a unified encoding form through regular expression matching and standardization rules, and status information can be categorized into a limited set of standards. After data type normalization, each target record in the record set is further parsed to construct a traversable syntax tree structure. Through word segmentation, part-of-speech tagging, named entity recognition, and syntactic relation analysis, the generated syntax tree can comprehensively reflect the syntactic structure and logical dependencies in the target records, providing data support for accurate keyword positioning.

[0040] After the syntax tree is constructed, candidate nodes matching the keywords are retrieved in each syntax tree, and these candidate nodes are prioritized based on keyword text matching degree, data type consistency, contextual similarity, and relative position features. To avoid positioning errors caused by semantic ambiguity or node duplication, candidate nodes are comprehensively scored and disambiguated to ultimately determine the unique slot position of each keyword in the record. After positioning, the slot relationship between two keywords is further analyzed to determine whether they belong to the same slot node. If they are in the same slot, the co-occurrence pattern is recorded; if they are in separate slots, features such as their hierarchical relationship, dependency direction, and distance between nodes in the syntax tree are extracted. In this way, the computer device can capture the structured positional relationship between keywords in each target record, providing a stable basic sample for subsequent statistical and quantitative analysis.

[0041] Based on this, the samples in the same slot and those in different slots of the entire record set are accumulated and statistically analyzed, and multi-dimensional features, including the frequency of occurrence of samples in the same slot, the proportion of samples in different slots, the average node distance, and the conditional probability, are extracted. Subsequently, these features are weighted, aggregated, and normalized using a preset weight configuration to obtain a quantitative indicator representing the degree of association between two keywords.

[0042] In this embodiment, the computer device can ensure the accuracy of slot identification by locating the syntax tree slot positions in the record set according to the data types of the two keywords. By analyzing the changes in the two keywords in the same slot and in separate slots, the differences in their structures can be revealed. By calculating the degree of correlation between the two keywords, this relationship can be quantified into an indicator that can be directly used for slot correction. Thus, the slot correction process is both accurate and has a quantifiable basis, thereby improving the effectiveness and reliability of subsequent slot optimization.

[0043] S105: Adjust the syntax tree slot position of the statement to be slotted based on the degree of association between each pair of keywords.

[0044] Specifically, the correlation value table for every two keywords is read, and the table is matched with the current syntax tree structure of the statement to be slotted to determine the correction candidate set. The candidate set contains possible merging, splitting, or repositioning operations, which are initially sorted and filtered according to the magnitude of the correlation and the data type of the keywords.

[0045] During execution, for each candidate keyword pair, the current slot node in the pending slot statement is located, and rule-based decisions are applied based on the degree of association. When the degree of association reaches a preset high confidence threshold, the slots of two keywords can be merged into the same node or mapped to the same parent slot to reflect their tight semantic coupling. When the degree of association is below a preset low confidence threshold, the processor can split the current node in the same slot into two independent slots or reassign one of the keywords to a slot position that matches its semantics better. When the degree of association is in the intermediate range, the processor can adjust the relative positions of the two keywords in the syntax tree or assign them different confidence weights so that probabilistic processing can be used in subsequent parsing. Before execution, the position modification operation verifies the integrity of the syntax tree and the consistency of the query semantics, and is only submitted if it does not break the syntax structure or is permitted by semantic constraints.

[0046] Simultaneously, during the judgment process, the position of the syntax tree slot to be inserted for each keyword in the current target statement is obtained, and the potential anomalies in the slot configuration are judged based on the correlation degree of the keywords. When it is detected that the slot division is too coarse, too fine, or deviates significantly from the historical semantic pattern, an early warning is triggered, and the risk information is output to the operator through the interface or logs, thereby realizing real-time prompts and intervention for unreasonable slot allocation.

[0047] After the correction is completed, the revised syntax tree is validated to ensure semantic consistency and query executability. Validation can be achieved by matching the correction results with the corresponding record set or calculating a consistency score. If the validation passes, the correction results are persisted and the basis for the correction and timestamp are recorded for auditing purposes. If the validation fails, the original structure is rolled back or the correction is marked as awaiting manual review. In this way, the computer equipment can effectively transform quantitative conclusions based on keyword relevance into structural improvements to the statements to be processed.

[0048] In this embodiment, the computer device adjusts the syntax tree slot position of the statement to be slotted based on the degree of correlation between each pair of keywords. This ensures that the slot adjustment process has an objective and quantitative basis, thereby avoiding semantic deviations caused by improper position settings. In this way, the syntax tree structure can better match the actual relationship between keywords, improving the rationality and accuracy of slot configuration, and ultimately enhancing the expressive effect and execution stability of the query statement.

[0049] In the above embodiments, by introducing historical query records and staff work records as a reference basis, the reliability of each staff member in each historical query record can be objectively quantified, thus providing an objective basis for determining slot granularity and avoiding the subjectivity problems caused by traditional reliance on manual settings. Based on this, the target records are further filtered by combining the review results of the target personnel, making the reference information used for slot correction more accurate and reliable, avoiding interference from historical data noise. Furthermore, by analyzing the keyword set in the statement to be slotted, and combining the data type of the keywords with their slot positions in the target records for correlation modeling, it is possible not only to reveal the changing patterns of different keywords in the same slot and slotted scenarios, but also to quantify the degree of correlation between keywords based on these patterns, thereby dynamically correcting the slot positions to ensure that the slot division is more consistent with the actual semantic relationship. Therefore, this method achieves adaptive adjustment of slot granularity through dynamic correction of the syntax tree slot positions, enabling slot division to avoid both insufficient query flexibility when the granularity is too coarse and the lengthy links and performance degradation when the granularity is too fine, thus ensuring a high degree of consistency between the query structure and actual semantic needs, and improving the efficiency and flexibility of production data queries.

[0050] In one embodiment, historical query records include query statements, which include time range, equipment number, and equipment anomaly type; historical work records include clock-in records, inspection records, and equipment anomaly analysis records. The steps for calculating the overall reliability of each worker in each historical query record include: For each historical query record, the clock-in record of each employee is compared with the time range of the historical query record to obtain the overlap time of each employee, and the ratio of each overlap time to the total time of the time range is calculated to obtain the first reliability of each employee. For each historical query record, based on each staff member's inspection record, the number of inspection days for each staff member in the area where the device number in the historical query record is located is counted to obtain the maximum number of inspection days. The ratio of each number of inspection days to the maximum number of inspection days is then calculated to obtain the second reliability of each staff member. For each historical query record, determine the total number of equipment anomaly types in that historical query record, as well as the number of times that equipment anomaly type is matched in each equipment anomaly analysis record. Calculate the ratio of each match to the total number to obtain the third reliability of each staff member. The total reliability of each employee in each historical query record is obtained by weighting the first, second, and third reliability of each employee in each historical query record.

[0051] The historical query records include the query statement, query time, and corresponding query results. The query statement is a complete statement formed by inserting keywords from the query request into the syntax tree slots. The query results are the corresponding output generated based on the statement, and the results can include multimodal data such as text, images, or audio. The query statement further includes fields such as time range, equipment number, and equipment anomaly type to limit the time conditions of the query, the target equipment, and its operating status. The historical work records are records of the operation and analysis data generated by the staff during production operations, including attendance records, inspection records, and equipment anomaly analysis records. Attendance records reflect the staff's on-duty status within a specific time period, inspection records indicate the number of days and frequency of inspections by the staff in a specific equipment area, and equipment anomaly analysis records characterize the staff's analysis, confirmation, and handling of equipment anomaly types. The first reliability is a quantitative value calculated by comparing the overlap between the time range of the attendance records and the query statement, reflecting the staff's on-duty level within the corresponding time period. The second reliability is a quantitative value calculated based on the percentage of days the staff inspected the area corresponding to the equipment number involved in the query statement in the inspection records, reflecting the staff's familiarity with the target equipment. The third reliability is a quantitative value calculated based on the matching of equipment anomaly types in the equipment anomaly analysis records with those in the query statement. It reflects the professionalism and accuracy of the staff in anomaly type analysis. The overall reliability is a comprehensive value obtained by weighting the three types of reliability. It characterizes the overall credibility of each staff member in a given historical query record.

[0052] Specifically, the computer equipment first obtains each historical query record and the corresponding staff member's attendance record. Then, it compares each staff member's attendance record with the time range in the historical query records. By comparing the overlap between the on-duty time and the query time range, it calculates the overlap time for each staff member and calculates the ratio of the overlap time to the total time of the query time range, thereby obtaining the first reliability of each staff member and quantifying the credibility of the staff member's on-duty status within a specific query time period.

[0053] Next, the computer equipment calculates the number of days each staff member inspects in the area where the equipment number involved in the historical query records is located based on the inspection records of each staff member, determines the maximum number of days of inspection in that area, and calculates the ratio of each staff member's number of inspection days to the maximum number of inspection days to obtain the second reliability of each staff member, ensuring that the staff member's familiarity with the target equipment area is objectively quantified.

[0054] Subsequently, the total number of equipment anomaly types in the historical query records is obtained, and the number of hits for the corresponding anomaly type in each staff member's equipment anomaly analysis records is compared. The ratio of the hits to the total number is calculated to obtain the third reliability of each staff member, thus quantifying the staff member's professionalism in anomaly analysis and judgment.

[0055] Finally, the computer system weights the first, second, and third reliability scores of each employee in each historical query record according to preset weights to obtain the overall reliability of each employee in that historical query record. This weighted calculation comprehensively reflects the credibility of employees across three dimensions: on-duty time, inspection experience, and anomaly analysis capabilities.

[0056] In one example, firstly, the query statement and query results corresponding to a query record R are obtained, and the time range SR, device number ER, and device anomaly type CR of the query statement are extracted. Then, the historical attendance records R1P, inspection records R2P, and device anomaly analysis records R3P of a worker P are obtained. The duration of the time range SR within the working time range corresponding to attendance record R1P is taken as D1. Based on the total duration D0 of the time range SR, the first reliability V1 of worker P as the target personnel for query record R is calculated, where V1 = D1 / D0. Next, the inspection area corresponding to the location of device number ER is determined as QE, and the inspection area information corresponding to inspection record R2P within the historical M days is obtained, thus obtaining the number of inspection days NP of worker P in inspection area QE. Simultaneously, the maximum value Nmax of the number of inspection days is determined based on the inspection records of all workers within the historical M days. Using the ratio of NP to Nmax, the second reliability V2 of worker P as the target personnel for query record R is calculated. Subsequently, the equipment anomaly type CR and anomaly analysis record R3P are obtained. The number of anomaly types in CR is denoted as NC, and the number of times each anomaly type appears in anomaly analysis record R3P is counted as N0. This yields the third reliability V3 for worker P as the target person in query record R, where V3 = N0 / NC. Finally, weights W1, W2, and W3 are assigned to the first, second, and third reliability, respectively, with their sum equal to 1. The total reliability VP corresponding to worker P is then calculated using a weighted average. Since each reliability value is between 0 and 1, the total reliability VP is also between 0 and 1.

[0057] In this embodiment, the computer equipment compares each worker's clock-in records with the time range of historical query records to quantify the actual on-duty status of workers within the query record period, thus obtaining a first level of reliability. By statistically analyzing the number of days workers patrolled the area where the device number in the query record is located and comparing this to the maximum number of patrol days, the equipment equipment's patrol experience in the relevant equipment area is reflected, yielding a second level of reliability. Furthermore, by calculating the hit rate of device anomaly types in the worker's anomaly analysis records, the worker's analytical ability regarding device anomalies is assessed, yielding a third level of reliability. The three levels of reliability are weighted to obtain a total reliability, which comprehensively reflects the reliability of each worker in a specific historical query record. This provides an objective basis for judging whether to review and verify query records, improving the accuracy and credibility of historical query record screening and target personnel identification.

[0058] In one embodiment, historical query records include query statements and their query results; The steps for identifying multiple target records by reviewing the historical query records of each target individual include: For each historical query record, obtain the review results and the first total number of entries obtained by the target personnel in the production data through the query statement of the historical query record, and count the second total number of entries of the query results in the historical query record, as well as the number of entries that are the same as the query results in the review results. Based on the first total number of entries, the second total number of entries, and the number of identical entries for each historical query record, calculate the difference ratio and overlap rate for each historical query record. The difference ratio is used to represent the error ratio of the query results, and the overlap rate is used to represent the similarity between the review results and the query results. For each historical query record, if the difference ratio of the historical query record is less than the preset first ratio threshold and the overlap rate is greater than the preset second ratio threshold, then the historical query record is used as the target record.

[0059] The query statement specifies the query conditions, and the query results reflect the retrieval results of the query statement in the production data. The first total number of entries refers to the total number of entries in the target personnel's review results; the second total number of entries refers to the total number of entries in the original historical query records; and the number of identical entries refers to the number of entries in the review results that are completely identical to those in the historical query records. The difference ratio quantifies the degree of inconsistency between the review results and the historical query records, representing the potential error rate in the query results; the overlap rate quantifies the degree of similarity between the review results and the historical query records, representing the consistency of their content.

[0060] Specifically, the computer equipment first obtains the query statement for each historical query record and identifies the target personnel corresponding to that historical query record. The computer equipment then obtains the target personnel's review operation on the production data for that query statement, generates the review results, and counts the total number of entries in the review results to obtain a first total number of entries. Simultaneously, the computer equipment counts the total number of query result entries in the original historical query records to obtain a second total number of entries, and further compares the review results with the query results to calculate the number of identical entries.

[0061] Subsequently, the computer equipment generates the difference ratio and overlap rate for each historical query record based on the first total number of entries, the second total number of entries, and the number of identical entries. The difference ratio is represented by the proportion of entries in the query results that are inconsistent with the review results to the total number of entries in the query results, quantifying the potential error level of the query results. The overlap rate is represented by the proportion of identical entries in the review results to the total number of entries in the review results, reflecting the degree of similarity between the review results and the query results.

[0062] Finally, the computer device compares the difference ratio of each historical query record with a preset first ratio threshold, and simultaneously compares the overlap rate with a preset second ratio threshold. When the difference ratio is less than the first ratio threshold and the overlap rate is greater than the second ratio threshold, the computer device identifies the historical query record as the target record.

[0063] In this embodiment, the computer device first obtains the review results and the first total number of entries obtained by the target personnel through the query statement in the production data for each historical query record. Simultaneously, it counts the second total number of entries in the query results of the historical query record and determines the number of identical entries between the review results and the query results. Based on this data, the computer device can clearly quantify the consistency between the review results and the query results. It directly reflects the degree of error that may exist in the query results by calculating the difference ratio, and measures the similarity between the review results and the query results by calculating the overlap rate. This allows the computer device to rigorously evaluate the reliability of each historical query record. Only when the difference ratio is less than a specified threshold and the overlap rate is higher than a specified threshold can the record be identified as the target record. This ensures that the selected records contain a small amount of erroneous information and are highly consistent with the review results, thereby systematically eliminating potential errors and guaranteeing the accuracy and reliability of the target records.

[0064] In one embodiment, the step of calculating the difference ratio and overlap rate of each historical query record based on the first total number of entries, the second total number of entries, and the number of identical entries includes: For each historical query record, calculate the first difference between the first total number of entries and the number of identical entries in the historical query record, and then use the ratio of the first difference to the first total number of entries as the difference ratio. For each historical query record, calculate the sum of the first total number of entries and the second total number of entries in that historical query record, then calculate the second difference between the sum and the number of identical entries, and take the ratio of the number of identical entries to the second difference as the overlap rate.

[0065] Specifically, for each historical query record, the computer device first reads the first total number of entries in that historical query record and the number of identical entries in that historical query record and the review results. The computer device subtracts the first total number of entries from the number of identical entries to obtain a first difference. Then, it calculates the ratio of this first difference to the first total number of entries to obtain the difference ratio for each historical query record. This quantitatively reflects the error ratio of the query results relative to the review results in each historical query record.

[0066] Subsequently, the computer device sums the first total number of entries and the second total number of entries for each historical query record, and calculates the second difference by dividing the sum by the number of identical entries. The computer device then calculates the ratio between the number of identical entries and the second difference to obtain the overlap rate of each historical query record, thereby accurately measuring the similarity between the review results and the query results.

[0067] In one example, the computer device first uses the query result of query record R as BR, and records the number of identical entries in the review result BP and query result BR as X. It then obtains the total number of entries in review result BP (X1) and the total number of entries in query result BR (X2). Next, the computer device determines whether query record R meets the following conditions: the value of (X2-X) / X2 is less than a preset first ratio threshold, and the value of (X1+X2-X) / X is greater than a preset second ratio threshold. For query record R that meets these conditions, the computer device uses it as the target record and extracts all target records that meet the conditions from the query record set.

[0068] In this embodiment, the computer device first calculates the difference between the first total number of entries and the number of identical entries for each historical query record. This difference is then compared to the first total number of entries to obtain the difference ratio, which quantifies the deviation between the review result and the original query result, allowing the computer device to determine the accuracy of the query result. Subsequently, the computer device adds the first total number of entries and the second total number of entries to obtain a sum, calculates the difference between this sum and the number of identical entries, and then compares this difference to the number of identical entries to obtain the overlap rate. This reflects the overlap between the review result and the query result in terms of the overall number of entries, ensuring that not only one-sided deviations are considered, but also the consistency of entries from both sides is taken into account. Through the calculation of the difference ratio and overlap rate, the computer device can rigorously determine the reliability of each historical query record, thereby effectively filtering out target records and improving the accuracy and stability of data processing.

[0069] In one embodiment, the step of determining the record set corresponding to each keyword set from each target record includes: Determine the data types corresponding to the two keywords in each keyword set; For each keyword set, among all target records, select those that also contain the data type corresponding to that keyword set and summarize them to obtain the record set for that keyword set.

[0070] Specifically, the computer device first analyzes the two keywords in each keyword set to determine their respective data types. This can be achieved by retrieving the data attributes of the keywords in historical records or databases. The computer device can identify the type of each keyword according to predefined data type classification rules. By clearly defining the data type of the keywords, the computer device can ensure that the data of different keywords can be correctly matched according to type during the analysis process, avoiding processing errors or logical deviations caused by inconsistencies in data types.

[0071] Subsequently, for each keyword set, the computer equipment filters out records from the target records that simultaneously contain the data type corresponding to that keyword set. This is done by iterating through the target records and comparing the data type of each record with the data type of the keyword set. Only records containing two keywords with data types matching the keyword set are included in the summary. In this way, the computer equipment can accurately summarize the target records that meet the criteria, forming a record set corresponding to each keyword set, ensuring the completeness and accuracy of the keyword set analysis, and improving the efficiency of data processing and the accuracy of the results.

[0072] In one example, a computer device obtains two keywords g1 and g2 from a keyword set G, and a query statement SQ corresponding to a target record T. The computer device determines whether the data types corresponding to keywords g1 and g2 simultaneously exist in the data types of the keywords in the query statement SQ. When the computer device determines that both data types exist simultaneously in the query statement, it marks the target record T as a marked record of keyword set G. Through the judgment and marking operations on each target record, the computer device can obtain all marked records corresponding to keyword set G and aggregate these marked records to form a complete record set corresponding to keyword set G.

[0073] In this embodiment, the computer device first determines the data types corresponding to the two keywords in each keyword set, thus clarifying the attributes and classifications of each keyword during data processing and ensuring the accuracy of keyword identification and matching. Subsequently, the computer device filters and summarizes target records from each target record that simultaneously contain data types corresponding to the keyword set, ensuring that only records meeting the criteria are selected and avoiding irrelevant records from interfering with the analysis results, thereby generating a record set corresponding to each keyword set. In this way, the computer device can accurately and systematically organize the correspondence between keyword sets and target records, improving the accuracy and reliability of data analysis.

[0074] In one embodiment, the step of locating the syntax tree slot positions of the two keywords in the record set corresponding to the keyword set includes: In the record set corresponding to the keyword set, select multiple target record pairs that are adjacent in query time and generated based on the same syntax tree template. The target record pairs include the previous record with an earlier query time and the next record with a later query time. For each target record pair, in the previous and next records, determine the matching words with the same data type for each keyword in the keyword set, and determine the syntax tree slot position of each keyword in the previous and next records according to the position of each matching word in the syntax tree template.

[0075] The syntax tree template refers to a hierarchical parsing structure pre-generated by computer equipment based on the query statement structure, used to determine the logical and syntactic position of each keyword in the query statement. Matching terms refer to words or identifiers in the target record that have the same data type as the keywords, used to locate the corresponding slot positions in the syntax tree template.

[0076] Specifically, the computer device first selects target record pairs from the record set corresponding to the keyword set, which are adjacent in query time and generated based on the same syntax tree template. Each target record pair includes the previous record with the earlier query time and the subsequent record with the later query time. By comparing the query time information in the records, the computer device automatically identifies record pairs with adjacent time sequences to ensure that subsequent analysis is continuous and comparable in time. This allows for accurate observation of the syntactic structure changes of the same keyword at different points in time.

[0077] Subsequently, for each pair of target records, the computer device identifies each keyword in the keyword set in the previous and next records, and searches for matching words with the same data type. By performing part-of-speech tagging and data type matching on the query, the computer device can quickly locate words with attributes consistent with the target keywords, thereby ensuring the accuracy and reproducibility of the matching and guaranteeing the accurate identification of the correspondence between keywords in different records.

[0078] Next, based on the position of the matching words in the syntax tree template, the computer device determines the syntax tree slot position of each keyword in the previous and next records. The computer device can then use the syntax tree parsing module to perform structured analysis on the query statement, mapping the matching words to the corresponding slot nodes in the template, thereby accurately reflecting the contextual relationships of the keywords within the syntax structure. In this way, the computer device can dynamically analyze the changes in the syntax tree position of keywords over time while maintaining logical consistency. This not only improves the accuracy of keyword correlation analysis but also provides a reliable foundation for subsequent intelligent analysis and data mining based on syntax structure.

[0079] In one example, the computer device first extracts the record set corresponding to a keyword set G, and obtains the keywords g1 and g2 from the keyword set. It then selects marked records R1 and R2 from the record set that have adjacent query times and share the same syntax tree template, where the query time of R1 is earlier than that of R2, to ensure the temporal order and continuity of the analysis. Subsequently, the computer device sets the data types corresponding to keywords g1 and g2 to D1 and D2 respectively, and obtains the keywords corresponding to data types D1 and D2 from the query statements of marked records R1 and R2. It further determines the corresponding slot positions of data types D1 and D2 in the syntax tree template, thereby accurately mapping the positions of the keywords in the grammatical structure.

[0080] In this embodiment, by determining the data type matching and syntax tree slot position of keywords in record pairs that are temporally adjacent and based on the same syntax tree template, the computer device can accurately capture the changes and relationships of keywords in the sentence structure, thereby ensuring a high degree of accuracy in the semantic and structural analysis of the target records. This effectively reduces analysis errors caused by differences in query time or syntax structure, improves the reliability of data comparison and trend mining, and thus enhances the accuracy and reliability of the entire data processing system in production information analysis.

[0081] In one embodiment, the step of analyzing the relationship between the two keywords under the same-slot and separate-slot conditions includes: For each target record pair, compare the positions of the corresponding syntax tree slots for the two keywords in the previous and next records. In each target record pair, count the number of times the content of the two keywords changes in the previous and next records, including the first number of times they change simultaneously in the same slot, the second number of times they change inconsistently in the same slot, the third number of times they change simultaneously in different slots, and the fourth number of times they change inconsistently in different slots.

[0082] Among them, the number of content changes refers to the number of different types of changes calculated when comparing the content of the slots corresponding to the keywords in the previous record and the next record. These include four cases: simultaneous changes in the same slot, inconsistent changes in the same slot, simultaneous changes in different slots, and inconsistent changes in different slots. This is used to quantify the degree of semantic or informational change of keywords in a record pair.

[0083] It's important to note that data type refers to the category corresponding to the keyword. For example, 2024 corresponds to the year, 6 to the month, and M1 to the device ID. In practical applications, the degree of association between different keywords may vary. For instance, the device ID M1 and channel L2 have a strong association; when the channel changes, the device ID usually changes as well. Therefore, placing the device ID and channel in the same syntax tree slot is reasonable. However, the association between the year and the device ID is weak; when the year changes, the device ID may not change accordingly. Therefore, placing the year and device ID in the same slot is less reasonable. Thus, by analyzing the relationship between each keyword and its data type, we can determine the appropriateness of the keywords in the syntax tree slots, thereby providing a basis for subsequent semantic analysis and query processing.

[0084] Based on this, the computer device can identify the syntax tree slot position corresponding to each keyword in the previous and next records for each target record pair, and compare the slot positions. By analyzing the changes in keywords between the previous and next records, the computer device categorizes them into four statistical types: simultaneous changes in the same slot, inconsistent changes in the same slot, simultaneous changes in different slots, and inconsistent changes in different slots. The computer device counts the number of these four types of changes for each target record pair, thereby quantifying the behavioral patterns of keywords in the syntax tree.

[0085] In practice, the changes in keywords within the syntax tree slots can be determined by analyzing the target record pairs. For example, if the previous record is "Query device M1 channel L2 status" and the next record is "Query device M2 channel L3 status," and the device number and channel share the same syntax tree slot, then both keywords will change in both records, and the changes will be consistent—that is, the device number will change from M1 to M2, and the channel will change from L2 to L3. In this case, the changes are synchronous. Conversely, if the previous record is "Query device M1 channel L2 status" and the next record is "Query device M1 channel L3 status," and the device number and channel are still in the same slot, but the device number remains unchanged while the channel changes, then the changes in keywords within the slots are inconsistent. If the device number and channel are located in different syntax tree slots, and the previous record is "Query device M1 channel L2 status" and the next record is "Query device M2 channel L3 status," then both keywords will change synchronously in both records, indicating that they are changing simultaneously in different slots. In the case where the previous record is "Query the status of channel L2 of device M1" and the next record is "Query the status of channel L3 of device M1", the device number and channel are located in different slots. If the device number does not change but the channel changes, it means that they belong to different slots and the changes are inconsistent.

[0086] In this embodiment, the computer device compares the positions of the two keywords in the syntax tree slots of each target record pair in the preceding and following records, and counts the number of times the keyword content changes. This includes simultaneous changes in keywords within the same slot, inconsistent changes in keywords within the same slot, simultaneous changes in keywords across different slots, and inconsistent changes in keywords across different slots. This allows the computer device to accurately identify the change patterns of keywords between records, thereby determining whether the slot configuration of keywords in the syntax tree is reasonable. By analyzing these changes, the computer device can distinguish whether there is a close relationship or independence between keywords. This is beneficial for optimizing semantic parsing and improving the accuracy of query results, as it ensures that the syntax tree slot design more closely matches the logical relationships of actual data, reducing incorrect matches or unreasonable structural configurations.

[0087] In one embodiment, the step of calculating the degree of association between the two keywords includes: Calculate the sum of the first number and the second number to obtain the total number of changes in the same slot, and use the ratio of the first number to the total number of changes in the same slot as the correlation degree of the same slot; Calculate the sum of the third number and the fourth number to obtain the total number of changes in the slotting, and use the ratio of the third number to the total number of changes in the slotting as the slotting correlation degree; The correlation between the same slot and the sub-slot is weighted to obtain the degree of correlation between the two keywords.

[0088] Specifically, the computer device first sums the first and second counts obtained from the statistics of each target record pair to obtain the total number of changes within the same slot. Then, the ratio of the first count to the total number of changes within the same slot is calculated to obtain the slot relevance. By comparing the synchronicity of keyword changes within the same slot, the degree to which keywords maintain logical consistency within the same slot can be quantified, thus reflecting their semantic relevance.

[0089] Next, the computer sums the third and fourth counts to obtain the total number of slot changes, and then calculates the ratio of the third count to the total number of slot changes to obtain the slot correlation degree. By analyzing the synchronicity of keyword changes in different slots, the strength of the correlation between keywords in independent grammatical positions can be reflected, thereby helping to determine whether there is a logical relationship across slots.

[0090] Finally, the computer device performs a weighted calculation of the same-slot correlation and the separate-slot correlation to obtain the overall correlation degree between the two keywords. This can comprehensively consider the variation patterns of the same-slot and separate-slot keywords, accurately quantify the correlation strength between keywords, ensure the establishment of a reasonable correspondence between syntactic structure and data logic, thereby enhancing the accurate understanding of the dependencies between keywords and improving the reliability of query and parsing.

[0091] In one example, the computer device first sets the initial quantities of covariates within the same slot (Q1), dissimilar covariates within the same slot (Q2), covariates across different slots (Q3), and dissimilar covariates across different slots (Q4) to zero. Then, it analyzes the data types D1 and D2 corresponding to each pair of marked records R1 and R2. If D1 and D2 are in the same slot and their corresponding keywords change simultaneously in the queries for R1 and R2, the covariate within the same slot (Q1) is incremented by 1. If D1 and D2 are still in the same slot but their corresponding keyword changes are inconsistent, the dissimilar covariate within the same slot (Q2) is incremented by 1. If D1 and D2 are not in the same slot and their corresponding keywords change simultaneously, the dissimilar covariate across different slots (Q3) is incremented by 1. If D1 and D2 are not in the same slot and their corresponding keyword changes are inconsistent, the dissimilar covariate across different slots (Q4) is incremented by 1. By statistically analyzing all marked records in the record set, the computer device obtains the final covariates within the same slot (Q1), dissimilar covariates within the same slot (Q2), covariates across different slots (Q3), and dissimilar covariates across different slots (Q4). Subsequently, based on these statistical values, the first relevance Y1 corresponding to the same slot is calculated, where Y1 = Q1 / (Q1+Q2), and the second relevance Y2 corresponding to different slots is calculated, where Y2 = Q3 / (Q3+Q4). Combining these with pre-set weights for the first and second relevance, the overall relevance degree between keywords g1 and g2 within the keyword set G is obtained. This systematically quantifies the synchronicity of keyword changes within the same or different slots, thus providing reliable data for analyzing logical relationships between keywords and semantic optimization.

[0092] In this embodiment, by calculating the ratio of consistency in keyword changes within the same slot and across different slots, and combining this with weighted processing, the computer device can accurately quantify the degree of logical association between keywords. This enables the identification of keyword combinations that are highly related or relatively independent in the semantic structure, thereby improving the accuracy of statement parsing and query optimization, and ensuring a more reliable and consistent understanding of keyword relationships in complex records.

[0093] In one embodiment, the step of correcting the syntax tree slot position of the statement to be slotted based on the degree of association between each pair of keywords includes: Obtain the syntax tree slot position for each keyword in the statement to be slotted, and adjust the syntax tree slot positions for two keywords whose relevance is lower than the relevance threshold.

[0094] Specifically, the computer device first obtains the initial slot position of each keyword in the statement to be slotted in the syntax tree. These slot positions can be determined by parsing the statement and combining it with the syntax tree template. For each pair of keywords in the statement, their correlation is calculated, and the obtained value is compared with a preset correlation threshold to determine whether the logical relevance of the keyword pair meets the requirements. Keyword pairs with a correlation below the threshold indicate that their semantic relationship under the current slot arrangement is not strong enough or there is a potential conflict, which may affect the accuracy of semantic parsing or subsequent query operations.

[0095] Upon identifying keyword pairs with a relevance level below a threshold, the computer can perform a slot adjustment operation, repositioning the keyword pair to more appropriate slots in the syntax tree. The new slot positions can be determined by analyzing the slot distribution, association patterns, and historical slot change patterns of other keywords in the target statement. This ensures that the adjusted keyword slots better reflect their semantic relationships and logical dependencies. This approach not only improves the structural rationality of the syntax tree but also reduces parsing errors or query result biases caused by improper slot placement.

[0096] Ultimately, the layout of the statements in the syntax tree after slot adjustments is more rational, and the semantic relationships between keywords are enhanced. This provides a more reliable data foundation for subsequent semantic analysis, automated query optimization, and historical record comparison. Simultaneously, this process can be executed automatically on the device without manual intervention, thereby improving system processing efficiency and accuracy, and enabling efficient management and optimization of large-scale statement data.

[0097] The following describes the data multimodal query enhancement system based on syntax tree slot correction provided in the embodiments of this application. The data multimodal query enhancement system based on syntax tree slot correction described below can be referred to in correspondence with the data multimodal query enhancement method based on syntax tree slot correction described above. Figure 2 As shown, this application provides a data multimodal query enhancement system based on syntax tree slot correction, the system comprising: The target personnel identification module 201 is used to obtain multiple historical query records of production data and historical work records of each worker, calculate the total reliability of each worker in each historical query record, and identify the target personnel for each historical query record. The target record determination module 202 is used to determine multiple target records by utilizing the review results of the historical query records corresponding to each target person; The record set determination module 203 is used to form a keyword set from every two keywords in the statement to be slotted, and to determine the record set corresponding to each keyword set from each target record; The correlation degree calculation module 204 is used to locate the syntax tree slot positions of the two keywords in the record set corresponding to the keyword set for each keyword set, based on the data type of the two keywords in the keyword set, analyze the changing relationship between the two keywords in the same slot and in separate slots, and calculate the correlation degree between the two keywords. The slot position correction module 205 is used to correct the syntax tree slot position of the statement to be slotted based on the degree of association between each pair of keywords.

[0098] In one embodiment, historical query records include query statements, which include time range, equipment number, and equipment anomaly type; historical work records include clock-in records, inspection records, and equipment anomaly analysis records. Target personnel identification module 201 includes: The first reliability calculation submodule is used to compare the clock-in record of each staff member with the time range of the historical query record for each historical query record, obtain the overlap time of each staff member, and calculate the ratio of each overlap time to the total time of the time range to obtain the first reliability of each staff member. The second reliability calculation submodule is used to calculate the number of inspection days of each staff member in the area where the device number of the historical query record is located, based on the inspection records of each staff member, to obtain the maximum number of inspection days, and to calculate the ratio of each inspection day to the maximum number of inspection days, so as to obtain the second reliability of each staff member. The third reliability calculation submodule is used to determine the total number of equipment anomaly types in each historical query record, as well as the number of times each equipment anomaly type is hit in each equipment anomaly analysis record, and calculate the ratio of each hit to the total number to obtain the third reliability of each worker. The total reliability calculation submodule is used to obtain the total reliability of each employee in each historical query record by weighting the first reliability, second reliability, and third reliability of each employee in each historical query record.

[0099] In one embodiment, historical query records include query statements and their query results; Target record determination module 202 includes: The item count submodule is used to obtain, for each historical query record, the review results obtained by the target personnel in the production data through the query statement of the historical query record and the first total number of items, and to count the second total number of items in the query results of the historical query record, as well as the number of items that are the same as the query results in the review results. The item count analysis submodule is used to calculate the difference ratio and overlap rate of each historical query record based on the first total number of items, the second total number of items, and the number of identical items. The difference ratio is used to represent the error ratio of the query results, and the overlap rate is used to represent the similarity between the review results and the query results. The target record determination submodule is used to determine the target record for each historical query record if the difference ratio of the historical query record is less than a preset first ratio threshold and the overlap rate is greater than a preset second ratio threshold.

[0100] In one embodiment, the entry quantity analysis submodule includes: The difference ratio calculation unit is used to calculate, for each historical query record, the first difference between the first total number of entries and the number of identical entries in the historical query record, and then use the ratio of the first difference to the first total number of entries as the difference ratio; The overlap rate calculation unit is used to calculate the sum of the first total number of entries and the second total number of entries in each historical query record, calculate the second difference between the sum and the number of identical entries, and take the ratio of the number of identical entries to the second difference as the overlap rate.

[0101] In one embodiment, the record set determination module 203 includes: The data type determination submodule is used to determine the data types corresponding to the two keywords in each keyword set. The record set determination submodule is used to filter out target records that simultaneously contain the data type corresponding to the keyword set from each target record for each keyword set, and then summarize them to obtain the record set for that keyword set.

[0102] In one embodiment, the correlation degree calculation module 204 includes: The target record pair generation submodule is used to select multiple target record pairs generated based on the same syntax tree template with adjacent query times from the record set corresponding to the keyword set. The target record pair includes the previous record with an earlier query time and the next record with a later query time. The syntax tree slot position determination submodule is used to determine, for each target record pair, a matching word of the same data type for each keyword in the keyword set in the previous and next records, and to determine the syntax tree slot position of each keyword in the previous and next records based on the position of each matching word in the syntax tree template.

[0103] In one embodiment, the correlation degree calculation module 204 includes: The content change count submodule is used to compare the syntax tree slot positions of the two keywords in the previous and next records for each target record pair, and to count the number of times the content of the two keywords changes in the previous and next records for each target record pair, including the first number of times they change simultaneously in the same slot, the second number of times they change inconsistently in the same slot, the third number of times they change simultaneously in different slots, and the fourth number of times they change inconsistently in different slots.

[0104] In one embodiment, the correlation degree calculation module 204 includes: The same-slot correlation calculation submodule is used to calculate the sum of the first number and the second number to obtain the total number of changes in the same slot, and to take the ratio of the first number to the total number of changes in the same slot as the same-slot correlation degree. The submodule for calculating the correlation degree of the slotting is used to calculate the sum of the third number and the fourth number to obtain the total number of slotting changes, and the ratio of the third number to the total number of slotting changes is used as the correlation degree of the slotting. The correlation degree calculation submodule is used to weight the correlation degree of the same slot and the correlation degree of the sub-slot to obtain the correlation degree of the two keywords.

[0105] In one embodiment, the slot position correction module 205 includes: The slot position correction submodule is used to obtain the syntax tree slot position of each keyword in the statement to be slotted, and adjust the syntax tree slot positions of two keywords whose relevance is lower than the relevance threshold.

[0106] In one embodiment, this application also provides a storage medium storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the data multimodal query enhancement method based on syntax tree slot correction as described in any of the above embodiments.

[0107] In one embodiment, this application also provides a computer device storing computer-readable instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of the data multimodal query enhancement method based on syntax tree slot correction as described in any of the above embodiments.

[0108] Indicatively, such as Figure 3 As shown, Figure 3 This is a schematic diagram of the internal structure of a computer device 300 provided in an embodiment of this application. The computer device 300 can be provided as a server. (Refer to...) Figure 3The computer device 300 includes a processing component 302, which further includes one or more processors, and memory resources represented by memory 301 for storing instructions, such as application programs, that can be executed by the processing component 302. The application programs stored in memory 301 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 302 is configured to execute instructions to perform the data multimodal query enhancement method based on syntax tree slot correction of any of the above embodiments.

[0109] The computer device 300 may also include a power supply component 303 configured to perform power management of the computer device 300, a wired or wireless network interface 304 configured to connect the computer device 300 to a network, and an input / output (I / O) interface 305. The computer device 300 may operate on an operating system stored in memory 301, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or similar.

[0110] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0111] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, "a," "an," "the," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. "Multiple" refers to at least two, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of the related listed items.

[0112] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.

[0113] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data multimodal query enhancement method based on syntax tree slot correction, characterized in that, The method includes: Obtain multiple historical query records of production data and historical work records of each employee, calculate the total reliability of each employee in each historical query record, and determine the target personnel for each historical query record; By reviewing the historical query records of each of the target individuals, multiple target records are identified. Form a keyword set from every two keywords in the statement to be slotted, and determine the record set corresponding to each keyword set from each of the target records; For each keyword set, based on the data type of the two keywords in the keyword set, the syntax tree slot positions of the two keywords are located in the corresponding record set. For each target record pair, the syntax tree slot positions of the two keywords in the previous and next records are compared. In each target record pair, the number of times the content of the two keywords changes in the previous and next records is counted, including the first number of simultaneous changes in the same slot, the second number of inconsistent changes in the same slot, the third number of simultaneous changes in different slots, and the fourth number of inconsistent changes in different slots. The sum of the first and second numbers is calculated to obtain the total number of changes in the same slot, and the ratio of the first number to the total number of changes in the same slot is used as the same slot correlation degree. The sum of the third and fourth numbers is calculated to obtain the total number of changes in the slot, and the ratio of the third number to the total number of changes in the slot is used as the slot correlation degree. The same slot correlation degree and the slot correlation degree are weighted to obtain the correlation degree of the two keywords. The target record pair includes the previous record with an earlier query time and the next record with a later query time. The syntax tree slot position of the statement to be slotted is adjusted according to the degree of correlation between each pair of keywords.

2. The data multimodal query enhancement method based on syntax tree slot correction according to claim 1, characterized in that, The historical query records include query statements, which include time range, equipment number, and equipment anomaly type. The historical work records include attendance records, inspection records, and equipment anomaly analysis records. The step of calculating the total reliability of each worker in each of the historical query records includes: For each historical query record, the clock-in record of each staff member is compared with the time range of the historical query record to obtain the overlap time of each staff member, and the ratio of each overlap time to the total time of the time range is calculated to obtain the first reliability of each staff member; For each historical query record, based on the inspection records of each staff member, the number of inspection days of each staff member in the area where the device number of the historical query record is located is counted to obtain the maximum number of inspection days, and the ratio of each inspection day to the maximum number of inspection days is calculated to obtain the second reliability of each staff member. For each historical query record, determine the total number of equipment anomaly types in the historical query record, and the number of times each equipment anomaly type is hit in each equipment anomaly analysis record. Calculate the ratio of each hit to the total number to obtain the third reliability of each worker. The total reliability of each staff member in each historical query record is obtained by weighting the first reliability, second reliability, and third reliability of each staff member in each historical query record.

3. The data multimodal query enhancement method based on syntax tree slot correction according to claim 1, characterized in that, The historical query records include the query statements and their results. The step of determining multiple target records by utilizing the review results of the historical query records corresponding to each of the target personnel includes: For each historical query record, obtain the review results and the first total number of entries obtained by the target personnel in the production data through the query statement of the historical query record, and count the second total number of entries of the query results in the historical query record, as well as the number of entries that are the same as the query results in the review results. Based on the first total number of entries, the second total number of entries, and the number of identical entries for each historical query record, calculate the difference ratio and overlap rate for each historical query record. The difference ratio is used to represent the error ratio of the query results, and the overlap rate is used to represent the similarity between the review results and the query results. For each historical query record, if the difference ratio of the historical query record is less than a preset first ratio threshold and the overlap rate is greater than a preset second ratio threshold, then the historical query record is taken as the target record.

4. The data multimodal query enhancement method based on syntax tree slot correction according to claim 3, characterized in that, The step of calculating the difference ratio and overlap rate of each historical query record based on the first total number of entries, the second total number of entries, and the number of identical entries includes: For each historical query record, after calculating the first difference between the first total number of entries and the number of identical entries in the historical query record, the ratio of the first difference to the first total number of entries is used as the difference ratio. For each historical query record, the sum of the first total number of entries and the second total number of entries in the historical query record is calculated, and the second difference between the sum and the number of identical entries is calculated. The ratio of the number of identical entries to the second difference is taken as the overlap rate.

5. The data multimodal query enhancement method based on syntax tree slot correction according to claim 1, characterized in that, The step of determining the record set corresponding to each keyword set from each of the target records includes: Determine the data types corresponding to the two keywords in each keyword set; For each keyword set, among each target record, target records that simultaneously contain the data type corresponding to that keyword set are selected and summarized to obtain the record set of that keyword set.

6. The data multimodal query enhancement method based on syntax tree slot correction according to claim 1, characterized in that, The step of locating the syntax tree slot positions of the two keywords in the record set corresponding to the keyword set includes: In the record set corresponding to the keyword set, select multiple target record pairs that are adjacent in query time and generated based on the same syntax tree template; For each target record pair, in the previous and next records, a matching word with the same data type as each keyword in the keyword set is determined, and the position of each keyword in the syntax tree slot in the previous and next records is determined according to the position of each matching word in the syntax tree template.

7. The data multimodal query enhancement method based on syntax tree slot correction according to any one of claims 1 to 6, characterized in that, The step of correcting the syntax tree slot position of the statement to be slotted based on the degree of correlation between each pair of keywords includes: Obtain the syntax tree slot position for each keyword in the statement to be slotted, and adjust the syntax tree slot positions for two keywords whose relevance is lower than the relevance threshold.

8. A data multimodal query enhancement system based on syntax tree slot correction, characterized in that, The system includes: The target personnel identification module is used to acquire multiple historical query records of production data and historical work records of each worker, calculate the total reliability of each worker in each historical query record, and identify the target personnel for each historical query record; The target record determination module is used to determine multiple target records by utilizing the review results of the historical query records corresponding to each of the target personnel. The record set determination module is used to form a keyword set from every two keywords in the statement to be slotted, and to determine the record set corresponding to each keyword set from each of the target records; The correlation degree calculation module is used to, for each keyword set, locate the syntax tree slot positions of the two keywords in the corresponding record set according to the data type of the two keywords in the keyword set, compare the syntax tree slot positions of the two keywords in the previous and next records for each target record pair, and count the number of times the content of the two keywords changes in the previous and next records for each target record pair, including the first number of times they change simultaneously in the same slot, the second number of times they change inconsistently in the same slot, and the third number of times they change simultaneously in different slots. The first number of changes and the second number of changes in different slots are calculated, and the sum of the first number and the second number is used to obtain the total number of changes in the same slot. The ratio of the first number to the total number of changes in the same slot is used as the correlation degree of the same slot. The sum of the third number and the fourth number is used to obtain the total number of changes in different slots. The ratio of the third number to the total number of changes in different slots is used as the correlation degree of different slots. The correlation degree of the same slot and the correlation degree of different slots are weighted to obtain the degree of association between the two keywords. The target record pair includes the previous record with an earlier query time and the subsequent record with a later query time. The slot position correction module is used to correct the syntax tree slot position of the statement to be slotted based on the degree of correlation between each pair of keywords.

Citation Information

Patent Citations

  • Semantic-based data lake query system and method

    CN114218400A

  • Query Optimization

    US20110093500A1