Information processing method and device and electronic equipment

By parsing the query statement and constructing a query tree, determining the source field of the query field and its link, and generating operator lineage information, the problem of inaccurate operator lineage information in the existing technology is solved, and the efficiency and accuracy of query statement correction are improved.

CN120705163APending Publication Date: 2025-09-26MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510146867.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the prior art, the operator lineage information of query data is not accurately determined, which makes it difficult to quickly locate and correct erroneous structured query statements.

Method used

By parsing the query statement, building a query tree, traversing the nodes to determine the source fields of the query field and their links, generating operator lineage information, and indicating the operator processing relationship between the query field and the source field.

Benefits of technology

The accuracy of operator lineage information and the efficiency of query statement correction are improved to ensure the accuracy and efficiency of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705163A_ABST
    Figure CN120705163A_ABST
Patent Text Reader

Abstract

The invention provides an information processing method and device and electronic equipment. The method comprises the following steps: analyzing a query statement to obtain a query field and a sub-query statement of the query statement; a query tree is constructed based on the sub-query statements, and fields in the sub-query statements corresponding to father nodes in the query tree are source fields of fields in the sub-query statements corresponding to child nodes of the father nodes; traversing nodes in the query tree, and determining a first source field of the query field and a query link between the query field and the first source field; and generating operator blood relationship information of the query field based on the query link, wherein the operator blood relationship information indicates an operator processing relationship between the query field and the first source field. According to the method and the device, the precision of the determined operator blood relationship information can be improved, so that the efficiency of correcting the wrong query field through the operator blood relationship information is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to database technology, and in particular to an information processing method, device and electronic device. Background Art

[0002] After obtaining query data through a structured query statement, the query data is often obtained through a complex, multi-layered structured query statement. To avoid being unable to find the specific structured query statement that caused the error after the query data is queried, it is necessary to determine the operator lineage information of each query data after obtaining the query data. This operator lineage information can then be used to quickly locate the structured query statement that caused the error. Therefore, how to determine the operator lineage information of query data has become a hot research issue in this field. Summary of the Invention

[0003] The embodiments of the present application provide an information processing method, apparatus, and electronic device, which can improve the accuracy of determined operator lineage information, thereby improving the efficiency of correcting erroneous query fields through operator lineage information.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] This embodiment of the present application provides an information processing method, the method comprising:

[0006] Parsing the query statement to obtain query fields and sub-query statements of the query statement;

[0007] Building a query tree based on the sub-query statement, wherein the fields in the sub-query statement corresponding to the parent node in the query tree are source fields of the fields in the sub-query statement corresponding to the child node of the parent node;

[0008] Traversing the nodes in the query tree, determining a first source field of the query field, and a query link between the query field and the first source field;

[0009] Operator lineage information of the query field is generated based on the query link, where the operator lineage information indicates an operator processing relationship between the query field and the first source field.

[0010] An embodiment of the present application provides an information processing device, including:

[0011] A statement parsing module, used to parse the query statement to obtain the query fields and sub-query statements of the query statement;

[0012] A query tree construction module, configured to construct a query tree based on the sub-query statement, wherein the fields in the sub-query statement corresponding to the parent node in the query tree are source fields of the fields in the sub-query statement corresponding to the child node of the parent node;

[0013] a link determination module, configured to traverse the nodes in the query tree, determine a first source field of the query field, and a query link between the query field and the first source field;

[0014] An information generation model is used to generate operator lineage information of the query field based on the query link, where the operator lineage information indicates an operator processing relationship between the query field and the first source field.

[0015] An embodiment of the present application provides an electronic device, comprising:

[0016] a memory for storing computer-executable instructions or computer programs;

[0017] The processor is used to implement the information processing method provided in the embodiment of the present application when executing the computer-executable instructions or computer programs stored in the memory.

[0018] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the information processing method provided in the embodiment of the present application when executed by a processor.

[0019] An embodiment of the present application provides a computer program product, including a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, the information processing method provided in the embodiment of the present application is implemented.

[0020] The embodiments of the present application have the following beneficial effects:

[0021] The query statement is parsed to obtain the query fields and sub-query statements of the query statement. By parsing the query statement, the query fields and sub-query statements therein are separated, and then the query fields and sub-query statements are processed separately in the subsequent process, which is equivalent to classifying the data and performing corresponding operations on different types of data, thereby improving the processing efficiency of the query statement. A query tree is then constructed based on the sub-query statements. The fields in the sub-query statements corresponding to the parent nodes in the query tree are the source fields of the fields in the sub-query statements corresponding to the child nodes of the parent nodes. By storing the information of the sub-query statements in the nodes of the query tree, the efficiency of storing the information of the sub-query statements is improved, and the relationship between the sub-query statements can be directly determined through the structure of the query tree, thereby improving the efficiency of information utilization; the nodes in the query tree are traversed to determine the first source field of the query field and the query link between the query field and the first source field, and the operator lineage information of the query field is generated based on the query link. The operator lineage information indicates the operator processing relationship between the query field and the first source field. By traversing the nodes in the query tree, the relationship between each query statement can be obtained, and then each process from the first source field to the final query field can be obtained, thereby improving the accuracy of the determined operator lineage information. At this time, if the query field obtained by the final query is erroneous, the operator lineage information of the query field can be used to accurately locate the query statement with the error, and then the query statement with the error can be modified to obtain the correct query field, thereby improving the accuracy and efficiency of repairing the erroneous query field. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 1 is a schematic diagram of the architecture of the information processing system 100 provided in an embodiment of the present application;

[0023] Figure 2 is a structural diagram of an electronic device 500 provided in an embodiment of the present application;

[0024] Figure 3A This is a first flow chart of the information processing method provided in an embodiment of the present application;

[0025] Figure 3B A second flow chart of the information processing method provided in an embodiment of the present application;

[0026] Figure 3C A third flow chart of the information processing method provided in an embodiment of the present application;

[0027] Figure 4 is a schematic diagram of a syntax tree provided in an embodiment of the present application;

