CN115563149A - Index calculation method and device, electronic equipment and storage medium - Google Patents

Index calculation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115563149A
CN115563149A CN202211328161.4A CN202211328161A CN115563149A CN 115563149 A CN115563149 A CN 115563149A CN 202211328161 A CN202211328161 A CN 202211328161A CN 115563149 A CN115563149 A CN 115563149A
Authority
CN
China
Prior art keywords
index
calculation
target
data table
reference data
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202211328161.4A
Other languages
Chinese (zh)
Inventor
金可栋
杨华
胡肖宇
管洪昌
那瑞冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software Co Ltd
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 Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202211328161.4A priority Critical patent/CN115563149A/en
Publication of CN115563149A publication Critical patent/CN115563149A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification
    • G06F16/287Visualization; Browsing

Landscapes

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

Abstract

The embodiment of the application provides an index calculation method and device, electronic equipment and a readable storage medium, and relates to the technical field of software management systems. The method comprises the following steps: displaying the table name of at least one reference data table, and displaying the field name of at least one field in the target reference data table; presenting a reference SQL statement in response to a selected operation on a target field name in at least one field name; running a reference SQL statement, displaying a target field of the target reference data table, and displaying at least one operation symbol and at least one initial service index; calculating the target service index; and responding to the operation of the operational expression, and displaying a target service index result corresponding to the target reference data table. According to the method and the system, the purpose that the index creating process can be realized according to the system under the condition that business personnel of a company do not know the SQL writing technology is achieved, the time for creating the index can be prolonged, and the index calculating efficiency can be improved.

Description

