Data query method, electronic device, storage medium and program product

By analyzing and reordering the database commands entered by users, the database execution exception caused by the input sequence logic error is solved, and the efficiency and success rate of data table query are improved.

CN120011396APending Publication Date: 2025-05-16CETC JINCANG (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510074088.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

When users enter the ALTER TABLE statement, logical errors may occur, resulting in database execution exceptions and reducing the efficiency and success rate of data table queries.

Method used

By receiving the query statements sent by the terminal, the data table identifier and command type are parsed out, the preset strategy is obtained to determine the execution order of the commands, the linked list array is constructed and the commands are executed in the execution order to avoid execution exceptions caused by errors in the input order.

Benefits of technology

It effectively avoids execution exceptions caused by input sequence logic errors, and improves the efficiency and success rate of data table query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120011396A_ABST
    Figure CN120011396A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data query method, electronic equipment, a storage medium and a program product, and is applied to the technical field of computers. The method comprises the following steps: receiving a query statement sent by a terminal, wherein the query statement comprises a plurality of commands for the same data table; analyzing the data table identifier and the type of each command from each command, obtaining a preset strategy, and determining the execution sequence of each command according to the preset strategy and the type of each command; the preset strategy comprises a plurality of preset types and a correct execution sequence of each preset type; judging whether the execution sequence of each command is the same as the corresponding original sequence, if not, constructing a linked list array, and sequentially adding each command into the linked list array according to the execution sequence; and obtaining the data table according to the data table identifier, and obtaining a query result based on the linked list array added with the command and the data table. Execution abnormity caused by logic errors of the input sequence is avoided, and the efficiency and success rate of data table query are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the continuous development of computer technology, the application of databases is becoming more and more extensive. In some specific business scenarios, it is necessary to query the data tables in the database to perform related operations on the data tables.

[0003] Currently, when querying a data table, the user usually inputs multiple operations to be performed on a data table into the ALTER TABLE statement in the order in which they are used. Then, in response to receiving the ALTER TABLE statement, the database obtains the multiple operations contained therein and performs the relevant operations on the corresponding data table in the order in which the user inputs them. The ALTER TABLE statement is defined in the SQL standard as a statement for modifying the properties of a database data table.

[0004] However, there may be logical errors in the user's input sequence, which may cause the database to perform abnormal operations due to the above errors, thereby reducing the efficiency and success rate of data table queries. Summary of the invention

[0005] The embodiments of the present application provide a data query method, an electronic device, a storage medium, and a program product to avoid execution exceptions caused by logical errors in the input sequence and improve the efficiency and success rate of data table queries.

[0006] In a first aspect, an embodiment of the present application provides a data query method, the method comprising: receiving a query statement sent by a terminal, the query statement comprising multiple commands for the same data table;

[0007] Parsing the data table identifier and the type of each command from each command, and obtaining a preset strategy, and determining the execution order of each command according to the preset strategy and the type of each command; the preset strategy includes multiple preset types and the correct execution order of each preset type;

[0008] Determine whether the execution order of each of the commands is the same as the corresponding original order. If not, construct a linked list array, and add each of the commands to the linked list array in sequence according to the execution order;

[0009] The data table is obtained according to the data table identifier, and the query result is obtained based on the linked list array after the command is added and the data table.

[0010] In a possible implementation, parsing the data table identifier and the type of each command from each command includes: reading the field where each command is located; obtaining the data table identifier and the query field contained therein according to the reading result; and determining the type of each command according to the specific operation mode reflected by the query field.

[0011] In a possible implementation, determining the execution order of each of the commands based on the preset strategy and the type of each of the commands includes: searching the preset strategy for a preset type that is the same as the type of each of the commands; determining the correct execution order of the same preset type as the first execution order of each of the commands; judging whether there are at least two commands with the same first execution order; if not, determining the first execution order as the execution order of each of the commands; if so, determining the original order of the at least two commands; determining the original order as the second execution order of the at least two commands; using the corresponding second execution order as a sub-order of the corresponding first execution order to obtain the execution order of the at least two commands; and determining the corresponding first execution order as the execution order of other commands.

[0012] In a possible implementation, the linked list array includes multiple linked lists; each of the linked lists is used to store at least one command of a different type; and constructing the linked list array includes: constructing different types of linked lists according to the types of each of the commands, and constructing the linked list array based on the different types of linked lists.

[0013] In a possible implementation, adding each of the commands to the linked list array in sequence according to the execution order includes: adding each of the commands to each of the linked lists in sequence according to a first execution order; in response to the existence of at least two commands in the same linked list, sorting the at least two commands in the linked list in accordance with a second execution order.

[0014] In a possible implementation, the query result is obtained based on the linked list array and the data table after adding commands, including: determining whether there is a linked list containing at least two commands in the linked list array; if not, performing specific operations on the data table in accordance with the order of adding commands and in accordance with the specific operation modes of the commands in each linked list; if so, based on the order, in response to a linked list containing at least two commands, performing specific operations on the data table in accordance with the sorting order of the at least two commands; and determining the result of performing the specific operation on the data table as the query result.

[0015] In a possible implementation, before the query statement is sent by the receiving terminal, it also includes: determining the priority of each of the preset types according to the dependency relationship between the preset types; determining the correct execution order of each of the preset types according to the priority; and constructing a mapping relationship between each of the preset types and the correct execution order of each of the preset types to obtain a preset strategy.

[0016] In a second aspect, an embodiment of the present application provides a data query device, comprising: a receiving module, configured to receive a query statement sent by a terminal, wherein the query statement includes multiple commands for the same data table;

[0017] A parsing module, used for parsing the data table identifier and the type of each command from each command;

[0018] An acquisition module is used to acquire a preset strategy;

[0019] A determination module, used to determine the execution order of each of the commands according to the preset strategy and the type of each of the commands; the preset strategy includes multiple preset types and the correct execution order of each preset type;

[0020] A judging module, used to judge whether the execution order of each of the commands is the same as the corresponding original order;

[0021] Construction module, used to construct a linked list array if not;

[0022] An adding module, used for sequentially adding each of the commands to the linked list array according to the execution order;

[0023] The acquisition module is further used to acquire the data table according to the data table identifier, and acquire the query result based on the linked list array after the command is added and the data table.

[0024] In a possible implementation manner, the parsing module, when parsing the data table identifier and the type of each command from each command, is specifically used to:

[0025] Read the fields where the commands are located; obtain the data table identifier and the query field contained therein according to the reading result; and determine the type of the commands according to the specific operation mode reflected by the query field.

[0026] In a possible implementation manner, the determination module, when determining the execution order of each of the commands according to the preset strategy and the type of each of the commands, is specifically configured to:

[0027] Search the preset strategy for a preset type that is the same as the type of each of the commands; determine the correct execution order of the same preset type as the first execution order of each of the commands; determine whether there are at least two commands with the same first execution order; if not, determine the first execution order as the execution order of each of the commands; if so, determine the original order of the at least two commands; determine the original order as the second execution order of the at least two commands; use the corresponding second execution order as a sub-order of the corresponding first execution order to obtain the execution order of the at least two commands; determine the corresponding first execution order as the execution order of other commands.

[0028] In a possible implementation, the linked list array includes a plurality of linked lists; each of the linked lists is used to store at least one command of a different type;

[0029] Accordingly, the construction module, when constructing the linked list array, is specifically used for:

[0030] Different types of linked lists are constructed according to the types of the commands, and the linked list array is constructed based on the different types of linked lists.

[0031] In a possible implementation manner, the adding module, when adding each of the commands to the linked list array in sequence according to the execution order, is specifically used to:

[0032] Adding each of the commands to each of the linked lists in turn according to a first execution order; in response to at least two commands being located in the same linked lists, sorting the at least two commands in the linked lists according to a second execution order.

[0033] In a possible implementation manner, the acquisition module, when acquiring the query result based on the linked list array after the addition command and the data table, is specifically used to:

[0034] Determine whether there is a linked list containing at least two commands in the linked list array; if not, perform specific operations on the data table in accordance with the order of adding the commands and in accordance with the specific operation modes of the commands in each linked list; if so, based on the order, in response to a linked list containing at least two commands, perform specific operations on the data table in accordance with the sorting order of the at least two commands; determine the result of performing the specific operation on the data table as the query result.

[0035] In a possible implementation, the determination module is also used to determine the priority of each of the preset types according to the dependency relationship between the preset types before the receiving module receives the query statement sent by the receiving terminal; determine the correct execution order of each of the preset types according to the priority; the construction module is also used to construct a mapping relationship between each of the preset types and the correct execution order of each of the preset types to obtain a preset strategy.

[0036] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;

[0037] The memory stores computer-executable instructions;

[0038] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.

[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.

[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.

[0041] The data query method, electronic device, storage medium and program product provided by the embodiment of the present application, because all preset types of commands are determined in advance, and the corresponding correct execution order is set for each preset type, a preset strategy is formed, so through the query statement sent by the receiving terminal, which contains multiple commands for the same data table, multiple commands can be obtained from it, and the data table identifier and the type of each command can be parsed from each of the commands. And by obtaining a preset strategy containing multiple preset types and the correct execution order of each preset type, the execution order of each command can be determined according to the preset strategy and the type of each command. Thus, by judging whether the execution order of each command is the same as the corresponding original order, the two can not construct a linked list array at the same time, and each command can be added to the linked list array in sequence according to the execution order. Then, by obtaining the data table according to the data table identifier, the query result can be obtained based on the linked list array and the data table after adding the command. This avoids execution anomalies caused by logical errors in the input order, and improves the efficiency and success rate of data table query. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] Figure 1 A schematic diagram of a scenario of the data query method provided in this application;

[0044] Figure 2 Schematic diagram of the data query method provided in this application Figure 1 ;

[0045] Figure 3 Schematic diagram of the data query method provided in this application Figure 2 ;

[0046] Figure 4 A schematic diagram of the structure of the data query device provided by this application;

[0047] Figure 5 Schematic diagram of the electronic structure provided for this application.

[0048] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0049] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0050] First, the terms involved in this application are explained:

