Method, device and equipment for realizing index extension through configuration formula template and medium

By configuring formula templates and regular expression matching technology, the problem of difficult to customize and reuse traditional indicator monitoring methods is solved, and flexible expansion and reuse of indicators is achieved, improving the efficiency and depth of data analysis.

CN119917154APending Publication Date: 2025-05-02山东浪潮智慧医疗科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411929226.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Traditional metric monitoring methods are difficult to flexibly implement the monitoring requirements at different stages through configuration, and the original code cannot be effectively reused when facing other projects of the same type, resulting in limited flexibility and depth of data analysis, and difficult code bloated and maintenance.

Method used

Implement indicator expansion by configuring formula templates, including setting the format of formula template reference indicators, defining instructions and creating formula templates, configuring basic information of indicators and associated data sources, and finally configuring indicator calculation formulas. This method uses regular expressions to match reference indicators in the formula template, parses the instructions and attaches them to the reference indicators, obtains data and substitutes them into the formula template to generate expressions, and completes the expansion of the new indicator through expression calculation.

Benefits of technology

It realizes that new complex indicators can be added without changing the code by configuring the formula template, meeting the data display needs in different stages and scenarios, improving the flexibility and efficiency of data analysis, and simplifying the implementation process of indicator calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119917154A_ABST
    Figure CN119917154A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of medical data index monitoring, and particularly relates to a method, a device, equipment and a medium for realizing index expansion by configuring a formula template, and the method comprises the steps: configuring the formula template to complete the description of a new index; the formula template comprises an index identifier and a multi-level instruction; matching a reference index in the formula template through a regular expression; the method comprises the following steps: analyzing an instruction, adding the instruction into a reference index, obtaining corresponding data, substituting the data into a formula template to generate an expression, and calculating the expression to complete the extension of a new index. Complex indexes can be newly added by configuring a formula template, data of different dimensions can be displayed in different stages and different scenes, and configuration is flexible without changing codes.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] With the rapid development of information technology and the in-depth advancement of informatization construction, paperless office has become the norm for modern enterprises and organizations. This transformation has not only greatly improved work efficiency, but also promoted the refinement of data management and analysis. In this process, a large amount of data is efficiently stored in binary form, making data retrieval, processing and analysis more convenient than ever before. Through the large-screen middle and back-end management system, management can intuitively observe the real-time trends and distribution of data in various dimensions, which is crucial for accurate decision-making and efficient operation.

[0003] However, traditional data display methods are often limited to fixed data displays, that is, once the display format and calculation rules of the data are set, it is difficult to flexibly adjust them. Common indicator monitoring is often fixed in a demand cycle and remains unchanged for a long time. Therefore, the realization of many indicator monitoring requirements is to implement the calculation method of the indicators to be monitored mentioned in the requirements through code, and call it from the code level to obtain the final result. This requires long-term follow-up by R&D personnel, and cannot flexibly realize customized monitoring requirements at different stages through configuration. When facing other projects of the same type, the original code cannot be reused well. This not only limits the flexibility and depth of data analysis, but may also lead to bloated code and difficult maintenance.

[0004] What is even more difficult is that when customers put forward customized data analysis requirements, R&D personnel often need to spend a lot of time and energy to modify the code and add new calculation rules. This "patching" development method is not only inefficient, but also difficult to ensure the quality and stability of the code. Summary of the invention

[0005] The traditional indicator monitoring method cannot flexibly realize customized monitoring requirements at different stages through configuration, and cannot reuse the original code well when facing other projects of the same type. The present invention provides a method, device, equipment and medium for realizing indicator expansion by configuring formula templates.

[0006] In a first aspect, the technical solution of the present invention provides a method for implementing indicator expansion by configuring a formula template, comprising: Configure the formula template to complete the description of the new indicator; the formula template contains the indicator identifier and multi-level instructions; The reference indicators in the formula template are matched through regular expressions. The instructions are parsed and attached to the reference indicators, and then the corresponding data is obtained and substituted into the formula template to generate an expression. The new indicator is expanded by calculating the expression.

[0007] As a further limitation of the technical solution of the present invention, the step of configuring the formula template to complete the description of the new indicator includes: Create a formula template by formatting the indicators it references and defining the instructions; Configure the basic information of the indicators in the formula template; Configure the indicator-associated data source; specifically associate the indicator identifier with the corresponding data source; Configure the indicator calculation formula.

