Information query method and device, equipment and storage medium

By constructing a specific format query statement, the problems of high resource usage and high traffic consumption during information query in the vehicle machine are solved, and fast and flexible API interface calls are realized, which improves the speed and efficiency of information acquisition.

CN119938695APending Publication Date: 2025-05-06CHONGQING CHANGAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510038897.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

When performing information query in a vehicle machine, multiple interface calls are required, resulting in high resource usage and high traffic consumption. At the same time, the GraphQL language is complex and has high learning costs, which limits the flexibility and efficiency of information acquisition.

Method used

By constructing a query statement in a specific format, including a data field selection clause, a target interface path clause, an interface request method indication clause and a query condition clause, a query statement is sent to the server to obtain the target data, and an interface call is used to obtain multiple data or aggregate the return data of multiple interfaces at one time.

Benefits of technology

It realizes that multiple data are obtained through only one interface call on the application side or aggregates the return data of multiple interfaces, which improves information acquisition speed, reduces traffic consumption, and supports querying of multi-level nested data, expands the application scope.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938695A_ABST
    Figure CN119938695A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an information query method and device, equipment and a storage medium, and the method is applied to an application side and comprises the steps that a query statement is constructed based on a query requirement for a target API interface; sending a query statement to the server side to enable the server side to request data from the target API interface according to the query statement, receiving a target data field returned by the target API interface, and splicing based on the target data field to obtain demand data of the application side; receiving demand data sent by the server; wherein the query statement comprises a data field selection clause which is used for indicating first target data in a target data field or data excluding second target data as demand data; the target interface path clause is used for indicating an interface path of the target API interface; the interface request mode indication clause is used for indicating the HTTP network request mode of the server side to request the interface side for the target API interface; the query condition clause is used for determining the target data field in the target API interface through the request parameter.
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 an information query method, device, equipment and storage medium. Background Art

[0002] The first screen of the application in the car computer after startup usually makes several serial or parallel calls to the API interface. Multiple interface calls will increase the resource usage of the car computer and increase traffic consumption. Getting data from the API interface usually requires writing specific code or scripts. For example, one method of related technology is to use JSON as the first query statement, and the server parses the query method parameters, query condition parameters and target result parameters contained in the first query statement, and generates a second query statement according to the GraphQL format for the query method parameters, query condition parameters and target result parameters, and then uses the second query statement to perform interface query.

[0003] In the above method, in order to query information, the query statement needs to be formatted, which reduces the speed of information acquisition; in addition, the GraphQL language is complex and has a high learning cost, which limits the flexibility and efficiency of information acquisition. Summary of the invention

[0004] The embodiments of the present application provide an information query method, device, equipment and storage medium. The following introduces various aspects involved in the embodiments of the present application.

[0005] In a first aspect, an information query method is provided, which is applied to an application side, and the method includes: constructing a query statement based on a query requirement for a target API interface; sending the query statement to a server side, so that the server side requests data from the target API interface according to the query statement, and receiving a target data field returned by the target API interface, and obtaining the required data of the application side based on the target data field; receiving the required data sent by the server side; wherein the query statement includes: a data field selection clause, used to indicate that the first target data in the target data field or the data after excluding the second target data is the required data; a target interface path clause, used to indicate the interface path of the target API interface; an interface request method indication clause, used to indicate the HTTP network request method of the server side requesting the target API interface from the interface side; and a query condition clause, used to determine the target data field in the target API interface through request parameters.

[0006] According to the above technical means, based on the application's query requirements for the target API interface, a query statement in a specific format is constructed, in which the selection method for determining the required data in the target field, the path of the target API interface, the method for the server to initiate an HTTP request, and the request parameters corresponding to the required data and other related information are defined, so that the server can initiate a query to the interface end according to the query statement and return the required data to the application end. The query method based on the above query statement can realize the call of multiple data of the same interface or the acquisition of return data of multiple interfaces after aggregation through only one interface on the application end, which can speed up the information acquisition speed and reduce traffic consumption.

[0007] In some embodiments, the data field selection clause includes an index of the first target data in the target data field, and the index is a primary index or a multi-level index.

[0008] According to the above technical means, by setting a multi-level index of the first target data in the data field selection clause, the query statement can support the query of data stored in a multi-level nested manner, thereby expanding the application scope of the query statement.

[0009] In some embodiments, the query statement further includes a sub-query statement, and the sub-query statement includes a dependent query clause for determining a request parameter corresponding to a target data field through third target data.

[0010] According to the above technical means, by setting a sub-query statement in the query statement, and using the dependent query clause in the sub-query statement to query different API interfaces with dependent relationships, this method allows the application end to query data with dependent relationships in different API interfaces with only one query request, thereby improving query efficiency.

[0011] In some embodiments, before constructing the query statement, the method also includes: sending an alias setting statement to the server to set an alias for the interface path of the target API interface; using the alias to replace the interface path of the target API interface in the target interface path query clause, so that the server determines the interface path of the target API interface based on the alias.

[0012] According to the above technical means, before performing information query, an alias is set for the interface path of the target API interface. In the subsequent interaction process, the alias is used instead of the interface path of the target API interface, which can reduce the length of information sent between the application and the server, save wireless communication resources, and reduce traffic consumption; at the same time, setting an alias can facilitate developers' understanding and improve development efficiency.

[0013] In a second aspect, an information query method is provided, which is applied to a server, and the method includes: receiving a query statement sent by an application, the query statement is constructed by the application based on the query requirements for a target API interface; parsing the query statement, and determining a data field selection clause, a target interface path clause, an interface request method indication clause, and a query condition clause in the query statement; wherein the data field selection clause is used to indicate that the data selected from the target data field is the required data of the application, the target interface path clause is used to indicate the interface path of the target API interface, the interface request method indication clause is used to indicate the HTTP network request method for the server to request the target API interface, and the query condition clause is used to determine the target data field in the target API interface path through request parameters; requesting data from the target API interface according to the HTTP network request method indicated by the interface request method indication clause; receiving return data sent by the interface end, the return data being the target data field; cutting and splicing the return data according to the data field selection clause to obtain the required data; and sending the required data to the application.