[0051] ALTER TABLE statement: refers to the SQL command used to modify the structure of an existing database table, which may include multiple commands for a database table, each command is used to indicate a specific related operation. The related operation may be, for example, a delete operation, a new operation, or a change operation.

[0052] At present, when querying a data table, the user usually enters multiple operations that need to be performed on a data table into the ALTER TABLE statement in sequence according to the order they are used to, and triggers the sending component based on the input results. Then, in response to receiving the above ALTER TABLE statement, the database obtains the multiple operations contained therein and performs the relevant operations on the data table that the user needs to perform based on the order that the user enters in the ALTER TABLE statement according to his habit. However, there may be logical errors in the user's input sequence, which causes the database to perform abnormal operations due to the above errors when performing related operations, reducing the efficiency and success rate of data table query.

[0053] When facing the technical problems in the prior art, in order to avoid execution exceptions caused by logical errors in the input sequence and improve the efficiency and success rate of data table queries, instead of performing related operations on the data table based on the order that the user enters in the ALTER TABLE statement as usual, all operation types that can be performed on the data table are predetermined, and the execution order under the normal execution state is set for each operation type. Then, when a statement containing multiple operations on a certain data table sent by the user through the terminal is received, the data table and the types of multiple operations that the user needs to query are determined based on these operations, and the execution order of the multiple operations is determined according to the predetermined execution order under the normal execution state. Further, the execution order is compared with the order that the user enters in the statement as usual, and when the two are different, a linked list array is constructed, so that the multiple operations are added to the linked list array according to the execution order, and then the related operations are performed on the data table based on the linked list array, thereby avoiding execution exceptions caused by logical errors in the input sequence and improving the efficiency and success rate of data table queries.

