WO2018035799A1 - Procédé d'interrogation de données, serveurs d'applications et de bases de données, intergiciel et système - Google Patents

Procédé d'interrogation de données, serveurs d'applications et de bases de données, intergiciel et système Download PDF

Info

Publication number
WO2018035799A1
WO2018035799A1 PCT/CN2016/096670 CN2016096670W WO2018035799A1 WO 2018035799 A1 WO2018035799 A1 WO 2018035799A1 CN 2016096670 W CN2016096670 W CN 2016096670W WO 2018035799 A1 WO2018035799 A1 WO 2018035799A1
Authority
WO
WIPO (PCT)
Prior art keywords
data query
data
database
application server
result
Prior art date
Application number
PCT/CN2016/096670
Other languages
English (en)
Chinese (zh)
Inventor
张辰
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Priority to CN201680088647.1A priority Critical patent/CN109643305A/zh
Priority to PCT/CN2016/096670 priority patent/WO2018035799A1/fr
Publication of WO2018035799A1 publication Critical patent/WO2018035799A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the present application relates to the field of database technologies, and in particular, to data query methods, applications, and database servers, middleware, and systems.
  • a database is organized according to a data model and stores a collection of data in secondary storage.
  • This data set has the following characteristics: it does not repeat as much as possible, and optimally serves multiple applications of a specific organization. Its data structure is independent of the application that uses it, and the data is added, deleted, modified, and checked. Unified software for management and control. Therefore, the database provides the underlying data resources for the application that uses it, and the query effect on the data in the database directly affects the performance of the application that uses it.
  • the current data query method is: after the application server of the chat application obtains the query request of the user, firstly, the first time is initiated to the database. Query the request to query all contacts who talk to the user; secondly, the second time a query request is initiated to the database to find the last message in conversation with each contact; finally, the last of each contact in chronological order After a message is sorted, the last contact with the user is determined, and a query request is initiated to the database for the third time to query the information of the last contact with the user, and the contact information is fed back to the user.
  • the database server needs to be accessed 3 times, and a large amount of data needs to be transmitted to the client for the client to perform the query again after filtering, which is inefficient.
  • the embodiment of the present application proposes a data query method, an application, a database server, a middleware, and a system.
  • an embodiment of the present application provides a data query method, where the method includes:
  • the data query script includes a data query statement and a result analysis statement.
  • the result analysis statement includes: a result screening statement, a result sorting statement, or a result operation statement, Or any combination of the above.
  • the generating a data query script according to the data query request includes:
  • the method further includes:
  • the data model is sent to a data storage system such that the data storage system defines a database model based on the data model.
  • an embodiment of the application provides an application server, where the application server includes:
  • a first obtaining module configured to obtain a data query request
  • a generating module configured to generate a data query script according to the data query request acquired by the first obtaining module
  • a first sending module configured to send a data query script generated by the generating module to a data storage system
  • a receiving module configured to receive a result obtained by the data storage system executing a data query script sent by the first sending module.
  • the data query script includes a data query statement and a result analysis statement.
  • the result analysis statement includes: a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • the generating module is configured to acquire a database model and/or an interface configuration parameter from the data storage system, and generate a data query script according to the database model and/or the interface configuration parameter.
  • the application server further includes:
  • a second acquiring module configured to acquire a data model of data to be stored
  • a second sending module configured to send the data model acquired by the second acquiring module to the data storage system, so that the data storage system defines the database model according to the data model.
  • an embodiment of the present application provides a data query method, where the method includes:
  • the data query result is fed back to the application server.
  • the data query script includes a data query statement and a result analysis statement.
  • the result analysis statement includes: a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • the obtaining the data query script from the application server comprises:
  • the feeding back the data query result to the application server includes:
  • the data query result is fed back to the application server by the middleware.
  • the method further includes:
  • the establishing an association relationship between the database model and the application server includes:
  • an embodiment of the present application provides a database server, where the database server includes:
  • An obtaining module configured to obtain a data query script from an application server
  • An execution module configured to execute a data query script obtained by the obtaining module, to obtain a data query result
  • a feedback module configured to feed back the data query result obtained by the execution module to the application server.
  • the data query script includes a data query statement and a result analysis statement.
  • the result analysis statement includes: a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • the obtaining module is configured to obtain a data query script that is distributed by the middleware based on a data query script from an application server;
  • the feedback module is configured to feed back the data query result to the application server by using the middleware.
  • the database server further includes:
  • a receiving module configured to receive a data model sent by the application server
  • a definition module configured to define a database model according to a data model received by the receiving module
  • the establishing module is configured to issue a database model to the application server, and/or determine an interface configuration parameter of the database model, and issue the interface configuration parameter to the application server.
  • an embodiment of the present application provides a data query method, where the method includes:
  • an embodiment of the present application provides a middleware, where the middleware includes:
  • a first obtaining module configured to acquire a data query script from an application server
  • a determining module configured to determine one or more database servers that execute the data query script acquired by the first obtaining module
  • a sending module configured to distribute the data query script acquired by the first acquiring module to the database server;
  • a second obtaining module configured to obtain a data query result fed back by the database server
  • a sending module configured to send the data query result obtained by the second acquiring module to the application server.
  • the embodiment of the present application provides a data query system, where the system includes: an application server and a data storage system;
  • the application server such as the application server described in the second aspect above;
  • the data storage system is composed of the database server according to the above fourth aspect, or the data storage system is composed of the database server according to the above fourth aspect and the middleware as described in the sixth aspect above.
  • Obtaining a data query request generating a data query script according to the data query request; sending the data query script to the data storage system; receiving the result obtained by the data storage system executing the data query script, so that only the data query script is sent to the data storage system, and the data storage is performed.
  • the system can obtain the final result according to the data query script, reduce the number of accesses with the data storage system, and improve the efficiency of data query.
  • FIG. 1 is a schematic diagram of an implementation environment of a data query method according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart diagram of a data query method according to another embodiment of the present application.
  • FIG. 3 is a schematic flowchart diagram of another data query method according to another embodiment of the present application.
  • FIG. 4 is a schematic flowchart diagram of another data query method according to another embodiment of the present application.
  • FIG. 5 is a schematic flowchart diagram of another data query method according to another embodiment of the present application.
  • FIG. 6 is a schematic flowchart diagram of another data query method according to another embodiment of the present application.
  • FIG. 7 is a schematic flowchart diagram of an existing data query method according to another embodiment of the present application.
  • FIG. 8 is a schematic flowchart diagram of another data query method according to another embodiment of the present application.
  • FIG. 9 is a schematic flowchart diagram of another data query method according to another embodiment of the present application.
  • FIG. 10 is a schematic flowchart diagram of another data query method according to another embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an application server according to another embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of another application server according to another embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of a database server according to another embodiment of the present application.
  • FIG. 14 is a schematic structural diagram of another database server according to another embodiment of the present application.
  • FIG. 15 is a schematic structural diagram of an intermediate member according to another embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of a data query system according to another embodiment of the present application.
  • FIG. 1 is a schematic diagram of an implementation environment of a data query method according to an embodiment of the present invention.
  • the implementation environment includes a terminal 101, an application server 102, and a data storage system 103.
  • the terminal 101 is configured to send a query request to the application server 102, and receive a result obtained by the application server 102 according to the query request.
  • the application server 102 After obtaining the query request from the terminal 101, the application server 102 generates a data query script according to the data query request; sends the data query script to the data storage system 103; and receives the result obtained by the data storage system 103 to execute the data query script, and sends the result to the terminal 101. Feedback the result;
  • the database model is obtained from the data storage system by the application server.
  • the database model may include the data structure of the data storage system, and may also include the data structure and data operation mode of the data storage system.
  • a script is an executable file, also called a macro or batch file, written in a specific descriptive language according to a certain format.
  • the data query script may include a data query statement and a result analysis statement, wherein the result analysis statement may be a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • the data storage system 103 can be implemented in two ways:
  • the data storage system 103 is composed of one or more database servers, and the data server includes a memory in which a database is stored. After the database server obtains the data query script from the application server 102, the data query script is executed, the data query result is obtained, and the data query result is fed back to the application server 102.
  • the data storage system 103 is composed of a middleware and one or more database servers, wherein the data server includes a memory, and the database stores the database.
  • middleware can manage database server resources and network communication, it can connect to multiple database servers. Even if multiple database servers have different interfaces, they can still exchange information with each other through middleware. Therefore, after obtaining the data query script from the application server, the middleware determines one or more database servers that execute the data query script; distributes the data query script to the database server; obtains the data query result fed back by the database server, and queries the data The result is sent to the application server.
  • the database server executes the data query script, obtains the data query result, and feeds back the data query result to the middleware.
  • the database server may store only data, and may also store data at the same time and cache part of the data. This application does not limit the specific implementation of the database.
  • this embodiment provides a data query method.
  • the process of the method provided in this embodiment is as follows:
  • the data query script includes a data query statement and a result analysis statement.
  • the result analysis statement includes: a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • generating a data query script according to the data query request including:
  • the method further includes:
  • the data model is sent to a data storage system to enable the data storage system to define a database model based on the data model.
  • this embodiment provides another data query method, and the process of the method is specifically as follows:
  • the data query script includes a data query statement and a result analysis statement.
  • the result analysis statement includes: a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • obtaining a data query script from the application server including:
  • Feedback of the data query results to the application server includes:
  • the data query results are fed back to the application server through the middleware.
  • the method further includes:
  • establishing an association between the database model and the application server including:
  • this embodiment provides another data query method, and the process flow is as follows:
  • Obtaining a data query request generating a data query script according to the data query request; sending the data query script to the data storage system; receiving the result obtained by the data storage system executing the data query script, so that only the data query script is sent to the data storage system, and the data storage is performed.
  • the system can obtain the final result according to the data query script, reduce the number of accesses with the data storage system, and improve the efficiency of data query.
  • the present application provides a data query method.
  • the method provided by the present application can be applied to various services, especially application scenarios with complex query requirements in data-intensive applications, which can break the database access bottleneck and solve the computationally intensive real-time database access problem.
  • the terminal queries the contact information of the last conversation through a structured query language, and the data storage system is a database server.
  • structured query language is a special purpose programming language, which is a database query and programming language for accessing data and querying, updating and managing relational database systems.
  • the database server After receiving the data query script, the database server loads the script through a separately isolated thread of the backend, and after the data query script is given the database permission, the data query script is executed in a certain order.
  • the data query script can access the database on the database server, process the data, and when the data processing is completed, the notification returns the processing result.
  • the database server receives the data query script in the form of javascript, dynamically loads the script, and queries the database according to the description of the data query script.
  • the Node server is an open source cross-platform running environment written in javascript, using Google's V8 engine to execute code. Since javascript itself is a scripting language, it can dynamically load script fragments for execution and execute scripts at runtime. to modify.
  • the mongoDB documentation is similar to the JSON (JavaScript Object Notation, Lightweight Data Interchange Format) object. Field values can contain other documents, arrays, and document arrays.
  • FIG. 5 provides a data query method for the above scenario, and the process flow is as follows:
  • the application server acquires a data model of data to be stored.
  • the application server acquires a data model of the data to be stored.
  • the data to be stored is ⁇ title:'blog',by:'user',content:'hello world' ⁇
  • the data model is ⁇ blogData: ⁇ title:'String',by:'String' ,content:'String' ⁇ .
  • the application server obtains ⁇ blogData: ⁇ title:'String',by:'String',content:'String' ⁇ .
  • the application server sends the data model to the database server.
  • the data model obtained in step 501 needs to be known by the database server, so that the database server establishes a corresponding database. Therefore, the application server sends the data model obtained in step 501 to the database server.
  • This embodiment does not limit the specific method in which the application server sends the data model to the database server. For example: Send a data model to the database server by attaching a script.
  • the database server receives the data model sent by the application server, and defines a database model according to the data model;
  • the database server defines the database model according to the data model to store the data to be stored.
  • the database server defines a database model based on a data model, and each database model corresponds to a table in mongoDB.
  • the database server may also include a database model manager specifically for storing the database model in the database server.
  • the database model is similar to a JSON string object.
  • create a database model manager to uniformly find or manage the database model in the mongoDB library.
  • the database server By performing steps 501 to 503, the database server establishes a database matching the data to be stored, and the database model of the database is the same as the data model of the data to be stored.
  • Steps 501 to 503 can be performed in other cases, except when the data query method provided in this embodiment is executed for the first time. For example, when the application server detects that the data model of the data to be stored changes, step 501 to step 503 are triggered. For another example, when the database server detects that the database model does not match the data model of the data to be stored, step 501 to step 503 are triggered. This embodiment does not limit the specific triggering conditions of step 501 to step 503.
  • the database server establishes an association relationship between the database model and the application server.
  • the first implementation manner the database server issues a database model to the application server;
  • the database server may directly issue a database model to the application server, or may issue an identifier of the database model to the application server.
  • the identifier of the database model includes, but is not limited to, the name of the database model.
  • the database server determines the interface configuration parameter of the database model, and publishes the interface configuration parameter to the application server;
  • the database server defines the interface configuration parameters of the database model, and the data query script generated by the application server can be configured to access the database through the interface configuration parameter and the database model corresponding to the database model.
  • the interface configuration parameter can be a public variable.
  • interface configuration parameters defined by the database server vary with the implementation. E.g:
  • the database access operation contains basic creation, deletion, update, insertion and query, these operations are defined by the original operation instructions of mongoDB.
  • these pre-made scripts can be written like the local program to achieve the permission on the database server. The effect of database analysis and calculations. Therefore, the database server must define interface configuration parameters for the following interfaces for the script:
  • Database connection interface including the creation, deletion, insertion, update and query functions of documents in the database, providing an access interface of the data model
  • the basic javascript base library interface provides the runtime environment for basic data analysis such as calculation and filtering of data.
  • the third implementation manner the database server issues a database model to the application server, and the database server determines interface configuration parameters of the database model, and issues interface configuration parameters to the application server.
  • the application server acquires a database model and/or an interface configuration parameter from the data storage system.
  • the database model and/or interface configuration parameters may be connected to the database corresponding to the database model, and the database is accessed and operated based on the connection.
  • the application server obtains the corresponding database connection by using the database model identifier, and the database table is Read and write.
  • a database connection is established between the application server and the database server. Based on the connection, the application server can access the corresponding database and operate on the data in the database.
  • the application server After the terminal initiates the query request, the application server obtains the data query request, and generates a data query script according to the data query request.
  • the application server generates a data query script according to the database model and/or interface configuration parameters from the data storage system acquired in step 505.
  • the data query script includes but is not limited to: a data query statement and a result analysis statement.
  • the result analysis statement includes but is not limited to: a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • the application server generates a data query script according to the database model and/or interface configuration parameters from the data storage system acquired in step 505, and forms the following data query script:
  • 1), 2), 4) are data query statements, and 3) are result analysis statements.
  • script content is only an example.
  • script content the script form, and the language used by the script can be adaptively changed. This embodiment does not limit the specific script content, form, and usage language.
  • the application server sends the data query script to the database server;
  • the application server sends a data query script to the database server using a structured query language.
  • the database server executes the data query script, obtains the data query result, and feeds back the data query result to the application server;
  • the data query script includes but is not limited to: a data query statement and a result analysis statement.
  • the result analysis statement includes but is not limited to: a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • the database server first queries all contacts that talk to the terminal; then finds the last message in conversation with each contact; then sorts the last message of each contact conversation in chronological order, determining the final The contact with the terminal; finally the information of the last contact with the user.
  • the process of querying the data can also be implemented as follows:
  • the database server can support dynamic loading of language or library classes.
  • javascript it supports the use of eval to dynamically load data query scripts, while java also supports loader query scripts in class loader mode, but needs to be performed. Precompiled.
  • the database server of different languages and frameworks is dynamically loaded.
  • the Node server used in this embodiment has a mechanism for loading dynamic modules.
  • the application server only needs to write the data query script as a text file and send it to the database server. After the database server receives it, it is loaded as a module.
  • the database server script In addition, in order to ensure the security of the data query script, the database server script must be verified before the script is loaded to prevent dangerous code injection.
  • the application server receives the result obtained by the database server executing the data query script.
  • the database server executes the data query script instead of the general query language, thereby optimizing the data access process and reducing the frequent network communication with the database server. In this way, data analysis and filtering operations can be performed simultaneously while the database server is running and the operation results can be flexibly given.
  • the overall process of the method is: 1) application server application deployment; 2) application server application initialization; 3) application server definition data model; 4) application The server confirms whether there is a data model in the database server, if it does not exist, executes 5), if it exists, executes 6); 5) the application server sends the data model to the database server side; 6) the application server acquires the configuration from the database server, The configuration includes, but is not limited to, a database model and/or interface configuration parameters; 7) the application server sends a data query script to the database server; 8) the application server determines whether the query is finished, if it is finished, executes 9), and if not, executes 7 ); 9) Application server output results.
  • the above method directly puts part of the data analysis and processing operations on the database server, solves the problem that the database access query in the database server is inconvenient, and expands the execution mode of the database operation.
  • the implementation process of the existing data query method is as follows: 1) the terminal sends a query request to the application server; 2) the application server processes the query request; 3) the application server sends a data request to the database server according to the query request; 4)
  • the database server parses the data request, determines the query content; 5) the database server performs the query based on the memory; 6) the memory performs the database access to obtain the query data; 7) the memory returns the data to the database server; 8) the database server returns the data to the application server; 9)
  • the application server analyzes the returned data; 10) the application server sends the data request to the database server again according to the analysis result; 11) the database server parses the data request, determines the query content; 12) the database server performs the query based on the memory; 13) the memory performs the database access Query data; 14) the memory returns data to the database server; 15) the database server returns data to the application server; 16) the application server analyzes the returned data to obtain the final result; 17) the application
  • the implementation process of the data query method provided by this embodiment is as follows: 1) the terminal sends a service request to the application server; 2) the application server processes the service request; 3) the application server constructs the data query script; 4) the application server The database server sends the data query script; 5) the database server loads the data query script; 6) the database server executes the data query script; 7) the memory performs the database access to obtain the query data; 8) the memory returns the data to the database server; 9) the database server according to the memory
  • the returned data is analyzed for data; 10) the database server executes the query again based on the memory; 11) the memory performs database access to obtain the query data; 12) the memory returns data to the database server; 13) the database server returns data to the application server; 14) the application server Analyze the returned data to get the final result; 15) The application server returns the final result to the terminal.
  • the existing implementation process can only be implemented in the application server, obtain a rough result by querying the database, and then return to the application server program to run the screening or analysis processing, and finally according to the running result. Perform the next query operation.
  • the data query method proposed in this embodiment directly sends the data query script as part of the query request to the data server, and the database server executes the data query script to query from the database and calculate the final data to be returned to the application server.
  • the application server the developer only needs to implement the preparation data query script and query Dynamically modify these data query scripts when they occur, and send them to the database server through the database query port.
  • the database server directly returns the results of the data query script execution, thereby avoiding frequent network access problems. For a system distributed remotely, it saves a lot of network communication delay time and alleviates the computing pressure of the local application server in processing the query results returned by the network.
  • Obtaining a data query request generating a data query script according to the data query request; sending the data query script to the data storage system; receiving the result obtained by the data storage system executing the data query script, so that only the data query script is sent to the data storage system, and the data storage is performed.
  • the system can obtain the final result according to the data query script, reduce the number of accesses with the data storage system, and improve the efficiency of data query.
  • the data storage system's own concurrency capability can be utilized to improve data query efficiency.
  • the embodiment does not limit the specific implementation manner of the data storage system concurrency.
  • the data storage system is composed of middleware and a database server, and the data query script is distributed by the middleware to implement concurrent execution of the data storage system.
  • the middleware distributes the data query script
  • the data query script is split by the middleware to optimize the data query sequence, thereby optimizing the database access process. , reduce the number of readings and reading range of the database, optimize the operation efficiency.
  • FIG. 9 The embodiment shown in FIG. 9 is exemplified by the following specific scenarios. For other scenarios, refer to the implementation of the following scenarios.
  • the data storage system consists of middleware and one or more database servers.
  • the application server acquires a data model of data to be stored.
  • step 501 The implementation of this step is the same as that of step 501.
  • step 501 For details, refer to step 501, and details are not described herein again.
  • the application server sends the data model to the database server.
  • step 502. The implementation of this step is the same as that of step 502. For details, refer to step 502, and details are not described herein again.
  • the database server receives the data model sent by the application server, and defines a database model according to the data model.
  • the database server can directly receive the data model sent by the application server, or receive the data model sent by the application server through the middleware.
  • the database server establishes a database matching the data to be stored, and the database model of the database is the same as the data model of the data to be stored.
  • Steps 901 to 903 can be performed in other cases, except when the data query method provided in this embodiment is executed for the first time. For example, when the application server detects that the data model of the data to be stored changes, step 901 to step 903 are triggered. For example, when the database server detects that the database model does not match the data model of the data to be stored, step 901 to step 903 are triggered. This embodiment does not limit the specific trigger conditions for performing steps 901 to 903.
  • the database server establishes an association relationship between the database model and the application server.
  • the first implementation manner the database server issues a database model to the application server;
  • the database server determines the interface configuration parameter of the database model, and publishes the interface configuration parameter to the application server;
  • the third implementation manner the database server issues a database model to the application server, and the database server determines interface configuration parameters of the database model, and issues interface configuration parameters to the application server.
  • the database server may directly publish the database model to the application server, or may publish the database model to the application server through the middleware.
  • the database server can directly publish interface configuration parameters to the application server, and can also publish interface configuration parameters to the application server through the middleware.
  • the application server acquires a database model and/or an interface configuration parameter from the data storage system.
  • the application server can directly obtain the database model and/or interface configuration parameters from the data storage system, and can also obtain the database model and/or interface configuration parameters from the data storage system through the middleware.
  • the application server After the terminal initiates the query request, the application server obtains a data query request, and generates a data query script according to the data query request.
  • step 506 The implementation of this step is the same as that of step 506. For details, refer to step 506, and details are not described herein again.
  • the application server sends the data query script to the middleware
  • the middleware acquires a data query script from the application server, and after determining one or more database servers that execute the data query script, distributes the data query script to the database server;
  • the middleware can obtain the data stored by each database server, select a database server that executes the data query script, and distribute a data query script to each selected database server.
  • the data query script is: query all voice contacts that talk to the user's voice and all text messages that are in conversation with the user's text message.
  • the database server 11 and the database server 12 If there are two database servers storing voice call data, the database server 11 and the database server 12, wherein the database server 11 stores the voice contacts of the user 0-100, and the database server 12 stores the voice contacts of the user 100-200. people.
  • This step distributes the data query script to the database server 11, database server 12, database server 21, and database server 22. That is, a data query script is sent to the database server 11, a data query script is sent to the database server 12, a data query script is sent to the database server 21, and a data query script is sent to the database server 22.
  • the database server obtains the data query script distributed by the middleware based on the data query script from the application server, executes the distributed data query script, obtains the data query result, and feeds back the data query result to the middleware;
  • the database server can determine which parts of the data query script are executable by the database server based on the data it stores, and which parts do not need to be executed. After the database server obtains the data query script distributed by the middleware based on the data query script from the application server, it executes the part of the distributed data query script that it thinks needs to be executed.
  • the data query script is as follows: Query the voice conversation with the user and all the contacts who talk to the user SMS.
  • the database server 11 which stores the voice contacts of the user number 0-100, can therefore perform a voice contact number 0-100 that queries the user's voice conversation.
  • the database server 11 executes only in the voice contact number 0-100, queries the language contact part of the conversation with the user voice, does not execute in the voice contact number 101-200, queries the voice contact part of the conversation with the user voice and the query All SMS contact sections that are in conversation with the user's text message. After obtaining the data query result for the voice contact number 0-100, the data query result is fed back to the middleware.
  • the database server 12 stores the voice contacts of the user number 101-200, so that it can execute the query Voice contact number 101-200 in conversation with the user voice.
  • the database server 12 executes only in the voice contact number 101-200, queries the language contact part of the conversation with the user voice, does not execute in the voice contact number 0-100, queries the voice contact part of the conversation with the user voice and the query All SMS contact sections that are in conversation with the user's text message. After obtaining the data query result for the voice contact number 101-200, the data query result is fed back to the middleware.
  • the database server 21 stores the short message contacts of the user 0-100, so that it can execute the SMS-number 0-100 contact that queries the user's short message.
  • the database server 11 executes only the short message contact in the 0-100 number, queries the short message contact part of the short message conversation with the user, does not execute in the short message contact number 101-200, and queries the short message contact part of the short message conversation with the user and the query. All voice contact sections that talk to the user's voice. After obtaining the data query result for the SMS contact number 0-100, the data query result is fed back to the middleware.
  • the database server 22 stores the short message contacts of the user No. 101-200, and therefore, it can execute the short message contacts No. 101-200 for inquiring the short message with the user.
  • the database server 22 only executes the short message contact part in the short message contact number 101-200, and queries the short message contact part of the short message conversation with the user, does not execute the short message contact part in the 0-100 number, and queries the short message contact part of the short message conversation with the user and the query. All voice contact sections that talk to the user's voice. After obtaining the data query result for the short message contact number 101-200, the data query result is fed back to the middleware.
  • the process of querying the data may first determine whether it has cached related data, and if the cache has been cached, and the cache has not expired, the cached data is obtained, thereby obtaining the cached data. Save database access.
  • the middleware obtains the data query result fed back by the database server, and sends the data query result to the application server;
  • the middleware of the step obtains the data query result fed back by each database server, summarizes the data query results, and sends the summarized result to the application server.
  • the specific way of summarizing can be the superposition of the data query results fed back by each database server.
  • the middleware obtains the data query result for the voice contact number 0-100 fed back by the database server 11, the data query result for the voice contact of the number 101-200 fed back by the database server 12, and the feedback from the database server 21 for 0-100.
  • the above four results are superimposed together to obtain the data query result of the voice contact 0-200 and
  • the data query result of the SMS contact number 0-200 sends the data query result of the voice contact 0-200 and the data query result of the voice contact 0-200 to the application server.
  • the application server receives the result of the middleware transmission.
  • the terminal sends a service request to the application server; 2) the application server processes the service request; 3) the application server sends a configuration query request to the middleware; 4) the middleware query configuration, and returns the query configuration, the configuration Including but not limited to database model and/or interface configuration parameters; 5) application server builds data query script according to the configuration; 6) application server sends data query script to middleware; 7) middleware distributes data query script; 8) distributes to The database server of the data query script executes the query based on the data query script; 9) the database server returns the execution result to the middleware; 10) the database server summarizes the execution result and returns the summarized result to the application server; 11) the application server analyzes the returned summary result, The final result is obtained; 15) the application server returns the final result to the terminal.
  • the required results can be searched more accurately and intelligently in the database.
  • the burden of the database server can also be reduced by distributing the operations in different databases.
  • Obtaining a data query request generating a data query script according to the data query request; sending the data query script to the data storage system; receiving the result obtained by the data storage system executing the data query script, so that only the data query script is sent to the data storage system, and the data storage is performed.
  • the system can obtain the final result according to the data query script, reduce the number of accesses with the data storage system, and improve the efficiency of data query.
  • the embodiment provides an application server.
  • the principle of the application server is similar to the data query method shown in FIG. 2, so the implementation of the application server can refer to the method shown in FIG. The embodiments are not repeated here.
  • the application server includes:
  • the first obtaining module 1101 is configured to obtain a data query request.
  • a generating module 1102 configured to generate a data query script according to the data query request acquired by the first obtaining module 1101;
  • the first sending module 1103 is configured to send the data query script generated by the generating module 1102 to the data storage system;
  • the receiving module 1104 is configured to receive a result obtained by the data storage system executing the data query script sent by the first sending module 1103.
  • the data query script includes a data query statement and a result analysis statement.
  • the result analysis statement includes: a result screening statement, a result sorting statement, or a result operation statement, or Any combination of the above.
  • the generating module 1102 is configured to obtain a database model and/or an interface configuration parameter from the data storage system, and generate a data query script according to the database model and/or the interface configuration parameter.
  • the application server further includes:
  • a second obtaining module 1105 configured to acquire a data model of data to be stored
  • the second sending module 1106 is configured to send the data model acquired by the second obtaining module 1105 to the data storage system, so that the data storage system defines the database model according to the data model.
  • Obtaining a data query request generating a data query script according to the data query request; sending the data query script to the data storage system; receiving the result obtained by the data storage system executing the data query script, so that only the data query script is sent to the data storage system, and the data storage is performed.
  • the system can obtain the final result according to the data query script, reduce the number of accesses with the data storage system, and improve the efficiency of data query.
  • the embodiment provides a database server.
  • the principle of solving the problem is similar to the data query method shown in FIG. 3, so the implementation of the database server can be referred to the method shown in FIG. The embodiments are not repeated here.
  • the database server includes:
  • An obtaining module 1301, configured to acquire a data query script from an application server
  • the execution module 1302 is configured to execute the data query script acquired by the obtaining module 1301 to obtain a data query result.
  • the feedback module 1303 is configured to feed back the data query result obtained by the execution module 1302 to the application server.
  • the data query script includes a data query statement and a result analysis statement.
  • the result analysis statement includes: a result screening statement, a result sorting statement, or a result operation statement, or any combination of the above.
  • the obtaining module 1301 is configured to obtain a data query script that is distributed by the middleware based on a data query script from an application server.
  • the feedback module 1303 is configured to feed back the data query result to the application server by using the middleware.
  • the database server further includes:
  • the receiving module 1304 is configured to receive a data model sent by the application server.
  • a definition module 1305, configured to define a database model according to a data model received by the receiving module 1304;
  • the establishing module 1306 is configured to establish a relationship between the database model defined by the definition module 1305 and the application server. Linkage.
  • the establishing module 1306 is configured to issue a database model to the application server, and/or determine interface configuration parameters of the database model, and issue interface configuration parameters to the application server.
  • the application server After the application server generates the data query script according to the data query request, the data query script is executed, and the result obtained by the execution script is fed back to the application server, so that only the receiving application server sends the data query script, and the final result can be obtained according to the data query script.
  • the number of accesses with the application server is reduced, and data query efficiency is improved.
  • the present embodiment provides a middleware. Since the principle of solving the problem is similar to the data query method shown in FIG. 4, the implementation of the middleware can be referred to the method shown in FIG. The embodiments are not repeated here.
  • the middleware includes:
  • a first obtaining module 1501 configured to acquire a data query script from an application server
  • a determining module 1502 configured to determine one or more database servers that execute the data query script acquired by the first obtaining module 1501;
  • the sending module 1503 is configured to distribute the data query script acquired by the first obtaining module 1502 to the database server;
  • a second obtaining module 1504 configured to obtain a data query result fed back by the database server
  • the sending module 1505 is configured to send the data query result obtained by the second obtaining module 1504 to the application server.
  • the middleware After the middleware obtains the data query script generated by the application server according to the data query request, the data query script is distributed to the database server, so that the database server executes the distributed data query script, and the data query result returned by the database server is sent to the application server, so that only The application server needs to send a data query script to obtain data according to the data query script and analyze the data to obtain the result, thereby reducing the number of accesses with the application server and improving the data query efficiency.
  • the present embodiment provides a data query system for performing the data query method provided by the embodiment shown in FIG. 5 or FIG. 6.
  • the system includes: an application server 1601 and data. Storage system 1602;
  • the application server 1601 is an application server as shown in FIG. 11 or FIG. 12;
  • the data storage system 1602 is composed of a database server as shown in FIG. 13 or FIG. 14, or the data storage system 1602 is composed of a database server as shown in FIG. 13 or FIG. 14 and a middleware as shown in FIG.
  • Obtaining a data query request generating a data query script according to the data query request; sending the data query script to the data storage system; receiving the result obtained by the data storage system executing the data query script, so that only the data query script is sent to the data storage system, and the data storage is performed.
  • the system can obtain the final result according to the data query script, reduce the number of accesses with the data storage system, and improve the efficiency of data query.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions are provided for implementing one or more processes and/or block diagrams in the flowchart The steps of a function specified in a box or multiple boxes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