[0014] In some embodiments, the data field selection clause includes an index of the first target data in the target data field, and the index is a primary index or a multi-level index; the returned data is trimmed and spliced ​​according to the data field selection clause, including: determining the first target data in the target data field according to the index.

[0015] In some embodiments, the query statement also includes a sub-query statement, and the sub-query statement includes a dependent query clause; the method also includes: performing a sub-query on the interface end according to the third target data indicated by the dependent query clause, and determining the request result data corresponding to the third target data; assigning the request result data to the request parameter in the query condition clause; and requesting data from the target API interface according to the assigned request parameters.

[0016] In some embodiments, before receiving the query statement, the method also includes: receiving an alias setting statement sent by the application end to set an alias for the interface path of the API interface of the interface end; when parsing that the target interface path clause includes an alias, determining the interface path of the target API interface based on the correspondence between the alias and the interface path of the API interface of the interface end.

[0017] In a third aspect, an information query method is provided, which is applied to an interface end, and the method includes: receiving an HTTP network request sent by a server; sending return data to the server according to the HTTP network request, so that the server sends spliced ​​data to the application end based on the return data and the query requirements of the application end for the target API interface; wherein the query requirements and HTTP network request of the application end are obtained by the server end by parsing the query statement sent by the application end, and the query statement includes: a data field selection clause, which is used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application end; a target interface path clause, which is used to indicate the interface path of the target API interface; an interface request method indication clause, which is used to indicate the request method of the HTTP network request of the server end requesting the target API interface; and a query condition clause, which is used to determine the target data field in the target API interface path through request parameters.

[0018] In some embodiments, the query statement also includes a sub-query statement, the sub-query statement includes a dependent query clause, and the method also includes: receiving a sub-query sent by the server, the sub-query is performed by the server based on the third target data indicated by the dependent query clause; sending request result data corresponding to the third target data to the server, so that the server assigns values ​​to request parameters in the query condition clause according to the request result data.

[0019] In a fourth aspect, an information query device is provided, which is applied to an application end, and the device includes: a query statement construction unit, which is used to construct a query statement based on the query demand for the target API interface; a first sending unit, which is used to send the query statement to the server end, so that the server end requests data from the target API interface according to the query statement, and receives the target data field returned by the target API interface, and obtains the demand data of the application end based on the target data field; a first receiving unit, which is used to receive the demand data sent by the server end; wherein the query statement includes: a data field selection clause, which is used to indicate that the first target data in the target data field or the data after excluding the second target data is the demand data; a target interface path clause, which is used to indicate the interface path of the target API interface; an interface request method indication clause, which is used to indicate the HTTP network request method of the server end requesting the target API interface from the interface end; and a query condition clause, which is used to determine the target data field in the target API interface through request parameters.

[0020] In a fifth aspect, an information query device is provided, which is applied to a server, and the device includes: a second receiving unit, which is used to receive a query statement sent by an application, and the query statement is constructed by the application based on the query demand for the target API interface; a parsing unit, which is used to parse the query statement, and determine the data field selection clause, the target interface path clause, the interface request method indication clause and the query condition clause in the query statement; wherein the data field selection clause is used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application, and the target interface path clause is used to indicate the interface path of the target API interface. path, the interface request method indication clause is used to indicate the HTTP network request method of the server requesting the target API interface, and the query condition clause is used to determine the target data field in the target API interface path through the request parameters; the data request unit is used to request data from the target API interface according to the HTTP network request method indicated by the interface request method indication clause; the second receiving unit is also used to receive the return data sent by the interface end, and the return data is the target data field; the splicing unit is used to cut and splice the return data according to the data field selection clause to obtain the required data; the second sending unit is used to send the required data to the application end.

[0021] In a sixth aspect, an information query device is provided, which is applied to an interface end, and the device includes: a third receiving unit, which is used to receive an HTTP network request sent by a server; a third sending unit, which is used to send return data to the server according to the HTTP network request, so that the server sends spliced ​​data to the application based on the return data and the query requirements of the application for the target API interface; wherein the query requirements and HTTP network request of the application are obtained by the server by parsing the query statement sent by the application, and the query statement includes: a data field selection clause, which is used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application; a target interface path clause, which is used to indicate the interface path of the target API interface; an interface request method indication clause, which is used to indicate the request method of the HTTP network request of the server requesting the target API interface; and a query condition clause, which is used to determine the target data field in the target API interface path through request parameters.

[0022] In a seventh aspect, an information query device is provided, comprising a processor memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to implement the method as described in any one of the first to third aspects.

[0023] In an eighth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program, when executed, implements the method as described in any one of the first to third aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic flow chart of an information query method provided in an embodiment of the present application;

[0025] Figure 2 A schematic flow chart of an information query method provided in another embodiment of the present application;

[0026] Figure 3 A schematic flow chart of an information query method provided in yet another embodiment of the present application;

[0027] Figure 4 is a schematic flow chart of an information query method provided by another embodiment of the present application;

[0028] Figure 5 is a schematic flow chart of an information query method provided by another embodiment of the present application;

[0029] Figure 6 is a schematic flow chart of an information query method provided by another embodiment of the present application;

[0030] Figure 7 is a schematic structural diagram of an information query device provided by an embodiment of the present application;

[0031] Figure 8 is a schematic structural diagram of an information query device provided by another embodiment of the present application;

[0032] Fig. 9 is a schematic structural diagram of an information query device provided by another embodiment of the present application;

[0033] Fig.10 It is a schematic structural diagram of the information query device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0035] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is 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. The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific order for the objects. It is understood that "first / second / third" may be interchanged in 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.

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

[0037] Before introducing the technical solutions of the embodiments of the present application in detail, detailed examples are given for information query methods in related technologies and existing problems thereof.

[0038] At present, the first screen of the application in the car computer after startup usually makes serial or parallel calls to several interfaces. Multiple interface calls will increase the resource occupation of the car computer and increase traffic consumption. To solve the above problems, the following method is adopted in the relevant technology: using JSON as the first query statement, the server parses the query method parameters, query condition parameters and target result parameters contained in the first query statement, and generates a second query statement according to the GraphQL format for the query method parameters, query condition parameters and target result parameters, and then uses the second query statement to perform interface query.