Index calculation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of software management systems, and in particular, to an index calculation method, an index calculation device, an electronic device, and a storage medium.
Background
With the development of various industries, the amount of data to be processed is more and more generated when a software management system is used for handling business every day, for example, business clearing and settlement between the inside and outside of the banking industry, centralized company release for employees, centralized card development for schools, and the like. For such a large amount of data to be processed, each company may use batch calculation, that is, all the data to be processed of the company are processed by a timing task at a specific time. The existing system for calculating the data adopts a mode of manually writing SQL, and writes a corresponding SQL statement for each piece of data to be processed; after the data is processed, technicians can store index calculation results in a manual modeling mode.
The problem that the data processing in the prior art is difficult to realize in terms of business personnel by adopting a manual writing mode because a calculation formula of the data to be processed is complex and business personnel do not contact the SQL sentence writing technology is solved; and technicians writing SQL sentences can not know corresponding services, so that the SQL sentences are very difficult to implement from the perspective of processing personnel and have the problem of computing performance. Meanwhile, due to the fact that the amount of data to be processed of each company is large, the data processing needs long processing time due to the fact that the data are written one by one in the prior art, the calculation efficiency is low, the requirement of real-time data calculation cannot be met, and the condition of result delay is caused frequently. Moreover, since the calculation result of the data to be processed is complex, the problem of generating redundant fields can be caused by storing the calculation result of the data in a manual modeling manner.
Disclosure of Invention
The embodiment of the application provides an index calculation method, an index calculation device, electronic equipment and a storage medium, and can solve the problems that manual modeling needs a large amount of time and cost, calculation efficiency is low due to the fact that calculation performance is compromised, a user cannot inquire calculation results in time and the like. The technical scheme is as follows:
according to an aspect of the embodiments of the present application, there is provided a method for index calculation, applied to a terminal, the method including:
displaying the table name of at least one reference data table, responding to the selection operation of the target reference data table name in the at least one table name, and displaying the field name of at least one field in the target reference data table corresponding to the target reference data table name;
responding to the selected operation of the target field name in the at least one field name, and displaying at least one operation symbol and at least one initial service index which are obtained in advance;
responding to the selected operation of the operation symbol and the initial service index, and displaying a calculation model for calculating the target service index;
and in response to the execution operation on the calculation model, showing a calculation result of the target business index determined based on the data in the target field in the target reference data table.
As an optional implementation manner, in response to the selection operation of the target field name in the at least one field name, the method further includes:
generating an SQL (structured query language) statement corresponding to the target field for each selected target field, wherein the SQL statement is a statement which can be recognized by a preset index computing system and is used for retrieving data in the target field of the target reference data table from a preset database;
and sending the SQL statement to a preset index computing system, wherein the index computing system is used for operating the SQL statement and obtaining an operation result of the SQL statement and data in a target field of a target reference data table.
As an optional implementation way, in response to the execution operation on the calculation model, the target service index result is presented, and the method comprises the following steps:
responding to the execution operation of the calculation model, sending the initial service index in the calculation model to an index calculation system, and indicating the index calculation system to obtain a calculation result of the initial service index according to the execution result;
obtaining a calculation result of an initial service index returned by the index calculation system, and taking the calculation result of the initial service index as the input of a calculation model to obtain a target service index output by the calculation model;
and displaying the target business index.
As an optional implementation way, in response to the execution operation on the calculation model, the target service index result is presented, and the method comprises the following steps:
responding to the execution operation of the calculation model, sending the calculation model to an index calculation system, and indicating the index calculation system to obtain a calculation result of an initial service index according to the execution result, and obtaining a target service index output by the calculation model according to the calculation result of the initial service index;
and obtaining and displaying a calculation result of the target service index returned by the index calculation system.
As an alternative embodiment, the method comprises the following steps:
the SQL statement is also used for indicating index information of the operation result of the index computing system for establishing the SQL statement.
As an alternative embodiment, in response to the selection operation of the table name of the target reference data table in the at least one reference data table, the method includes:
displaying a preset window;
and in response to dragging the table name of the target reference data table to a preset window, displaying the field name of at least one field in the target reference data table in the preset window.
According to another aspect of an embodiment of the present application, there is provided an index calculation apparatus including:
the field display module is used for displaying the table name of at least one reference data table, responding to the selection operation of the target reference data table name in the at least one table name and displaying the field name of at least one field in the target reference data table corresponding to the target reference data table name;
the index creating module is used for responding to the selection operation of the target field name in the at least one field name and displaying at least one operation symbol and at least one initial service index which are obtained in advance;
the model generation module is used for responding to the selection operation of the operation symbol and the initial service index and displaying a calculation model for calculating the target service index;
and the result calling module is used for responding to the execution operation of the calculation model and displaying the calculation result of the target service index determined based on the data in the target field in the target reference data table.
According to another aspect of an embodiment of the present application, there is provided an electronic apparatus including:
comprising a memory, a processor and a computer program stored on the memory, the processor executing the computer program to carry out the steps of the index calculation method of any one of claims 1 to 6.
According to another aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the index calculation method of any one of claims 1 to 6.
According to another aspect of embodiments of the present application, there is provided a computer program product, which when executed by a processor implements the steps of the index calculation method of any one of claims 1 to 6.
The technical scheme provided by the embodiment of the application has the following beneficial effects: the technical effect that the user creates the indexes in batches at the terminal is achieved in a visual mode, the data calculation system is separated from the terminal, calculation efficiency is improved, and the user can conveniently inquire calculation results in time; the method and the system can enable business personnel to participate in index creation without knowing the database technology, greatly shorten the time for creating the index, enable a user to construct a calculation model in a visual mode to improve the data calculation efficiency, and can meet the beneficial effect that the user can check the calculation result in time.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic diagram of a system architecture for implementing an index calculation method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an index calculation method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an interface for displaying a reference data table according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an interface for displaying a reference data table according to an embodiment of the present application;
fig. 5 is a schematic interface diagram of generating a first SQL statement data table according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an interface for displaying a computational model according to an embodiment of the present disclosure;
FIG. 7 is a schematic interface diagram of an input calculation model according to an embodiment of the present application;
FIG. 8 is a logic diagram of a process implementation provided by an embodiment of the present application;
FIG. 9 is a logic diagram of a process implementation provided by an embodiment of the present application;
fig. 10 is a schematic structural diagram of an index calculation apparatus according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the embodiments set forth below in connection with the drawings are exemplary descriptions for explaining technical solutions of the embodiments of the present application, and do not limit the technical solutions of the embodiments of the present application.
As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the terms "comprises" and/or "comprising," when used in this specification in connection with embodiments of the present application, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, as embodied in the art. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates at least one of the items defined by the term, e.g., "a and/or B" can be implemented as "a", or as "B", or as "a and B".
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The application provides an index calculation method, an index calculation device, an electronic device and a readable storage medium, and aims to solve the technical problems in the prior art.
The technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application will be described below through descriptions of several exemplary embodiments. It should be noted that the following embodiments may be referred to, referred to or combined with each other, and the description of the same terms, similar features, similar implementation steps and the like in different embodiments is not repeated.
Fig. 1 is a schematic diagram of a system architecture for implementing an exemplary embodiment scheme provided in an embodiment of the present application, which may include a terminal 100, a server 200, and a data computing system 300.
The terminal 100 is installed and operated with an application program supporting a virtual environment, the terminal 100 sends a preset SQL statement to an application server (server for short) 200 and synchronizes the database to the server 200, and the server 200 executes tasks such as initial service index lookup after reading the preset SQL statement; the server 200 sends a preset SQL statement to the index computing system 300 and synchronizes database information, the index computing system 300 calls data to be processed in a database through the statement, executes the preset SQL statement and returns a computing result to the server 200; after receiving the calculation result, the server 200 returns the calculation result to the terminal 100 for the user to call and view.
An embodiment of the present application provides a method for index calculation, and as shown in fig. 2, the method includes:
s101, displaying a table name of at least one reference data table, responding to the selection operation of a target reference data table name in the at least one table name, and displaying a field name of at least one field in the target reference data table corresponding to the target reference data table name;
the target reference data table in the embodiment of the application is a data table selected by a user in a database, wherein the target reference data table may include a target reference data table selected from all data tables in the database and a plurality of target reference data tables selected in the database, and specific data to be processed in the reference data table is not displayed when the name of the reference data table is displayed. Wherein, the database can include: mainstream databases and middleware software such as Oracle, kingbase, mySQL, weblogic, tomCat, jboss, apache, sendmail, postfix, starBus, etc.
The specific method for selecting the name of the target reference data table may include: and dragging the data table to a progress display window by a user through a moving mode of dragging after clicking and selecting the data table by a mouse, and displaying a plurality of fields contained in the target reference data table in the display window. It may also be that the user double-clicks on a data table, the selected data table presenting a plurality of fields contained in the target reference data table within a presentation window. And the user confirms the specific data to be processed corresponding to the field by checking the field name in the table, wherein the specific data to be processed corresponding to the field name is not displayed when the field name is displayed.
The reference data table in the embodiment of the present application may be a data table in a target folder selected by a user from a database, and after the target folder is selected, the data table contained in the folder is displayed, which is the reference data table in the embodiment of the present application.
Fig. 3 is a schematic diagram of an interface for displaying a reference data table according to an embodiment of the present application, and as shown in fig. 3, the interface has two display areas, where the display area 101 is used to display table names of the reference data table that can be selected by a user, the table names of the reference data table shown in the figure include tables a to D, and the display area 102 is used to display fields of a selected target reference data table, and at this time, since the target reference data table has not been selected by the user, no field is displayed in the display area 102.
In addition to the embodiment shown in fig. 3, referring to fig. 4, the user selects the target reference data table (e.g., table a) in fig. 3, and the fields in table a are shown in the display area 102. The selection operation in the embodiment of the application may specifically be dragging the table name into the display area 102.
As shown in fig. 4, when the optional fields and the reference data table are displayed, the embodiment of the present application may not display specific data to be processed. The number of the user-selected target reference data tables may be one or more.
The reference data table is displayed, and the target reference data table is selected from the reference data tables, so that convenience of a user in checking and selecting a target field can be improved, only the field name in the target reference data table is displayed, and specific data to be processed is not displayed, and the problem that cross-field personnel can not know difficulty in using the database because audit personnel can not know the technology of the related computer field of the database but can quickly determine whether the data table in the selected database is a quotation table required by the audit personnel in the financial field can be solved.
S102, responding to the selection operation of the target field name in the at least one field name, and displaying at least one operation symbol and at least one initial service index which are obtained in advance;
in the embodiment of the application, after the name of the target field is selected, the terminal generates an SQL sentence which can be identified by the server and the data computing system and corresponds to the target field for each selected target field through a preset template.
Referring to fig. 5, which schematically shows a first SQL statement display interface according to another embodiment of the present application, compared to the interfaces for displaying reference data tables shown in fig. 3 and 3, a display area 103 is added for displaying SQL statements. As 3 fields are selected, 3 sql sentences are correspondingly displayed, wherein the displayed sql sentences are related to the sequence of the fields selected by the user and are unrelated to the sequence of the fields in the data table.
Meanwhile, after the target field is selected, the user may set an index name for the selected target field, for example, the user may set an index name "attendance" for the target field with the field name "meiriqiandanao", and the use of setting the index name may include prompting a data type included in the target field of the user, where the data type includes an integer type, a floating point type, a character type, and the like, and may classify data according to the length and precision of the data, such as DEC, VARCHAR, and the like.
The data computing system may include: kylin system, hongmeng system, etc. The terminal calls the server through SQL statements; the server synchronizes the information of the target reference data table selected by the user into the server and is linked to the data computing system through a general interface of the data computing system; and the data computing system synchronizes the information of the target reference data table into the data computing system, reads the SQL statement, calls specific data in the name of the selected target field in the data table, and processes the data to be processed to obtain a data result of the initial service index.
In the embodiment of the present application, at least one operation symbol and at least one initial service indicator obtained in advance are shown, where the operation symbol is pre-stored in the application system, such as addition, subtraction, multiplication, division, square, evolution, and the like.
The operation rule corresponding to the operation symbol may include a fixed operation mode, or may include an operation rule set by the user, and when the fixed operation rule conflicts with the operation rule set by the user, the operation rule set by the user is preferentially used to calculate the formula. The first initial service index may include data to be processed corresponding to an index name; processed data corresponding to the index name can also be included; the data processing method can also comprise the data processing result of a plurality of data sets corresponding to the index names in a preset mode.
By selecting the target field and then automatically generating the SQL sentence through the preset template, the efficiency of manually writing the SQL sentence and the accuracy of writing the sentence in the prior art can be improved, and the convenience of use of a user can be improved.
S103, responding to the selection operation of the operation symbol and the initial service index, and displaying a calculation model for calculating a target service index;
in the embodiment of the application, the calculation model is a combination result obtained by selecting the operation symbol and the initial service index on a visual interface by a user. The combination can comprise that a user selects a calculation formula pre-stored by the system to directly obtain a required calculation model; the method also can comprise that the user arranges and combines the operation symbols and the initial service indexes to obtain a self-defined calculation model.
The user can name and store the customized calculation model. After a user inputs a calculation model at a terminal, the terminal automatically generates a calculation statement which can be read by the server and the data calculation system according to the calculation model in a preset mode.
The target service index in the embodiment of the application may include a data result obtained by a plurality of initial service indexes through a calculation model, and a data result obtained by a single initial service index through the calculation model. Wherein the user can set index names for the obtained data results.
The calculation template is set by selecting the operation symbol and the initial business index by the user, the individual calculation requirement of the user can be met, meanwhile, the terminal automatically generates the calculation statement which can be read by the server and the data calculation system according to the input calculation template in a preset mode, the calculation efficiency of the target business index and the calculation convenience of the target business index can be improved, and the problems that the target business index cannot be calculated, the calculation efficiency is low, the calculation result is wrong and the like due to errors or careless mistakes of manually writing the statement in the prior art can be avoided.
Fig. 6 is a schematic diagram of an interface for displaying a calculation model according to an embodiment of the present application, and as shown in fig. 6, the interface has three display areas, where a display area 601 is used for displaying initial service indicators that can be selected by a user, the initial service indicators shown in the drawing include initial service indicators a to D, a display area 602 is used for displaying a preset operation symbol, and a display area 603 is used for displaying a calculation model formed by combining the initial service indicators and the operation symbols, and at this time, no field is displayed in the display area 603 because the user has not selected the initial service indicators and the operation symbols.
On the basis of the embodiment shown in fig. 6, please refer to fig. 7, the user selects the initial service indicator (e.g., initial service indicator a) and the operation symbol (e.g., plus sign) in fig. 6, and the combined calculation model is shown in the display area 603. The selection operation in the embodiment of the present application may specifically be dragging the initial service index and the operation symbol to the display area 603.
As shown in fig. 7, when the optional fields and the reference data table are displayed, the embodiment of the present application may not display specific data to be processed. The number of the user-selected target reference data tables may be one or more.
And S104, responding to the execution operation of the calculation model, and displaying the calculation result of the target business index determined based on the data in the target field in the target reference data table.
The displaying of the calculation result in the embodiment of the application may include that the system displays the calculation result in a result column after the user executes the calculation model; the method also can comprise that a user inquires a target service index, and a terminal displays a data result of the target service index; or initial service indexes used when a user inquires and calculates the target service indexes can be included, and the terminal displays the calculation result of all target service indexes including the initial service indexes in the calculation model or the calculation result; the method also can comprise the steps that a target field corresponding to the initial service index is used when a user inquires and calculates the target service index, and the terminal displays the calculation results of all target service indexes, including the initial service index corresponding to the target field, in the calculation model or the calculation result;
the calculation of the target service index in the embodiment of the application may include that after the data calculation system completes processing of data to be processed in the initial service index, the data result of the processed initial service index is calculated according to the received calculation statement, and after the calculation result of the target service index is obtained, the calculation result is stored in the data calculation system or sent to the server to wait for the application system to call;
the data calculation system can also store the data result in the data calculation system or send the calculation result to the server after completing the processing of the data to be processed in the initial service index, the server retrieves the data result after receiving the calculation statement sent by the terminal, calculates the data result of the processed initial service index according to the calculation statement according to the received calculation statement to obtain the calculation result of the target service index, and stores the calculation result in the server for awaiting the retrieval of the application system.
The calculation results inquired in multiple modes can improve the convenience of the user in use, and meanwhile, the situation that the calculation results cannot be inquired due to wrongly written characters and the like when the target service indexes are named can be avoided.
As an optional implementation manner, in response to the selection operation of the target field name in the at least one field name, the method further includes:
s201, generating an SQL (structured query language) statement corresponding to each selected target field, wherein the SQL statement is a statement which can be recognized by a preset index computing system and is used for retrieving data containing the target fields in the target reference data table from a preset database;
in this embodiment, the corresponding SQL statement generated according to the target field is the first SQL statement. The first SQL statement is generated through a preset template according to the target field selected by the user and used for retrieving data in the target field of the target reference data table in a preset database.
The preset template can be set according to the needs of a user, for example, the user only takes partial data under the target field, and can set the data calling range of the preset template, so that the user can search and call the partial data in the preset database according to the needs of the user after checking the target field to generate a first SQL statement; if the user does not set the preset template individually, the default state of the preset template is to take all the specific data to be processed corresponding to the target field, that is, after the user selects the target field again to generate the first SQL statement, all the data to be processed corresponding to the target field is retrieved and called in the preset database.
The first SQL statement is generated through the preset template, so that the time cost for manually writing the first SQL statement and the error rate of the first SQL statement can be reduced, data required by a user can be called more quickly and accurately, and the user can use the first SQL statement more smoothly and simply.
S202, sending the SQL statement to a preset index computing system, wherein the index computing system is used for operating the SQL statement and obtaining an operation result of the SQL statement, and the operation result is data corresponding to the initial service index.
In this embodiment, after the first SQL statement is generated, the terminal sends the first SQL statement to the server and the index computing system, and the index computing system runs the first SQL statement, finds out data to be processed that needs to be computed through the first SQL statement, and processes the data to obtain data corresponding to the initial service index.
After the index calculation system obtains the data corresponding to the initial service index, the initial service index may be stored in the index calculation system for later calling; or may include being sent by the metrics computing system to a server, stored in the server, and awaiting invocation.
The initial business index is obtained by operating the first SQL statement through the index calculation system, the calculation rate can be improved when the target business index is calculated in the subsequent process, and the user can be ensured to obtain the calculation result of the target business index in time.
On the basis of the foregoing embodiments, as an optional embodiment, the presenting a calculation result of the target business index in response to an execution operation on the calculation model includes:
s301, responding to the execution operation of the calculation model, sending the initial service index in the calculation model to an index calculation system, and indicating the index calculation system to obtain the calculation result of the initial service index according to the execution result;
in the embodiment of the application, when the terminal receives the execution operation of the calculation model, the terminal sends the initial business index used in the calculation model to the index calculation system, that is, the first SQL statement corresponding to the initial business index in the calculation model is sent to the index calculation system, and the index calculation system finds the data result of the data to be calculated corresponding to the target field, that is, the data corresponding to the initial business index, through the first SQL statement.
The index calculation system obtains a calculation result of the initial business index according to the data result, namely the initial business index, namely the index calculation system executes a second SQL statement corresponding to the initial business index, wherein the second SQL statement is used for obtaining the calculation result of the initial business index and storing the obtained calculation result to the index calculation system. For example, the terminal sends a first SQL statement to the index calculation system, the index calculation system finds an initial service index "attendance rate" corresponding to a target field "meirikaoqin" corresponding to the first SQL statement, and the index calculation system obtains a calculation result, namely "numerical value X", corresponding to the initial service index "attendance rate" according to a second SQL statement.
S302, obtaining a calculation result of the initial business index returned by the index calculation system, and obtaining a target business index output by the calculation model by taking the calculation result of the initial business index as the input of the calculation model;
and S303, displaying the target service index.
In the embodiment of the present application, the target service index output by the calculation model is obtained by using the calculation result of the initial service index as the input of the calculation model according to the calculation result of the initial service index obtained by the second SQL statement, for example, the calculation model "a + B" may include the calculation result of two different initial service indexes A, B, or may include the calculation result of two same initial service indexes, assigning A, B is to use the calculation result of the initial service index as the input of the calculation model, and the obtained calculation result of the calculation model "a + B" is assumed to be C, because the assignment of C = a + B, and the assignment of C is the target service index output by the calculation model.
In the embodiment of the application, after the server obtains the target service index, the target service index is sent to the terminal, and the service index is displayed at the terminal.
As shown in fig. 8, the terminal sends a first SQL statement to the server;
after receiving the first SQL statement, the server searches for an initial service index containing the first SQL statement, and sends the first SQL statement to an index computing system;
after receiving the first SQL statement, the index calculation system finds an initial business index corresponding to the first SQL statement, runs the second SQL statement to obtain a calculation result of the initial business index, and returns the calculation result of the initial business index to the server; the computing system obtains a computing result of the initial business index according to a data result, namely the initial business index, namely the index computing system executes a second SQL statement corresponding to the initial business index, wherein the second SQL statement is used for obtaining the computing result of the initial business index and storing the obtained computing result to the index computing system.
The terminal obtains a calculation model input by a user, and the calculation model terminal generates a third SQL statement according to the calculation model and sends the third SQL statement to the server;
the server assigns values to the initial business indexes corresponding to the first SQL sentences searched by the server according to the calculation results of the initial business indexes, executes third SQL sentences generated according to the calculation model, assigns the output results to the target business indexes, and sends the target business indexes back to the terminal;
and the terminal displays the target service index.
According to the method and the device, after the initial service index data to be processed is processed by the index computing system, the computing result of the initial service index data to be processed is obtained by the server, and the computing model is computed.
On the basis of the foregoing embodiments, as an optional embodiment, in response to an execution operation on a calculation model, presenting a target business index result includes:
s401, responding to the execution operation of the calculation model, sending the calculation model to an index calculation system, instructing the index calculation system to obtain a calculation result of an initial service index according to the execution result, and obtaining a target service index output by the calculation model according to the calculation result of the initial service index;
in the embodiment of the application, in response to the execution operation on the calculation model, the calculation model is sent to the index calculation system, and the index calculation system is instructed to obtain the calculation result of the initial service index according to the execution result. And the indication mode comprises the step of generating a third SQL statement according to the calculation model, wherein the third SQL statement can be read by the server and the index calculation system. After a user inputs a calculation model at a terminal, the terminal generates a third SQL statement according to the calculation model and sends the statement to a server, the server calls a calculation result from an index calculation system to the server through a second SQL statement according to an initial business index related to the statement, and the server inputs the calculation result into the third SQL statement to obtain a calculation result of a target business index and sends the calculation result back to the terminal.
Meanwhile, as shown in fig. 9, another way of executing the third SQL statement in the embodiment of the present application may include:
after receiving the first SQL statement, the server searches for an initial service index containing the first SQL statement, and sends the first SQL statement to an index computing system;
after receiving the first SQL statement, the index calculation system finds an initial business index corresponding to the first SQL statement, runs the second SQL statement to obtain a calculation result of the initial business index, and returns the calculation result of the initial business index to the server; the computing system obtains a computing result of the initial business index according to a data result, namely the initial business index, namely the index computing system executes a second SQL statement corresponding to the initial business index, wherein the second SQL statement is used for obtaining the computing result of the initial business index and storing the obtained computing result to the index computing system.
After the terminal generates a third SQL statement according to the calculation model, the server sends the third SQL statement to the index calculation system, the index calculation system calculates the result of the target business index by applying the third SQL statement, and when the result query operation is obtained, the calculation result of the target business index is obtained from the index statement to the index calculation system.
S402, obtaining and displaying a calculation result of the target service index returned by the index calculation system.
The instruction returning in the embodiment of the application may include that the server sends a preset SQL statement for indexing the calculation result, and the data calculation system sends the calculation result to the server according to the SQL statement for indexing after completing the calculation. The index may include an initial service index sent by the server for searching for a corresponding target field, a calculation result sent by the server for searching for a corresponding initial service index, a target service index sent by the index calculation system for searching for a corresponding calculation result, and the like.
The target business index output by the calculation model is obtained according to the calculation result of the initial business index, so that the calling steps can be reduced, the data calculation system can calculate the calculation result of the target business index more quickly, and the convenience and the accuracy of the index calculation method are improved.
On the basis of the above embodiments, as an optional embodiment, the method includes:
the SQL statement is also used for indicating the index computing system to establish index information of the operation result of the SQL statement.
In the embodiment of the application, the index information is a preset first SQL statement, and the terminal or the server obtains a data result calculated by the index calculation system through the preset first SQL statement. That is, the purpose of the first SQL statement may include the aforementioned instructing the data computing system to search for the target field, and may also include the server invoking a plurality of computation results to the data computing system, or the terminal invoking a plurality of computation results to the server.
Index information is constructed on the operation result through the SQL sentence, so that the terminal can more conveniently call the calculation result after the terminal obtains the result checking operation of the user, and the convenience and the accuracy of the terminal are improved.
An embodiment of the present application provides an index calculation apparatus, as shown in fig. 10, the index calculation apparatus may include: a field presentation module 601, an indicator creation module 602, and a model generation module 603, and a result invocation module 604, wherein,
the field display module 601: displaying the table name of at least one reference data table, responding to the selection operation of the target reference data table name in the at least one table name, and displaying the field name of at least one field in the target reference data table corresponding to the target reference data table name;
the metric creation module 602: responding to the selected operation of the target field name in the at least one field name, and displaying at least one operation symbol and at least one initial service index which are obtained in advance;
the model generation module 603: responding to the selected operation of the operation symbol and the initial service index, and displaying a calculation model for calculating the target service index;
the result invocation module 604: and in response to the execution operation on the calculation model, showing a calculation result of the target business index determined based on the data in the target field in the target reference data table.
The apparatus of the embodiment of the present application may execute the method provided by the embodiment of the present application, and the implementation principle is similar, the actions executed by the modules in the apparatus of the embodiments of the present application correspond to the steps in the method of the embodiments of the present application, and for the detailed functional description of the modules of the apparatus, reference may be specifically made to the description in the corresponding method shown in the foregoing, and details are not repeated here.
The embodiment of the application provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to realize the steps of the index calculation method, and compared with the related art, the method can realize the following steps: the technical effect that the user creates the indexes in batches at the terminal is achieved in a visual mode, the data calculation system is separated from the terminal, calculation efficiency is improved, and the user can conveniently inquire calculation results in time; the method and the system can enable business personnel to participate in index creation without knowing the database technology, greatly shorten the time for creating the index, enable a user to construct a calculation model in a visualization mode to improve the data calculation efficiency, and can meet the beneficial effect that the user can check the calculation result in time.
In an alternative embodiment, an electronic device is provided, as shown in fig. 11, the electronic device 4000 shown in fig. 11 comprising: a processor 4001 and a memory 4003. Processor 4001 is coupled to memory 4003, such as via bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, and the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data. In addition, the transceiver 4004 is not limited to one in practical applications, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The Processor 4001 may be a CPU (Central Processing Unit), a general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 4001 may also be a combination that performs a computational function, including, for example, a combination of one or more microprocessors, a combination of a DSP and a microprocessor, or the like.
Bus 4002 may include a path that carries information between the aforementioned components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 4002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 11, but this is not intended to represent only one bus or type of bus.
The Memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer, without limitation.
The memory 4003 is used for storing computer programs for executing the embodiments of the present application, and is controlled by the processor 4001 to execute. The processor 4001 is configured to execute a computer program stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and when being executed by a processor, the computer program may implement the steps and corresponding contents of the foregoing method embodiments.
Embodiments of the present application further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.
The terms "first," "second," "third," "fourth," "1," "2," and the like in the description and in the claims of the present application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than described or illustrated herein.
It should be understood that, although each operation step is indicated by an arrow in the flowchart of the embodiment of the present application, the implementation order of the steps is not limited to the order indicated by the arrow. In some implementation scenarios of the embodiments of the present application, the implementation steps in the flowcharts may be performed in other sequences as desired, unless explicitly stated otherwise herein. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on an actual implementation scenario. Some or all of these sub-steps or stages may be performed at the same time, or each of these sub-steps or stages may be performed at different times, respectively. In a scenario where execution times are different, an execution sequence of the sub-steps or the phases may be flexibly configured according to requirements, which is not limited in the embodiment of the present application.
The foregoing is only an optional implementation manner of a part of implementation scenarios in this application, and it should be noted that, for those skilled in the art, other similar implementation means based on the technical idea of this application are also within the protection scope of the embodiments of this application without departing from the technical idea of this application.