[0054] Figure 1 A schematic diagram of a scenario of the data query method provided in this application, such as Figure 1As shown, the data query system provided by the embodiment of the present application includes: a user terminal 1, a database device 2, and a storage component 3. Among them, the user terminal 1 is a terminal where a user with a data query requirement is located. The database device 2 is a device for executing a data query method, which contains a data table where the user needs to query the data. The storage component 3 is a storage component built into the database device 2. Among them, the database device 2 is respectively connected to the user terminal 1 and the storage component 3 in communication. First, based on the needs of data query, the user uses the customary input order to enter multiple commands for indicating corresponding operations in the query statement, and sends the above query statement to the database through the user terminal 1. Then, in response to receiving the query statement, the database device 2 obtains multiple commands for the same data table contained therein, and parses the data table identifier and the type of each command from each command, and then obtains the preset strategy containing multiple preset types and the correct execution order of each preset type from the storage component 3, and determines the execution order of each command according to the preset strategy and the type of each command. Further, it is determined whether the execution order of each command is the same as the corresponding original order. If not, a linked list array is constructed, and each command is added to the linked list array in sequence according to the execution order. Finally, the data table is obtained according to the data table identifier, and the query result is obtained based on the linked list array and the data table after the command is added.

[0055] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0056] Figure 2 Schematic diagram of the data query method provided in this application Figure 1 ,like Figure 2 As shown, the execution subject of the method is a data query device, which can be located in an electronic device, specifically in a database device. The method includes:

[0057] S201. Receive a query statement sent by a terminal, where the query statement includes multiple commands for the same data table.

[0058] The terminal is any terminal where a database administrator with data query needs is located, such as a mobile terminal, a computer terminal, etc. This embodiment does not limit the specific terminal.

[0059] The query statement is a statement used to query the data structure of the data table, and specifically includes multiple commands for the same data table. The command is used to indicate a specific related operation, such as "add a column named a to the A data table". This embodiment does not limit the specific query statement and specific command.

[0060] In this embodiment, a user with data query needs can write multiple command codes according to the logic of the query statement based on habit to form a query statement, and send the query statement to the database device through the corresponding terminal. The database device then responds to receiving the query statement sent by the terminal and obtains the multiple commands contained therein.

[0061] For example, the query statement written by the user according to habit may be: "Add a new column named a in data table A; delete the existing column a in data table A; delete the existing column b in data table A; change the data format of data table A", then the multiple commands are "Add a new column named a in data table A", "Delete the existing column a in data table A", "Delete the existing column b in data table A", and "Change the data format of data table A".

[0062] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0063] S202, parse the data table identifier and the type of each command from each command, and obtain the preset strategy, and determine the execution order of each command according to the preset strategy and the type of each command; the preset strategy includes multiple preset types and the correct execution order of each preset type.

[0064] The data table identifier is an identifier that represents the specific identity of the data table, such as the name and number of the data table. This embodiment does not limit the specific data table identifier.

[0065] The type of command is the type of specific related operation indicated by the command. For example, if the command is "add a column named a in the A data table", the type of command is "delete". This example is only an example and does not constitute any limitation to this application.

[0066] The preset strategy is a pre-defined strategy for determining the order of executing commands. Specifically, it includes multiple preset types and the correct execution order of each preset type. The preset type is any type of operation that can be performed on the data table, and the correct execution order is the execution order of different preset types under normal execution state.

[0067] For example, if multiple preset types are "delete", "modify", and "add", the normal execution order can be determined as "1. delete, 2. add, 3. modify" according to the execution of each preset type in the normal state.

[0068] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0069] In this embodiment, after obtaining multiple commands, the fields where each command is located are parsed, and the data table identifier corresponding to the data table that the user needs to query and the type of each command are obtained. Further, a pre-stored preset strategy is obtained, and the correct execution order corresponding to the type of each command is determined according to the correct execution order of each preset type in the preset strategy, and then the execution order of each command is determined according to the correct execution order of the corresponding type.

[0070] Among them, before obtaining the pre-stored preset strategy, the database administrator can determine all the preset types, and according to the relationship between different preset types, determine the corresponding correct execution order for each preset type, and then build an association between each preset type and the correct execution order corresponding to each preset type to obtain the preset strategy and store the preset strategy.

[0071] The preset strategy may be stored in any storage component corresponding to the database device, and this embodiment does not limit the specific storage component.

[0072] S203: Determine whether the execution order of each command is the same as the corresponding original order.

[0073] S204: If not, construct a linked list array, and add each command to the linked list array in sequence according to the execution order.

[0074] The original order is the order of commands in the query statement, that is, the order in which the user writes them according to habit.