[0008] As a further limitation of the technical solution of the present invention, before the step of creating a formula template by setting the format of the formula template reference indicator and defining the instruction, the step includes: Define the name of the data source according to the data type of the data source.

[0009] As a further limitation of the technical solution of the present invention, in the step of creating a formula template by setting the format of the formula template reference indicator and defining the instruction, the format of the formula template reference indicator is as follows: ${n-level instruction. Second-level instruction. First-level instruction. Indicator identifier} The indicator identifier is used to represent a new indicator calculated by the formula template; The n-level instructions represent the calculation operation of the formula, the first-level instructions represent the first-level screening conditions of the data source, and the second-level instructions represent the second-level screening conditions of the data source based on the first-level screening.

[0010] As a further limitation of the technical solution of the present invention, the step of configuring the index calculation formula includes: Set indicator identifiers according to calculation requirements; According to the indicator identification, the combination definition is carried out, and the indicator instruction is matched to form the indicator calculation formula.

[0011] As a further limitation of the technical solution of the present invention, the step of matching the reference indicator in the formula template by a regular expression includes: The data in the curly brackets in the format of the referenced indicator of the formula template are matched in sequence through the regular formula, and the referenced indicator is split by the separator to obtain the indicator identifier; Match the associated data source based on the indicator identifier.

[0012] As a further limitation of the technical solution of the present invention, the steps of parsing the instruction and appending it to the reference indicator, obtaining the corresponding data and substituting it into the formula template to generate an expression, and completing the expansion of the new indicator by calculating the expression include: Parse the first-level instruction to obtain the first-level screening conditions of the data source and perform first-level screening on the associated data source; Parse the secondary instruction to obtain the secondary screening conditions of the data source and perform secondary screening on the data source after the primary screening; Get the data after secondary filtering and substitute it into the formula template to generate an expression; Evaluating the expression completes the expansion of the new indicator.

[0013] As a further limitation of the technical solution of the present invention, the method also includes: when a formula template is generated by a combination of indicator identifiers, the data in the curly brackets in the format of the formula template reference indicator is matched in sequence by a regular formula, and the reference indicator is then split by a delimiter, the current context is substituted into the instruction for calculation, and the result of the calculation is used as the context and substituted into the next instruction for calculation again, until the last instruction, and then the final result of the instruction is used as a parameter to obtain the data of the corresponding indicator, and the final data is used to replace the reference indicator through a regular formula. When all the reference indicators are replaced, the entire expression is calculated to achieve the output of the final result of the formula template to complete the expansion of the new indicator.

[0014] In a second aspect, the technical solution of the present invention also provides a device for implementing indicator expansion by configuring a formula template, including an indicator configuration module and an indicator calculation module; The indicator configuration module is used to configure the formula template to complete the description of the new indicator; the formula template contains the indicator identifier and multi-level instructions; The indicator calculation module is used to match the referenced indicators in the formula template through regular expressions, parse the instructions and append them to the referenced indicators, and then obtain the corresponding data and substitute them into the formula template to generate expressions, and complete the expansion of new indicators by calculating the expressions.

[0015] As a further limitation of the technical solution of the present invention, the indicator configuration module is specifically used to create a formula template by setting the format of the indicator referenced by the formula template and defining the instructions; configuring the basic information of the indicator in the formula template; configuring the indicator to associate with the data source; specifically establishing an association between the indicator identifier and the corresponding data source; and configuring the indicator calculation formula.

[0016] As a further limitation of the technical solution of the present invention, the device also includes a data source setting module, which defines the name of the data source according to the data type of the data source.

[0017] As a further limitation of the technical solution of the present invention, the format of the formula template reference indicator is as follows: ${n-level instruction. Second-level instruction. First-level instruction. Indicator identifier} The indicator identifier is used to represent a new indicator calculated by the formula template; The n-level instructions represent the calculation operation of the formula, the first-level instructions represent the first-level screening conditions of the data source, and the second-level instructions represent the second-level screening conditions of the data source based on the first-level screening.

[0018] As a further limitation of the technical solution of the present invention, the indicator configuration module is specifically used to set the indicator identification according to the calculation requirements; and to perform combination definition according to the indicator identification, and to cooperate with the indicator instruction to form the indicator calculation formula.