[0028] Figure 5 is a schematic diagram of the result obtained by pruning the syntax tree provided in an embodiment of the present application;

[0029] Figure 6 This is a schematic diagram of a query tree traversal method provided by an embodiment of the present application;

[0030] Figure 7 This is a flowchart of the implementation of the information processing method provided in the embodiment of the present application.

[0031] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of distinction between the advantages and disadvantages of the solutions or the priority in the implementation process. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0033] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0034] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0035] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0036] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0037] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0038] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0039] 1) Operator Lineage: Operator lineage in a query statement refers to the logical path of data transformation and processing, specifically the sequence of operations that transform data from one state to another. This typically includes steps such as data source acquisition, data cleansing, transformation, and final data storage. By analyzing the operator lineage in a query statement, we can clearly understand how data is transformed from its original state through a series of processing steps to form an analyzable dataset. Operator lineage analysis is crucial for improving data governance and data quality. It helps us understand the source and flow of data, thereby optimizing data processing processes, improving data processing efficiency, and ensuring data accuracy and consistency. Furthermore, operator lineage analysis can identify potential data issues such as duplication and missing data, allowing us to take appropriate measures to address them. In terms of specific technical implementation, operator lineage analysis can be performed using technologies such as graph databases and SQL parsing. For example, by parsing SQL statements, we can identify operations such as query, filtering, and aggregation, and then construct a logical diagram of data processing, visually demonstrating the data's progress from its original state to its final state. This analysis applies not only to structured data but also to unstructured and semi-structured data, providing strong support for complex data processing and analysis tasks. In short, operator lineage is a crucial tool for understanding data processing flows, optimizing data quality, and improving data processing efficiency. By analyzing operator lineage in query statements, we can better understand the source and flow of data, providing strong support for data governance and analysis.

[0040] 2) Query Statements: Query statements are commands used to communicate with a database, request data, modify data, or perform other data-related operations. Specifically, query statements can be used to retrieve, sort, aggregate, update, insert, and delete data from a database.

[0041] 3) Aliases: In database operations, aliases are a common feature used to assign temporary names to tables or columns. Column aliases are often used to provide more readable column names in query results when column names are long or contain spaces or special characters. Column aliases can also be used to distinguish columns in the result set when multiple columns have the same name. When table names are long or the same table needs to be referenced multiple times in the same query, table aliases can be used to simplify query statements. Table aliases can also be used to distinguish column names from different tables in join queries.

[0042] 4) Physical Table: A physical table is the data table actually stored in the database. It represents the data's physical representation on disk. It is directly associated with the database's storage engine and determines data storage methods, indexing mechanisms, and data access speed.

[0043] In related technologies, the operator lineage information determined often only indicates which physical table the final data is obtained from, but does not pay attention to the intermediate query process. In this way, although the correct query data can be obtained by adjusting the structured query statement that queries the corresponding physical table, since the specific erroneous structured query statement cannot be accurately located, if the data obtained by the query is erroneous, it is difficult to quickly find the erroneous structured query statement through the operator lineage information.

[0044] In order to solve the above problems, the embodiments of the present application provide an information processing method, apparatus, device, computer-readable storage medium and computer program product, which can improve the accuracy of the determined operator lineage information, thereby improving the efficiency of correcting erroneous query fields through operator lineage information. The following describes an exemplary application of the information processing device provided by the embodiments of the present application. The device provided by the embodiments of the present application can be implemented as various types of terminals such as laptops, tablet computers, desktop computers, set-top boxes, smart phones, smart speakers, smart watches, smart TVs, and car-mounted terminals, and can also be implemented as servers. Below, an exemplary application when the device is implemented as a server will be described.

[0045] See also Figure 1 , Figure 1 This is a schematic diagram of the architecture of the information processing system 100 provided in an embodiment of the present application. To support an information processing application, the terminal 400 is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.

[0046] The terminal 400 is used to input a query statement of the database and transmit the query statement to the server 200 through the network 300 .

[0047] The server 200 is used to receive the query statement transmitted by the terminal 400 through the network 300, and then parse the query statement to obtain the query field and sub-query statement of the query statement, and build a query tree based on the sub-query statement. The field in the sub-query statement corresponding to the parent node in the query tree is the source field of the field in the sub-query statement corresponding to the child node of the parent node. The nodes in the query tree are traversed to determine the first source field of the query field and the query link between the query field and the first source field. The operator lineage information of the query field is generated based on the query link. The operator lineage information indicates the operator processing relationship between the query field and the first source field. Finally, the operator lineage information of each query field can be stored so that the operator lineage information of the corresponding query field can be directly retrieved when the operator lineage information of the query field is needed.

[0048] The information processing method provided by the embodiment of the present application can be applied to financial scenarios, call scenarios, shopping scenarios, artificial intelligence scenarios and resource transaction scenarios. In the financial scenario, the server can query the financial data stored in the financial database through a query statement, such as transaction record information, identity information and policy information, and then parse the query statement based on the grammatical type of the query statement to obtain the query field and sub-query statement of the query statement, and construct a query tree based on the nested recursive relationship between the sub-query statements. The field in the sub-query statement corresponding to the parent node in the query tree is the source field of the field in the sub-query statement corresponding to the child node of the parent node. By traversing the nodes in the query tree, the node that records the query field is found, and the query field is determined to be the first source field from the physical table. It should be noted that since the query statement may be obtained by nesting multiple query statements, the query fields stored in the node are related to the query field. The source field may not come from the physical table, but from the query results of other query statements. At this time, the first source field of the query field can be determined by the alias of the query results of other query statements. Then, the query link between the query field and the first source field can be determined, and the operator lineage information of the query field is generated based on the query link. The operator lineage information indicates the operator processing relationship between the query field and the first source field. Finally, the operator lineage information of each query field can be stored. If the future income calculated based on the financial data obtained from the query is different from the expectation, the operator lineage information query can be used to quickly locate the erroneous query statement, and then the erroneous query statement can be corrected to obtain the correct financial data to recalculate the future income.