[0075] In this embodiment, after determining the execution order of each command, it is necessary to first determine whether the original order of each command can be executed normally based on the execution order of each command. Based on this, the original order of each command in the query statement is read, and the corresponding original order is compared with the execution order of each command to determine whether the two orders are the same. If not, it means that under the original order of each command, the relevant operation on the data table that the user needs to query may be abnormal, and it is necessary to perform relevant operations based on the execution order of each command. Further, a linked list array is constructed, and each command is added to the linked list array in sequence according to the execution order.

[0076] The linked list array is an array composed of multiple linked lists, and each linked list has a one-way execution relationship. The linked list is used to store a series of nodes, including a data part and a pointer to the next node.

[0077] Specifically, multiple linked lists are constructed according to the data structure of the linked list, and an array is created, and the head node of each linked list is used as an element in the array to obtain a linked list array. Then, according to the execution order of each command, each command is added to each linked list contained in the linked list array.

[0078] It can be understood that if the two orders are the same, it means that the relevant operations can be performed normally on the data table that the user needs to query under the original order of each command, and the relevant operations are performed directly based on the original order of each command to ensure the accuracy of the data query results and reduce computing resources.

[0079] S205: Acquire a data table according to the data table identifier, and acquire a query result based on the linked list array and the data table after the command is added.

[0080] The query result is a result of performing related operations on the data table.

[0081] In this embodiment, after each command is added to the linked list array, the data table with the same identifier is searched and obtained in the internally stored data according to the acquired data table identifier. Then, according to the current linked list array, the relevant operations indicated by the commands in each linked list are executed in turn for the above data tables.

[0082] The data query method provided in this embodiment, because all preset types of commands are determined in advance, and the corresponding correct execution order is set for each preset type, a preset strategy is formed, so by receiving a query statement sent by a terminal, which contains multiple commands for the same data table, multiple commands can be obtained from it, and the data table identifier and the type of each command can be parsed from each command. And by obtaining a preset strategy containing multiple preset types and the correct execution order of each preset type, the execution order of each command can be determined according to the preset strategy and the type of each command. Thus, by judging whether the execution order of each command is the same as the corresponding original order, the two can not construct a linked list array at the same time, and each command can be added to the linked list array in sequence according to the execution order. Then, by obtaining the data table according to the data table identifier, the query result can be obtained based on the linked list array and the data table after adding the command. This avoids execution abnormality caused by logical errors in the input order, and improves the efficiency and success rate of data table query.

[0083] As an optional embodiment, based on the above embodiment, this embodiment further refines the process of parsing the data table identifier and the type of each command from each command. When parsing the data table identifier and the type of each command from each command, this embodiment specifically includes the following steps:

[0084] Step a1: Read the field where each command is located.

[0085] It is understandable that, since each command indicates a specific operation related to the data table that the user needs to query, by reading the field where each command is located, the data table identifier and the type of each command can be obtained based on the specific content of the field.

[0086] Based on this, read the fields where each command is located.

[0087] Step a2: Obtain the data table identifier and query field contained in the read result according to the read result.

[0088] The query field is a field that represents a specific related operation performed on the data table.

[0089] It is understandable that, since each command is directed to the same data table, each command reflects the same data table identifier. Based on this, after obtaining the field where each command is located, the data table identifier is obtained therein, and the query field is obtained.

[0090] Step a3: Determine the type of each command according to the specific operation mode reflected by the query field.

[0091] The specific operation mode is used to represent that a specific operation needs to be performed on the data structure of the data table.

[0092] In this embodiment, after the data table identifier and the query field are obtained, the type of each command is determined according to the specific operation mode indicated by the query field.

[0093] For example, if the query statement is: "Add a new column named a in data table A; delete the existing column a in data table A; delete the existing column b in data table A; change the data format of data table A", then the data table identifier "A" can be obtained according to the fields where each command is located, as well as the query fields of each command "Add a new column named a", "Delete the existing column a", "Delete the existing column b", "Change data format", and the type of each command can be further determined as "Add", "Delete", "Delete", or "Change".

[0094] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0095] The data query method provided in this embodiment, since each command indicates the data table and specific related operations that the user needs to query, by reading the field where each command is located, the data table identifier and the query field contained therein can be obtained according to the reading result, and the type of each command can be determined according to the specific operation method reflected in the query field, thereby smoothly determining the data table identifier and the type of each command, thereby improving the accuracy of the determination.

[0096] As an optional embodiment, based on the above embodiment, this embodiment further refines the execution order of each command according to the preset strategy and the type of each command. When determining the execution order of each command according to the preset strategy and the type of each command, this embodiment specifically includes the following steps:

[0097] Step b1: Search the preset policies for a preset type that is the same as the type of each command.

[0098] Specifically, after determining the type of each command, read the preset policy and the field where the type of each command is located, and based on the reading result, search the preset policy for the preset type whose field is the same as the type of each command, and obtain the preset type that is the same as the type of each command, thereby obtaining the correct execution order corresponding to the same preset type.

[0099] Step b2: Determine the correct execution order of the same preset type as the first execution order of each command.

[0100] The first execution order is an execution order preliminarily determined according to the type of command.

[0101] In this embodiment, after the correct execution order corresponding to the preset type that is the same as the type of each command is obtained, the corresponding correct execution order is determined as the first execution order of each command.

[0102] For example, if multiple preset types are "delete", "modify", and "add", and the correct execution order of each preset type is "1. Delete, 2. Add, 3. Modify". Then based on the fact that each command is "add a column named a to data table A", "delete the existing column a in data table A", "delete the existing column b in data table A", and "change the data format of data table A", and the types of each command are "add", "delete", "delete", and "change", it can be determined that the first execution order of each command is "1. Add a column named b to data table A; delete the existing column a in data table A, 2. Add a column named a to data table A, 3. Change the data format of data table A".