La présente invention concerne le domaine technique des bases de données et propose un procédé d'interrogation de données, des serveurs d'applications et de bases de données, un intergiciel et un système. Le procédé consiste à : obtenir une requête d'interrogation de données et générer un script d'interrogation de données en fonction de la requête d'interrogation de données ; envoyer le script d'interrogation de données à un système de stockage de données ; et recevoir un résultat obtenu suite à l'exécution du script d'interrogation de données par le système de stockage de données. Selon la présente invention, grâce aux aux étapes consistant à obtenir une requête d'interrogation de données et générer un script d'interrogation de données en fonction de la requête d'interrogation de données, à envoyer le script d'interrogation de données à un système de stockage de données, et à recevoir un résultat obtenu suite à l'exécution du script d'interrogation de données par le système de stockage de données, le système de stockage de données peut obtenir un résultat final selon le script d'interrogation de données en n'envoyant qu'une seule fois le script d'interrogation de données au système de stockage de données. De ce fait, le nombre d'accès au système de stockage de données est réduit et l'efficacité des interrogations de données s'en trouve améliorée.
PCT/CN2016/096670 2016-08-25 2016-08-25 Procédé d'interrogation de données, serveurs d'applications et de bases de données, intergiciel et système WO2018035799A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201680088647.1A CN109643305A (zh) 2016-08-25 2016-08-25 数据查询方法、应用和数据库服务器、中间件及系统
PCT/CN2016/096670 WO2018035799A1 (fr) 2016-08-25 2016-08-25 Procédé d'interrogation de données, serveurs d'applications et de bases de données, intergiciel et système

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/096670 WO2018035799A1 (fr) 2016-08-25 2016-08-25 Procédé d'interrogation de données, serveurs d'applications et de bases de données, intergiciel et système