[0039] In the above method, in order to query information, the query statement needs to be converted, which will reduce the speed of data acquisition; in addition, the GraphQL language is complex and has a high learning cost. Therefore, it is urgent to provide a method that can quickly and flexibly implement API interface calls.

[0040] In view of the above problems, the embodiments of the present application provide an information query method, device, equipment and storage medium, which can be applied to the vehicle computer to reduce the resource occupation of the vehicle computer application and speed up the data acquisition speed. The technical solution of the present application will be described in detail with reference to the accompanying drawings.

[0041] Figure 1This is a schematic flow chart of the information query method provided in the embodiment of the present application, which is described from the perspective of the interaction between the application end, the service end and the interface end. The application end may be, for example, an application software running in the vehicle computer, and the service end may be deployed on a server corresponding to the application software, which may be a local server, a cloud server or a server cluster. Figure 1 The method includes steps S110-S170.

[0042] like Figure 1 As shown, in step S110, the application side constructs a query statement based on the query requirements for the target API interface.

[0043] API interface, also known as application programming interface, is a specification that defines the interaction between software components. It defines how applications communicate with other applications or systems and how to exchange data. Using API interface can improve the efficiency of application development. By using API interface, the functions of application can be expanded. Taking the login operation of application as an example, in the process of software development, different instant messaging software API interfaces can be called to log in to the application using different instant messaging software accounts. In addition, during the operation of the application, the referenced program communicates with other applications and systems through API interface. Even if one of the applications or systems fails, it will not affect the operation of the application.

[0044] As mentioned above, the technical solution provided by the embodiment of the present application is applied to the car computer. For the application running on the car computer, its operation process also needs to rely on multiple API interfaces. For example, when the application is initially started, it is necessary to call the account-related API interface to obtain the identity-related information of the currently logged-in user from the database stored on the server. The identity-related information can be, for example, the name, age, and account permissions of the current user. It should be noted that the above is only an example. In actual applications, the operation of various applications in the car computer needs to rely on different API interfaces. The embodiment of the present application does not limit the number and type of API interfaces called by the application.

[0045] In an embodiment of the present application, the application end's query demand for the target API interface includes all or part of the data in the target data field, wherein the target data field is one of multiple data fields corresponding to the target API interface. Still taking the account-related information mentioned above as an example, the target API usually corresponds to the identity information of multiple users, and the target data field is the identity information corresponding to the currently logged-in user; in addition, the target data field contains multiple types of identity information of the currently logged-in user, and the above-mentioned application end's demand may be part or all of the multiple identity information.

[0046] In an embodiment of the present application, the query statement constructed by the application end according to the above query requirements includes a data field selection clause, a target interface path clause, an interface request method indication clause and a query condition clause.

[0047] The data field selection statement is used to indicate that the first target data in the target data field or the data after excluding the second target data is the required data.

[0048] It should be noted that the embodiment of the present application does not limit the number of the first target data or the second target data. In other words, the number of the first target data or the second target data is not limited to one. The demand data may be a plurality of first target data in the target data field, or the demand data may also be data in the target data field excluding a plurality of second target data.

[0049] It should also be noted that the target API interface mentioned in the embodiments of the present application may be one or more of a plurality of API interfaces associated with an application program on the application side.

[0050] Combined with the previous example, the target data field includes multiple data fields such as the user's name, age, height, and health status. The required data of the application is, for example, name and age data. The data field selection statement can perform a positive indication, that is, directly indicate that part of the data in the target data field is the required data, or the data field selection statement can also perform a reverse indication, that is, indicate the unnecessary fields in the target data field and use the remaining data as the required data.

[0051] Exemplarily, the data field selection clause may be a select statement, and the above two indication modes correspond to the following two syntaxes respectively:

[0052] Syntax 1: select A,B, means selecting field A and field B from the target data field.

[0053] Syntax 2: select*(A,B), where select* means selecting all data fields in the target data field, and (A,B) means excluding the A and B fields.

[0054] The target interface path clause is used to indicate the interface path of the target API interface. As mentioned above, an application is usually associated with multiple API interfaces, which can be organized and classified through a multi-level directory structure. Therefore, when querying the required data, the path of the target API interface containing the required data must first be indicated.

[0055] Exemplarily, the target interface path clause may be a from statement, which may use the following syntax: from / C / D / E. Wherein, / C / D / E represents the path of the target API interface. It should be understood that the above three-level path is only an example, and the path of the target API interface may be a single-level path or a multi-level path, which is not limited in the embodiments of the present application.

[0056] The interface request method indication clause is used to indicate the HTTP network request method used by the server to request the target API interface from the interface end. Common HTTP network request methods include GET and POST. GET is mainly used to obtain data, and POST is suitable for submitting data or creating new resources. When the target API interface needs to determine the target data field based on the request parameters, the POST method can be used to send the request.

[0057] The query condition clause is used to determine the target data field in the target API interface path through the request parameters. It can be understood that the target API interface usually corresponds to multiple data fields. Still taking the identity information of the user in the previous text as an example, the target API interface corresponds to the identity information of each user. The aforementioned request parameter can be, for example, the user's identity identification code (identify, ID). According to the request parameter, the target data field of the user corresponding to a certain identity identification code can be determined. The target data field includes multiple data fields such as the user's name, age, height, and health status. The request parameter can also be understood as the index of the target data field in the target API interface.

[0058] Exemplarily, the query condition clause may be a where statement, which may adopt the following syntax: where F=f, wherein F is the type of the request parameter, and f is the value of the request parameter.

[0059] According to the syntax of each clause described above, the query statement may be, for example, select *, (name, age) post from / soa / 10225 / getHealth where id = 15. This query statement means: the interface path of the target API interface is / soa / 10225 / getHealth, a group with id 15 is selected from all the data of the target port as the target data field, and the remaining fields after excluding the name and age fields in the target data field are the required data of the application end.