Claims (10)

1. An index calculation method is applied to a terminal, and comprises the following steps:
displaying a table name of at least one reference data table, and responding to a selection operation of a target reference data table name in the at least one table name, and displaying a field name of at least one field in the target reference data table corresponding to the target reference data table name;
responding to the selected operation of the target field name in at least one field name, and displaying at least one operation symbol and at least one initial service index which are obtained in advance;
responding to the selected operation of the operation symbol and the initial service index, and displaying a calculation model for calculating a target service index;
in response to an execution operation on the calculation model, presenting a calculation result of the target business indicator determined based on data in the target field in the target reference data table.
2. The index calculation method of claim 1, in response to a selected operation on a target field name of the at least one field name, thereafter further comprising:
for each selected target field, generating an SQL statement corresponding to the target field, wherein the SQL statement is a statement recognizable by a preset index computing system and is used for retrieving data containing the target field of the target reference data table from a preset database;
and sending the SQL statement to a preset index computing system, wherein the index computing system is used for executing the SQL statement and obtaining an execution result of the SQL statement, and the execution result is corresponding data of the initial business index.
3. The method of claim 1, wherein the presenting the calculated result of the target business metric determined based on the data in the target field of the target reference data table in response to performing the operation on the calculation model comprises:
responding to the execution operation of the calculation model, sending the initial business index in the calculation model to the index calculation system, and indicating the index calculation system to obtain a calculation result of the initial business index according to the execution result;
obtaining a calculation result of the initial business index returned by the index calculation system, and obtaining a calculation result of the target business index output by the calculation model by taking the calculation result of the initial business index as an input value of the calculation model;
and displaying the calculation result of the target service index.
4. The method of claim 1, wherein presenting a target business metric result in response to performing the operation on the computational model comprises:
responding to the execution operation of the calculation model, sending the calculation model to the index calculation system, instructing the index calculation system to obtain the calculation result of the initial business index according to the execution result, and obtaining the target business index output by the calculation model according to the calculation result of the initial business index;
and obtaining and displaying the target service index calculation result returned by the index calculation system.
5. The index calculation method according to any one of claims 2 to 4, characterized by comprising:
the SQL statement is also used for indicating the index computing system to establish index information of the operation result of the SQL statement.
6. An index calculation method according to claim 1, wherein said responding to a selected operation on a table name of a target reference data table among the at least one reference data table comprises:
displaying a preset window;
and in response to dragging the table name of the target reference data table to the preset window, displaying the field name of at least one field in the target reference data table in the preset window.
7. An index calculation apparatus, comprising:
the field display module is used for displaying the table name of at least one reference data table, responding to the selection operation of the target reference data table name in the at least one table name and displaying the field name of at least one field in the target reference data table corresponding to the target reference data table name;
the index creating module is used for responding to the selection operation of a target field name in at least one field name and displaying at least one operation symbol and at least one initial service index which are obtained in advance;
the model generation module is used for responding to the selected operation of the operation symbol and the initial service index and displaying a calculation model for calculating a target service index;
and the result calling module is used for responding to the execution operation of the calculation model and displaying the calculation result of the target service index determined based on the data in the target field in the target reference data table.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of the index calculation method of any one of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the index calculation method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the index calculation method of any one of claims 1 to 6 when executed by a processor.
CN202211328161.4A 2022-10-27 2022-10-27 Index calculation method and device, electronic equipment and storage medium Pending CN115563149A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211328161.4A CN115563149A (en) 2022-10-27 2022-10-27 Index calculation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211328161.4A CN115563149A (en) 2022-10-27 2022-10-27 Index calculation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115563149A true CN115563149A (en) 2023-01-03