[0049] In a call scenario, the server can query the call information database for call-related data through query statements, such as communication record information, communication time information, and communication object information, and then parse the query statement based on the grammatical type of the query statement to obtain the query fields and sub-query statements of the query statement. A query tree is constructed based on the nested recursive relationship between the sub-query statements. The fields in the sub-query statements corresponding to the parent node in the query tree are the source fields of the fields in the sub-query statements corresponding to the child nodes of the parent node. By traversing the nodes in the query tree, the node that records the query field is found, and the first source field of the query field from the physical table is determined. It should be noted that since the query statement may be obtained by nesting multiple query statements, the fields stored in the node that are related to the query statement are The source field of a field may not come from a physical table, but from the query results of other query statements. At this time, the first source field of the query field can be determined by the alias of the query results of other query statements. Then, the query link between the query field and the first source field can be determined, and the operator lineage information of the query field is generated based on the query link. The operator lineage information indicates the operator processing relationship between the query field and the first source field. Finally, the operator lineage information of each query field can be stored. When the call data obtained by counting the call records is wrong, the operator lineage information can be used to quickly find the query statement that has an error in the call record statistics process, and then the correct call record data can be obtained by correcting the query statement with an error.

[0050] In a shopping scenario, the server can use query statements to query shopping information stored in the database of shopping information related data, such as transaction record information, address information, and preferential policy information, and then parse the query statement based on the grammatical type of the query statement to obtain the query fields and sub-query statements of the query statement, and build a query tree based on the nested recursive relationship between the sub-query statements. The fields in the sub-query statements corresponding to the parent node in the query tree are the source fields of the fields in the sub-query statements corresponding to the child nodes of the parent node. By traversing the nodes in the query tree, the node that records the query field is found, and the first source field of the query field from the physical table is determined. It should be noted that since the query statement may be obtained by nesting multiple query statements, the source field of the query field stored in the node may not be the source field of the query field. It does not originate from the physical table, but from the query results of other query statements. At this time, the first source field of the query field can be determined by the alias of the query results of other query statements, and then the query link between the query field and the first source field can be determined. The operator lineage information of the query field is generated based on the query link. The operator lineage information indicates the operator processing relationship between the query field and the first source field. Finally, the operator lineage information of each query field can be stored, so that after the user feedbacks that the user's shopping information or logistics information is wrong, the operator lineage information of the shopping can be used to quickly find the query statement with the error, and then adjust the query statement with the error to obtain the corrected shopping information or corrected logistics information, and feedback the corrected shopping information or corrected logistics information to the user.

[0051] In the artificial intelligence scenario, the server can query the artificial intelligence data related to artificial intelligence stored in the artificial intelligence database through query statements, such as training sample information, function construction information, and training process information, and then parse the query statement based on the syntax type of the query statement to obtain the query fields and sub-query statements of the query statement. A query tree is constructed based on the nested recursive relationship between the sub-query statements. The fields in the sub-query statement corresponding to the parent node in the query tree are the source fields of the fields in the sub-query statement corresponding to the child node of the parent node. By traversing the nodes in the query tree, the node that records the query field is found, and the first source field of the query field from the physical table is determined. It should be noted that since the query statement may be obtained by nesting multiple query statements, the source field of the query field stored in the node may not come from the physical table, but from other The query results of other query statements can be used to determine the first source field of the query field through the alias of the query results of other query statements. Then, the query link between the query field and the first source field can be determined, and the operator lineage information of the query field is generated based on the query link. The operator lineage information indicates the operator processing relationship between the query field and the first source field. Finally, the operator lineage information of each query field can be stored. After the artificial intelligence model is trained with the acquired training samples, the artificial intelligence model cannot meet the expected training requirements. The acquired operator lineage information can be used to check whether the training samples found from the artificial intelligence database are the same as expected. If the training samples are different from the expectations, the corresponding query statement can be adjusted through the operator lineage information, and the training samples can be re-obtained from the artificial intelligence database to retrain the artificial intelligence model.

[0052] In the resource transaction scenario, the server can query the transaction information database for transaction-related data through query statements, such as transaction time, transaction content, and after-sales information. Then, the query statement is parsed based on the grammatical type of the query statement to obtain the query fields and sub-query statements of the query statement. A query tree is constructed based on the nested recursive relationship between the sub-query statements. The fields in the sub-query statements corresponding to the parent node in the query tree are the source fields of the fields in the sub-query statements corresponding to the child nodes of the parent node. By traversing the nodes in the query tree, the node that records the query field is found, and the first source field of the query field from the physical table is determined. It should be noted that since the query statement may be obtained by nesting multiple query statements, the source field of the query field stored in the node may not be the source field. It does not come from the physical table, but from the query results of other query statements. At this time, the first source field of the query field can be determined by the alias of the query results of other query statements, and then the query link between the query field and the first source field can be determined. The operator lineage information of the query field is generated based on the query link. The operator lineage information indicates the operator processing relationship between the query field and the first source field. Finally, the operator lineage information of each query field can be stored, and then the resource transaction information for a user in a certain time period can be obtained through the query statement. When the user reports that the resource transaction information is wrong, the query statement with the error can be queried through the obtained operator lineage information, and then the query statement with the error can be modified to obtain the corrected resource transaction information and feedback it to the user.

[0053] In some embodiments, the server 200 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal and the server may be connected directly or indirectly via wired or wireless communication, which is not limited in the embodiments of the present application.

[0054] See also Figure 2 , Figure 2 is a structural diagram of an electronic device 500 provided in an embodiment of the present application, Figure 2The electronic device 500 shown includes: at least one processor 510, a memory 550, at least one network interface 520 and a user interface 530. The various components in the electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 540 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 540 is not shown in FIG. Figure 2 Various buses are labeled as bus system 540 .

[0055] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0056] The user interface 530 includes one or more output devices 531 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0057] The memory 550 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 550 may optionally include one or more storage devices that are physically remote from the processor 510.