[0060] In step S120, the application sends a query statement to the server.

[0061] The embodiment of the present application does not limit the method for sending the query statement. Combined with the application scenario of the technical solution on the vehicle computer described above, the query statement can be sent through the vehicle's Internet of Vehicles, that is, the communication unit in the vehicle computer sends the query statement to the communication base station through wireless communication, and the base station then forwards it to the server where the server is deployed.

[0062] In step S130, the server receives and parses the query statement, and determines the data field selection clause, the target interface path clause, the interface request mode indication clause, and the query condition clause in the query statement.

[0063] In the embodiment of the present application, the server needs to parse the query statement based on the grammatical rules used by the application to construct the query statement, and determine the various types of information contained in the query statement. The construction of the query statement by the application and the parsing of the query statement by the server can be understood as encoding and decoding of the query information, that is, transmitting the query information in a way that can be understood by both parties.

[0064] In step S140, the server requests data from the interface end according to the HTTP network request method indicated by the interface request method indication clause.

[0065] According to the aforementioned step S130, the server parses the query statement to obtain an interface request method indication clause, which indicates a specific method of HTTP network request, such as POST or GET. The server executes according to the corresponding method and requests data from the interface end.

[0066] For example, according to the query statement example given above, the HTTP network request method indicated by the interface request method is POST, then the server can request the target API interface with the interface path of / soa / 10225 / getHealth in POST mode and carry the request parameter id=15.

[0067] In step S150, the interface end sends return data to the server end according to the received HTTP network request.

[0068] After receiving the HTTP network request sent by the server, the interface end determines the target API interface according to the interface path, and then uses the request parameters as an index to select a set of data that matches the request parameters and sends it to the server as return data.

[0069] Referring to the previous example, the returned data on the interface is:

[0070] {

[0071] "id":15,

[0072] "user":{"name":"zhangsan","age":20}

[0073] "health": 98

[0074] }

[0075] The above-mentioned return data is usually JSON data, which is a lightweight data exchange format. JSON can be a composite data type. JSON can include objects and arrays. JSON objects can be a collection of key-value pairs, and arrays can be a collection of value data. A JSON object can start with a left bracket "{" and end with a right bracket "}". Each key data is followed by a colon, and each key-value pair is separated by a comma. As an example, JSON data can be, for example, {"b":3,"a":"xyz"}, which includes two key-value pairs, which are b=3 and a=xyz, respectively. A JSON array can start with a left bracket "[" and end with a right bracket "]", and each value data is separated by a comma. As an example, JSON data can be, for example, {"b":["3","a","xyz"]}, which includes 3 key-value pairs, which are b=3, b=a, and b=xyz, respectively. The value data of JSON can be, for example, one or more of a number, a string, an object, an array, and a Boolean value. JSON data is data with nested relationships. The value data in a JSON object can contain other arrays or other objects. JSON data itself is a nested structure, which makes JSON data a tree-structured data in organization. The nested structure in JSON data makes JSON data easy to write, read and parse without the need for a special structure.

[0076] In step S160, the server cuts and splices the returned data according to the data field selection clause to obtain the required data.

[0077] According to the description above, the data field selection clause contains the application's requirements for data, including the first target data or the exclusion of the second target data. After receiving the aforementioned return data sent by the interface, the server cuts and splices it according to the application's requirements to form the required data that matches the application's requirements.

[0078] Referring to the previous example, the data field selection clause indicates the requirement to exclude the name field and the age field. Based on this requirement, the server trims the above returned data, removes the corresponding fields, and concatenates the remaining fields to obtain the following JSON data as the required data:

[0079] {

[0080] "id":15,

[0081] "health": 98

[0082] }

[0083] In step S170, the server sends the required data to the application.

[0084] The embodiments of the present application do not limit the method for sending the demand data. Combined with the application scenario of the technical solution on the vehicle computer described above, the vehicle can receive the demand data through the vehicle network, and the server deployed on the service end sends the demand data to the base station, and the base station then sends the demand data to the application end through wireless communication between the vehicle computer and the vehicle computer.

[0085] According to the above information query method provided by the embodiment of the present application, based on the query requirements of the application program for the target API interface, a query statement of a specific format is constructed, in which the selection method for determining the required data in the target field, the path of the target API interface, the method for the server to initiate an HTTP request, and the request parameters corresponding to the required data and other related information are defined, so that the server can initiate a query to the interface end according to the query statement and return the required data to the application end. The query method based on the above query statement can realize the calling of multiple data of the same interface or the acquisition of the return data of multiple interfaces after aggregation through only one interface on the application end, which can speed up the information acquisition speed and reduce traffic consumption.

[0086] In some embodiments, the data selection clause in the query statement includes an index of the first target data in the target data end, and the index may be a primary index or a multi-level index.

[0087] According to the above description, the first target data is the data that needs to be retained in the target data field indicated by the data selection clause. The data of different fields in the target data field can be stored in a multi-level nested manner, and each field corresponds to at least one level of index. In this case, the data selection clause needs to support multi-level fields, that is, the index containing the first target data.

[0088] For example, the query statement may be select user.name, user.age post from / soa / 10225 / getHealth where id=15, wherein user.name and user.age are multi-level fields.

[0089] Combination Figure 1 The method uses id=15 as the request parameter, and the path of the interface end is / soa / 10225 / getHealth. The JSON data returned by the target API interface is:

[0090] {

[0091] "id":15,

[0092] "user":{"name":"zhangsan","age":20}

[0093] "health": 98

[0094] }

[0095] The server cuts and splices the data and returns it to the application as follows:

[0096] {

[0097] "name":"zhangsan",

[0098] "age": 20

[0099] }

[0100] According to the above technical means, by setting a multi-level index of the first target data in the data field selection clause, the query statement can support the query of data stored in a multi-level nested manner, thereby expanding the application scope of the query statement.

[0101] In some embodiments, the aforementioned query statement further includes a sub-query statement, and the sub-query statement includes a dependent query clause, which is used to determine the request parameter corresponding to the target data field through the third target data.

