Index query method and device, equipment and storage medium
By establishing a communication connection between the report platform and the indicator server for authentication and query, the problem of non-real-time indicator query in the existing technology is solved, real-time query and data analysis of indicators are realized, and the competitiveness of the platform is improved.
Patent Information
- Application Number
- CN202410664979.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-10
AI Technical Summary
Existing indicator query methods cannot achieve real-time synchronization of indicators and cannot meet the needs of real-time query of indicators.
By establishing a communication connection between the reporting platform and the indicator server, authentication is performed, and an indicator query request is sent after the connection response. The indicator server feeds back the query result set to realize real-time indicator data query.
Real-time query of indicators is realized, the indicator data analysis cycle is shortened, and the product competitiveness of the indicator management platform is improved.
Smart Images

Figure CN118626515A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data query technology, and in particular to an indicator query method, device, equipment and storage medium. Background Art
[0002] The indicator management platform is one of the core contents of data management. Its main goal is to help enterprises build a unified indicator system for analysis and application. Moreover, most indicator platforms will serve the reporting platform. The common way of connecting the two is that the indicator platform solidifies the indicator data into a certain database, and then the reporting platform connects to the database to analyze and display the data.
[0003] However, after solidifying the indicator data into the indicator database, this method cannot achieve real-time synchronization of the indicator data, and therefore cannot meet the needs of real-time query of indicators.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide an indicator query method, device, equipment and storage medium, aiming to solve the technical problem that the existing indicator query method cannot meet the demand for real-time indicator query.
[0006] To achieve the above object, the present invention provides an indicator query method, which is applied to a report platform and includes:
[0007] Sending a communication connection request to the indicator server, the indicator server performs authentication when detecting the communication connection request, and feeds back a connection response when the authentication is successful;
[0008] When a connection response is detected, an indicator query request is sent to the indicator server, and the indicator server feeds back a corresponding query result set when receiving the indicator query request.
[0009] In addition, to achieve the above purpose, the present invention also proposes an indicator query device, the indicator query device comprising:
[0010] A connection request module is used to send a communication connection request to the indicator server, and the indicator server performs authentication when detecting the communication connection request, and feeds back a connection response when the authentication is successful;
[0011] The indicator query module is used to send an indicator query request to the indicator server when a connection response is detected, and the indicator server feeds back a corresponding query result set when receiving the indicator query request.
[0012] In addition, to achieve the above purpose, the present invention also provides an indicator query method, which is applied to an indicator server and includes:
[0013] When a communication connection request sent by the reporting platform is detected, authentication is performed, and when the authentication is successful, a connection response is fed back to the reporting platform;
[0014] When detecting an indicator query request sent by the report platform, obtaining query parameters according to the indicator query request;
[0015] Generate an indicator calculation result based on the query parameter, and send a query result set corresponding to the indicator calculation result to the report platform.
[0016] Optionally, the indicator query request is an SQL request; the step of acquiring query parameters according to the indicator query request includes:
[0017] Parsing the indicator query request to obtain a query SQL statement;
[0018] Perform SQL parsing on the query SQL statement to obtain query parameters.
[0019] Optionally, the step of generating an indicator calculation result based on the query parameter includes:
[0020] Acquire target indicator information according to the query parameters;
[0021] An indicator calculation is performed based on the target indicator information to obtain an indicator calculation result.
[0022] Optionally, the query parameters include: query fields and query tables; the target indicator parameters include: target indicator models and target indicator fields;
[0023] The step of acquiring target indicator information according to the query parameter includes:
[0024] Traverse the preset indicator database according to the query field to obtain the corresponding target indicator field;
[0025] The corresponding target indicator model is obtained based on the query table.
[0026] Optionally, after performing the indicator calculation based on the target indicator information and obtaining the indicator calculation result, the method further includes:
[0027] Storing the index calculation results in a preset proxy database;
[0028] The step of sending the query result set corresponding to the indicator calculation result to the report platform includes:
[0029] forwarding the index query request to the preset proxy database, and the preset proxy database feeds back a query result set corresponding to the index calculation result;
[0030] The query result set is sent to the reporting platform.
[0031] In addition, to achieve the above purpose, the present invention also proposes an indicator query device, the indicator query device comprising:
[0032] The authentication module is used to perform authentication when a communication connection request sent by the reporting platform is detected, and to feed back a connection response to the reporting platform when the authentication is successful;
[0033] A parameter acquisition module, used to acquire query parameters according to the indicator query request when detecting the indicator query request sent by the report platform;
[0034] The indicator feedback module is used to generate an indicator operation result based on the query parameter, and send the query result set corresponding to the indicator operation result to the report platform.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also proposes an indicator query device, which includes: a memory, a processor, and an indicator query program stored in the memory and executable on the processor, and the indicator query program is configured to implement the steps of the indicator query method described above.
[0036] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which an indicator query program is stored, and when the indicator query program is executed by a processor, the steps of the indicator query method described above are implemented.
[0037] The present invention discloses an indicator query method, device, equipment and storage medium, the method comprising: sending a communication connection request to an indicator server, the indicator server performs authentication when detecting the communication connection request, and feeds back a connection response when the authentication is passed; when detecting the connection response, sending an indicator query request to the indicator server, the indicator server feeds back a corresponding query result set when receiving the indicator query request. Compared with the indicator query method in which the traditional indicator platform stores the results of indicator calculation in a database through task scheduling, and the report platform then reads the indicator data from the database, the indicator server in the present invention can feed back real-time indicator analysis data, that is, the above-mentioned query result set to the report platform when receiving the indicator query request sent by the report platform, thereby meeting the demand for real-time indicator query. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a structural diagram of an index query device for a hardware operating environment involved in an embodiment of the present invention;
[0039] Figure 2 This is a flow chart of the first embodiment of the index query method of the present invention;
[0040] Figure 3 This is a schematic diagram of a first flow chart of a second embodiment of the indicator query method of the present invention;
[0041] Figure 4 A second flow chart of the second embodiment of the index query method of the present invention;
[0042] Figure 5 A third flow chart of the second embodiment of the index query method of the present invention;
[0043] Figure 6 It is a structural block diagram of the first embodiment of the index query device of the present invention;
[0044] Figure 7 This is a structural block diagram of the second embodiment of the indicator query device of the present invention.
[0045] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0046] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0047] Reference Figure 1 , Figure 1 The present invention is a schematic diagram of the structure of an index query device for a hardware operating environment according to an embodiment of the present invention.
[0048] like Figure 1As shown, the indicator query device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0049] Those skilled in the art will understand that Figure 1 The structure shown in does not constitute a limitation on the indicator query device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0050] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and an indicator query program.
[0051] exist Figure 1 In the indicator query device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the indicator query device of the present invention can be set in the indicator query device, and the indicator query device calls the indicator query program stored in the memory 1005 through the processor 1001, and executes the indicator query method provided by the embodiment of the present invention.
[0052] The embodiment of the present invention provides an index query method, referring to Figure 2 , Figure 2 It is a flowchart of the first embodiment of the indicator query method of the present invention.
[0053] In this embodiment, the indicator query method includes the following steps:
[0054] Step S10: Sending a communication connection request to the indicator server, the indicator server performs authentication upon detecting the communication connection request, and feeds back a connection response upon passing the authentication;
[0055] It should be noted that the indicator query method in this embodiment is applied to a reporting platform, which can be a computing service device with data processing, network communication and program running functions, such as mobile phones, televisions, tablets, personal computers, etc., or other electronic devices that can achieve the same or similar functions.
[0056] It is understandable that in the existing solution, the reporting platform is connected to the database, and the traditional indicator platform stores the results of indicator calculation in the database according to the update cycle through task scheduling. In this way, the data read by the reporting platform from the database is often not the latest data, that is, the traditional reporting platform cannot achieve real-time indicator calculation when connected to the indicator platform. To solve this problem, in this embodiment, the reporting platform is directly connected to the indicator server, which can be an indicator platform that is externally represented as a database server.
[0057] It is easy to understand that the report platform and the indicator server can be seamlessly connected using a more common database connection method, and most of the report platforms or report tools on the market support MySQL data source connection. Therefore, in order to expand the scope of application of this embodiment and reduce the connection cost, the above-mentioned communication connection request in this embodiment can be a request to establish a MySQL communication protocol connection. The MySQL communication protocol is a stateful protocol that supports SSL, compression, authentication and other functions.
[0058] At the same time, after receiving the communication connection request, the indicator server will perform corresponding authentication and after the authentication is passed, it will feedback the connection response to the reporting platform to establish a communication connection between the reporting platform and the indicator server.
[0059] Step S20: When a connection response is detected, an indicator query request is sent to the indicator server, and the indicator server feeds back a corresponding query result set when receiving the indicator query request.
[0060] It is understandable that when the report platform detects a connection response, it means that the report platform has successfully connected to the indicator server directly using the MySQL data source connection method, and can initiate a MySQL query, that is, an indicator query request to the indicator server. It is easy to understand that in this embodiment, the indicator server also supports the MySQL communication protocol, which is essentially a proxy for the MySQL database. The indicator server can forward the indicator query request sent by the report platform to the proxied MySQL database, and then forward the real-time data query response result of the proxied MySQL database, that is, the above-mentioned query result set, to the report platform, thereby realizing real-time indicator data query of the report platform.
[0061] The present embodiment discloses an indicator query method, which includes: sending a communication connection request to an indicator server, the indicator server performs authentication when detecting the communication connection request, and feeds back a connection response when the authentication is passed; when detecting the connection response, sending an indicator query request to the indicator server, the indicator server feeds back a corresponding query result set when receiving the indicator query request. Compared with the indicator query method in which the traditional indicator platform stores the results of indicator calculation in a database through task scheduling, and the reporting platform then reads the indicator data from the database, the indicator server in the present embodiment can feed back real-time indicator analysis data, that is, the above-mentioned query result set to the reporting platform when receiving the indicator query request sent by the reporting platform, thereby meeting the demand for real-time indicator query.
[0062] Reference Figure 3 , Figure 3 This is a first flow chart of the second embodiment of the index query method of the present invention, based on the above Figure 2 The embodiment shown provides a second embodiment of the indicator query method of the present invention.
[0063] like Figure 3 As shown, in this embodiment, the indicator query method includes:
[0064] Step S40: performing authentication upon detecting a communication connection request sent by the reporting platform, and feeding back a connection response to the reporting platform upon passing the authentication;
[0065] It should be noted that the indicator query method in the present embodiment is applied to the indicator server, which can be directly connected to the reporting platform so that the reporting platform can obtain real-time indicator analysis data. Specifically, a more general database connection method can be used between the reporting platform and the indicator server to achieve seamless connection, and most of the reporting platforms or reporting tools on the market support MySQL data source connection. Therefore, in order to expand the scope of application of the present embodiment and reduce the docking cost, the indicator server in the present embodiment can support the MySQL communication protocol, and the above-mentioned communication connection request can be a request to establish a MySQL communication protocol connection. After receiving the communication connection request, the indicator server will authenticate the reporting platform that sent the request, and feedback the connection response to the reporting platform after the authentication is passed, thereby establishing a communication connection between the reporting platform and the indicator server.
[0066] Step S50: when detecting the indicator query request sent by the report platform, obtaining query parameters according to the indicator query request;
[0067] It should be understood that when the communication between the indicator server and the reporting platform is implemented based on the MySQL communication protocol, the above indicator query request can be an SQL request from the reporting platform, and the indicator server can perform SQL parsing on it to obtain the table or field corresponding to the indicator query request.
[0068] Therefore, further, as an implementable embodiment, referring to Figure 4 , Figure 4 This is a second flow chart of the second embodiment of the indicator query method of the present invention. In this embodiment, the indicator query request is an SQL request; step S50 includes:
[0069] Step S51: parsing the indicator query request to obtain a query SQL statement;
[0070] Step S52: performing SQL parsing on the query SQL statement to obtain query parameters.
[0071] And analyze the target table and target field of the query from the parsed SQL.
[0072] It is understandable that after receiving the SQL request from the reporting platform, the indicator server can parse the MySQL data packet based on the MySQL communication protocol, obtain the query SQL statement from the data packet, and then use Druid (which is an open source tool that can be used for database connection and SQL parsing, etc.) to perform SQL parsing. The parsing process can be: first, generate the corresponding abstract syntax tree (Abstract Syntax code, AST) according to the SQL statement. There are many types of AST nodes, among which SQLSelect Statement is the main focus. The SQL Select Statement object contains all the tables and fields involved in the SQL statement. Based on this, the target table and target field of the query, that is, the above-mentioned query parameters, can be analyzed.
[0073] Step S60: Generate an indicator calculation result based on the query parameter, and send a query result set corresponding to the indicator calculation result to the report platform.
[0074] It is easy to understand that after obtaining the query parameters, in order to speed up the indicator data analysis process, in this embodiment, the indicator server can perform indicator calculations according to the data processing methods corresponding to the target table and target field obtained after analyzing the query SQL, and then directly feed back the query result set corresponding to the indicator calculation to the report platform. Therefore, further, as an implementable method, refer to Figure 5 , Figure 5 This is a third flow chart of the second embodiment of the indicator query method of the present invention. In this embodiment, step S60 includes:
[0075] Step S61: Obtain target indicator information according to the query parameter;
[0076] It can be understood that in this embodiment, the indicator server has pre-built-in data analysis methods for different tables and fields. Therefore, this embodiment can determine the matching target indicator information based on the obtained query parameters, and then perform indicator calculations according to the data analysis method corresponding to the indicator information.
[0077] Specifically, as an implementable method, in this embodiment, the query parameters include: query fields and query tables; the target indicator parameters include: target indicator models and target indicator fields; step S61 includes:
[0078] Step S611: traverse the preset indicator database according to the query field to obtain the corresponding target indicator field;
[0079] Step S612: Obtain the corresponding target indicator model based on the query table.
[0080] It should be noted that the above-mentioned indicator model can be a database table defined and created in the indicator server for storing the results of raw data processing, and the configuration information of the indicator model will be saved in the preset indicator database of the indicator server. The indicator field can be a field in the indicator model. When the indicator model is actually queried, all fields of the indicator model may not be queried, and only some fields in the model table may be queried, so it is called an indicator field, which is also stored in the preset indicator database. Therefore, after parsing to obtain the query field and query table (that is, the target field and target table parsed based on the query SQL statement above), this embodiment can find the corresponding target indicator model and target indicator field in the indicator platform by traversing and matching the preset indicator database.
[0081] It should be understood that when the indicator model is created, the configuration information of the indicator model, such as table name, field name, etc., will be pre-saved in the indicator server. Therefore, this embodiment can associate the table name of the query table with the configuration information of the indicator model). However, in the process of traversing the preset indicator database, the query field and the target indicator field may belong to data of different data types, so the two can be matched through a pre-configured mapping relationship.
[0082] Step S62: Perform indicator calculation based on the target indicator information to obtain an indicator calculation result.
[0083] It is easy to understand that indicator calculation is the process of processing indicator data in the indicator server, which may refer to a series of rule operations on the original data, and different indicator models in this embodiment correspond to different indicator operation methods. Therefore, after determining the target indicator information, this embodiment can perform corresponding indicator operations to obtain indicator operation results.
[0084] Further, as an implementable embodiment, Figure 5 As shown, in this embodiment, after step S62, the following steps are also included:
[0085] Step S63: storing the index calculation result in a preset proxy database;
[0086] In addition, in this embodiment, the indicator server can be published as a database server, which can be implemented based on Vertx. The essence of the indicator server is a proxy for the MySQL database, which can forward the request of the report platform to the proxied MySQL database, and then forward the response result of the proxied MySQL database to the report platform to complete the data interaction. The indicator platform itself does not design and store the database structure. Therefore, in this embodiment, after obtaining the indicator calculation results, the indicator server needs to store the processed data in the corresponding MySQL database, that is, the above-mentioned preset proxy database.
[0087] Accordingly, in this embodiment, step S60 further includes:
[0088] Step S64: forwarding the index query request to the preset proxy database, and the preset proxy database feeds back a query result set corresponding to the index calculation result;
[0089] Step S65: Send the query result set to the reporting platform.
[0090] It should be noted that, since the data type of the indicator calculation performed by the indicator server does not match the transmission data type of the MySQL communication protocol, in this embodiment, the indicator server stores the indicator calculation results in the preset proxy database, on the one hand, to store historical data, and on the other hand, to achieve data conversion.
[0091] Specifically, after waiting for the indicator calculation to be completed, the indicator server will forward the SQL query request sent by the report platform to the proxied MySQL database and execute the database query. The preset proxy database will then respond with a query result set of the transmission data type that corresponds to the indicator calculation result and complies with the MySQL communication protocol, and the indicator server will then forward the query result set to the report platform.
[0092] It is easy to understand that although the above-mentioned indicator calculation-storage-query-forwarding process is relatively cumbersome, compared with the existing indicator query method, this embodiment has greatly shortened the indicator data analysis cycle, and can perform real-time indicator data analysis and feedback based on the indicator query request sent by the reporting platform, thereby meeting the needs of real-time indicator query and further enhancing the product competitiveness of the indicator management platform.
[0093] The present embodiment discloses an indicator query method, which includes: performing authentication when a communication connection request sent by a reporting platform is detected, and feeding back a connection response to the reporting platform when the authentication is passed; parsing the indicator query request to obtain a query SQL statement; performing SQL parsing on the query SQL statement to obtain query parameters. Traverse the preset indicator database according to the query field to obtain the corresponding target indicator field; obtain the corresponding target indicator model based on the query table. Perform indicator calculation based on the target indicator information to obtain the indicator calculation result. Store the indicator calculation result in a preset proxy database; forward the indicator query request to the preset proxy database, and the preset proxy database feeds back a query result set corresponding to the indicator calculation result; and send the query result set to the reporting platform. Compared with the traditional indicator platform, the indicator query method stores the result of the indicator calculation in the database through task scheduling, and the reporting platform then reads the indicator data from the database. In this embodiment, the indicator server can feed back real-time indicator analysis data, that is, the above-mentioned query result set to the reporting platform when receiving the indicator query request sent by the reporting platform, thereby meeting the demand for real-time indicator query. In addition, this embodiment can greatly shorten the indicator data analysis cycle, and can perform real-time indicator data analysis and feedback based on the indicator query request sent by the reporting platform, further enhancing the product competitiveness of the indicator management platform.
[0094] In addition, an embodiment of the present invention further proposes a storage medium, on which an indicator query program is stored. When the indicator query program is executed by a processor, the steps of the indicator query method described above are implemented.
[0095] refer to Figure 6 , Figure 6 This is a structural block diagram of the first embodiment of the indicator query device of the present invention.
[0096] like Figure 6 As shown, the indicator query device proposed in the embodiment of the present invention is applied to a report platform, and the indicator query device includes:
[0097] The connection request module A1 is used to send a communication connection request to the indicator server. The indicator server performs authentication when detecting the communication connection request and feeds back a connection response when the authentication is successful.
[0098] The indicator query module A2 is used to send an indicator query request to the indicator server when a connection response is detected, and the indicator server feeds back a corresponding query result set when receiving the indicator query request.
[0099] In this embodiment, a communication connection request is sent to the indicator server. When the communication connection request is detected, the indicator server performs authentication and verification, and feedbacks a connection response when the authentication is passed; when the connection response is detected, an indicator query request is sent to the indicator server, and the indicator server feedbacks the corresponding query result set when receiving the indicator query request. Compared with the indicator query method in which the traditional indicator platform stores the results of indicator calculation in the database through task scheduling, and the reporting platform then reads the indicator data from the database, the indicator server in this embodiment can feedback real-time indicator analysis data, that is, the above-mentioned query result set to the reporting platform when receiving the indicator query request sent by the reporting platform, thereby meeting the demand for real-time indicator query.
[0100] refer to Figure 7 , Figure 7 This is a structural block diagram of the second embodiment of the indicator query device of the present invention. Figure 6 The embodiment shown provides a second embodiment of the indicator query device of the present invention.
[0101] In this embodiment, the indicator query device proposed in the embodiment of the present invention is applied to the indicator server, and the indicator query device includes:
[0102] The authentication module B1 is used to perform authentication when a communication connection request sent by the reporting platform is detected, and to feed back a connection response to the reporting platform when the authentication is successful;
[0103] The parameter acquisition module B2 is used to acquire query parameters according to the indicator query request when detecting the indicator query request sent by the report platform;
[0104] The indicator feedback module B3 is used to generate an indicator operation result based on the query parameter, and send the query result set corresponding to the indicator operation result to the report platform.
[0105] Further, as an implementable method, in this embodiment, the parameter acquisition module is also used to parse the indicator query request to obtain a query SQL statement;
[0106] The parameter acquisition module is also used to perform SQL parsing on the query SQL statement to obtain query parameters.
[0107] Further, as an implementable method, in this embodiment, the indicator feedback module B3 is also used to obtain target indicator information according to the query parameter;
[0108] The indicator feedback module B3 is further used to perform indicator calculation based on the target indicator information to obtain an indicator calculation result.
[0109] Further, as an implementable method, in this embodiment, the query parameters include: query fields and query tables; the target indicator parameters include: target indicator models and target indicator fields; the indicator feedback module B3 is further used to traverse the preset indicator database according to the query fields to obtain the corresponding target indicator fields;
[0110] The indicator feedback module B3 is also used to obtain the corresponding target indicator model based on the query table.
[0111] Further, as an implementable method, the indicator feedback module B3 is also used to store the indicator calculation result in a preset proxy database;
[0112] Correspondingly, the indicator feedback module B3 is further used to forward the indicator query request to the preset proxy database, and the preset proxy database feeds back a query result set corresponding to the indicator calculation result;
[0113] The indicator feedback module B3 is also used to send the query result set to the reporting platform.
[0114] This embodiment performs authentication when a communication connection request sent by a reporting platform is detected, and feeds back a connection response to the reporting platform when the authentication is passed; parses the indicator query request to obtain a query SQL statement; performs SQL parsing on the query SQL statement to obtain query parameters. Traverse the preset indicator database according to the query field to obtain the corresponding target indicator field; obtain the corresponding target indicator model based on the query table. Perform indicator calculation based on the target indicator information to obtain the indicator calculation result. Store the indicator calculation result in the preset proxy database; forward the indicator query request to the preset proxy database, and the preset proxy database feeds back a query result set corresponding to the indicator calculation result; and send the query result set to the reporting platform. Compared with the indicator query method in which the traditional indicator platform stores the result of indicator calculation in the database through task scheduling, and the reporting platform reads the indicator data from the database, the indicator server in this embodiment can feed back real-time indicator analysis data, that is, the above-mentioned query result set to the reporting platform when receiving the indicator query request sent by the reporting platform, thereby meeting the demand for real-time indicator query. In addition, this embodiment can greatly shorten the indicator data analysis cycle, and can perform real-time indicator data analysis and feedback according to the indicator query request sent by the reporting platform, further enhancing the product competitiveness of the indicator management platform.
[0115] Other embodiments or specific implementations of the indicator query device of the present invention can refer to the above-mentioned method embodiments and will not be described in detail here.
[0116] 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 system 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 system. 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 system including the element.
[0117] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0118] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0119] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An indicator query method, characterized in that: The indicator query method is applied to a report platform, and the method includes: Sending a communication connection request to the indicator server, the indicator server performs authentication when detecting the communication connection request, and feeds back a connection response when the authentication is successful; When a connection response is detected, an indicator query request is sent to the indicator server, and the indicator server feeds back a corresponding query result set when receiving the indicator query request.
2. An indicator query device, characterized in that: The indicator query device comprises: A connection request module is used to send a communication connection request to the indicator server, and the indicator server performs authentication when detecting the communication connection request, and feeds back a connection response when the authentication is successful; The indicator query module is used to send an indicator query request to the indicator server when a connection response is detected, and the indicator server feeds back a corresponding query result set when receiving the indicator query request.
3. An indicator query method, characterized in that: The indicator query method is applied to an indicator server, and the method includes: When a communication connection request sent by the reporting platform is detected, authentication is performed, and when the authentication is successful, a connection response is fed back to the reporting platform; When detecting an indicator query request sent by the report platform, obtaining query parameters according to the indicator query request; Generate an indicator calculation result based on the query parameter, and send a query result set corresponding to the indicator calculation result to the report platform.
4. The index query method according to claim 3, characterized in that: The indicator query request is an SQL request; the step of obtaining query parameters according to the indicator query request includes: Parsing the indicator query request to obtain a query SQL statement; Perform SQL parsing on the query SQL statement to obtain query parameters.
5. The index query method according to claim 4, characterized in that: The step of generating an indicator calculation result based on the query parameter includes: Acquire target indicator information according to the query parameters; An indicator calculation is performed based on the target indicator information to obtain an indicator calculation result.
6. The index query method according to claim 5, characterized in that: The query parameters include: query fields and query tables; the target indicator parameters include: target indicator models and target indicator fields; The step of acquiring target indicator information according to the query parameter includes: Traverse the preset indicator database according to the query field to obtain the corresponding target indicator field; The corresponding target indicator model is obtained based on the query table.
7. The index query method according to claim 6, characterized in that: After performing the indicator calculation based on the target indicator information and obtaining the indicator calculation result, the method further includes: Storing the index calculation results in a preset proxy database; The step of sending the query result set corresponding to the indicator calculation result to the report platform includes: forwarding the index query request to the preset proxy database, and the preset proxy database feeds back a query result set corresponding to the index calculation result; The query result set is sent to the reporting platform.
8. An indicator query device, characterized in that: The indicator query device comprises: The authentication module is used to perform authentication when a communication connection request sent by the reporting platform is detected, and to feed back a connection response to the reporting platform when the authentication is successful; A parameter acquisition module, used to acquire query parameters according to the indicator query request when detecting the indicator query request sent by the report platform; The indicator feedback module is used to generate an indicator operation result based on the query parameter, and send the query result set corresponding to the indicator operation result to the report platform.
9. An index query device, characterized in that: The device comprises: a memory, a processor, and an indicator query program stored in the memory and executable on the processor, wherein the indicator query program is configured to implement the steps of the indicator query method according to claim 1 or any one of claims 3 to 7.
10. A storage medium, characterized in that: The storage medium stores an indicator query program, which, when executed by a processor, implements the steps of the indicator query method according to claim 1 or any one of claims 3 to 7.