Family

ID=84768018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211328161.4A Pending CN115563149A (en) 2022-10-27 2022-10-27 Index calculation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115563149A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093000A (en) * 2013-02-25 2013-05-08 用友软件股份有限公司 Database query modeling system and database query modeling method
CN109992589A (en) * 2019-04-11 2019-07-09 北京启迪区块链科技发展有限公司 Method, apparatus, server and the medium of SQL statement are generated based on visual page
CN109992262A (en) * 2019-03-27 2019-07-09 杭州城市大数据运营有限公司 A kind of structured query language (SQL) graphical operation method
CN114969109A (en) * 2022-05-31 2022-08-30 东风畅行科技股份有限公司 Progressive interactive data query system, method and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093000A (en) * 2013-02-25 2013-05-08 用友软件股份有限公司 Database query modeling system and database query modeling method
CN109992262A (en) * 2019-03-27 2019-07-09 杭州城市大数据运营有限公司 A kind of structured query language (SQL) graphical operation method
CN109992589A (en) * 2019-04-11 2019-07-09 北京启迪区块链科技发展有限公司 Method, apparatus, server and the medium of SQL statement are generated based on visual page
CN114969109A (en) * 2022-05-31 2022-08-30 东风畅行科技股份有限公司 Progressive interactive data query system, method and medium