[0102] It is understandable that, in the interface end, in order to facilitate data management, there will be dependencies between data from different interfaces. Taking the query of user information described in the previous article as an example, the user's ID information is associated with the name and stored in the same table or database, and the user's age is associated with the ID-related information and stored in the same table or database. When using the user's name to query his age, it is necessary to first use the name as a request parameter to query the user's ID information; then use the user's ID information as a request parameter to query the user's age information. The above-mentioned query of the user's ID information using the name as the request parameter is the subquery in the embodiment of the present application. The user's name is the third target data, and the user ID information determined based on it is the request parameter of the target data field.

[0103] For example, the query statement may be:

[0104] select name,age post from / soa / 10225 / getHealth as api1 where id=api2.id;

[0105] join select id post from / soa / 10225 / user as api2 where name='zhangsan'.

[0106] Among them, join select id post from / soa / 10225 / user as api2 where name = 'zhangsan' is a subquery statement. select name,age post from / soa / 10225 / getHealth as api1where id = api2.id can be called the main query statement. The difference between this main query statement and the query statement in the previous example is that the specific value of the request parameter depends on the query result of the subquery statement.

[0107] In the above subquery statement, join means that the request parameters of one interface depend on the request result data of the next interface. This self-query statement is used to find the user ID corresponding to the target data field with the request parameter name of 'zhangsan' in the API interface with the path / soa / 10225 / user. Then use this user ID to find the name and age fields in the API interface with the path / soa / 10225 / getHealth.

[0108] Figure 2 is a schematic flow chart of an information query method provided by another embodiment of the present application, which illustrates the information query method when a query statement includes a sub-query statement. It should be noted that: Figure 2 It is still described from the perspective of the interaction between the application side, the service side, and the interface side. Figure 2 Some of the steps in the method shown are Figure 1 The steps in are the same or similar, and will not be described in detail later. Figure 1 And the previous description. Figure 2 The method includes steps S210-S290.

[0109] In step S210, the application constructs a query statement based on the query requirements for the target API interface.

[0110] In this embodiment, the query statement has substantially the same syntax as the query statement described above, except that the query statement includes a sub-query statement.

[0111] In step S220, the application sends a query statement to the server.

[0112] In step S230, the server receives and parses the query statement.

[0113] The server parses the query statement according to the grammatical rules of the query statement and sub-query statement constructed by the application, and determines the data field selection clause, target interface path clause, interface request method indication clause and query condition clause in the query statement, and the dependent query clause, dependent query data field selection clause, dependent query target interface clause, dependent query interface request method indication clause and dependent query condition clause in the sub-query statement.

[0114] In step S240, the server sends a first HTTP network request according to the HTTP network request mode indicated by the dependency query interface request mode indication clause to request the dependency query parameters from the interface end.

[0115] For example, according to the subquery statement in the previous text, if the HTTP network request method indicated by the dependency query interface request method indication clause is POST, the server can request the API interface with the interface path / soa / 10225 / user in POST mode, carrying the request parameter name='zhangsan'.

[0116] In step S250, the interface end sends first return data to the server end according to the received first HTTP network request.

[0117] According to the above example, the interface uses the request parameter name='zhangsan' as an index, determines the corresponding target data and sends it to the server. The first return data received by the server is:

[0118] {

[0119] "id":15

[0120] }

[0121] In step S260, the server sends a second HTTP network request to request data from the interface end according to the HTTP network request method indicated by the interface request method indication clause of the query statement.

[0122] For example, the HTTP network request method indicated by the query statement select name,age post from / soa / 10225 / getHealth asapi1 where id=api2.id is POST, and the server requests the target API interface with the interface path of / soa / 10225 / getHealth in POST mode, and carries the request parameter id=15. The value of id here is obtained according to the above step S250.

[0123] In step S270, the interface end sends second return data to the server end according to the received second HTTP network request.

[0124] After receiving the second HTTP network request, the interface end determines the target API interface according to the interface path, and then uses the request parameter as an index to select a set of data matching the request parameter, and sends it to the server end as the second return data.

[0125] Referring to the previous example, the second return data of the interface is:

[0126] {

[0127] "id":15,

[0128] "name": "zhangsan",

[0129] "age": 20,

[0130] "health": 98

[0131] }

[0132] In step S280, the server cuts and splices the second returned data according to the data field selection clause to obtain the required data. This step is the same as step S160 in the above text and will not be repeated here.

[0133] Referring to the example above, the data field selection clause indicates the requirements for the name field and the age field. Based on this requirement, the server trims and concatenates the above returned data to obtain the following JSON data as the required data:

[0134] {

[0135] "name": "zhangsan",

[0136] "age": 20

[0137] }

[0138] In step S290, the server sends the required data to the application.

[0139] According to the above technical means, by setting a sub-query statement in the query statement, and using the dependent query clause in the sub-query statement to query different API interfaces with dependent relationships, this method allows the application end to query data with dependent relationships in different API interfaces with only one query request, thereby improving query efficiency.

[0140] In some embodiments, Figure 3 As shown, before the application side constructs the query statement in step S110, the method further includes:

[0141] Step S310: the application sends an alias setting statement to the server to set an alias for the interface path of the target API interface.

[0142] When constructing the query statement in step S110, the interface path of the target API interface is replaced by the alias in the target interface path query clause, so that the server can determine the interface path of the target API interface according to the alias.

[0143] Exemplarily, the alias setting statement is set table1 as / soa / 10225 / getHealth, wherein / soa / 10225 / getHealth is the path of the target API interface, and table1 is the alias set for the path.

[0144] According to the above technical means, before performing information query, an alias is set for the interface path of the target API interface. In the subsequent interaction process, the alias is used instead of the interface path of the target API interface, which can reduce the length of information sent between the application and the server, save wireless communication resources, and reduce traffic consumption; at the same time, setting an alias can facilitate developers' understanding and improve development efficiency.

[0145] Figure 4 is a schematic flow chart of an information query method provided by another embodiment of the present application, the method is applied to an application end, the application end may be an application software running in a vehicle computer, or the application end may be connected to Figure 1-Figure 3 The application end in any of the embodiments shown is the same. Figure 4 The method includes steps S410-S430.