[0103] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0104] Step b3: Determine whether there are at least two commands whose first execution order is the same.

[0105] It is understandable that among the multiple commands included in the query statement, some commands may have the same type, in which case the first execution order of the commands is also the same. Then, for these commands, it is necessary to further determine their execution order.

[0106] Based on this, after determining the first execution order of each command, it is determined whether there are at least two commands in the first execution order of each command that have the same first execution order.

[0107] Exemplarily, if the first execution order of each command is "1. Add a column named b in data table A; delete the existing column a in data table A, 2. Add a column named a in data table A, 3. Change the data format of data table A", then it can be determined that the first execution order of the command "add a column named a in data table A" and the command "delete the existing column b in data table A" are the same.

[0108] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0109] Step b4: If not, the first execution order is determined as the execution order of each command.

[0110] In this embodiment, it is determined whether there are at least two commands with the same first execution order. If not, it means that the types of the commands are different, and the first execution order is directly determined as the execution order of the commands.

[0111] Step b5: If so, determine the original order of at least two commands; determine the original order as the second execution order of at least two commands; use the corresponding second execution order as a sub-order of the corresponding first execution order to obtain the execution order of at least two commands; determine the corresponding first execution order as the execution order of other commands.

[0112] The second execution order is a further execution order of commands of the same type.

[0113] In this embodiment, it is determined whether there are at least two commands with the same first execution order. If so, it means that there are at least two commands with the same type, and the execution order of the commands of the same type needs to be further determined.

[0114] Based on this, the at least two commands are obtained, and the original order of the at least two commands is determined in the query statement, and the corresponding original order is determined as the second execution order of the at least two commands. Further, based on the corresponding first execution order, the corresponding second execution order is used as a sub-order of the corresponding first execution order, and the combination of the two orders is used as the execution order of the at least two commands.

[0115] That is to say, during the specific execution, first determine to execute the above-mentioned at least two commands according to the corresponding first execution order, then traverse the above-mentioned at least two commands according to the second execution order, and in response to the completion of the traversal, determine the next command to be executed according to the first execution order.

[0116] For example, if the query statement is: "Add a new column named a in data table A; delete the existing column a in data table A; delete the existing column b in data table A; change the data format of data table A", the first execution order of each command is "1. Add a new column named b in data table A; delete the existing column a in data table A, 2. Add a new column named a in data table A, 3. Change the data format of data table A", then the second execution order of the command "Add a new column named b in data table A" and the command "Delete the existing column a in data table A" can be further determined as "1.1 Delete the existing column a in data table A, 1.2 Delete the existing column b in data table A".

[0117] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0118] Further, the corresponding first execution order is determined as the execution order of other commands. The other commands are, in this case, other commands with a unique first execution order except for the at least two commands mentioned above.

[0119] The data query method provided in this embodiment has a preset strategy set in advance, so by searching the preset type that is the same as the type of each command in the preset strategy, the correct execution order of the same preset type can be determined as the first execution order of each command. And by judging whether there are at least two commands with the same first execution order, the first execution order can be determined as the execution order of each command when it is determined that it does not exist, and the original order of at least two commands can be determined when it is determined that it exists, so that the original order is determined as the second execution order of at least two commands, and then the corresponding second execution order is used as a sub-order of the corresponding first execution order to obtain the execution order of at least two commands, and the corresponding first execution order is determined as the execution order of other commands, thereby accurately determining the execution order of each command in the normal execution state, and improving the accuracy of determining the execution order.

[0120] As an optional embodiment, this embodiment further refines the contents of the linked list array and the construction of the linked list array on the basis of any of the above embodiments. In this embodiment, the linked list array includes multiple linked lists, each linked list is used to store at least one command of a different type. When constructing the linked list array, the following steps are specifically included:

[0121] Different types of linked lists are constructed according to the types of each command, and linked list arrays are constructed based on the different types of linked lists.

[0122] In this embodiment, the linked list array includes a plurality of linked lists, each of which is used to store at least one command of a different type. That is, the number of linked lists is the same as the number of command types.

[0123] Based on this, based on determining the type of each command, the number of different types is obtained, and the same number of linked lists are constructed based on the number. Further, the head nodes of these linked lists are used as elements of the created array to obtain a linked list array.

[0124] The data query method provided in this embodiment can construct linked list arrays based on different types of linked lists by constructing different types of linked lists according to the types of each command, thereby successfully obtaining the corresponding linked list array, improving the accuracy of the established linked list array, and improving the success rate of subsequent data queries based on the array.

[0125] As an optional embodiment, based on the above embodiment, this embodiment further refines the process of adding each command to the linked list array in sequence according to the execution order. When adding each command to the linked list array in sequence according to the execution order, this embodiment specifically includes the following steps:

[0126] Step c1: Add each command to each linked list in turn according to the first execution order.

[0127] It can be understood that there are two situations involved in this embodiment: in the first situation, the execution order of each command is determined based only on the first execution order, and in the second situation, the execution order of each command is determined based on the first execution order and the combination of the first execution order and the second execution order. Further, since the second execution order is a sub-order of the corresponding first execution order, in either case, each command must first be added to the linked list array according to the first execution order.

[0128] Based on this, each command is added to each linked list included in the linked list array in sequence according to the first execution order of each command.

[0129] In order to more clearly illustrate the above adding process, a specific table is used for description below. As shown in Table 1, if the execution order of each command finally determined is "1.1 delete the existing column a of data table A; 1.2 delete the existing column b of data table A, 2. add a column named a to data table A, 3. change the data format of data table A", then each command is added according to the first execution order, and the resulting linked list array is:

[0130] Table 1

[0131]

[0132] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0133] Step c2: In response to the existence of at least two commands in the same linked lists, sort the at least two commands in the linked lists according to the second execution order.

[0134] In this embodiment, based on the second situation, when there are at least two commands in the same linked list, it means that the at least two commands have a second execution order. Then, according to the corresponding second execution order, the at least two commands are sorted in the linked list where the at least two commands are located.

[0135] In order to more clearly illustrate the above sorting process, a specific table is used for description below. As shown in Table 2, if the linked list array of commands added according to the first execution order is Table 1, and the execution order of each command finally determined is "11.1 delete the existing a column of data table A; 1.2 delete the existing b column of data table A, 2. add a column named a to data table A, 3. change the data format of data table A", then the above at least two commands are sorted according to the second execution order, and the resulting linked list array is:

[0136] Table 2

[0137]

[0138] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0139] Optionally, there is a third situation in which the execution order of each command is determined only in combination with the first execution order and the second execution order. In this case, the method of adding each command is similar to the method of adding the above-mentioned at least two commands in the second situation, and will not be repeated here.

[0140] The data query method provided in this embodiment, since a linked list array is constructed, each command can be added to each linked list in sequence according to the first execution order, and each command can be smoothly added to the array linked list when the execution order of each command is determined only based on the first execution order. And by sorting at least two commands in the linked list according to the second execution order when it is determined that there are at least two commands in the same linked list, each command can be smoothly added to the array linked list in sequence when the execution order of each command is determined based on the first execution order and in combination with the first and second execution orders, thereby improving the accuracy of the addition and thereby improving the success rate of subsequent data query based on the linked list array of the added command.

[0141] As an optional embodiment, this embodiment further refines the query results obtained based on the linked list array and data table after adding the command on the basis of the above embodiment. When obtaining the query results based on the linked list array and data table after adding the command, this embodiment specifically includes the following steps:

[0142] Step d1: Determine whether there is a linked list containing at least two commands in the linked list array.

[0143] In this embodiment, based on the two situations mentioned in the above embodiments, the execution process is different in different situations. Therefore, after obtaining the linked list array after adding the command and the data table that the user needs to query, it is necessary to first determine whether there is a linked list containing at least two commands in the linked list array.

[0144] Specifically, traverse each linked list contained in the linked list array to determine whether there are at least two commands in each linked list. If so, determine that there is a linked list containing at least two commands in the linked list array. If not, determine that there is no linked list containing at least two commands in the linked list array.

[0145] Step d2: If not, then according to the order of adding commands and the specific operation modes of the command responses in each linked list, specific operations are performed on the data table.

[0146] In this embodiment, based on determining that there is no linked list containing at least two commands in the linked list array, and determining that the number of commands in each linked list is one, specific operations are performed on the data table directly in the order of adding the commands, that is, the first execution order, in accordance with the specific operation methods indicated by the commands in each linked list.

[0147] For example, if a command in a linked list is "delete the existing column a in the A data table", a delete operation is performed on the column a in the A data table.

[0148] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0149] Step d3: If yes, then based on the sequence, in response to a linked list containing at least two commands, specific operations are performed on the data table in sequence according to the sorting order of the at least two commands.

[0150] In this embodiment, based on determining that there is a linked list containing at least two commands in the linked list array, and determining that the number of commands in the linked list is at least two, each linked list is traversed in sequence based on the order in which the commands are added. If the number of commands contained in the currently traversed linked list is one, a specific operation is performed according to the command, and the next linked list is traversed after the execution is completed. If the number of commands contained in the currently traversed linked list is at least two, specific operations are performed in sequence according to the sorting order of the at least two commands in the linked list, and the next linked list is traversed after the execution is completed.

[0151] Optionally, for the third situation mentioned in the above embodiment, the method for performing specific operations on the data table in this situation is similar to this step and will not be repeated here.

[0152] Step d4: Determine the result of executing the specific operation on the data table as the query result.

[0153] In this embodiment, based on the completion of the specific operation on the data table, the data table after the specific operation is performed is obtained, and the data table after the specific operation is performed is determined as the query result.

[0154] It is understandable that after the query result is obtained, the query result is sent to the terminal so that the user can know the query result through the terminal.

[0155] The data query method provided by the present embodiment obtains a linked list array of added commands, so by judging whether there is a linked list containing at least two commands in the linked list array, when it is determined that it does not exist, specific operations can be performed on the data table directly according to the order of adding commands and the specific operation modes of the commands in each linked list. When it is determined that it exists, based on the order of order, in response to a certain linked list containing at least two commands, specific operations can be performed on the data table in sequence according to the sorting order of at least two commands, so that the result of performing the specific operation on the data table is determined as the query result, thereby ensuring that accurate query results can be obtained in different situations, thereby improving the accuracy of the query results.

[0156] As an optional embodiment, based on any of the above embodiments, this embodiment further includes the following steps before receiving the query statement sent by the terminal:

[0157] Step e1: Determine the priority of each preset type according to the dependency relationship between the preset types.

[0158] The dependency relationship is the sequential dependency relationship of different preset types in a normal execution state.

[0159] Among them, the priority is the level of priority execution.

[0160] It is understandable that a prerequisite for the implementation of this solution is that a preset strategy has been stored. Based on this, it is necessary to first determine the preset strategy and store it.

[0161] Specifically, multiple preset types are obtained, and, under the historical normal execution state, the order of querying the data table using operations of different preset types is adopted, the dependency relationship between the preset types is determined according to the above order, and the priority of each preset type is determined according to this dependency relationship.