[0058] The memory 550 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.

[0059] In some embodiments, the memory 550 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.

[0060] Operating system 551, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0061] A network communication module 552 for reaching other electronic devices via one or more (wired or wireless) network interfaces 520 , exemplary network interfaces 520 including Bluetooth, Wi-Fi, and Universal Serial Bus (USB);

[0062] a presentation module 553 for enabling presentation of information via one or more output devices 531 (e.g., a display screen, a speaker, etc.) associated with the user interface 530 (e.g., a user interface for operating peripheral devices and displaying content and information);

[0063] The input processing module 554 is configured to detect one or more user inputs or interactions from one of the one or more input devices 532 and to translate the detected inputs or interactions.

[0064] In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in software. Figure 2 The information processing device 555 stored in the memory 550 is shown. This device can be software in the form of a program or plug-in, and includes the following software modules: a statement parsing module 5551, a query tree construction module 5552, a link determination module 5553, and an information generation model 5554. These modules are logical and can be arbitrarily combined or further separated according to the functions they implement. The functions of each module will be described below.

[0065] In other embodiments, the apparatus provided in the embodiments of the present application may be implemented in hardware. As an example, the apparatus provided in the embodiments of the present application may be a processor in the form of a hardware decoding processor, which is programmed to execute the information processing method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor may be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0066] The following describes the information processing method provided by the embodiment of the present application. As mentioned above, the electronic device that implements the information processing method of the embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution entity of each step will not be repeated below.

[0067] See also Figure 3A , Figure 3A This is a first flow chart of the information processing method provided by the embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.

[0068] In step 101, the query statement is parsed to obtain query fields and sub-query statements of the query statement.

[0069] As an example, the information processing method provided in the embodiments of the present application can be implemented in a distributed system. A distributed system can be a collection of independent computer systems that communicate and collaborate through a network. These systems work together to complete a task or provide a service. In a distributed system, each computer node can run its own operating system, and the nodes interact and coordinate with each other through message passing. The following are some key characteristics of distributed systems: Parallelism: A distributed system can use multiple nodes to perform multiple tasks simultaneously, thereby improving the system's processing power and throughput; Fault tolerance: A distributed system can continue to work even when some nodes fail because it can maintain service availability through redundancy and fault tolerance mechanisms; Scalability: A distributed system can expand its processing power and storage capacity by adding more nodes to accommodate growing workloads; Transparency: Users generally do not need to know the exact location of data or resources in the system because this information is managed and processed by the system itself; Openness: A distributed system can support interoperability in heterogeneous environments, that is, different types of computers and operating systems can work together; Security: A distributed system needs to protect itself from unauthorized access and attacks to ensure the security and integrity of data.

[0070] For example, if there are 1 million query statements that need to be parsed, it would be very slow to parse them one by one on a single computer. In this case, the 1 million query statements can be split into several batches, such as 100. Then each computer only needs to parse 10,000 SQL statements, and finally the results of these 100 computers can be aggregated. Frameworks such as SPARK support this task splitting and running and then aggregating.

[0071] As an example, the query field may be a field obtained by querying a query statement, that is, the query result of executing the query statement; since the query statement may be composed of multiple query statements nested and recursively, the sub-query statement may be a query statement with a nested and recursive relationship obtained after parsing the query statement.

[0072] As an example, the query statement parsing process can be a series of steps for a database management system to process, understand, and execute a submitted query statement. Specifically, it can include lexical analysis of the query statement, breaking the query statement into a series of tokens, such as keywords such as SELECT, FROM, WHERE, as well as identifiers, literals, etc., to identify the basic elements in the query statement and prepare for grammatical analysis. After that, the first token of the lexical analysis can be obtained, which is usually a keyword of the query statement (such as SELECT, INSERT, UPDATE, DELETE, etc.). Then, according to the grammatical rules of the language, a series of prediction and recursive steps can be used to identify the token sequence and build a hierarchical syntax tree. The grammatical analysis can match the current token with the grammatical rules, for example, matching the various components of the SELECT statement: the select list, the FROM clause, the WHERE clause, etc.

[0073] In some embodiments, the query statement in step 101 is parsed to obtain the query fields and sub-query statements of the query statement, which can be obtained by Figure 3B Steps 1011 to 1012 are implemented as shown.

[0074] In step 1011, the query statement is parsed based on the language syntax type of the query statement to obtain a syntax tree corresponding to the query statement.

[0075] For example, in different databases and data processing systems, the syntax type of query statements may vary depending on the execution engine used. The following describes two common types of query statement syntax: 1. Hive Query Language (Hive Query Language) can include Data Definition Language (DDL), which is used to define database structures, such as creating (CREATE TABLE), modifying (ALTER TABLE), and deleting (DROP TABLE) tables; Data Manipulation Language (DML), which is used to manage data in the database, such as inserting (INSERT), querying (SELECT), updating (UPDATE), and deleting (DELETE); and Data Control Language (DCL), which is used to control different data access permissions, such as granting (GRANT) and revoking (REVOKE). 2. Spark SQL supports standard SQL syntax and can perform operations such as data selection (SELECT), insertion (INSERT), update (UPDATE), and deletion (DELETE). Spark SQL supports aggregate functions (such as SUM, AVG, COUNT, etc.) as well as GROUP BY and HAVING clauses. It also supports different types of table join operations such as INNER JOIN, LEFT OUTER JOIN, and RIGHT OUTER JOIN.

[0076] As an example, the above examples show that different syntax types correspond to different statement structures. For example, HiveQuery Language uses the DROP TABLE statement to delete data, while Spark SQL uses the DELETE statement to delete data. Therefore, before parsing a query statement, you need to first determine the syntax type of the query statement and then parse the query statement based on the determined syntax type.