[0146] In step S410, a query statement is constructed based on the query requirement for the target API interface.

[0147] Among them, the query statement includes: a data field selection clause, which is used to indicate that the first target data in the target data field or the data after excluding the second target data is the required data; a target interface path clause, which is used to indicate the interface path of the target API interface; an interface request method indication clause, which is used to indicate the HTTP network request method by which the server requests the target API interface from the interface end; and a query condition clause, which is used to determine the target data field in the target API interface through request parameters.

[0148] In step S420, a query statement is sent to the server, so that the server requests data from the target API interface according to the query statement, receives the target data field returned by the target API interface, and obtains the required data of the application end based on the target data field.

[0149] In step S430, the demand data sent by the server is received.

[0150] In some embodiments, the data field selection clause includes an index of the first target data in the target data field, and the index is a primary index or a multi-level index.

[0151] In some embodiments, the query statement further includes a sub-query statement, and the sub-query statement includes a dependent query clause for determining a request parameter corresponding to a target data field through third target data.

[0152] In some embodiments, before constructing the query statement, the information query method also includes: sending an alias setting statement to the server to set an alias for the interface path of the target API interface; using the alias to replace the interface path of the target API interface in the target interface path query clause, so that the server determines the interface path of the target API interface based on the alias.

[0153] Figure 5 is a schematic flow chart of an information query method provided by another embodiment of the present application. The method is applied to a server. The server can be deployed on a server corresponding to the application software. The server can be a local server, a cloud server, or a server cluster. Figure 1-Figure 3 The server side in any of the embodiments shown is the same. Figure 5 The method includes steps S510-S560.

[0154] In step S510, a query statement sent by an application is received.

[0155] The query statement is constructed by the application end based on the query requirements for the target API interface. The detailed description of the query statement can be found in the above embodiment, which will not be repeated here.

[0156] In step S520, the query statement is parsed. By parsing the query statement, the data field selection clause, the target interface path clause, the interface request method indication clause and the query condition clause can be determined; wherein the data field selection clause is used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application end, the target interface path clause is used to indicate the interface path of the target API interface, the interface request method indication clause is used to indicate the HTTP network request method of the server end requesting the target API interface, and the query condition clause is used to determine the target data field in the target API interface path through the request parameters.

[0157] In step S530, data is requested from the target API interface according to the HTTP network request method indicated by the interface request method indication clause.

[0158] In step S540, the return data sent by the receiving interface end is the target data field.

[0159] In step S550, the returned data is trimmed and spliced ​​according to the data field selection clause to obtain the required data.

[0160] In step S560, the demand data is sent to the application end.

[0161] In some embodiments, the data field selection clause includes an index of the first target data in the target data field, and the index is a primary index or a multi-level index;

[0162] The aforementioned trimming and splicing of the returned data according to the data field selection clause includes: determining the first target data in the target data field according to the index.

[0163] In some embodiments, the query statement also includes a sub-query statement, and the sub-query statement includes a dependent query clause; the method also includes: performing a sub-query on the interface end according to the third target data indicated by the dependent query clause, and determining the request result data corresponding to the third target data; assigning the request result data to the request parameter in the query condition clause; and requesting data from the target API interface according to the assigned request parameters.

[0164] In some embodiments, before receiving the query statement, the method also includes: receiving an alias setting statement sent by the application end to set an alias for the interface path of the API interface of the interface end; when parsing that the target interface path clause includes an alias, determining the interface path of the target API interface based on the correspondence between the alias and the interface path of the API interface of the interface end.

[0165] Figure 6 is a schematic flow chart of an information query method provided by another embodiment of the present application, the method is applied to the interface end, Figure 6 The method includes steps S610-S620.

[0166] In step S610, an HTTP network request sent by a server is received.

[0167] In step S620, according to the HTTP network request, the return data is sent to the server, so that the server sends the spliced ​​data to the application based on the return data and the query requirements of the application for the target API interface; wherein the query requirements of the application and the HTTP network request are obtained by the server by parsing the query statement sent by the application, and the query statement includes: a data field selection clause, which is used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application; a target interface path clause, which is used to indicate the interface path of the target API interface; an interface request method indication clause, which is used to indicate the request method of the HTTP network request of the server to request the target API interface; a query condition clause, which is used to determine the target data field in the target API interface path through request parameters.

[0168] In some embodiments, the query statement also includes a sub-query statement, the sub-query statement includes a dependent query clause, and the information query method also includes: receiving a sub-query sent by the server, the sub-query is performed by the server based on the third target data indicated by the dependent query clause; sending request result data corresponding to the third target data to the server, so that the server assigns values ​​to request parameters in the query condition clause according to the request result data.

[0169] Combination of the above Figures 1 to 6 , describes the method embodiment of the present application in detail, and the following is combined with Figure 7-10 , describes the device embodiment of the present application in detail. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so the parts not described in detail can refer to the previous method embodiment.

[0170] Figure 7 is a schematic structural diagram of an information query device provided in an embodiment of the present application, Figure 7 The device 700 is applied to an application end, and the device 700 includes:

[0171] The query statement building unit 710 is used to build a query statement based on the query requirement for the target API interface.

[0172] The first sending unit 720 is used to send a query statement to the server, so that the server requests data from the target API interface according to the query statement, receives the target data field returned by the target API interface, and obtains the required data of the application end based on the target data field.

[0173] The first receiving unit 730 is used to receive demand data sent by the server.

[0174] Among them, the query statement includes: a data field selection clause, which is used to indicate that the first target data in the target data field or the data after excluding the second target data is the required data; a target interface path clause, which is used to indicate the interface path of the target API interface; an interface request method indication clause, which is used to indicate the HTTP network request method by which the server requests the target API interface from the interface end; and a query condition clause, which is used to determine the target data field in the target API interface through request parameters.

[0175] In some embodiments, the data field selection clause includes an index of the first target data in the target data field, and the index is a primary index or a multi-level index.

[0176] In some embodiments, the query statement further includes a sub-query statement, and the sub-query statement includes a dependent query clause for determining a request parameter corresponding to a target data field through third target data.