[0019] As a further limitation of the technical solution of the present invention, the indicator calculation module includes a matching unit, which matches the referenced indicators in the formula template through regular expressions; specifically, it is used to match the data in the curly brackets in the format of the referenced indicators in the formula template in sequence through regular formulas, split the referenced indicators through delimiters, and obtain indicator identifiers; and match the associated data source according to the indicator identifier.

[0020] As a further limitation of the technical solution of the present invention, the indicator calculation module also includes an instruction parsing unit, a data loading unit and an execution unit; An instruction parsing unit, used to parse the first-level instruction to obtain the first-level screening conditions of the data source and perform the first-level screening on the associated data source; parse the second-level instruction to obtain the second-level screening conditions of the data source and perform the second-level screening on the first-level screened data source; The data loading unit is used to obtain the data after secondary screening and substitute it into the formula template to generate an expression; The execution unit is used to calculate the expression to complete the expansion of the new indicator.

[0021] As a further limitation of the technical solution of the present invention, when a formula template is generated by a combination of indicator identifiers, the indicator calculation module matches the data in the curly brackets in the format of the formula template reference indicator in sequence through a regular formula, and then divides the reference indicator by a delimiter, substitutes the current context into the instruction for calculation, and substitutes the calculated result as the context into the next instruction for calculation again, until the last instruction, and then uses the final calculated result of the instruction as a parameter to obtain the data of the corresponding indicator, and replaces the reference indicator with the final data through a regular formula, and when all the reference indicators are replaced, the entire expression is calculated to realize the output of the final result of the formula template to complete the expansion of the new indicator.

[0022] In the third aspect, the technical solution of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the method for realizing indicator expansion by configuring a formula template as described in the first aspect.

[0023] In a fourth aspect, the technical solution of the present invention also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method for realizing indicator expansion by configuring a formula template as described in the first aspect.

[0024] The beneficial effects of the technical solution of the present invention are as follows: by matching each indicator referenced in the template through a regular expression, the coexistence of indicators and multi-level instructions is achieved through a separator for each indicator, the instructions are processed and attached to the referenced indicators, and then the corresponding data is obtained and substituted into the formula template to generate an expression, and the expansion of new indicators is completed by calculating the expression. By configuring the formula template to add new complex indicators, it is possible to display data of different dimensions in different stages and scenarios, and the flexible configuration does not require code changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0026] Figure 1 A schematic flow chart of a method provided for one embodiment of the present invention.

[0027] Figure 2 A schematic flow chart of a method provided for another embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in this specific embodiment. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of them. Based on the embodiments in this patent, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this patent.

[0029] like Figure 1 As shown, an embodiment of the present invention provides a method for implementing indicator expansion by configuring a formula template, including: Step 1: Configure the formula template to complete the description of the new indicator; the formula template contains the indicator identifier and multi-level instructions; Step 2: Use regular expressions to match the referenced indicators in the formula template; parse the instructions and append them to the referenced indicators, obtain the corresponding data and substitute them into the formula template to generate an expression, and complete the expansion of the new indicator by calculating the expression.

[0030] In some embodiments, Figure 2 As shown in the figure, the steps to configure the formula template to complete the description of the new indicator include: Step 11: Create a formula template by setting the format of the formula template reference indicator and defining the instructions; Step 12: Configure the basic information of the indicator in the formula template; Step 13: Configure the indicator-associated data source; specifically associate the indicator identifier with the corresponding data source; define the name of the data source according to the data type of the data source, and associate the indicator identifier with the data source name.

[0031] Step 14: Configure the indicator calculation formula.

[0032] It should be noted that in the steps of creating a formula template by setting the format of the formula template reference indicator and defining the instruction, the format of the formula template reference indicator is as follows: ${n-level instruction. Second-level instruction. First-level instruction. Indicator identifier} The indicator identifier is used to represent a new indicator calculated by the formula template; The n-level instructions represent the calculation operation of the formula, the first-level instructions represent the first-level screening conditions of the data source, and the second-level instructions represent the second-level screening conditions of the data source based on the first-level screening.

[0033] Accordingly, the steps for configuring the indicator calculation formula include: Set indicator identifiers according to calculation requirements; According to the indicator identification, the combination definition is carried out, and the indicator instruction is matched to form the indicator calculation formula.