[0162] Exemplarily, if multiple preset types are "add, delete, change", and the above order is "delete, add, change", then the dependency relationship can be determined as "the change operation depends on the completed add operation, and the add operation depends on the completed delete operation", then the priority of "add, delete, change" can be determined as "2, 1, 3" respectively.

[0163] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0164] Step e2: Determine the correct execution order of each preset type according to the priority.

[0165] In this embodiment, after the priority of each preset type is determined, the correct execution order of each preset type is determined according to the sequence identifier of the priority.

[0166] Exemplarily, based on the priorities of “add, delete, and change” being “2, 1, and 3” respectively, it can be determined that the correct execution order of each preset type is “1. delete, 2. add, and 3. change”.

[0167] It should be understood that the above examples are only for illustrative purposes and should not constitute any limitation to the present application.

[0168] Step e3: construct a mapping relationship between each preset type and the correct execution order of each preset type to obtain a preset strategy.

[0169] In this embodiment, after the correct execution order of each preset type is determined, a mapping relationship is constructed between each preset type and its corresponding correct execution order, and the mapping relationship is stored as a preset strategy.

[0170] The data query method provided in this embodiment can determine the priority of each preset type according to the dependency relationship between the preset types, and can determine the correct execution order of each preset type according to the priority. Therefore, by constructing a mapping relationship between each preset type and the correct execution order of each preset type, a preset strategy can be obtained, so that the execution order of a certain type can be quickly known through the pre-stored preset strategy in the subsequent process, thereby improving the efficiency of determining the execution order of a certain type.

[0171] Figure 3 Schematic diagram of the data query method provided in this application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, the data query method is described in detail, and the method includes:

[0172] S301. Determine the priority of each preset type according to the dependency relationship between the preset types.

[0173] S302: Determine the correct execution order of each preset type according to the priority.

[0174] S303: Construct a mapping relationship between each preset type and the correct execution order of each preset type to obtain a preset strategy.

[0175] S304: Receive a query statement sent by the terminal, where the query statement includes multiple commands for the same data table.

[0176] S305: Read the fields where each command is located.

[0177] S306: Obtain the data table identifier and query field contained therein according to the read result.

[0178] S307: Determine the type of each command according to the specific operation mode reflected by the query field.

[0179] S308, obtaining a preset strategy; the preset strategy includes a plurality of preset types and a correct execution order of each preset type.

[0180] S309: Search the preset policies for preset types that are the same as the types of each command.

[0181] S310: Determine the correct execution order of the same preset type as the first execution order of each command.

[0182] S311. Determine whether there are at least two commands whose first execution order is the same. If so, execute S313; if not, execute S312.

[0183] S312. Determine the first execution order as the execution order of each command, and execute S314.

[0184] S313. Determine the original order of at least two commands; determine the original order as the second execution order of at least two commands; use the corresponding second execution order as a sub-order of the corresponding first execution order to obtain the execution order of at least two commands; determine the corresponding first execution order as the execution order of other commands, and execute S314.

[0185] S314: Determine whether the execution order of each command is the same as the corresponding original order. If so, execute S323; if not, execute S315-S322.

[0186] S315. Construct different types of linked lists according to the types of the commands.

[0187] S316. Construct a linked list array based on linked lists of different types; the linked list array includes multiple linked lists; each linked list is used to store at least one command of a different type.

[0188] S317. Add each command to each linked list in sequence according to the first execution order.

[0189] S318: In response to the existence of at least two commands in the same linked list, sort the at least two commands in the linked list according to the second execution order.

[0190] S319, obtaining the data table according to the data table identifier, and determining whether there is a linked list containing at least two commands in the linked list array, if so, executing S321, if not, executing S320.

[0191] S320, according to the order of adding commands, perform specific operations on the data table according to the specific operation modes of the command responses in each linked list, and execute S322.

[0192] S321. Based on the sequence, in response to a linked list containing at least two commands, specific operations are performed on the data table in sequence according to the sorting order of the at least two commands, and S322 is executed.

[0193] S322: Determine the result of executing the specific operation on the data table as the query result.

[0194] S323. Obtain query results based on the original order of each command and the data table.

[0195] Figure 4 A schematic diagram of the structure of the data query device provided by this application, such as Figure 4 As shown, the data query device 40 provided in this embodiment includes: a receiving module 41, a parsing module 42, an acquiring module 43, a determining module 44, a judging module 45, a constructing module 46, and an adding module 47.

[0196] Among them, the receiving module 41 is used to receive the query statement sent by the terminal, and the query statement includes multiple commands for the same data table; the parsing module 42 is used to parse the data table identifier and the type of each command from each command; the obtaining module 43 is used to obtain the preset strategy; the determining module 44 is used to determine the execution order of each command according to the preset strategy and the type of each command; the preset strategy includes multiple preset types and the correct execution order of each preset type; the judging module 45 is used to judge whether the execution order of each command is the same as the corresponding original order; the constructing module 46 is used to construct a linked list array if not; the adding module 47 is used to add each command to the linked list array in sequence according to the execution order; the obtaining module 43 is also used to obtain the data table according to the data table identifier, and obtain the query result based on the linked list array and the data table after the command is added.

[0197] Optionally, when parsing the data table identifier and the type of each command from each command, the parsing module 42 is specifically used to:

[0198] Read the fields where each command is located; obtain the data table identifier contained therein and the query field according to the reading result; determine the type of each command according to the specific operation mode reflected by the query field.