[0077] For example, if query statement A is Insert into table db1.table1 Select * from db1.table2 where column_a = 1, and the syntax type of query statement A is Spark SQL, then Spark SQL lexical analysis can be performed on query statement A to decompose the query statement into a series of tokens, including Insert into table db1.table1, Select * from db1.table2, and where column_a = 1. Then, the syntax analyzer organizes these tokens into a syntax tree according to the rules of the Spark SQL language, such as Figure 4 As shown, Figure 4 This is a schematic diagram of the syntax tree provided in the embodiment of the present application. Figure 4 In the example, node 401 is a root node, and the information included in node 401 is Insert into table db1.table1; node 402 is a child node of node 401, and the information included in node 402 is Select * from db1.table2; node 403 is a child node of node 402, and the information included in node 403 is where column_a=1.

[0078] In step 1012, the syntax tree is pruned to obtain query fields and sub-query statements of the query statement.

[0079] In some embodiments, the pruning of the syntax tree in step 1012 to obtain query fields and sub-query statements of the query statement can be implemented by the following technical solution: performing a first pruning process on the syntax tree to obtain a query header and a query body of the query statement, the query header including at least one query field, and the query body including at least one main query statement; if the grammatical relationship corresponding to the main query statement is a nested recursive relationship, performing a second pruning process on the main query statement to obtain multiple sub-query statements that are freed from the nested recursive relationship.

[0080] As an example, after obtaining the syntax tree, the syntax tree can be pruned. First, the syntax tree can be pruned into a query header and a query body. The second pruning can pruned the sub-query statement with a nested recursive relationship into multiple sub-query statements without a nested recursive relationship, wherein the query header can be the header information of the relevant information of the output table including the query field (such as the name of the output table, and the query field included in the output table), and the query body can be the sub-query statement that needs to be executed to obtain the query field in the output table.

[0081] As an example, we first introduce the first cropping, following the above Figure 4 For example, Figure 4The information included in node 401 is Insert into tabledb1.table1. According to this statement, the output table is db1.table1. Since the output table is a table that records query fields, db1.table1 can be used as the query header to trim node 401 to db1.table1. Then, the information included in node 403 is where column_a=1. It can be seen that the information stored in node 403 is a filter condition. The filter condition and other related information are needed to determine the operator lineage information later. Therefore, node 403 can be trimmed to obtain the following: Figure 5 The pruned tree shown, Figure 5 This is a schematic diagram of the result obtained by pruning the syntax tree provided in the embodiment of the present application. Figure 5 It can be seen that after pruning, the syntax tree retains the query header (db1.table1) and the query body (Select * from db1.table2).

[0082] As an example, if the main query statement A is Select alias_a, alias_b from (select column_a alias_a, column_b alias_b from db1.table1), it can be seen that the main query statement A is a query statement with a nested recursive relationship. That is, the main query statement A can be pruned to obtain Select alias_a, alias_b from and select column_a alias_a, column_b alias_b from db1.table1, respectively. Among them, Select alias_a, alias_b from and select column_a alias_a, column_b alias_b fromdb1.table1 are subqueries, and the subquery statement Select alias_a, alias_b from and the subquery statement select column_a alias_a, column_b alias_b from db1.table1 have a nested recursive relationship.

[0083] In this way, unnecessary information in a complex syntax tree can be pruned and removed, and operator lineage information can be subsequently determined based on the information in the pruned syntax tree, thereby improving the efficiency of determining operator lineage information.

[0084] In step 102, a query tree is constructed based on the sub-query statements. The fields in the sub-query statements corresponding to the parent nodes in the query tree are the source fields of the fields in the sub-query statements corresponding to the child nodes of the parent node.

[0085] In some embodiments, there are multiple sub-query statements. The construction of a query tree based on the sub-query statements in step 102 can be implemented by the following technical solution: determining the nested recursive relationship between the sub-query statements; performing the following processing on the two sub-query statements in the nested recursive relationship: determining a first sub-query statement representing the query source and a second sub-query statement representing the query purpose; and constructing a query tree with the first sub-query statement as the parent node and the second sub-query statement as the child node.

[0086] Continuing with the previous example, there is a nested recursive relationship between subquery statement A (Select alias_a, alias_b from) and subquery statement B (select column_a alias_a, column_b alias_b from db1.table1). Subquery statement A is the first subquery statement that represents the query source, and subquery statement B is the second subquery statement that represents the query destination. That is, the data queried in subquery statement A is queried from the data obtained by subquery statement B. Subquery statement A can then be used as the parent node and subquery statement B as the child node to construct a query tree.

[0087] Through the above method, the nested recursive relationship between query statements can be represented in the form of a tree, which improves the storage efficiency of the nested recursive relationship. At the same time, the relationship between query statements can be simply and clearly displayed in the form of a tree, which improves the readability of the data.

[0088] In step 103 , the nodes in the query tree are traversed to determine the first source field of the query field and the query link between the query field and the first source field.

[0089] As an example, since a query statement may query multiple query fields, for example, the query statement is select round(alias_a), floor(alias_b) from db1.table2 group by column_a, column_b), where select round(alias_a) from db1.table2 group by column_a can query query field A, and select floor(alias_b) from db1.table2 group by column_b can obtain query field B. In the subsequent process of determining the operator lineage information of the field, the operator lineage information of each query field needs to be determined separately. Therefore, the operator lineage information of query field A can be determined first, and then the operator lineage information of query field B can be determined.

[0090] In some embodiments, the traversal of the nodes in the query tree in step 103 to determine the first source field of the query field can be performed as follows: Figure 3C Steps 1031 to 1033 are implemented as shown.

[0091] In step 1031 , the nodes in the query tree are traversed according to the hierarchical relationship between the nodes in the query tree.

[0092] As an example, the first source field may be data stored in a physical table, and the query field is obtained by querying the first source field through a query statement. That is, the data actually stored in the database is the first source field, and the query field is obtained by querying the first source field.

[0093] As an example, the way to traverse the query tree nodes can be to start from the root node and traverse in sequence. For details, please refer to Figure 6 The query tree is traversed in the order shown. Figure 6 This is a schematic diagram of the query tree traversal method provided by the embodiment of the present application. Figure 6 It can be seen that the traversal order can be node 602 → node 603 → node 604 → node 605 → node 606 → node 607. It should be noted that the above is only one traversal order provided in the embodiment of the present application. The specific traversal process in actual application can be selected according to actual conditions, as long as the entire query tree can be traversed.