[0034] In some embodiments, the steps of matching the reference indicator in the formula template by a regular expression, parsing the instruction and appending it to the reference indicator, obtaining the corresponding data and substituting it into the formula template to generate an expression, and completing the expansion of the new indicator by calculating the expression include: Step 21: Use regular formulas to match the data in the curly brackets in the format of the referenced indicator in the formula template in sequence, split the referenced indicator by separators, and obtain the indicator identifier; Step 22: Match the associated data source according to the indicator identifier.

[0035] Step 23: parse the first-level instruction to obtain the first-level screening condition of the data source and perform first-level screening on the associated data source; Step 24: parse the secondary instruction to obtain the secondary screening conditions of the data source and perform secondary screening on the data source after the primary screening; Step 25: Get the data after secondary screening and substitute it into the formula template to generate an expression; Step 26: Calculate the expression to complete the expansion of the new indicator.

[0036] In some embodiments, the method also includes: when a formula template is generated by a combination of indicator identifiers, the data in the curly brackets in the format of the formula template reference indicator is matched in sequence by a regular formula, the reference indicator is then split by a delimiter, the current context is substituted into the instruction for calculation, and the result of the calculation is substituted as the context into the next instruction for calculation again, until the last instruction, and the final result of the instruction is used as a parameter to obtain the data of the corresponding indicator, and the final data is used to replace the reference indicator by a regular formula, and when all the reference indicators are replaced, the entire expression is calculated to achieve the output of the final result of the formula template to complete the expansion of the new indicator.

[0037] The present invention mainly simplifies the implementation of indicator calculation, improves the efficiency of implementing new indicators, decouples the implementation from the code, and the configuration personnel do not need to pay attention to the specific implementation of the code. They only need to configure according to the formula rules to implement the corresponding functions. First, the formula template is composed. The format of the formula template reference indicator is "${n-level instruction. Second-level instruction. First-level instruction. Indicator identifier}". By defining the instructions, the function expansion is realized, and the complex calculation is realized by combining the referenced indicators. For example, “(${yqmoney} -${y-1.q.money}) / ${yqmoney}”, where “y” is the relative year, “q” is the relative quarter, “y-1” is the first year relative to the current year, and so on. “money” is the unique identifier of the indicator. The formula represents a year-on-year indicator with the indicator identifier “money”.

[0038] In addition to basic operations, there are also aggregation operations, such as "SUM(${y.q0.money})" and "AVG(${y.q0.money})", where "q0" is the quarter of the year. The formula is respectively expressed as the cumulative sum and average value of the quarters of the current year with the indicator marked as "money". The requirements in special scenarios can also be met by superimposing aggregation operations and basic operations.

[0039] The second step is to parse the formula template. First, the regular formula "\$\{([^\}]+)\}" is used to match the data in the "${}" braces in sequence, and then the reference indicators are separated by the separator ".". The current context is substituted into the instruction for calculation, and the result of the calculation is used as the context for the next instruction to calculate again, and so on, until the last instruction, and then the final result of the instruction is used as a parameter to obtain the data of the corresponding indicator, and the regular formula "\$\{([^\}]+)\}" is used to replace the reference indicator with the final data. When all reference indicators are replaced, the entire expression is calculated to output the final result of the formula template.

[0040] The formula template includes basic instructions: sum, avg calculation operations; y: current form year; Reference quarter: current form year y:q0: all quarters in a year q1, q2, q3, q4: respectively represent the indicator item quarters of the first quarter, the second quarter, the third quarter, and the fourth quarter; Example: SUM(${y-1.q0.Total number of outpatient and emergency visits in the county})); N-level instructions: represent sum (sum) and avg (average) operations; Secondary instruction: y-1, representing the previous year; Level 3 instructions: q0 represents all quarters; Indicator: Number of outpatient and emergency visits in the county.

[0041] The instruction contains multiple defined identifiers, which can be combined and defined according to the identifiers, and combined with the indicator instructions to form a general template. Because of the combination, we can process our formula template and implement complex calculations to form results in combination with the values ​​of the indicator identifiers. For example, the following formula template: (SUM(${y.q0.Total number of outpatient and emergency department visits in the county})-SUM(${y-1.q0.Total number of outpatient and emergency department visits in the county})) / SUM(${y-1.q0.Total number of outpatient and emergency department visits in the county})*100%; calculate the growth rate of outpatient and emergency department visits in the county. The calculation of indicators is a recursive process, and the formula will be parsed. For example, the growth rate of outpatient and emergency department visits in the county above. There is an intermediate result such as calculating the total number of visits per year first. The intermediate result will replace the module specified by the formula template in the entire calculation, and finally the entire formula template processing can be completed.

