Index generation method and device
By receiving user selection operations and generating execution statements, the problem of high technical threshold for writing SQL scripts is solved, and the flexibility and convenience of ordinary business personnel to obtain data indicators is achieved.
Patent Information
- Application Number
- CN202310700815.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-13
- Publication Date
- 2024-12-13
AI Technical Summary
In the existing technology, generating data indicators requires professional data developers to write SQL scripts, and there is a high technical threshold that ordinary business personnel find difficult to master.
Provide an indicator generation method and device. By receiving user selection operations, determine the selection keyword, data source table and target table, generate execution statements based on keyword mapping relationships, and execute tasks, store the results in the target table, which reduces the Technical threshold for generating data indicators.
Users can flexibly obtain various data indicators, which lowers the technical threshold for generating data indicators and facilitates ordinary business personnel to obtain data indicators that meet business needs.
Smart Images

Figure CN119127905A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical health and big data technology, and in particular to an indicator generation method and device. Background Art
[0002] With the continuous development of various information systems, each information system has accumulated a large amount of data. For example, in the Internet medical scenario, a large amount of consultation data, patient questionnaire data, and drug data have been accumulated. At present, various data indicators can be generated based on the business data in each system, and data can be analyzed to generate value. Usually, professional data developers are required to write various SQL (Structured Query Language) scripts to generate various data indicators. However, there is a high technical threshold for writing SQL scripts, which is difficult for ordinary business personnel to master. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides an indicator generation method and device, which can lower the technical threshold for generating data indicators and flexibly obtain various types of data indicators.
[0004] In a first aspect, an embodiment of the present invention provides an indicator generation method, comprising:
[0005] Receive a selection operation of a user for a target indicator, and determine a selection keyword, a data source table, and a target table corresponding to the selection operation;
[0006] Determine the execution keyword corresponding to the selection keyword according to the keyword mapping relationship;
[0007] Generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table;
[0008] According to the execution statement, an execution task corresponding to the target indicator is generated and executed, and the execution result of the execution task is stored in the target table.
[0009] Optionally, generating and executing the execution task corresponding to the target indicator according to the execution statement includes:
[0010] Receiving a configuration operation of the user for the target indicator;
[0011] Determine the execution engine and execution parameters corresponding to the configuration operation;
[0012] Generate an execution task corresponding to the target indicator according to the execution statement and the execution parameters;
[0013] The execution engine is called to execute the execution task.
[0014] Optionally, generating an execution statement corresponding to the target indicator according to the execution keyword and the data source table includes:
[0015] Determine the target field selected by the user from the target table;
[0016] An execution statement corresponding to the target indicator is generated according to the execution keyword, the target field and the data source table.
[0017] Optionally, generating an execution statement corresponding to the target indicator according to the execution keyword and the data source table includes:
[0018] Determine the conditional field selected by the user from the target table;
[0019] Determine a matching range input by a user for the condition field;
[0020] Generate a matching condition according to the condition field and the matching range;
[0021] An execution statement corresponding to the target indicator is generated according to the execution keyword, the data source table and the matching condition.
[0022] Optionally, before receiving the user's selection operation on the target indicator, the method further includes:
[0023] Determine the execution method information corresponding to the target indicator;
[0024] In response to the execution mode information being an execution statement mode, the step of receiving a user's selection operation for a target indicator is executed.
[0025] Optionally, after determining the execution mode information corresponding to the target indicator, the method further includes:
[0026] In response to the execution mode information being an execution package mode, receiving an upload operation of the user for the target indicator, and storing the execution package corresponding to the upload operation in the target storage;
[0027] Determine a storage path of the execution package on the target storage, and generate a path mapping relationship between the target indicator and the storage path;
[0028] According to the path mapping relationship, an execution task corresponding to the target indicator is generated and executed. The execution task calls the execution package through the path mapping relationship to complete the generation process of the target indicator.
[0029] Optionally, after generating and executing the execution task corresponding to the target indicator according to the execution statement, the method further includes:
[0030] Receiving a control instruction issued by a user for executing the task;
[0031] According to the control instruction, the execution process of the execution task is controlled.
[0032] In a second aspect, an embodiment of the present invention provides an indicator generation device, including:
[0033] An operation receiving module, used to receive a user's selection operation for a target indicator, and determine a selection keyword, a data source table, and a target table corresponding to the selection operation;
[0034] A keyword determination module, used to determine the execution keyword corresponding to the selection keyword according to the keyword mapping relationship;
[0035] A statement generation module, used to generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table;
[0036] The task execution module is used to generate and execute the execution task corresponding to the target indicator according to the execution statement, and store the execution result of the execution task in the target table.
[0037] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0038] one or more processors;
[0039] a storage device for storing one or more programs,
[0040] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
[0041] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.
[0042] An embodiment of the above invention has the following advantages or beneficial effects: the user performs a selection operation on the target indicator, and selects the selection keyword, data source table and target table corresponding to the target indicator. Among them, the selection keyword is a keyword that is easy for the user to understand and is used to process the data, and may include: counting, summing, etc. The data source table is a source table for obtaining processed data. The target table is a data table for storing target indicators. The system can automatically convert the selection keyword, data source table, etc. into an execution statement corresponding to the target indicator, and the execution statement is used to generate the target indicator. Then generate and execute the execution task corresponding to the execution statement, and store the execution result in the target table. Compared with directly writing SQL scripts, it can lower the technical threshold for generating data indicators and flexibly obtain various types of data indicators.
[0043] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0045] Figure 1 is a schematic diagram of a process of an indicator generation method provided by an embodiment of the present invention;
[0046] Figure 2 is a schematic diagram of a process of an indicator generation method provided by another embodiment of the present invention;
[0047] Figure 3 is a schematic diagram of a process of an indicator generation method provided by another embodiment of the present invention;
[0048] Figure 4 is a structural schematic diagram of an indicator generating device provided by an embodiment of the present invention;
[0049] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0051] It should be noted that in the technical solution of the present invention, the collection / collection, updating, analysis, use, transmission, storage and other aspects of the user personal information involved (such as medical consultation information, drug purchase information, patient questionnaire data, etc.) are in compliance with the provisions of relevant laws and regulations, and are used for legal and reasonable purposes. They are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken for user personal information to selectively block the use or access to personal information data to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. In addition, once these user personal information data are no longer needed, the risks should be minimized by limiting or even prohibiting data collection and / or deleting data.
[0052] Figure 1 FIG. 1 is a schematic diagram of a process of an indicator generation method provided by an embodiment of the present invention. Figure 1 As shown, the method includes:
[0053] Step 101: receiving a selection operation of a user for a target indicator, and determining a selection keyword, a data source table, and a target table corresponding to the selection operation.
[0054] The system can provide an indicator editing page, where users can enter the attribute information of the indicator. The attribute information may include: indicator name, indicator description, enumeration value of result mapping, indicator category, etc. Indicator categories may include: natural attributes, social attributes, artificial attributes, etc. Indicator categories can facilitate the subsequent association processing of indicators. The enumeration value of result mapping includes the mapping relationship of data types, such as mapping long integers to graphic consultation types or telephone consultation types.
[0055] The system can also provide a target table editing page, where users can enter the table information of the target table. The table information may include: table name, table description, field name, field description, field type, etc. The system can generate a table creation statement for the target table based on the table information of the target table entered by the user, and use the table creation statement to create the target table in the data warehouse.
[0056] Users can select keywords, data source tables, and target tables by dragging, clicking, and inputting. The selected keywords are keywords that are easy for users to understand and select, and are used to process data, such as query, count, and sum. The data source table is the source table for obtaining processed data. The target table is the data table for storing target indicators. The target table can be uniformly stored in the ORC (Optimized Record Columnar) format to make data reading faster.
[0057] Step 102: Determine the execution keyword corresponding to the selection keyword according to the keyword mapping relationship.
[0058] The execution keyword is a keyword that the database engine can recognize. The execution keyword can be a keyword in the SQL syntax. Create a keyword mapping relationship based on the correspondence between the selection keyword and the execution keyword. For example, if the selection keyword is count, the execution keyword is count. If the selection keyword is sum, the execution keyword is sum, etc.
[0059] In addition to maintaining the keyword mapping relationship in the system, it is also necessary to maintain the inverted index of the indicator and the data table storing the indicator. Through the inverted index, the target table corresponding to the target indicator can be quickly determined.
[0060] Step 103: Generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table.
[0061] The statement template of the execution statement is preset in the system. The replacement identifier in the statement template replaces the execution keyword and data source table and other replacement contents to generate the execution statement corresponding to the target indicator. The statement template can be in the form of: select{dimension field set}{execution keyword}({target field})from{data source table}{matching condition}{grouping condition}.
[0062] Among them, {dimension field set}, {execution keyword}, {target field}, {data source table}, {matching condition}, and {grouping condition} are replacement identifiers. Replacement identifiers such as {dimension field set}, {matching condition}, and {grouping condition} can be empty. The target field is the processing field corresponding to the selection keyword. If the user does not select a target field, the {target field} in the statement template is replaced with "*".
[0063] For example, the user has not selected a target field, the selection keyword corresponding to the selection operation is: count, and the data source table is: Table 1. The execution keyword corresponding to count is: count. The replacement identifiers such as {dimension field set}, {matching condition}, and {grouping condition} are all empty, and the {target field} in the statement template is replaced with "*", then the generated execution statement is: select count(*)from Table 1.
[0064] For another example, the user selects the target field, the selection keyword corresponding to the selection operation is: sum, the data source table is: table 1, and the target field is: score. The execution keyword corresponding to sum is: sum. If the replacement tags such as {dimension field set}, {matching condition}, and {grouping condition} are all empty, the generated execution statement is: select sum(score)from table 1.
[0065] In one embodiment of the present invention, an execution statement can be generated in the following manner: determine the condition field selected by the user from the target table; determine the matching range input by the user for the condition field; generate matching conditions based on the condition field and the matching range; generate an execution statement corresponding to the target indicator based on the execution keyword, the data source table and the matching conditions.
[0066] The matching condition corresponds to the following two templates: the first template is: where {condition field} = {matching range}. The second template is: where {condition field} between {value 1} and {value 2}. The first template or the second template is selected based on whether the matching range input by the user is a single value or a value range.
[0067] For example, the selection keyword corresponding to the selection operation is: sum, the data source table is: table 1, the target field is: score, the condition field is: age, and the matching range is: 20. Then the first template is selected to generate the matching condition, and the generated matching condition is: where age = 20, and the generated execution statement is: select sum (score) from table 1 where age = 20.
[0068] The function of the dimension field is to divide a data set into several small areas by using different values of the dimension field, and then process the data in several small areas. The user can select at least one dimension field, generate a dimension field set and grouping conditions based on the dimension field, and then generate an execution statement based on the dimension field set and grouping conditions.
[0069] The template of the dimension field set is: dimension field 1, dimension field 2, dimension field 3, ... That is, the dimension fields are connected together through "," to generate a dimension field set.
[0070] The template for the grouping condition is: group by dimension field 1, dimension field 2, dimension field 3...
[0071] For example, the selection keyword corresponding to the selection operation is: count, the data source table is: Table 1, and the dimension fields are: gender, age. The execution keyword corresponding to count is: count. Then {target field} in the statement template is replaced with "*"; the generated dimension field set is: gender, age,; the grouping condition is: group by gender, age, and the generated execution statement is: select gender, age, count(*) from table 1 group by gender, age. Among them, gender represents gender, age represents age, and the above execution statement is used to group the data in Table 1 according to gender and age, and count the amount of data in each group.
[0072] Step 104: Generate and execute an execution task corresponding to the target indicator according to the execution statement, and store the execution result of the execution task in the target table.
[0073] The execution task is used to call the execution statement to complete the statistical processing of the target indicator and store the statistical results corresponding to the target indicator in the target table.
[0074] It should be noted that before storing the execution result of the execution task in the target table, it is determined whether the target table exists. If it does not exist, the table creation statement corresponding to the target table is obtained, and the target table is created in the data warehouse using the table creation statement.
[0075] In an embodiment of the present invention, the user performs a selection operation on the target indicator and selects the selection keyword, data source table and target table corresponding to the target indicator. The system can automatically convert the selection keyword, data source table and target table into an execution statement corresponding to the target indicator, and the execution statement is used to generate the target indicator. Then, the execution task corresponding to the execution statement is generated and executed, and the execution result is stored in the target table. Compared with directly writing SQL scripts, the technical threshold for generating data indicators can be lowered, making it convenient for ordinary business personnel to flexibly obtain data indicators that meet business needs.
[0076] In one embodiment of the present invention, an execution task corresponding to the target indicator is generated and executed according to an execution statement, including: receiving a user's configuration operation for the target indicator; determining an execution engine and execution parameters corresponding to the configuration operation; generating an execution task corresponding to the target indicator according to the execution statement and the execution parameters; and calling the execution engine to execute the execution task.
[0077] According to specific needs, multiple execution engines can be pre-deployed in the system, and the execution engines may include: MR (MapReduce, map-reduce) engine, spark computing engine, presto query engine, etc. Execution parameters may include: CPU allocation strategy, memory allocation strategy, and optimization parameters, etc. Optimization parameters may include: small file merging strategy, dynamic partitioning parameters, etc.
[0078] Different indicators require different execution parameters. Users can configure the execution engine and execution parameters that meet their needs. If the user does not configure the execution engine and execution parameters, the system will assign the default execution engine and execution parameters to the target indicator.
[0079] Figure 2 FIG. 1 is a schematic diagram of a process of an indicator generation method provided by another embodiment of the present invention. Figure 2 As shown, the method includes:
[0080] Step 201: Determine the execution method information corresponding to the target indicator.
[0081] If the execution mode information is the execution statement mode, step 202 is executed. If the execution mode information is the execution package mode, step 206 is executed.
[0082] Step 202: receiving a selection operation of a user for a target indicator, and determining a selection keyword, a data source table, and a target table corresponding to the selection operation.
[0083] Step 203: Determine the execution keyword corresponding to the selection keyword according to the keyword mapping relationship.
[0084] Step 204: Generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table.
[0085] Step 205: Generate and execute an execution task corresponding to the target indicator according to the execution statement, and store the execution result of the execution task in the target table.
[0086] Step 206: receiving the user's upload operation for the target indicator, and storing the execution package corresponding to the upload operation in the target storage.
[0087] Step 207: Determine the storage path of the execution package on the target storage, and generate a path mapping relationship between the target indicator and the storage path.
[0088] Step 208: Generate and execute the execution task corresponding to the target indicator according to the path mapping relationship. The execution task calls the execution package through the path mapping relationship to complete the generation process of the target indicator.
[0089] If the processing of the target indicator is more complicated, such as running a machine learning algorithm, a simple SQL statement cannot generate the target indicator. Users can upload the completed execution package, and the background will save the execution package to a specific directory and save the path mapping relationship between the target indicator and the storage path.
[0090] The execution package includes the target indicator generation logic. The execution task calls the execution package through the path mapping relationship to complete the target indicator generation process.
[0091] The solution of the embodiment of the present invention provides two indicator generation methods: execution statement method and execution package method. The execution package method generates execution tasks by uploading execution packages, and can handle more complex processing logic. Through the above two methods, the scope of application of the solution of the embodiment of the present invention is wider.
[0092] Figure 3 FIG. 1 is a schematic diagram of a process of an indicator generation method provided by another embodiment of the present invention. Figure 3 As shown, the method includes:
[0093] Step 301: receiving a selection operation of a user for a target indicator, and determining a selection keyword, a data source table, and a target table corresponding to the selection operation.
[0094] Step 302: Determine the execution keyword corresponding to the selection keyword according to the keyword mapping relationship.
[0095] Step 303: Generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table.
[0096] Step 304: Generate and execute an execution task corresponding to the target indicator according to the execution statement.
[0097] Step 305: receiving a control instruction issued by the user for executing the task; and controlling the execution process of the task according to the control instruction.
[0098] Control instructions are used to control the execution process of the execution task. Control instructions may include: interrupt instructions, resume operation instructions, re-run instructions, failure reason viewing instructions, etc.
[0099] In the embodiment of the present invention, when the task is executed, the task running status can be transmitted back and displayed to the user by callback. The user can monitor the running status of the task and the processing quality of the monitored data. After the task is completed, the task completion status is transmitted back and displayed. If the task fails, the user can trigger a re-run instruction, or trigger a failure reason viewing instruction, etc.
[0100] The embodiment of the present invention also provides an indicator generation system, which can lower the threshold of data indicator processing, speed up the development of data indicators, and shorten the product iteration cycle. The indicator generation system is divided into two parts: a configuration platform and a big data platform.
[0101] The configuration platform is used to configure and maintain the relevant parameters of the indicators and generate the execution SQL statement. The execution SQL statement and related parameters are passed to the big data platform. The configuration platform can provide the following functions:
[0102] Provides an indicator editing page for users to enter indicator attribute information, such as indicator name, target table, result mapping enumeration value, indicator category maintenance, etc.
[0103] Index processing rule entry: Maintain keyword mapping relationships in the database in advance, that is, select the mapping relationship between keywords and execution keywords, and maintain the inverted index of the index and the target table. The inverted index can be maintained through blood relationship maintenance or obtained from hive metadata.
[0104] After maintaining the above metadata, the user selects the target indicator, keyword and data source table on the page. Generate the execution statement corresponding to the indicator based on the user's selection. If the indicator corresponds to a result mapping enumeration value, you can also generate a type conversion condition based on the mapping relationship of the data type in the result mapping enumeration value, and splice the type conversion condition with the execution statement.
[0105] Input of execution parameters: After generating the table creation statement of the target table and the execution statement of the indicator, select different execution engines and execution parameters according to the characteristics of the execution statement or execution package. Then, assemble the table creation statement, execution statement, selected execution engine and execution parameters into json parameters and send them to the big data platform through RPC (Remote Procedure Call Protocol) request.
[0106] The big data platform indicator processing logic annotates the data sent by the platform, generates execution tasks, generates and saves indicators, and transmits the running status of the execution tasks back to the configuration platform. The big data platform can provide the following functions:
[0107] Parsing of indicator parameters: The system has built-in clients for executing hiveSQL, mapreduce, spark, spakSQL, prestoSQL, etc. Parse the json parameters regularly transmitted from the configuration platform, and select different built-in execution clients according to different engines. Convert the json parameters into corresponding execution tasks through the execution client.
[0108] Task scheduling and operation: The execution engine schedules different indicator processing results to be stored in different target tables of the data warehouse. Different indicators are distributed in different data tables, and multiple related indicators can be combined together according to needs.
[0109] The configuration platform can configure merge statements, which are used to merge multiple related indicators into a wide table, and then save the data in the wide table to different databases as needed for use by different business parties.
[0110] Figure 4 FIG. 1 is a schematic diagram of a structure of an indicator generating device provided by an embodiment of the present invention. Figure 4 As shown, the device comprises:
[0111] The operation receiving module 401 is used to receive the user's selection operation for the target indicator, and determine the selection keyword, data source table and target table corresponding to the selection operation;
[0112] A keyword determination module 402, used to determine an execution keyword corresponding to a selected keyword according to a keyword mapping relationship;
[0113] The statement generation module 403 is used to generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table;
[0114] The task execution module 404 is used to generate and execute the execution task corresponding to the target indicator according to the execution statement, and store the execution result of the execution task in the target table.
[0115] Optionally, the task execution module 404 is specifically used for:
[0116] Receive user configuration operations for target indicators;
[0117] Determine the execution engine and execution parameters corresponding to the configuration operation;
[0118] Generate execution tasks corresponding to target indicators based on execution statements and execution parameters;
[0119] Call the execution engine to execute the task.
[0120] Optionally, the statement generation module 403 is specifically used for:
[0121] Determine the target field selected by the user from the target table;
[0122] Generate the execution statement corresponding to the target indicator based on the execution keyword, target field and data source table.
[0123] Optionally, the statement generation module 403 is specifically used for:
[0124] Determine the conditional fields selected by the user from the target table;
[0125] Determine the matching scope of user input for the condition field;
[0126] Generate matching conditions based on condition fields and matching ranges;
[0127] Generate the execution statement corresponding to the target indicator based on the execution keyword, data source table and matching conditions.
[0128] Optionally, it also includes:
[0129] A method determination module 405 is used to determine execution method information corresponding to the target indicator;
[0130] In response to the execution mode information being the execution statement mode, a step of receiving a user's selection operation on a target indicator is executed.
[0131] Optionally, the task execution module 404 is further used to:
[0132] In response to the execution mode information being an execution package mode, receiving an upload operation of a user for a target indicator, and storing an execution package corresponding to the upload operation in a target storage;
[0133] Determine the storage path of the execution package on the target storage, and generate a path mapping relationship between the target indicator and the storage path;
[0134] According to the path mapping relationship, the execution task corresponding to the target indicator is generated and executed. The execution task calls the execution package through the path mapping relationship to complete the generation process of the target indicator.
[0135] Optionally, it also includes:
[0136] The process control module 406 is used to receive control instructions issued by the user for executing tasks;
[0137] According to the control instructions, control the execution process of the execution task.
[0138] An embodiment of the present invention provides an electronic device, including:
[0139] one or more processors;
[0140] a storage device for storing one or more programs,
[0141] When one or more programs are executed by one or more processors, the one or more processors implement the method of any of the above embodiments.
[0142] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0143] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0144] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0145] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0146] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0147] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0148] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be arranged in a processor, for example, they may be described as: an operation receiving module, a keyword determination module, and a task execution module. The names of these modules do not constitute limitations on the modules themselves in certain circumstances, for example, the operation receiving module may also be described as "receiving a user's selection operation for a target indicator, and determining the selection keyword, data source table, and target table corresponding to the selection operation".
[0149] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0150] Receive a selection operation of a user for a target indicator, and determine a selection keyword, a data source table, and a target table corresponding to the selection operation;
[0151] Determine the execution keyword corresponding to the selection keyword according to the keyword mapping relationship;
[0152] Generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table;
[0153] According to the execution statement, an execution task corresponding to the target indicator is generated and executed, and the execution result of the execution task is stored in the target table.
[0154] According to the technical solution of the embodiment of the present invention, the user performs a selection operation on the target indicator and selects the selection keyword, data source table and target table corresponding to the target indicator. Among them, the selection keyword may include: counting, summing, etc. The data source table is the source table for obtaining the processed data. The target table is a data table for storing the target indicator. The system can automatically convert the selection keyword, data source table and target table into an execution statement corresponding to the target indicator, and the execution statement is used to generate the target indicator. Then generate and execute the execution task corresponding to the execution statement, and store the execution result in the target table. Compared with directly writing SQL scripts, it can lower the technical threshold for generating data indicators, making it convenient for ordinary business personnel to flexibly obtain data indicators that meet business needs.
[0155] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for generating indicators, It is characterized in that include: Receive a selection operation of a user for a target indicator, and determine a selection keyword, a data source table, and a target table corresponding to the selection operation; Determine the execution keyword corresponding to the selection keyword according to the keyword mapping relationship; Generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table; According to the execution statement, an execution task corresponding to the target indicator is generated and executed, and the execution result of the execution task is stored in the target table.
2. The method according to claim 1, It is characterized in that The step of generating and executing the execution task corresponding to the target indicator according to the execution statement includes: Receiving a configuration operation of the user for the target indicator; Determine the execution engine and execution parameters corresponding to the configuration operation; Generate an execution task corresponding to the target indicator according to the execution statement and the execution parameters; The execution engine is called to execute the execution task.
3. The method according to claim 1, It is characterized in that The step of generating an execution statement corresponding to the target indicator according to the execution keyword and the data source table includes: Determine the target field selected by the user from the target table; An execution statement corresponding to the target indicator is generated according to the execution keyword, the target field and the data source table.
4. The method according to claim 1, It is characterized in that The step of generating an execution statement corresponding to the target indicator according to the execution keyword and the data source table includes: Determine the conditional field selected by the user from the target table; Determine a matching range input by a user for the condition field; Generate a matching condition according to the condition field and the matching range; An execution statement corresponding to the target indicator is generated according to the execution keyword, the data source table and the matching condition.
5. The method according to claim 1, It is characterized in that Before receiving the user's selection operation for the target indicator, the method further includes: Determine the execution method information corresponding to the target indicator; In response to the execution mode information being an execution statement mode, the step of receiving a user's selection operation for a target indicator is executed.
6. The method according to claim 5, It is characterized in that After determining the execution mode information corresponding to the target indicator, the method further includes: In response to the execution mode information being an execution package mode, receiving an upload operation of the user for the target indicator, and storing the execution package corresponding to the upload operation in the target storage; Determine a storage path of the execution package on the target storage, and generate a path mapping relationship between the target indicator and the storage path; According to the path mapping relationship, an execution task corresponding to the target indicator is generated and executed. The execution task calls the execution package through the path mapping relationship to complete the generation process of the target indicator.
7. The method according to claim 1, It is characterized in that After generating and executing the execution task corresponding to the target indicator according to the execution statement, the method further includes: Receiving a control instruction issued by a user for executing the task; According to the control instruction, the execution process of the execution task is controlled.
8. An indicator generating device, It is characterized in that include: An operation receiving module, used to receive a user's selection operation for a target indicator, and determine a selection keyword, a data source table, and a target table corresponding to the selection operation; A keyword determination module, used to determine the execution keyword corresponding to the selection keyword according to the keyword mapping relationship; A statement generation module, used to generate an execution statement corresponding to the target indicator according to the execution keyword and the data source table; The task execution module is used to generate and execute the execution task corresponding to the target indicator according to the execution statement, and store the execution result of the execution task in the target table.
9. An electronic device, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data table generation method and device, equipment and storage medium
CN113760891A
Derivative index generation method and device and storage medium
CN114879937A
Method and device for creating data table
WO2020211657A1