Similar Documents

Publication Publication Date Title
CN111177231A (en) Report generation method and report generation device
CN110750654A (en) Knowledge graph acquisition method, device, equipment and medium
CN111125555B (en) Enterprise information acquisition method and device
CN107783786B (en) Method and device for creating equipment resources
CN114282129A (en) Information system page generation method, system, electronic equipment and storage medium
CN114756470A (en) Test file generation method and device, storage medium and computer equipment
CN114358742A (en) Workflow execution method, device, equipment and storage medium
CN111596897B (en) Code multiplexing processing method and device and electronic equipment
CN112783582A (en) Report generation method and device, electronic equipment and storage medium
CN111488368A (en) Data query method and device and electronic equipment
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
CN116009847A (en) Code generation method, device, electronic equipment and storage medium
CN115563149A (en) Index calculation method and device, electronic equipment and storage medium
CN115309730A (en) Data auditing method and device, electronic equipment and storage medium
CN115269431A (en) Interface testing method and device, electronic equipment and storage medium
CN109857501B (en) APP page display method and device, storage medium and server
CN109697141B (en) Method and device for visual testing
CN112165549A (en) Short message processing method, device, equipment and medium applied to intelligent terminal
CN110866492A (en) Baseline branch identification method and device and computer system
CN111176718A (en) Script online method and device, storage medium and electronic equipment
CN116185412B (en) Data management method and device, electronic equipment and storage medium
CN118133794B (en) Table configuration method, apparatus, device and storage medium
CN110109941B (en) Data query method, device, computer device and storage medium
US11042564B1 (en) Transaction associations in waveform displays
CN114119806A (en) Nested flow chart generation method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20230103