[0094] In step 1032 , the query field is compared with a second source field, where the second source field is a field in the third sub-query statement corresponding to the traversed node.

[0095] As an example, during the traversal process, the query field can be compared with the second source field of the third sub-query statement stored in the node. For example, if the query field is name and the second source field B in the third sub-query statement A is age, the comparison between the query field and the second source field B will fail. If the second source field D in the third sub-query statement C is name, the comparison between the query field and the second source field D will succeed.

[0096] As an example, the information included in the query tree may be as shown in the following table (1):

[0097]

[0098] Table 1

[0099] As shown in Table 1, a query tree node stores the node's unique identifier, its parent node ID, the name of its source table, the specific list of SELECT queries (the second source field), the where clause, the join clause, and the aggregation condition. The specific list of SELECT queries is the second source field of the subquery statement corresponding to the node. This can be compared with the source field using the data recorded in the table (e.g., max(column_a)alias_a, min(column_b)alias_b in the table above).

[0100] In step 1033 , if the query field is successfully compared with the second source field, the first source field of the query field is determined based on the second source field.

[0101] In some embodiments, determining the first source field of the query field based on the second source field in step 1033 can be achieved through the following technical solution: if the second source field comes from a physical table, the second source field is determined as the first source field of the query field; if the second source field does not come from a physical table, the fourth sub-query statement associated with the third sub-query statement is determined, and based on the alias of the second source field, the third source field corresponding to the alias is queried in the fourth sub-query statement; if the third source field comes from a physical table, the third source field is determined as the first source field of the query field.

[0102] For example, if the comparison is successful, if the second source field originates from a physical table, this indicates that the second source field is stored in the physical table. This query does not involve a subsequent query process, and the query field is directly obtained by querying the physical table. Therefore, the query link between the first source field and the query field can be directly determined. If the second source field does not originate from a physical table, this indicates that the second source field is not data stored in the physical table, and the second source field was obtained through a query statement. In this case, it is necessary to determine how the second source field was obtained through the query statement.

[0103] As an example, you can follow the above Figure 6 In the traversal order shown, the fourth sub-query statement of the relationship between the third sub-query statement obtained through traversal, the association relationship here may be that there is a nested recursive relationship between the third sub-query statement and the fourth sub-query statement.

[0104] For example, since the second source field doesn't come from the underlying data in the physical table but is instead obtained by querying other data using a query function, its alias is required when querying the second source field in the fourth subquery. For example, the original query statement is "Select alias_a from (select column_a alias_a from db1.table1)." This shows that the query statement has two layers. Therefore, when determining which table the outer query statement (Select alias_a from) originates from, there's no specific table name. The data queried by the outer query statement actually comes from the query results of the inner query statement (select column_a alias_a fromdb1.table1). Therefore, an alias is required for the results of the inner query statement. By determining which query statement the data corresponding to the alias was obtained, the third source field can be obtained. For example, in the example above, alias_a can be used as an alias for the query results of "select column_a alias_a from db1.table1."

[0105] Performing a query using the query alias instead of the entire query statement can improve the efficiency of querying data.

[0106] In some embodiments, determining the query link between the query field and the first source field in step 103 can be implemented through the following technical solution: if the second source field does not come from the physical table, then based on the association relationship between the third sub-query statement and the fourth sub-query statement, determine the query order of the second source field and the third source field; based on the query order, generate a query link between the query field and the first source field.

[0107] As an example, if the second source field is not from a physical table, it represents that the second source field is obtained from the query result obtained from the query statement. At this time, it is necessary to determine the source of the second source field, and then determine the query order based on the source relationship. For example, the query statement for querying source field A is query statement B, the query statement for querying source field C is query statement C, and the query statement for querying source field D is query statement E, where source field A is obtained from the query result of query statement C, and source field C is obtained from the query result of query statement E. It can be seen that the query order is to execute query statement E first, then query statement C, and finally query statement B.

[0108] For example, if the query statement is select round(alias_a) from(select max(column_a, from db1.table2 group by column_a)), and the query statement finally obtained is column_c, it can be seen that the query order of this query statement is to execute the innermost query statement first, that is, execute max(column_a), and finally execute round(alias_a). Therefore, the query link between the query field and the first source field can be column_c→round(alias_a)→max(column_a).

[0109] In step 104 , operator lineage information of the query field is generated based on the query link, where the operator lineage information indicates an operator processing relationship between the query field and the first source field.

[0110] In some embodiments, generating the operator lineage information of the query field based on the query link in step 104 can be implemented through the following technical solution: based on the association relationship between the sub-query statements in the query link, determining the query order of each sub-query statement in the query link; based on the query order, integrating each sub-query statement to obtain the operator lineage information of the query field.

[0111] For example, after obtaining a query chain, to intuitively express the operator lineage information of the query field, you can integrate the subquery statements in the query chain. For example, if the query chain is column_c → round(alias_a) → max(column_a), the query statements round(alias_a) and max(column_a) in the query chain can be integrated into round(max(column_a)), and the integrated result can be used as the operator lineage information of the query field.

[0112] Through the above method, the operator lineage information of the query field can be represented by a simple structure, which reduces the storage space occupied by storing the operator lineage information and improves the readability of the operator lineage information.

[0113] Next, combine Figure 7 The following describes an exemplary application of the present invention in a practical application scenario. Figure 7 This is a flowchart of the implementation of the information processing method provided in the embodiment of the present application.

[0114] In step 701, a syntax tree is obtained.

[0115] The parser (Antlr) loads the grammar files of different engines based on their query statements, along with the entire grammar metadata. This primarily involves loading all tables in the big data platform, including the fields in each table, for use in query parsing. The parser then generates a syntax tree for each grammar type. These syntax trees can include Hive AST, Doris AST, Presto AST, and Spark AST.