Publications (1)

Publication Number Publication Date
WO2018035799A1 true WO2018035799A1 (fr) 2018-03-01

Family

ID=61245966

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/096670 WO2018035799A1 (fr) 2016-08-25 2016-08-25 Procédé d'interrogation de données, serveurs d'applications et de bases de données, intergiciel et système

Country Status (2)

Country Link
CN (1) CN109643305A (fr)
WO (1) WO2018035799A1 (fr)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362613A (zh) * 2019-07-22 2019-10-22 中国联合网络通信集团有限公司 数据处理方法和设备
CN111143416A (zh) * 2019-12-25 2020-05-12 深圳广联赛讯有限公司 基于数据缓存的查询方法、终端及存储介质
CN111324545A (zh) * 2020-03-13 2020-06-23 中国工商银行股份有限公司 应用服务器中间件性能测试方法、测试终端、应用服务器
CN111522642A (zh) * 2020-04-21 2020-08-11 观为监测技术无锡股份有限公司 风电机组状态监测数据的获取方法、查询方法及电子设备
CN113312374A (zh) * 2021-05-18 2021-08-27 网银在线(北京)科技有限公司 数据查询方法、装置、设备及存储介质
CN114974605A (zh) * 2022-05-24 2022-08-30 山东浪潮智慧医疗科技有限公司 一种高并发场景下查询多条核酸报告的办法
CN117290411A (zh) * 2023-11-22 2023-12-26 深圳九有数据库有限公司 一种多模数据库查询方法、装置、电子设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110874214B (zh) * 2019-11-14 2023-06-16 北京明略软件系统有限公司 一种功能调用方法、装置、电子设备和存储介质
CN111104421A (zh) * 2019-12-31 2020-05-05 新奥数能科技有限公司 一种基于数据接口标准配置的数据查询方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488026A (zh) * 2009-02-26 2009-07-22 福州欣创摩尔电子科技有限公司 分布式数据采集控制平台系统
CN103856969A (zh) * 2014-03-28 2014-06-11 大唐移动通信设备有限公司 网元特性参数的统计方法、装置及系统
CN103853743A (zh) * 2012-11-29 2014-06-11 百度在线网络技术(北京)有限公司 一种分布式系统及其日志查询方法
CN104050161A (zh) * 2013-03-11 2014-09-17 Sap股份公司 应用和数据服务器的动态桥接
CN105786932A (zh) * 2014-12-26 2016-07-20 北大医疗信息技术有限公司 医疗系统中临床业务的查询方法及查询装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588369A (zh) * 2004-09-06 2005-03-02 杭州恒生电子股份有限公司 一种关系型数据库系统及其查询和报表方法
JP2013025446A (ja) * 2011-07-19 2013-02-04 Canon Marketing Japan Inc 情報処理装置、情報処理システム、情報処理方法、プログラムおよび記録媒体
CN104346378B (zh) * 2013-07-31 2019-02-05 腾讯科技(深圳)有限公司 一种实现复杂数据处理的方法、装置及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488026A (zh) * 2009-02-26 2009-07-22 福州欣创摩尔电子科技有限公司 分布式数据采集控制平台系统
CN103853743A (zh) * 2012-11-29 2014-06-11 百度在线网络技术(北京)有限公司 一种分布式系统及其日志查询方法
CN104050161A (zh) * 2013-03-11 2014-09-17 Sap股份公司 应用和数据服务器的动态桥接
CN103856969A (zh) * 2014-03-28 2014-06-11 大唐移动通信设备有限公司 网元特性参数的统计方法、装置及系统
CN105786932A (zh) * 2014-12-26 2016-07-20 北大医疗信息技术有限公司 医疗系统中临床业务的查询方法及查询装置

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110362613A (zh) * 2019-07-22 2019-10-22 中国联合网络通信集团有限公司 数据处理方法和设备
CN111143416A (zh) * 2019-12-25 2020-05-12 深圳广联赛讯有限公司 基于数据缓存的查询方法、终端及存储介质
CN111143416B (zh) * 2019-12-25 2024-01-30 深圳广联赛讯股份有限公司 基于数据缓存的查询方法、终端及存储介质
CN111324545A (zh) * 2020-03-13 2020-06-23 中国工商银行股份有限公司 应用服务器中间件性能测试方法、测试终端、应用服务器
CN111324545B (zh) * 2020-03-13 2023-09-22 中国工商银行股份有限公司 应用服务器中间件性能测试方法、测试终端、应用服务器
CN111522642A (zh) * 2020-04-21 2020-08-11 观为监测技术无锡股份有限公司 风电机组状态监测数据的获取方法、查询方法及电子设备
CN111522642B (zh) * 2020-04-21 2024-02-13 观为监测技术无锡股份有限公司 风电机组状态监测数据的获取方法、查询方法及电子设备
CN113312374A (zh) * 2021-05-18 2021-08-27 网银在线(北京)科技有限公司 数据查询方法、装置、设备及存储介质
CN114974605A (zh) * 2022-05-24 2022-08-30 山东浪潮智慧医疗科技有限公司 一种高并发场景下查询多条核酸报告的办法
CN117290411A (zh) * 2023-11-22 2023-12-26 深圳九有数据库有限公司 一种多模数据库查询方法、装置、电子设备及存储介质
CN117290411B (zh) * 2023-11-22 2024-02-13 深圳九有数据库有限公司 一种多模数据库查询方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN109643305A (zh) 2019-04-16