[0042] The embodiment of the present invention also provides a device for implementing index expansion by configuring a formula template, including an index configuration module and an index calculation module; The indicator configuration module is used to configure the formula template to complete the description of the new indicator; the formula template contains the indicator identifier and multi-level instructions; The indicator calculation module is used to match the referenced indicators in the formula template through regular expressions, parse the instructions and append them to the referenced indicators, and then obtain the corresponding data and substitute them into the formula template to generate expressions, and complete the expansion of new indicators by calculating the expressions.

[0043] In some embodiments, the indicator configuration module is specifically used to create a formula template by setting the format of the indicator referenced by the formula template and defining the instruction; configuring the basic information of the indicator in the formula template; configuring the indicator-related data source; specifically establishing an association between the indicator identifier and the corresponding data source; and configuring the indicator calculation formula. The device also includes a data source setting module, which defines the name of the data source according to the data type of the data source.

[0044] The format of the formula template reference indicator is as follows: ${n-level instruction. Second-level instruction. First-level instruction. Indicator identifier} The indicator identifier is used to represent a new indicator calculated by the formula template; The n-level instructions represent the calculation operation of the formula, the first-level instructions represent the first-level screening conditions of the data source, and the second-level instructions represent the second-level screening conditions of the data source based on the first-level screening.

[0045] In some embodiments, the indicator configuration module is specifically used to set the indicator identifier according to the calculation requirements; perform combination definition according to the indicator identifier, and cooperate with the indicator instruction to form the indicator calculation formula.

[0046] In some embodiments, the indicator calculation module includes a matching unit, which matches the referenced indicators in the formula template through regular expressions; specifically, it is used to match the data in the curly brackets in the format of the referenced indicators in the formula template in sequence through regular formulas, split the referenced indicators through delimiters, and obtain indicator identifiers; and match the associated data source according to the indicator identifier.

[0047] In some embodiments, the indicator calculation module further includes an instruction parsing unit, a data loading unit, and an execution unit; An instruction parsing unit, used to parse the first-level instruction to obtain the first-level screening conditions of the data source and perform the first-level screening on the associated data source; parse the second-level instruction to obtain the second-level screening conditions of the data source and perform the second-level screening on the first-level screened data source; The data loading unit is used to obtain the data after secondary screening and substitute it into the formula template to generate an expression; The execution unit is used to calculate the expression to complete the expansion of the new indicator.

[0048] In some embodiments, when a formula template is generated by a combination of indicator identifiers, the indicator calculation module matches the data in the curly brackets in the format of the formula template reference indicator in sequence through a regular formula, and then splits the reference indicator through a delimiter, substitutes the current context into the instruction for calculation, and substitutes the result of the calculation as the context into the next instruction for calculation again, until the last instruction, and then uses the final calculated result of the instruction as a parameter to obtain the data of the corresponding indicator, and replaces the reference indicator with the final data through a regular formula. When all the reference indicators have been replaced, the entire expression is calculated to output the final result of the formula template to complete the expansion of the new indicator.

[0049] An embodiment of the present invention also provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The communication bus can be used for information transmission between the electronic device and the sensor. The processor can call the logic instructions in the memory to execute the following method: Step 1: Configure the formula template to complete the description of the new indicator; the formula template contains indicator identification and multi-level instructions; Step 2: Match the referenced indicator in the formula template through a regular expression; parse the instruction and attach it to the referenced indicator, and then obtain the corresponding data and substitute it into the formula template to generate an expression, and complete the expansion of the new indicator by calculating the expression.

[0050] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0051] An embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute the method provided by the above method embodiment, for example, including: Step 1: Configuring a formula template to complete the description of a new indicator; the formula template contains an indicator identifier and multi-level instructions; Step 2: Matching the referenced indicator in the formula template through a regular expression; parsing the instructions and appending them to the referenced indicators, thereby obtaining the corresponding data and substituting them into the formula template to generate an expression, and completing the expansion of the new indicator by calculating the expression.

[0052] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0053] An embodiment of the device for implementing indicator expansion by configuring a formula template is provided in an embodiment of the present invention. The device and the method for implementing indicator expansion by configuring a formula template in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the device for implementing indicator expansion by configuring a formula template, reference can be made to the embodiment of the method for implementing indicator expansion by configuring a formula template.