[0199] Optionally, the determination module 44, when determining the execution order of each command according to a preset strategy and the type of each command, is specifically configured to:

[0200] Search for preset types that are the same as the types of each command in the preset strategy; determine the correct execution order of the same preset type as the first execution order of each command; determine whether there are at least two commands with the same first execution order; if not, determine the first execution order as the execution order of each command; if so, determine the original order of at least two commands; determine the original order as the second execution order of at least two commands; use the corresponding second execution order as a sub-order of the corresponding first execution order to obtain the execution order of at least two commands; determine the corresponding first execution order as the execution order of other commands.

[0201] Optionally, the linked list array includes a plurality of linked lists; each linked list is used to store at least one command of a different type;

[0202] Accordingly, the construction module 46, when constructing the linked list array, is specifically used for:

[0203] Different types of linked lists are constructed according to the types of each command, and linked list arrays are constructed based on the different types of linked lists.

[0204] Optionally, the adding module 47, when adding each command to the linked list array in sequence according to the execution order, is specifically used to:

[0205] Add each command to each linked list in turn according to the first execution order; in response to the existence of at least two commands in the same linked list, sort the at least two commands in the linked list according to the second execution order.

[0206] Optionally, when acquiring the query result based on the linked list array and the data table after the command is added, the acquisition module 43 is specifically used to:

[0207] Determine whether there is a linked list containing at least two commands in the linked list array; if not, perform specific operations on the data table in the order of adding the commands and in accordance with the specific operation modes responded to by the commands in each linked list; if so, based on the order of order, in response to a linked list containing at least two commands, perform specific operations on the data table in accordance with the sorting order of at least two commands; determine the result of performing the specific operation on the data table as the query result.

[0208] Optionally, the determination module 44 is also used to determine the priority of each preset type according to the dependency relationship between the preset types before the receiving module 41 receives the query statement sent by the terminal; determine the correct execution order of each preset type according to the priority; the construction module 46 is also used to construct a mapping relationship between each preset type and the correct execution order of each preset type to obtain a preset strategy.

[0209] The data query device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and this embodiment will not be described in detail here.

[0210] Figure 5 A schematic diagram of the structure of the electronic device provided in this application, such as Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 51 and a memory 52. ​​Optionally, the device 50 also includes a communication component 53. The processor 51, the memory 52 and the communication component 53 are connected via a bus 54.

[0211] In a specific implementation process, at least one processor 51 executes the computer-executable instructions stored in the memory 52, so that at least one processor 51 executes the above method.

[0212] The specific implementation process of the processor 51 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0213] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.

[0214] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.

[0215] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0216] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0217] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0218] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0219] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0220] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0221] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0222] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0223] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0224] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0225] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A data query method, characterized in that: include: Receiving a query statement sent by a terminal, wherein the query statement includes multiple commands for the same data table; Parsing the data table identifier and the type of each command from each command, and obtaining a preset strategy, and determining the execution order of each command according to the preset strategy and the type of each command; the preset strategy includes multiple preset types and the correct execution order of each preset type; Determine whether the execution order of each of the commands is the same as the corresponding original order. If not, construct a linked list array, and add each of the commands to the linked list array in sequence according to the execution order; The data table is obtained according to the data table identifier, and the query result is obtained based on the linked list array after the command is added and the data table.

2. The method according to claim 1, characterized in that The step of parsing the data table identifier and the type of each command from each command includes: Read the fields where the commands are located; Obtain the data table identifier and query field contained in the read result according to the read result; The type of each command is determined according to the specific operation mode reflected by the query field.

3. The method according to claim 1, characterized in that Determining the execution order of each of the commands according to the preset strategy and the type of each of the commands includes: Searching the preset strategy for a preset type that is the same as the type of each of the commands; Determining the correct execution order of the same preset type as the first execution order of each of the commands; Determine whether there are at least two commands with the same first execution order; If not, determining the first execution order as the execution order of each of the commands; If so, determine the original order of the at least two commands; determine the original order as the second execution order of the at least two commands; use the corresponding second execution order as a sub-order of the corresponding first execution order to obtain the execution order of the at least two commands; and determine the corresponding first execution order as the execution order of other commands.

4. The method according to any one of claims 1 to 3, characterized in that: The linked list array includes a plurality of linked lists; each of the linked lists is used to store at least one command of a different type; The construction of the linked list array includes: Different types of linked lists are constructed according to the types of the commands, and the linked list array is constructed based on the different types of linked lists.

5. The method according to claim 4, characterized in that The adding each of the commands to the linked list array in sequence according to the execution order comprises: According to the first execution order, each of the commands is added to each of the linked lists in turn; In response to at least two commands being located in the same linked lists, the at least two commands are sorted in the linked lists according to a second execution order.

6. The method according to claim 5, characterized in that The obtaining of query results based on the linked list array after the command is added and the data table includes: Determine whether there is a linked list containing at least two commands in the linked list array; If not, then according to the order of adding commands, and in turn according to the specific operation modes of the command responses in each of the linked lists, specific operations are performed on the data table; If so, based on the sequence, in response to a linked list containing at least two commands, specific operations are sequentially performed on the data table according to the sequence of the at least two commands; The result of executing a specific operation on the data table is determined as the query result.

7. The method according to claim 1, characterized in that Before the query statement sent by the receiving terminal, the method further includes: Determining the priority of each of the preset types according to the dependency relationship between the preset types; Determine the correct execution order of each of the preset types according to the priority; A mapping relationship is established between each of the preset types and a correct execution order of each of the preset types to obtain a preset strategy.

8. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 7 when being executed by a processor.