[0177] In some embodiments, the device 700 also includes an alias setting unit, which is used to send an alias setting statement to the server to set an alias for the interface path of the target API interface.

[0178] The query statement construction unit is also used to replace the interface path of the target API interface with the alias in the target interface path query clause, so that the server determines the interface path of the target API interface according to the alias.

[0179] Figure 8 is a schematic structural diagram of an information query device provided by another embodiment of the present application, Figure 8 The device 800 is applied to the server, and the device 800 includes:

[0180] The second receiving unit 810 is used to receive a query statement sent by the application end, where the query statement is constructed by the application end based on a query requirement for a target API interface.

[0181] The parsing unit 820 is used to parse the query statement and determine the data field selection clause, the target interface path clause, the interface request mode indication clause and the query condition clause in the query statement.

[0182] Among them, the data field selection clause is used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application end, the target interface path clause is used to indicate the interface path of the target API interface, the interface request method indication clause is used to indicate the HTTP network request method for the server to request the target API interface, and the query condition clause is used to determine the target data field in the target API interface path through the request parameters.

[0183] The data request unit 830 is used to request data from the target API interface according to the HTTP network request method indicated by the interface request method indication clause.

[0184] The second receiving unit 810 is further configured to receive return data sent by the interface end, where the return data is a target data field.

[0185] The splicing unit 840 is used to cut and splice the returned data according to the data field selection clause to obtain the required data.

[0186] The second sending unit 850 is used to send the required data to the application end.

[0187] In some embodiments, the data field selection clause includes an index of the first target data in the target data field, and the index is a primary index or a multi-level index.

[0188] The splicing unit 840 is further configured to determine the first target data in the target data field according to the index.

[0189] In some embodiments, the query statement further includes a sub-query statement, and the sub-query statement includes a dependent query clause;

[0190] The apparatus 800 further includes a sub-query unit, configured to perform a sub-query on the interface end according to the third target data indicated by the dependent query clause, and determine the request result data corresponding to the third target data;

[0191] An assignment unit, used to assign values ​​to request parameters in a query condition clause using request result data;

[0192] The data request unit 830 is further used to request data from the target API interface according to the assigned request parameters.

[0193] In some embodiments, the second receiving unit 810 is further configured to receive an alias setting statement sent by the application end, so as to set an alias for the interface path of the API interface of the interface end.

[0194] The parsing unit 820 is further configured to: when parsing that the target interface path clause includes an alias, determine the interface path of the target API interface according to the correspondence between the alias and the interface path of the API interface at the interface end.

[0195] Fig. 9 is a schematic structural diagram of an information query device provided by another embodiment of the present application. The device 900 is applied to an interface end. Fig. 9 The device 900 in the embodiment includes:

[0196] The third receiving unit 910 is used to receive an HTTP network request sent by the server.

[0197] The third sending unit 920 is used to send return data to the server according to the HTTP network request, so that the server sends the spliced ​​data to the application based on the return data and the query requirements of the application for the target API interface.

[0198] Among them, the query requirements and HTTP network requests of the application side are obtained by the server side through parsing the query statements sent by the application side. The query statements include: a data field selection clause, which is used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application side; a target interface path clause, which is used to indicate the interface path of the target API interface; an interface request method indication clause, which is used to indicate the request method of the HTTP network request of the server side requesting the target API interface; a query condition clause, which is used to determine the target data field in the target API interface path through request parameters.

[0199] In some embodiments, the query statement also includes a sub-query statement, the sub-query statement includes a dependent query clause, and the third receiving unit 910 is further used to: receive a sub-query sent by the server, and the sub-query is performed by the server based on the third target data indicated by the dependent query clause.

[0200] The third sending unit 920 is further configured to send request result data corresponding to the third target data to the server, so that the server assigns values ​​to request parameters in the query condition clause according to the request result data.

[0201] Fig.10 It is a schematic structural diagram of the information query device provided in an embodiment of the present application. Fig.10 The dotted line in the figure indicates that the unit or module is optional. The device 1000 can be used to implement the method described in the above method embodiment. The device 1000 can be a server or a chip or integrated circuit that can implement the method of the above embodiment.

[0202] The device 1000 may include one or more processors 1010. The processor 1010 may support the device 1000 to implement the method described in the above method embodiment.

[0203] The device 1000 may further include one or more memories 1020. The memory 1020 stores a computer program, which can be executed by the processor 1010, so that the processor 1010 performs the method described in the above method embodiment. The memory 1020 may be independent of the processor 1010 or integrated in the processor 1010.

[0204] The device 1000 may further include a transceiver 1030. The processor 1010 may communicate with other devices or chips through the transceiver 1030. For example, the processor 1010 may transmit and receive data with other devices or chips through the transceiver 1030.

[0205] The embodiment of the present application provides a storage medium, which stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement some or all of the steps in the above method. The storage medium can be transient or non-transient.

[0206] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0207] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0208] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0209] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0210] The processor may be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It is understandable that the electronic device that implements the functions of the processor may also be other, and the embodiments of the present application are not specifically limited.

[0211] The above-mentioned computer storage medium / memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0212] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.

[0213] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0214] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0215] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; 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 present embodiment.

[0216] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0217] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0218] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a vehicle-mounted terminal (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0219] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. An information query method, applied to an application end, characterized in that: The method comprises: Construct query statements based on the query requirements of the target application programming interface API; Send the query statement to the server, so that the server requests data from the target API interface according to the query statement, receives the target data field returned by the target API interface, and obtains the required data of the application end based on the target data field; Receiving the demand data sent by the server; The query statement includes: A data field selection clause, used to indicate that the first target data or the data after excluding the second target data in the target data field is the required data; The target interface path clause is used to indicate the interface path of the target API interface; The interface request method indication clause is used to indicate the HTTP network request method used by the server to request the target API interface from the interface end; The query condition clause is used to determine the target data field in the target API interface through request parameters.

2. The information query method according to claim 1, characterized in that: The data field selection clause includes an index of the first target data in the target data field, and the index is a primary index or a multi-level index.