Similar Documents

Publication Publication Date Title
WO2018035799A1 (fr) Procédé d'interrogation de données, serveurs d'applications et de bases de données, intergiciel et système
US20220058200A1 (en) Generation of archiver queries for continuous queries over archived relations
US10928970B2 (en) User-interface for developing applications that apply machine learning
WO2020238597A1 (fr) Procédé, dispositif, système et support de mise à jour de données basés sur hadoop
CN106649630A (zh) 数据查询方法及装置
WO2014052679A2 (fr) Gestion de requêtes continues avec des relations archivées
US10102230B1 (en) Rate-limiting secondary index creation for an online table
US10445157B2 (en) Concurrent services caching
US11620310B1 (en) Cross-organization and cross-cloud automated data pipelines
CN114356971A (zh) 数据处理方法、装置以及系统
US20220413819A1 (en) Code translations of resilient distributed datasets in databases
US20190258736A1 (en) Dynamic Execution of ETL Jobs Without Metadata Repository
CN116226200A (zh) 一种基于bff架构的服务接口数据缓存方法、装置及设备
WO2019000897A1 (fr) Procédé et dispositif d'acquisition de données
US11106670B2 (en) Local identifiers for database objects
US11301498B2 (en) Multi-cloud object store access
CN115563183B (zh) 查询方法、装置及程序产品
CN117033748B (zh) 业务查询信息的获取方法、业务数据查询方法以及装置
CN109062929A (zh) 一种查询任务通信方法及系统
US12045221B1 (en) Compact representation of table columns via templatization
JP2017117355A (ja) 情報処理システム、情報処理装置、処理制御方法、及び処理制御プログラム
CN112783904A (zh) 一种更新索引数据的方法和装置
CA3238279A1 (fr) Moteur de requete federe preservant la confidentialite
Gannouni et al. Data integration using service composition in data service middleware
CN117472335A (zh) 作业开发架构及作业处理方法、存储介质、电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16913822

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16913822

Country of ref document: EP

Kind code of ref document: A1