A method and system for processing of indicator engine data
By using a preset indicator variable verification algorithm and a recursive algorithm to verify the indicator engine formula, the problem of inconvenient analysis and verification of indicator engine formulas in existing technologies is solved, and a highly efficient verification effect is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-15
- Publication Date
- 2026-03-24
AI Technical Summary
In banking or financial systems, existing technologies lack effective parsing and verification methods, leading to the failure of indicator engine formula calculations and inconvenient verification.
The indicator engine formulas are validated using a preset indicator variable validation algorithm and a preset recursive algorithm, including the validation of the correctness of indicator variables and the parsing of the formula structure. The correct parsing of the formulas is ensured through separate parsing and recursive validation.
It improves the convenience and efficiency of formula verification in the indicator engine, enabling timely detection of formula configuration errors before execution and ensuring successful subsequent execution.
Smart Images

Figure CN117076502B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a processing method and system of index engine data. BACKGROUND
[0002] At present, in a bank system or a financial system, each application system builds a report and processes an index (an index engine formula) or builds a theme domain data report application based on a theme data set. Generally, the index engine formula involves index variables, parentheses, and IF conditions and other special structures, and has a multi-nested scenario with different structures. The industry does not have a better targeted analysis and verification method for the index engine formula, which is inconvenient for analysis and verification, and thus leads to failure of the index formula calculation. SUMMARY
[0003] The embodiments of the present application aim to provide a processing method and system of index engine data, an electronic device, and a computer readable storage medium, which can achieve the technical effect of improving the verification convenience and verification efficiency of the index engine formula.
[0004] In a first aspect, the embodiments of the present application provide a processing method of index engine data, comprising:
[0005] Obtaining index engine data, wherein the index engine data comprises an index engine formula to be analyzed;
[0006] Performing index variable correctness verification on the index engine formula in the index engine data based on a preset index variable verification algorithm to obtain first index engine data;
[0007] Performing formula structure analysis on the first index engine data by a preset recursive algorithm to obtain second index engine data, wherein the second index engine data comprises a parenthesis structure analysis result and a condition structure analysis result;
[0008] Performing recursive verification according to the structure analysis result of the second index engine data to obtain a detailed analysis and verification result of the index engine data.
[0009] In the implementation process, the index engine data processing method first performs index variable correctness verification on the index engine formula in the index engine data based on a preset index variable verification algorithm, then performs formula structure analysis on the first index engine data through a preset recursive algorithm, obtains second index engine data, and performs recursive verification according to the structure analysis result of the second index engine data; thus, through separate analysis and verification and recursive verification, the index engine formula can be correctly analyzed and verified, whether it is a normal formula or a multiple recursive formula, so that the formula configuration error can be found in time before the index formula is run, and the subsequent execution can be ensured to be successful; therefore, the index engine data processing method can achieve the technical effects of improving the convenience and efficiency of index engine formula verification.
[0010] Further, the step of performing index variable correctness verification on the index engine formula in the index engine data based on a preset index variable verification algorithm to obtain first index engine data includes:
[0011] Query the index information and metric information in the index engine data through a preset data table to generate to-be-verified metric table information;
[0012] Iterate through each index variable in the index engine data, and perform the following processing on the iterated index variable:
[0013] Perform correctness verification on the index variable, and if the metric corresponding to the index variable belongs to the to-be-verified metric table information, the index variable passes the correctness verification;
[0014] After the iteration is completed, the first index engine data is generated according to all index variables that pass the correctness verification.
[0015] In the implementation process, the structure of the index variable is “index·metric”, the index and metric information involved in the formula are queried through a preset data table, and then the index variables in the formula are checked one by one to query whether the corresponding metric is included in the to-be-verified metric table information queried, so as to verify and ensure the correctness of the index metric.
[0016] Further, the step of performing formula structure analysis on the first index engine data through a preset recursive algorithm to obtain second index engine data includes:
[0017] The fields of the first index engine data are read and stored in a stack structure variable in sequence;
[0018] Iterate and analyze the fields in the stack structure variable:
[0019] When the first preset character string is parsed, a preset structure is entered; when a second preset character string is continuously parsed, the preset structure is ended; strings between the first preset character string and the second preset character string are taken out in reverse order from the stack structure variable and encapsulated to obtain preset structure content information;
[0020] After the traversal is completed, the preset structure content information is replaced by a preset indicator word and continuously stored in the stack structure variable to obtain second index engine data.
[0021] Further, the first preset character string and the second preset character string are both small bracket structure character strings.
[0022] Further, the first preset character string and the second preset character string are both condition structure character strings, and the preset structure content information includes three parts, that is, a condition, a condition establishment result and a condition non-establishment result.
[0023] Further, after the step of recursively checking according to a structure parsing result of the second index engine data to obtain a detailed parsing checking result of the index engine data, the method further includes:
[0024] The preset indicator words in the stack structure variable are taken out in reverse order and composed into a preset structure formula.
[0025] The preset structure formula is subjected to overall recursive checking to obtain an overall parsing checking result.
[0026] In a second aspect, an embodiment of the present application provides a processing system of index engine data, including:
[0027] An index acquisition module is configured to acquire index engine data, the index engine data including an index engine formula to be parsed;
[0028] A correctness checking module is configured to perform index variable correctness checking on the index engine formula in the index engine data based on a preset index variable checking algorithm to obtain first index engine data;
[0029] A parsing module is configured to perform formula structure parsing on the first index engine data by using a preset recursive algorithm to obtain second index engine data, the second index engine data including a small bracket structure parsing result and a condition structure parsing result;
[0030] A recursive checking module is configured to perform recursive checking according to a structure parsing result of the second index engine data to obtain a detailed parsing checking result of the index engine data.
[0031] Further, the correctness checking module is specifically configured to:
[0032] The index engine data in the preset data table is queried to obtain index information and metric information in the index engine data, and a to-be-verified metric table information is generated;
[0033] Each index variable in the index engine data is traversed, and the following processing is performed on the traversed index variable:
[0034] The index variable is subjected to correctness verification, and when the metric corresponding to the index variable belongs to the to-be-verified metric table information, the index variable passes the correctness verification;
[0035] After the traversal is completed, the first index engine data is generated according to all index variables that pass the correctness verification.
[0036] Further, the parsing module is specifically configured to:
[0037] The fields of the first index engine data are sequentially read and stored in a stack structure variable;
[0038] The fields in the stack structure variable are traversed and parsed:
[0039] When a first preset string is parsed, a preset structure is entered; when a second preset string is parsed, the preset structure is ended; the strings between the first preset string and the second preset string in the stack structure variable are taken out in reverse order and encapsulated to obtain preset structure content information;
[0040] After the traversal is completed, the preset structure content information is replaced by a preset indicator and is continuously stored in the stack structure variable to obtain second index engine data.
[0041] Further, the processing system of the index engine data further includes an overall verification module configured to:
[0042] All preset indicators in the stack structure variable are taken out in reverse order and are composed into a preset structure formula;
[0043] The preset structure formula is subjected to overall recursive verification to obtain an overall analysis and verification result.
[0044] In a third aspect, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of the first aspect when executing the computer program.
[0045] In a fourth aspect, a computer readable storage medium is provided, and instructions are stored on the computer readable storage medium, and when the instructions are executed on a computer, the computer executes the method according to any one of the first aspect.
[0046] In a fifth aspect, a computer program product is provided. The computer program product, when executed on a computer, causes the computer to perform the method of any of the first aspect.
[0047] Other features and advantages of the present application will be set forth in the following description of the application, taken in conjunction with the accompanying drawings, and best understood from the practice of the application. This description, appended claims, and drawings are that of the preferred embodiments. They teach the best modes presently contemplated by the inventors of carrying out their application. The details in such description are not intended to limit the scope of the application, as defined in the appended claims, but rather serve as an example of one or more of the many equivalent ways in which one can practice the application.
[0048] In order to make the above objectives, features and advantages of the present application more clear and understandable, below preferred embodiments are specifically described with reference to the accompanying drawings, in which: BRIEF DESCRIPTION OF DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0050] Figure 1 A flowchart of a processing method of index engine data provided by the embodiments of the present application;
[0051] Figure 2 A flowchart of another processing method of index engine data provided by the embodiments of the present application;
[0052] Figure 3 A structure block diagram of a processing system of index engine data provided by the embodiments of the present application;
[0053] Figure 4 A structure block diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0054] The technical solutions of the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0055] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. Meanwhile, in the description of the present application, the terms “first”, “second”, etc. are only used for distinguishing description, and cannot be understood as indicating or implying relative importance.
[0056] The embodiment of the application aims to provide a kind of index engine data processing method, system, electronic equipment and computer readable storage medium, can be applied to the checking process of index engine formula in bank system or financial system;The index engine data processing method first carries out index variable correctness checking to the index engine formula in the index engine data based on preset index variable checking algorithm, then carries out formula structure analysis to the first index engine data by preset recursive algorithm, obtains second index engine data, and carries out recursive checking according to the structure analysis result of the second index engine data;Therefore, by separate analysis checking and recursive checking mode, it can be guaranteed that index engine formula is correctly analyzed and checked, whether it is normal formula or multiple recursive formula, it can be guaranteed that index engine formula is correctly analyzed and checked, so that the error place of formula configuration can be found in time before index formula is run, and subsequent execution is guaranteed to be successful;Therefore, the index engine data processing method can realize the technical effects of improving the checking convenience and checking efficiency of index engine formula.
[0057] Please refer to Figure 1 , Figure 1 The flowchart of the index engine data processing method provided by the embodiment of the application includes the following steps:
[0058] S100: obtain index engine data, and the index engine data includes index engine formula to be analyzed;
[0059] S200: index variable correctness checking is carried out to the index engine formula in the index engine data based on preset index variable checking algorithm, and first index engine data is obtained;
[0060] S300: formula structure analysis is carried out to the first index engine data by preset recursive algorithm, and second index engine data is obtained, and the second index engine data includes parentheses structure analysis result and condition structure analysis result;
[0061] S400: recursive checking is carried out according to the structure analysis result of the second index engine data, and the detailed analysis checking result of the index engine data is obtained.
[0062] Exemplarily, the processing method of the index engine data first performs index variable correctness verification on the index engine formula in the index engine data based on a preset index variable verification algorithm, then performs formula structure analysis on the first index engine data by a preset recursive algorithm, obtains second index engine data, and performs recursive verification according to the structure analysis result of the second index engine data; thus, through separate analysis verification and recursive verification, the index engine formula can be correctly analyzed and verified, whether it is a normal formula or a multiple recursive formula, so that errors in formula configuration can be found in time before the index formula is run, and the subsequent execution can be ensured to be successful; therefore, the processing method of the index engine data can achieve the technical effects of improving the convenience and efficiency of index engine formula verification.
[0063] Please attend Figure 2 , Figure 2 Another flowchart of a processing method of index engine data provided by an embodiment of the present application is shown in FIG. 6.
[0064] Exemplarily, S200: performing index variable correctness verification on the index engine formula in the index engine data based on a preset index variable verification algorithm to obtain first index engine data, including:
[0065] S210: querying index information and measurement information in the index engine data through a preset data table to generate to-be-verified measurement table information;
[0066] S220: traversing each index variable in the index engine data, and performing the following processing on the traversed index variable: performing correctness verification on the index variable, and when the measurement corresponding to the index variable belongs to the to-be-verified measurement table information, the index variable passes the correctness verification;
[0067] S230: after the traversal, generating the first index engine data according to all index variables that pass the correctness verification.
[0068] Exemplarily, the structure of the index variable is “index·measurement”, the index and its measurement information involved in the formula are first queried through a preset data table, then the index variables in the formula are checked one by one, and it is checked whether the corresponding measurement is included in the to-be-verified measurement table information queried by the index variable, so as to verify and ensure the correctness of the index measurement.
[0069] Exemplarily, S300: performing formula structure analysis on the first index engine data by a preset recursive algorithm to obtain second index engine data, including:
[0070] S310: sequentially reading the fields of the first index engine data and storing them in a stack structure variable;
[0071] S320: traversing the fields in the stack structure variable: when the first preset string is parsed, the preset structure is entered; when the second preset string is parsed, the preset structure is ended; the strings between the first preset string and the second preset string are taken out in reverse order from the stack structure variable and encapsulated to obtain the preset structure content information;
[0072] S330: after the traversal is completed, the preset structure content information is replaced by a preset indicator and is continuously stored in the stack structure variable to obtain the second index engine data.
[0073] Exemplarily, the first preset string and the second preset string are both small parentheses structure strings.
[0074] Exemplarily, the first preset string and the second preset string are both condition structure strings, and the preset structure content information includes three parts: "condition", "condition true result", and "condition false result".
[0075] Exemplarily, after the step S400 of obtaining the detailed parsing and verification result of the index engine data according to the structure parsing result of the second index engine data, the method further includes:
[0076] S410: all preset indicators in the stack structure variable are taken out in reverse order and composed into a preset structure formula;
[0077] S420: the preset structure formula is subjected to overall recursive verification to obtain an overall parsing and verification result.
[0078] In some embodiments, in combination with the processing method of the index engine data shown in Figure 1 and Figure 2 The embodiments of the present application can be applied to the verification process of the index engine formula of a bank system or a financial system, the special structures such as parentheses and conditions are solved by separately parsing and verifying the index variable and using recursive verification, and the detailed parsing and verification of the index engine formula are realized; optionally, the specific operation mode is as follows:
[0079] 1. Verify the correctness of the index variable of the formula. The structure of the index variable is "index · measure". First, query the index and its measure array involved in the formula through a data table, and encapsulate them into a HashMap structure meas. Then, the index variable in the formula is verified one by one, and it is queried whether the corresponding measure is contained in the queried measure table meas, to verify the correctness of the index measure.
[0080] 2. Analyze the parentheses structure and IF condition of the formula and other special structures. In order to process such special structures, the formula is parsed by using a parsing method in a recursive manner:
[0081] 2.1, the bracket structure analysis method, the fields of the formula are read into the stack structure variable stack in turn, when the "(" string is parsed, it indicates that the bracket structure is entered, and the ")" string is parsed, which indicates the end of the bracket structure. The string is taken out from the stack stack in reverse order until the "(" string appears for the first time, the content of the bracket structure is composed, and the content is encapsulated into a string to recursively parse and verify the parsing method. If the recursion is correct, the success indicator "ResultA" is used to replace the content of the bracket structure and continue to be stored in the stack stack;
[0082] 2.2, similarly, the conditional structure analysis method: parse the formula, when the "IF{" string is parsed, it indicates that the IF structure is entered, and the "}" is parsed, which indicates the end of the IF structure. The string is taken out from the stack stack in reverse order until the "IF{" string appears for the first time, the content of the IF structure is composed. Unlike the bracket structure, the IF structure is special, and the format is "IF{condition a, condition true result b, condition false result c}", so the content of the IF structure is divided into three parts: condition a, condition true result b, and condition false result c by the key symbol ",". The three parts are encapsulated into strings and recursively parsed and verified by the parsing method. Only when all three are recursively successful, the content of the IF structure is parsed and verified correctly, and the success indicator "ResultA" is used to replace the content of the bracket structure and continue to be stored in the stack stack.
[0083] 3, after parsing the entire formula, the content in the stack stack is taken out in reverse order to form the entire formula without special structure, and then the entire formula is recursively verified;
[0084] 4, for different structure multiple nesting scenarios, such as the scenario that the condition true result b in the IF structure is nested with the IF structure, the principle of our parsing and verification is to take the smallest structure to verify and parse each time. Therefore, through the IF structure, the nested IF structure in the condition true result b is first verified, and the indicator "ResultA" is used to replace it, and then the outer IF structure is verified.
[0085] Please refer to Figure 3 , Figure 3 The structural block diagram of the index engine data processing system provided by the embodiment of the present application, the index engine data processing system comprises:
[0086] An index acquisition module 100 is configured to acquire index engine data, wherein the index engine data comprises an index engine formula to be parsed.
[0087] The correctness verification module 200 is configured to perform correctness verification on the index variable in the index engine formula in the index engine data based on a preset index variable verification algorithm, and obtain first index engine data.
[0088] The analysis module 300 is configured to perform formula structure analysis on the first index engine data by using a preset recursive algorithm, and obtain second index engine data, wherein the second index engine data includes a small bracket structure analysis result and a condition structure analysis result.
[0089] The recursive verification module 400 is configured to perform recursive verification according to the structure analysis result of the second index engine data, and obtain a detailed analysis and verification result of the index engine data.
[0090] For example, the correctness verification module 200 is specifically configured to:
[0091] query the index information and the metric information in the index engine data through a preset data table, and generate to-be-verified metric table information;
[0092] traverse each index variable in the index engine data, and perform the following processing on the traversed index variable:
[0093] perform correctness verification on the index variable, and when the metric corresponding to the index variable belongs to the to-be-verified metric table information, the index variable passes the correctness verification;
[0094] After the traversal is completed, the first index engine data is generated according to all the index variables that pass the correctness verification.
[0095] For example, the analysis module 300 is specifically configured to:
[0096] read the fields of the first index engine data in sequence and store them in a stack structure variable;
[0097] traverse the fields in the stack structure variable:
[0098] when the first preset string is parsed, the preset structure is entered; when the second preset string is parsed, the preset structure is ended; the string between the first preset string and the second preset string in the stack structure variable is taken out in reverse order and encapsulated to obtain preset structure content information;
[0099] After the traversal is completed, the preset structure content information is replaced by a preset indicator and is continuously stored in the stack structure variable to obtain the second index engine data.
[0100] For example, the index engine data processing system further includes an overall verification module, which is configured to:
[0101] take out all the preset indicators in the stack structure variable in reverse order and compose a preset structure formula;
[0102] The preset structure formula is recursively checked as a whole to obtain a whole analysis checking result.
[0103] It should be noted that the processing system of the index engine data provided in the embodiments of the present application is not limited to the above-mentioned method embodiments Figure 1 and Figure 2 The method embodiments corresponding to the method embodiments shown in the above are not repeated here.
[0104] The present application also provides an electronic device, please refer to Figure 4 , Figure 4 The structural block diagram of an electronic device provided in the embodiments of the present application. The electronic device can include a processor 510, a communication interface 520, a memory 530 and at least one communication bus 540. Among them, the communication bus 540 is used to realize the direct connection communication of these components. Among them, the communication interface 520 of the electronic device in the embodiments of the present application is used to communicate with other node devices. The processor 510 can be an integrated circuit chip with signal processing capability.
[0105] The processor 510 described above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a ready-to-program gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor 510 can also be any conventional processor, etc.
[0106] The memory 530 can be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) and the like. The memory 530 stores computer readable instructions, when the computer readable instructions are executed by the processor 510, the electronic device can execute the above-mentioned Figures 1 to 2 The method embodiments involve various steps.
[0107] Optionally, the electronic device can further include a storage controller, an input / output unit.
[0108] The memory 530, the storage controller, the processor 510, the peripheral interface, and the input / output unit are electrically connected with each other directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected with each other through one or more communication buses 540. The processor 510 is configured to execute executable modules stored in the memory 530, for example, software function modules or computer programs included in the electronic device.
[0109] The input / output unit is configured to provide a user with a creation task and create a selectable time period or a preset execution time for the task to realize interaction between the user and the server. The input / output unit can be, but is not limited to, a mouse, a keyboard, and the like.
[0110] It can be understood that, Figure 4 The structure shown is only schematic, and the electronic device can further include more or fewer components than those shown in the figures, or have a different configuration from that shown in the figures. Figure 4 The components shown in the figures can be implemented in hardware, software, or a combination thereof. Figure 4 The components shown in the figures can be implemented in hardware, software, or a combination thereof. Figure 4 The components shown in the figures can be implemented in hardware, software, or a combination thereof.
[0111] The embodiments of the present application further provide a storage medium, and the storage medium stores instructions. When the instructions run on a computer, the computer program is executed by a processor to implement the method in the method embodiments. To avoid repetition, details are not described here.
[0112] The present application further provides a computer program product, and the computer program product makes a computer execute the method in the method embodiments when the computer program product runs on the computer.
[0113] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented by other means. The apparatus embodiments described above are only illustrative, for example, the flowcharts and block diagrams in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order from that shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0114] In addition, the functional modules in the various embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0115] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0116] The above merely provides an example of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, and thus, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.
[0117] The above merely provides an example of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, and thus, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings.
[0118] It should be noted that the relational terms herein such as first and second and the like are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
Claims
1. A method for processing indicator engine data, characterized in that, include: Obtain indicator engine data, which includes the indicator engine formula to be parsed; The first indicator engine data is obtained by verifying the correctness of the indicator engine formula in the indicator engine data based on the preset indicator variable verification algorithm. The first indicator engine data is parsed using a preset recursive algorithm to obtain the second indicator engine data, which includes the parsing results of the bracket structure and the parsing results of the condition structure. Recursively verify the data based on the structural parsing results of the second indicator engine data to obtain the detailed parsing and verification results of the indicator engine data. The step of parsing the formula structure of the first indicator engine data using a preset recursive algorithm to obtain the second indicator engine data includes: Read the fields of the first indicator engine data in sequence and store them into a stack structure variable; Iterate through and parse the fields in the stack structure variables: When the first preset string is parsed, the preset structure is entered; when the second preset string is parsed, the preset structure is terminated; the string between the first preset string and the second preset string is retrieved in reverse order from the stack structure variable and encapsulated to obtain the preset structure content information; After the traversal is completed, the preset structure content information is replaced with preset indicator words and stored in the stack structure variable to obtain the second indicator engine data.
2. The method for processing indicator engine data according to claim 1, characterized in that, The step of verifying the correctness of indicator engine formulas in the indicator engine data based on a preset indicator variable verification algorithm to obtain the first indicator engine data includes: The indicator information and measurement information in the indicator engine data are queried through a preset data table to generate a measurement table information to be verified. Iterate through each indicator variable in the indicator engine data and perform the following processing on the iterated indicator variables: The correctness of the indicator variable is verified. If the metric corresponding to the indicator variable belongs to the information of the metric table to be verified, then the indicator variable passes the correctness verification. After the traversal is complete, the first indicator engine data is generated based on all indicator variables that have passed the correctness check.
3. The method for processing indicator engine data according to claim 1, characterized in that, Both the first preset string and the second preset string are parentheses-structured strings.
4. The method for processing indicator engine data according to claim 1, characterized in that, Both the first preset string and the second preset string are conditional structure strings. The preset structure content information includes three parts: "condition", "condition true result", and "condition false result".
5. The method for processing indicator engine data according to claim 1, characterized in that, After the step of recursively verifying the data based on the structural parsing results of the second indicator engine data to obtain the detailed parsing verification results of the indicator engine data, the method further includes: Reverse the order of all preset indicator words in the stack structure variable and form a preset structure formula; The preset structural formula is recursively verified to obtain the overall analytical verification result.
6. A data processing system for an indicator engine, characterized in that, include: The indicator acquisition module is used to acquire indicator engine data, which includes indicator engine formulas to be parsed. The correctness verification module is used to verify the correctness of the indicator engine formula in the indicator engine data based on a preset indicator variable verification algorithm to obtain the first indicator engine data. The parsing module is used to parse the formula structure of the first indicator engine data using a preset recursive algorithm to obtain the second indicator engine data, which includes the parsing results of the bracket structure and the parsing results of the condition structure. The recursive verification module is used to perform recursive verification based on the structural parsing result of the second indicator engine data to obtain the detailed parsing verification result of the indicator engine data. The parsing module is specifically used for: Read the fields of the first indicator engine data in sequence and store them into a stack structure variable; Iterate through and parse the fields in the stack structure variables: When the first preset string is encountered, the preset structure is entered; when the second preset string is encountered, the preset structure is terminated. Retrieve the string between the first preset string and the second preset string from the stack structure variable in reverse order and encapsulate it to obtain the preset structure content information; After the traversal is completed, the preset structure content information is replaced with preset indicator words and stored in the stack structure variable to obtain the second indicator engine data.
7. The data processing system for the indicator engine according to claim 6, characterized in that, The correctness verification module is specifically used for: The indicator information and measurement information in the indicator engine data are queried through a preset data table to generate a measurement table information to be verified. Iterate through each indicator variable in the indicator engine data and perform the following processing on the iterated indicator variables: The correctness of the indicator variable is verified. If the metric corresponding to the indicator variable belongs to the information of the metric table to be verified, then the indicator variable passes the correctness verification. After the traversal is complete, the first indicator engine data is generated based on all indicator variables that have passed the correctness check.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the method for processing index engine data as described in any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the method for processing indicator engine data as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Expression grammar analysis method and system, storage medium and electronic equipment
CN116107552A
Method and System for Representing Quantitative Properties in a Computer Program and for Validating Dimensional Integrity of Mathematical Expressions
US20080247532A1