[0054] The device for implementing index expansion by configuring a formula template is a unit and algorithm step of each example described in combination with the embodiments disclosed herein, and can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0055] Those skilled in the art will appreciate that various aspects of the method for implementing indicator expansion by configuring a formula template can be implemented as a system, method, or program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as a "circuit", "module", or "system".

[0056] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for implementing indicator expansion by configuring a formula template, characterized in that: include: Configure the formula template to complete the description of the new indicator; the formula template contains the indicator identifier and multi-level instructions; Use regular expressions to match the reference indicators in the formula template; By parsing the instructions and appending them to the reference indicators, the corresponding data is obtained and substituted into the formula template to generate an expression, and the expansion of the new indicator is completed by calculating the expression.

2. The method for implementing indicator expansion by configuring a formula template according to claim 1, characterized in that: The steps to configure the formula template to complete the description of the new indicator include: Create a formula template by formatting the indicators it references and defining the instructions; Configure the basic information of the indicators in the formula template; Configure the indicator-associated data source; specifically associate the indicator identifier with the corresponding data source; Configure the indicator calculation formula.

3. The method for implementing indicator expansion by configuring a formula template according to claim 2, characterized in that: In the steps of creating a formula template by setting the format of the formula template reference indicator and defining the instruction, the format of the formula template reference indicator is as follows: ${n-level instruction. Second-level instruction. First-level instruction. Indicator identifier} The indicator identifier is used to represent a new indicator calculated by the formula template; The n-level instructions represent the calculation operation of the formula, the first-level instructions represent the first-level screening conditions of the data source, and the second-level instructions represent the second-level screening conditions of the data source based on the first-level screening.

4. The method for implementing indicator expansion by configuring a formula template according to claim 3, characterized in that: The steps to configure the indicator calculation formula include: Set indicator identifiers according to calculation requirements; According to the indicator identification, the combination definition is carried out, and the indicator instruction is matched to form the indicator calculation formula.

5. The method for implementing indicator expansion by configuring a formula template according to claim 4, characterized in that: The steps to match the reference indicator in the formula template through regular expressions include: The data in the curly brackets in the format of the referenced indicator of the formula template are matched in sequence through the regular formula, and the referenced indicator is split by the separator to obtain the indicator identifier; Match the associated data source based on the indicator identifier.

6. The method for implementing indicator expansion by configuring a formula template according to claim 5, characterized in that: The instructions are parsed and attached to the reference indicators, and then the corresponding data is obtained and substituted into the formula template to generate an expression. The steps of completing the expansion of the new indicator by calculating the expression include: Parse the first-level instruction to obtain the first-level screening conditions of the data source and perform first-level screening on the associated data source; Parse the secondary instruction to obtain the secondary screening conditions of the data source and perform secondary screening on the data source after the primary screening; Get the data after secondary filtering and substitute it into the formula template to generate an expression; Evaluating the expression completes the expansion of the new indicator.

7. The method for implementing indicator expansion by configuring a formula template according to claim 6, characterized in that: The method further includes: When a formula template is generated by a combination of indicator identifiers, the data in the curly brackets in the format of the formula template reference indicator is matched in sequence through a regular formula, and the reference indicator is split by a delimiter, the current context is substituted into the instruction for calculation, and the result of the calculation is used as the context for the next instruction to be calculated again, until the last instruction, and then the final result of the instruction is used as a parameter to obtain the data of the corresponding indicator, and the final data is used to replace the reference indicator through a regular formula. When all reference indicators are replaced, the entire expression is calculated to achieve the output of the final result of the formula template to complete the expansion of the new indicator.

8. A device for implementing indicator expansion by configuring a formula template, characterized in that: Including indicator configuration module and indicator calculation module; The indicator configuration module is used to configure the formula template to complete the description of the new indicator; the formula template contains the indicator identifier and multi-level instructions; The indicator calculation module is used to match the referenced indicators in the formula template through regular expressions, parse the instructions and append them to the referenced indicators, and then obtain the corresponding data and substitute them into the formula template to generate expressions, and complete the expansion of new indicators by calculating the expressions.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the method for realizing indicator expansion by configuring a formula template as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method for implementing indicator expansion by configuring a formula template as described in any one of claims 1 to 7.