[0116] In step 702, the syntax tree is pruned to determine output table information and source table information.

[0117] The syntax tree parsed by Antlr is trimmed, mainly into two parts, including the query header and the query body. The header contains the output table information. For example, the query statement is Insert into table db1.table1 Select * from db1.table2 where column_a = 1, and the output table information is Insert into table db1.table1 in the above example. The output table db1.table1 can be extracted and saved. The original query statement becomes only Select * from db1.table2 where column_a = 1. The query statement becomes shorter, which is the trimming process. In the above example, the clause following "where" is a filter condition and is useless for parsing the operator lineage. Therefore, it can be removed, and the query statement becomes "Select * from db1.table2." According to the syntax of the query statement, we can know that the source table (the table storing the first source field) is the table following "from." Therefore, we can know the source table db1.table2. After the source table and the output table are clear, we only need to search the source table for the corresponding source fields one by one according to the order of the fields in the output table to obtain the source table information.

[0118] In step 703, each field (query field) of the output table is taken out from the output table to traverse the query tree.

[0119] Specifically, the traversal begins at the root node, comparing the query field with the source field in the traversed node. If the comparison fails, the traversal continues until the comparison succeeds. If so, the traversal determines whether the source table of the source field is a physical table. If so, the operator lineage information for the query field is determined and stored. If the source table of the source field is not a physical table, the traversal continues through the query tree using the alias of the source table of the source field until data is found whose source table is a physical table. If the comparison fails, the traversal continues through the query tree.

[0120] For example, obtain the output table db1.table1 from the header after AST trimming, obtain the field list of the output table based on the output table, assuming the fields are column_c and column_d, and start traversing the select subtree one by one according to the fields of the output table. Taking the traversal of column_c as an example, the query tree is traversed first at the basis node (outermost node), and the outermost traversal adopts the index corresponding method (for example, a table table_a contains 3 fields, column_a, column_b, column_c. The so-called index is to search in the order of this field. Specifically, it first traverses in depth according to column_a, then traverses according to column_b, and finally traverses according to column_c). (Select alias_a, alias_b from (select column_a alias_a, column_b alias_b from db1.table1) You can see that there are two layers of select statements here. The first layer can only reference the fields of the second layer through aliases. This is a common SQL standard. To search, the first layer's alias_a is used to find the second layer's alias_a, and the second layer's alias_a is used to find the second layer's original column_a, and so on).

[0121] Through this approach, business personnel can quickly understand the processing logic of query fields. Previously, it could take hours to sort out the logic, now it takes only seconds. This is because after parsing a query statement, the specific processing logic for each output table field is generated. Business personnel can directly view the parsing results without having to review the query statement itself. This approach also enables the construction of query links. Previously, manual analysis was time-consuming and prone to omissions and errors. Now, simply by looking at the generated operator lineage diagram, one can understand the logic between tasks, between queries and tables, between tables and fields, and between fields and operators. Because the relationship between tables and fields, and between fields and operators, is revealed during query parsing, building a graph becomes very easy with this relationship data.

[0122] It is understandable that in the embodiments of the present application, when user information and other related data are involved, when the embodiments of the present application are applied to specific products or technologies, user permission or consent must be obtained, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0123] The following continues to describe the exemplary structure of the information processing device 555 provided in the embodiment of the present application implemented as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the information processing device 555 of the memory 550 may include:

[0124] A statement parsing module 5551 is used to parse the query statement to obtain the query fields and sub-query statements of the query statement;

[0125] A query tree construction module 5552 is configured to construct a query tree based on the sub-query statement, wherein the fields in the sub-query statement corresponding to the parent node in the query tree are source fields of the fields in the sub-query statement corresponding to the child node of the parent node;

[0126] a link determination module 5553, configured to traverse the nodes in the query tree to determine a first source field of the query field and a query link between the query field and the first source field;

[0127] The information generation model 5554 is used to generate operator lineage information of the query field based on the query link, where the operator lineage information indicates the operator processing relationship between the query field and the first source field.

[0128] In some embodiments, the statement parsing module 5551 is also used to parse the query statement based on the language syntax type of the query statement to obtain a syntax tree corresponding to the query statement; and to trim the syntax tree to obtain query fields and sub-query statements of the query statement.

[0129] In some embodiments, the statement parsing module 5551 is also used to perform a first pruning process on the syntax tree to obtain a query header and a query body of the query statement, where the query header includes at least one query field, and the query body includes at least one main query statement; if the grammatical relationship corresponding to the main query statement is a nested recursive relationship, then a second pruning process is performed on the main query statement to obtain multiple sub-query statements that resolve the nested recursive relationship.

[0130] In some embodiments, the query tree construction module 5552 is also used to determine the nested recursive relationship between each sub-query statement; perform the following processing on two sub-query statements that have a nested recursive relationship: determine a first sub-query statement that represents the source of the query, and a second sub-query statement that represents the purpose of the query; and construct the query tree with the first sub-query statement as the parent node and the second sub-query statement as the child node.

[0131] In some embodiments, the link determination module 5553 is also used to traverse the nodes in the query tree according to the hierarchical relationship between the nodes in the query tree; compare the query field with the second source field, where the second source field is the field in the third sub-query statement corresponding to the traversed node; if the query field is successfully compared with the second source field, then based on the second source field, the first source field of the query field is determined.

[0132] In some embodiments, the link determination module 5553 is also used to determine the second source field as the first source field of the query field if the second source field is derived from a physical table; if the second source field is not derived from a physical table, determine the fourth sub-query statement associated with the third sub-query statement, and query the third source field corresponding to the alias in the fourth sub-query statement based on the alias of the second source field; if the third source field is derived from a physical table, determine the third source field as the first source field of the query field.

[0133] In some embodiments, the link determination module 5553 is also used to determine the query order of the second source field and the third source field based on the association relationship between the third sub-query statement and the fourth sub-query statement if the second source field does not come from a physical table; and generate a query link between the query field and the first source field based on the query order.