3. The information query method according to claim 1, characterized in that: The query statement also includes a sub-query statement, and the sub-query statement includes a dependent query clause, which is used to determine the request parameter corresponding to the target data field through the third target data.

4. The information query method according to any one of claims 1 to 3, characterized in that: Before constructing the query statement, the method further includes: Sending an alias setting statement to the server to set an alias for the interface path of the target API interface; The alias is used to replace the interface path of the target API interface in the target interface path query clause, so that the server determines the interface path of the target API interface according to the alias.

5. An information query method, applied to a server, characterized in that: The method comprises: Receiving a query statement sent by an application end, wherein the query statement is constructed by the application end based on a query requirement for a target API interface; Parsing the query statement to determine a data field selection clause, a target interface path clause, an interface request mode indication clause, and a query condition clause in the query statement; Among them, the data field selection clause is used to indicate that the first target data or the data after excluding the second target data from the target data field is selected as the required data of the application end, the target interface path clause is used to indicate the interface path of the target API interface, the interface request method indication clause is used to indicate the HTTP network request method of the server end requesting the target API interface, and the query condition clause is used to determine the target data field in the target API interface path through request parameters; Requesting data from the target API interface according to the HTTP network request method indicated by the interface request method indication clause; receiving return data sent by the interface end, wherein the return data is the target data field; Cut and splice the returned data according to the data field selection clause to obtain the required data; The demand data is sent to the application end.

6. The information query method according to claim 5, characterized in that: The data field selection clause includes an index of the first target data in the target data field, and the index is a primary index or a multi-level index; The trimming and splicing of the returned data according to the data field selection clause includes: The first target data is determined in the target data field according to the index.

7. The information query method according to claim 5, characterized in that: The query statement also includes a sub-query statement, and the sub-query statement includes a dependent query clause; The method further comprises: performing a sub-query on the interface end according to the third target data indicated by the dependent query clause to determine the request result data corresponding to the third target data; Assigning a value to the request parameter in the query condition clause using the request result data; According to the assigned request parameters, data is requested from the target API interface.

8. The information query method according to any one of claims 5 to 7, characterized in that: Before receiving the query statement, the method further includes: Receiving an alias setting statement sent by the application end to set an alias for the interface path of the API interface of the interface end; When it is parsed that the target interface path clause includes the alias, the interface path of the target API interface is determined according to the corresponding relationship between the alias and the interface path of the API interface of the interface end.

9. An information query method, the method being applied to an interface end, characterized in that: The method comprises: Receive HTTP network requests sent by the server; Sending return data to the server according to the HTTP network request, so that the server sends the spliced ​​data to the application based on the return data and the application's query requirements for the target API interface; Among them, the query requirements of the application end and the HTTP network request are obtained by the server end by parsing the query statement sent by the application end, and the query statement includes: a data field selection clause, used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application end; a target interface path clause, used to indicate the interface path of the target API interface; an interface request method indication clause, used to indicate the request method of the HTTP network request of the server end requesting the target API interface; a query condition clause, used to determine the target data field in the target API interface path through request parameters.

10. The method according to claim 9, characterized in that The query statement further includes a sub-query statement, the sub-query statement includes a dependent query clause, and the method further includes: receiving a subquery sent by the server, wherein the subquery is performed by the server based on the third target data indicated by the dependent query clause; Sending request result data corresponding to the third target data to the server, so that the server assigns a value to the request parameter in the query condition clause according to the request result data.

11. An information query device, applied to an application end, characterized in that: The device comprises: A query statement building unit, used to build a query statement based on the query requirements for the target API interface; A first sending unit is used to send the query statement to the server, so that the server requests data from the target API interface according to the query statement, receives the target data field returned by the target API interface, and obtains the required data of the application end based on the target data field; A first receiving unit, configured to receive the demand data sent by the server; The query statement includes: A data field selection clause, used to indicate that the first target data or the data after excluding the second target data in the target data field is the required data; The target interface path clause is used to indicate the interface path of the target API interface; The interface request method indication clause is used to indicate the HTTP network request method used by the server to request the target API interface from the interface end; The query condition clause is used to determine the target data field in the target API interface through request parameters.

12. An information query device, applied to a server, characterized in that: The device comprises: A second receiving unit is used to receive a query statement sent by an application end, where the query statement is constructed by the application end based on a query requirement for a target API interface; A parsing unit, used to parse the query statement, and determine a data field selection clause, a target interface path clause, an interface request mode indication clause, and a query condition clause in the query statement; Among them, the data field selection clause is used to indicate that the first target data or the data after excluding the second target data from the target data field is selected as the required data of the application end, the target interface path clause is used to indicate the interface path of the target API interface, the interface request method indication clause is used to indicate the HTTP network request method of the server end requesting the target API interface, and the query condition clause is used to determine the target data field in the target API interface path through request parameters; A data request unit, configured to request data from the target API interface according to the HTTP network request method indicated by the interface request method indication clause; The second receiving unit is further used to receive the return data sent by the interface end, and the return data is the target data field; A splicing unit, used for cutting and splicing the returned data according to the data field selection clause to obtain the required data; The second sending unit is used to send the demand data to the application end.

13. An information query device, applied to an interface end, characterized in that: The device comprises: The third receiving unit is used to receive the HTTP network request sent by the server; A third sending unit is used to send return data to the server according to the HTTP network request, so that the server sends the spliced ​​data to the application based on the return data and the query demand of the application for the target API interface; Among them, the query requirements of the application end and the HTTP network request are obtained by the server end by parsing the query statement sent by the application end, and the query statement includes: a data field selection clause, used to indicate that the first target data or the data after excluding the second target data from the target data field is the required data of the application end; a target interface path clause, used to indicate the interface path of the target API interface; an interface request method indication clause, used to indicate the request method of the HTTP network request of the server end requesting the target API interface; a query condition clause, used to determine the target data field in the target API interface path through request parameters.

14. An information query device, characterized in that: The device comprises a processor memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 10.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and when the computer program is executed, the method according to any one of claims 1 to 10 is implemented.