[0134] In some embodiments, the information generation module 5554 is also used to determine the query order of each sub-query statement in the query link based on the association relationship between each sub-query statement in the query link; based on the query order, each sub-query statement is integrated to obtain the operator lineage information of the query field.

[0135] An embodiment of the present application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the information processing method described in the embodiment of the present application.

[0136] The embodiment of the present application provides a computer-readable storage medium in which computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the information processing method provided by the embodiment of the present application, for example, Figure 3A The information processing method shown.

[0137] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0138] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0139] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0140] By way of example, computer-executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.

[0141] In summary, the following technical effects can be achieved through the embodiments of the present application:

[0142] The query statement is parsed to obtain the query fields and sub-query statements of the query statement. By parsing the query statement, the query fields and sub-query statements therein are separated, and then the query fields and sub-query statements are processed separately in the subsequent process, thereby improving the efficiency of subsequently determining the operator lineage information. A query tree is then constructed based on the sub-query statements. The fields in the sub-query statements corresponding to the parent nodes in the query tree are the source fields of the fields in the sub-query statements corresponding to the child nodes of the parent nodes. By storing the information of the sub-query statements in the nodes of the query tree, the efficiency of storing the information of the sub-query statements is improved, and the relationship between the sub-query statements can be directly determined through the structure of the query tree in the future, thereby improving the efficiency of information utilization. The nodes in the query tree are traversed to determine the first source field of the query field and the query link between the query field and the first source field. The operator lineage information of the query field is generated based on the query link. The operator lineage information indicates the operator processing relationship between the query field and the first source field. By traversing the nodes in the query tree, the relationship between each query statement can be obtained, and then each process from the first source field to the final query field can be obtained, thereby improving the accuracy of the determined operator lineage information. At this time, if the query field obtained by the final query is erroneous, the operator lineage information of the query field can be used to accurately locate the query statement with the error, and then the query statement with the error can be modified to obtain the correct query field, thereby improving the accuracy and efficiency of repairing the erroneous query field.

[0143] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.

Claims

1. An information processing method, characterized in that: The method comprises: Parsing the query statement to obtain query fields and sub-query statements of the query statement; Building a query tree based on the sub-query statement, wherein the field in the sub-query statement corresponding to the parent node in the query tree is the source field of the field in the sub-query statement corresponding to the child node of the parent node; Traversing the nodes in the query tree, determining a first source field of the query field, and a query link between the query field and the first source field; Operator lineage information of the query field is generated based on the query link, where the operator lineage information indicates an operator processing relationship between the query field and the first source field.

2. The method according to claim 1, characterized in that The query statement is parsed to obtain query fields and sub-query statements of the query statement, including: Parsing the query statement based on the language syntax type of the query statement to obtain a syntax tree corresponding to the query statement; The syntax tree is pruned to obtain query fields and sub-query statements of the query statement.

3. The method according to claim 2, characterized in that The pruning of the syntax tree to obtain query fields and sub-query statements of the query statement includes: Performing a first pruning process on the syntax tree to obtain a query header and a query body of the query statement, wherein the query header includes at least one query field, and the query body includes at least one main query statement; If the grammatical relationship corresponding to the main query statement is a nested recursive relationship, a second pruning process is performed on the main query statement to obtain a plurality of sub-query statements that eliminate the nested recursive relationship.

4. The method according to claim 1, wherein There are multiple sub-query statements, and constructing a query tree based on the sub-query statements includes: Determine the nested recursive relationship between sub-query statements; The following processing is performed on the two subquery statements with nested recursive relations: A first sub-query statement representing a query source and a second sub-query statement representing a query destination are determined; and the query tree is constructed with the first sub-query statement as a parent node and the second sub-query statement as a child node.

5. The method according to claim 1, wherein The traversing the nodes in the query tree to determine the first source field of the query field includes: Traversing the nodes in the query tree according to the hierarchical relationship between the nodes in the query tree; Comparing the query field with a second source field, where the second source field is a field in a third sub-query statement corresponding to the traversed node; If the query field is successfully compared with the second source field, the first source field of the query field is determined based on the second source field.

6. The method according to claim 5, characterized in that The determining the first source field of the query field based on the second source field includes: If the second source field is derived from a physical table, determining the second source field as the first source field of the query field; If the second source field does not originate from a physical table, determining a fourth sub-query statement associated with the third sub-query statement, and querying the fourth sub-query statement for a third source field corresponding to the alias based on the alias of the second source field; If the third source field is derived from a physical table, the third source field is determined as the first source field of the query field.

7. The method according to claim 6, characterized in that Determining the query link between the query field and the first source field includes: If the second source field does not originate from a physical table, determining a query order of the second source field and the third source field based on an association relationship between the third sub-query statement and the fourth sub-query statement; Based on the query sequence, a query link is generated between the query field and the first source field.

8. The method according to claim 1, characterized in that The generating of the operator lineage information of the query field based on the query link includes: Determining a query order for each sub-query statement in the query chain based on an association relationship between each sub-query statement in the query chain; Based on the query sequence, each of the sub-query statements is integrated to obtain operator lineage information of the query field.

9. An information processing device, characterized in that The device comprises: A statement parsing module, used to parse the query statement to obtain the query fields and sub-query statements of the query statement; A query tree construction module, configured to construct a query tree based on the sub-query statement, wherein the fields in the sub-query statement corresponding to the parent node in the query tree are source fields of the fields in the sub-query statement corresponding to the child node of the parent node; a link determination module, configured to traverse the nodes in the query tree, determine a first source field of the query field, and a query link between the query field and the first source field; An information generation module is used to generate operator lineage information of the query field based on the query link, where the operator lineage information indicates an operator processing relationship between the query field and the first source field.

10. An electronic device, characterized in that: The electronic device comprises: a memory for storing computer-executable instructions or computer programs; The processor is configured to implement the information processing method according to any one of claims 1 to 8 when executing the computer-executable instructions or computer programs stored in the memory.