Data processing method and device, equipment and storage medium
By automatically determining and generating execution codes, the problem of low efficiency in manually entering calculation formulas and data processing instructions by financial personnel is solved, thus achieving automation and high efficiency in data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- RICHFIT INFORMATION TECH
- Filing Date
- 2024-12-13
- Publication Date
- 2026-06-16
AI Technical Summary
Manually entering calculation formulas and data processing instructions by finance personnel is inefficient and prone to errors, resulting in low efficiency in data analysis and processing.
By receiving user operations, the system automatically determines the target data processing instructions, parses their component information, generates execution code, and sends it to the financial processing program, thereby automating data processing.
It significantly improves data processing efficiency, reduces the inefficiency and error probability caused by manual code input, and enhances user experience.
Smart Images

Figure CN122220001A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer programming technology, and in particular to a data processing method, apparatus, device, and storage medium. Background Technology
[0002] As corporate financial management becomes increasingly complex, the preparation of financial statements and data analysis have become more and more important. Both financial statement preparation and data analysis involve the calculation and analysis of various data forms, which requires the use of various calculation formulas to process the data.
[0003] The related technologies and calculation formulas need to be manually entered into the relevant programs by financial personnel in the form of code. This requires a high level of programming skills and experience from the financial personnel, and it is easy to make mistakes in formula input, resulting in low efficiency in data analysis and processing. Summary of the Invention
[0004] This disclosure provides a data processing method, apparatus, device, and storage medium to address the problems of low efficiency and high error rate in the related art when users manually enter calculation formulas and data processing instructions.
[0005] In a first aspect, embodiments of this disclosure provide a data processing method, the data processing method comprising:
[0006] In response to the received first operation, the target data processing instruction and the component information of the target data processing instruction are determined. The target data processing instruction is used to instruct the target data in the data form to be calculated and the corresponding calculation result is output. The component information includes the type of target data processing instruction and the information to be filled in the target data processing instruction. The information to be filled is used to indicate the reference address of the target data involved in the calculation of the target data processing instruction.
[0007] In response to the received second operation, determine the information to be filled;
[0008] Based on the type of the target data processing instruction and the information to be filled, determine the execution code corresponding to the target data processing instruction;
[0009] Based on the executed code, determine the execution result corresponding to the target data processing instruction.
[0010] Secondly, embodiments of this disclosure provide a data processing apparatus, the data processing including:
[0011] The determination module is used to respond to the received first operation and determine the target data processing instruction and the component information of the target data processing instruction. The target data processing instruction is used to instruct the target data in the data form to be calculated and the corresponding calculation result to be output. The component information includes the type of target data processing instruction and the information to be filled in the target data processing instruction. The information to be filled is used to indicate the reference address of the target data involved in the calculation of the target data processing instruction.
[0012] The extraction module is used to determine the information to be filled in response to the received second operation;
[0013] The generation module is used to determine the execution code corresponding to the target data processing instruction based on the type of the target data processing instruction and the information to be filled.
[0014] The execution module is used to determine the execution result corresponding to the target data processing instruction based on the execution code.
[0015] Thirdly, embodiments of this disclosure also provide a control device, which includes:
[0016] At least one processor;
[0017] and memory that is communicatively connected to at least one processor;
[0018] The memory stores instructions that can be executed by at least one processor to cause the control device to perform the data processing method as described in the first aspect of this disclosure.
[0019] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the data processing method as described in the first aspect of this disclosure.
[0020] Fifthly, embodiments of this disclosure also provide a computer program product comprising computer execution instructions, which, when executed by a processor, are used to implement the data processing method as described in the first aspect of this disclosure.
[0021] The data processing method, apparatus, device, and storage medium provided in this disclosure, in response to a received first operation, determine a target data processing instruction and its component information; then, in response to a received second operation, determine the information to be filled; and based on the type of the target data processing instruction and the information to be filled, determine the execution code corresponding to the target data processing instruction; and based on the execution code, determine the execution result corresponding to the target data processing instruction. Therefore, all information of the target data processing instruction required for data processing can be entered through the first and second operations, without requiring manual input of the corresponding code by relevant personnel. This significantly reduces the inefficiency and error-proneness caused by manually entering the target data processing instruction code, significantly improves data processing efficiency, and facilitates users to quickly complete data processing. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0023] Figure 1 This is an application scenario diagram of the data processing method provided in the embodiments of this disclosure;
[0024] Figure 2 A flowchart illustrating a data processing method provided in one embodiment of this disclosure;
[0025] Figure 3a A flowchart illustrating a data processing method provided in yet another embodiment of this disclosure;
[0026] Figure 3b for Figure 3a A schematic diagram of the structure of the first interface provided in the illustrated embodiment;
[0027] Figure 3c for Figure 3a The flowchart of the method for parsing target data processing instructions provided in the illustrated embodiment is shown.
[0028] Figure 3d for Figure 3a The flowchart of the method for generating an abstract syntax tree provided in the illustrated embodiment is shown.
[0029] Figure 3e for Figure 3a The flowchart of the component element inspection method provided in the illustrated embodiment;
[0030] Figure 3f for Figure 3a The flowchart of the method for determining the data to be filled provided in the embodiment shown;
[0031] Figure 3g for Figure 3aThe illustrated embodiment provides a schematic diagram of the abstract syntax tree structure corresponding to the KMJE function;
[0032] Figure 4 A schematic diagram of the structure of a data processing apparatus provided in yet another embodiment of this disclosure;
[0033] Figure 5 This is a schematic diagram of the structure of a control device provided in one embodiment of the present disclosure.
[0034] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0035] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0036] The technical solutions of this disclosure and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of this disclosure will now be described with reference to the accompanying drawings.
[0037] As corporate financial management becomes increasingly complex, the preparation of financial statements and data analysis have become increasingly important. Both financial statement preparation and data analysis involve the calculation and analysis of various data forms. Therefore, financial personnel need to continuously use various calculation formulas to process data when preparing financial statements in order to generate corresponding reports based on the data processing results.
[0038] The relevant technologies, calculation formulas, or calculation instructions need to be manually entered into the relevant programs by financial personnel in the form of code. This requires a high level of programming skills and experience from the financial personnel, and it is easy to make mistakes in formula input, resulting in low efficiency in data analysis and processing.
[0039] To address this issue, this disclosure provides a data processing method that automatically generates a target data processing instruction through a first operation and a second operation to obtain the processing result corresponding to the target data processing instruction, without requiring manual input by the user. This significantly reduces the difficulty of inputting data processing instructions and improves the efficiency of data analysis and processing.
[0040] The application scenarios of the embodiments of this disclosure are explained below:
[0041] Figure 1 This diagram illustrates an application scenario of the data processing method provided in this embodiment of the disclosure. Figure 1 As shown, during the data processing process, the data processing tool 110 receives the input operation from the user 120, determines the corresponding target data processing instruction, generates its corresponding execution code, and then sends the execution code to the financial processing program 130 so that the financial processing program can perform the corresponding data processing action and obtain the data processing result.
[0042] It should be noted that, Figure 1 The data processing tools, users, and financial processing programs shown in the scenario are only illustrated by one or a specific number of examples, but this disclosure is not limited thereto. That is to say, the number of data processing tools, users, and financial processing programs can be arbitrary.
[0043] The data processing method provided in this disclosure will be described in detail below through specific embodiments.
[0044] Figure 2 This is a flowchart illustrating a data processing method provided in one embodiment of this disclosure. Figure 2 As shown, the data processing method provided in this embodiment includes the following steps:
[0045] Step S201: In response to the received first operation, determine the target data processing instruction and the composition information of the target data processing instruction.
[0046] The target data processing instruction is used to instruct the target data in the data form to be calculated and the corresponding calculation result to be output. The component information includes the type of target data processing instruction and the information to be filled in the target data processing instruction. The information to be filled is used to indicate the reference address of the target data involved in the calculation by the target data processing instruction.
[0047] Specifically, this embodiment is used to illustrate the entire data processing process.
[0048] The execution entity of this disclosure is a control, external plug-in, script, or program (hereinafter collectively referred to as a data processing tool) in a financial processing program.
[0049] The data processing tool corresponds to the existing financial processing program, which is used to input financial data and process the input data according to data processing instructions or codes. The data processing tool provides controls to directly select the target data processing instruction and the target data that the instruction targets. Based on the user's selection, it can directly generate the corresponding target data processing instruction (execution code), so that the financial processing program can complete the corresponding data processing task according to the execution code and output the corresponding calculation results.
[0050] Financial processing procedures are typically handled by an ERP management system (ERP stands for Enterprise Resource Planning). The ERP management system is configured with corresponding financial processing functions according to the company's needs, thereby completing the processing of financial data.
[0051] Data processing instructions are commands that process data and output corresponding calculation results, such as commands to sum or calculate the standard deviation of specified data. These can also be more complex calculation commands (such as identifying target data that meets several different characteristics in a data sheet and overlaying them). Different calculation methods correspond to different types of data processing instructions.
[0052] The method for selecting the target data processing instruction can be achieved through the first operation. Depending on the interface of the data processing tool, the first operation can be clicking a button control, a menu control, or entering a formula in the input field (and then providing an autocomplete function or menu for selection).
[0053] Once the target data processing instruction is selected through the first operation, the data processing tool will automatically determine its corresponding component information based on the selected target data processing instruction.
[0054] Step S202: In response to the received second operation, determine the information to be filled.
[0055] Specifically, based on the composition information, the data processing tool will determine the information to be filled that the user needs to select, such as the reference address of the target data corresponding to the summation calculation command. At this time, the data processing tool can provide an input field to input the information to be filled, or it can provide controls (such as buttons or other types of controls) to select the target data through the controls. Then, based on the target data selected by the controls, the tool will automatically determine the information to be filled corresponding to the target data.
[0056] Step S203: Based on the type of the target data processing instruction and the information to be filled, determine the execution code corresponding to the target data processing instruction.
[0057] Specifically, depending on the type of target data processing instruction, the data processing tool will determine the main body of its execution code. Through the information to be filled, the data processing tool can determine parameters such as the reference address of the corresponding target data in the execution code (which may also include the quantity of target data, whether the cell containing the target data is an empty set, and other related parameters). Then, combining the parameters and the main body of the execution code, the corresponding execution code will be automatically generated.
[0058] Step S204: Based on the execution code, determine the execution result corresponding to the target data processing instruction.
[0059] Specifically, the data processing tool sends the generated execution code to the financial processing program, which can then complete the corresponding data processing based on the execution code and output the corresponding execution results to the location specified by the execution code or the default location, thereby completing the data processing process.
[0060] In the above process, users do not need to enter complex programming operations such as execution code. Instead, they only need to interact with the controls in the financial processing tool (such as clicking) to automatically generate the execution code of the target data processing instruction. This automatically realizes the execution of the target data processing instruction, significantly improves data processing efficiency, reduces the difficulty of generating data processing instructions, and enhances the user experience.
[0061] The data processing method provided in this disclosure, in response to a received first operation, determines a target data processing instruction and its component information; then, in response to a received second operation, determines the information to be filled; and based on the type of the target data processing instruction and the information to be filled, determines the execution code corresponding to the target data processing instruction; and based on the execution code, determines the execution result corresponding to the target data processing instruction. Therefore, all information of the target data processing instruction required for data processing can be entered through the first and second operations, eliminating the need for manual input of the corresponding code by relevant personnel. This significantly reduces the inefficiency and error-proneness caused by manually entering the target data processing instruction code, significantly improves data processing efficiency, and facilitates users in quickly completing data processing.
[0062] Figure 3a This is a flowchart illustrating a data processing method provided in one embodiment of this disclosure. Figure 3a As shown, the data processing method provided in this embodiment includes the following steps:
[0063] Step S301: In response to the received first operation, determine the target data processing instruction.
[0064] Specifically, this embodiment mainly provides further explanation of the specific determination process of the target data processing instructions and the specific determination process of the reference information.
[0065] When determining the target data processing instruction, the user only needs to complete the first operation, and the data processing tool can automatically identify the corresponding data processing instruction.
[0066] In this embodiment, the data processing method is applied to a data processing tool, which includes a first interface. The first interface includes a first control for selecting a target data processing instruction and a display bar for displaying the target data processing instruction.
[0067] Therefore, the target data processing instruction can be determined as follows: based on the triggering operation of the first control, the data processing instruction corresponding to the first control is determined as the target data processing instruction; or, in response to the input operation in the display bar, the data processing instruction entered in the display bar is determined as the target data processing instruction.
[0068] like Figure 3b The diagram shown is a schematic representation of one possible structure for the first interface. Developers can configure the corresponding first interface according to their actual needs. Figure 3b In the first interface, five commonly used data processing commands (i.e., common data processing commands 1 to 5) are displayed at the top via button controls, and other less frequently used data processing commands (such as calculating expenses, calculating profits, etc.) are displayed via drop-down menus (i.e. data command selection menus). In the middle of the first interface, the selected data processing command is displayed via a text box (as shown in the figure, "JSZC" corresponds to the data processing command).
[0069] Therefore, users can directly click any button or select the corresponding option from the drop-down menu to confirm the target data processing instruction. Users who are more familiar with data processing instructions, or those who require more complex data processing logic, can also enter the corresponding data processing instructions in the text box, thus achieving multiple different ways to complete the data processing instruction input.
[0070] Meanwhile, at the bottom of the first interface, the reference information of the data to be filled in by the user will be determined based on the fields and corresponding information contained in the target data processing field. Each field will be displayed separately, and explanatory text for the meaning of each field will be provided. A selection box will be provided to select the corresponding data. After the user has made a selection, he / she can click the OK button on the other side to get the complete target data processing instructions.
[0071] Once the target data processing instruction and the reference information of the corresponding data to be filled are determined, you can click the "Output Results" button in the lower right corner of the first interface. At this time, the data processing tool will generate the corresponding execution code, send it to the financial processing program, and output the result to the location specified in the target data processing instruction.
[0072] In some embodiments, when entering data processing instructions in a text box, only part of the data processing instructions (such as functions) can be entered. In this case, the data processing tool can include an auto-completion function, which can automatically match the corresponding data processing instructions based on the partial input. When there are multiple data processing instructions that can match the input, multiple data processing instructions can be displayed in the form of a drop-down menu for the user to select.
[0073] Step S302: Based on the set parsing algorithm, extract the composition information of the target data processing instructions.
[0074] Specifically, after the target data processing command is input, the data processing tool will automatically parse the target data processing command and extract its component information.
[0075] In some embodiments, if the first operation is to select a target data processing instruction via a button or menu, the data processing tool can extract the pre-parsed component information corresponding to the target data instruction from the internal storage to improve parsing efficiency; if the first operation is to input a target data processing instruction via a text box, the data processing tool will parse the input target data processing instruction to extract its component information.
[0076] Furthermore, such as Figure 3c The diagram shown is a flowchart of a method for parsing target data processing instructions, which includes the following steps:
[0077] Step S3021: Extract formula elements from the target data processing instructions based on lexical analysis tools.
[0078] The formula elements include words, numbers, and symbols.
[0079] Specifically, the first step is to extract each formula element from the target data processing instruction in order to identify it based on the formula element.
[0080] Extraction can be achieved through syntax analysis algorithms, regular expressions, etc. For example, extracting SUM(A1:A10) yields its corresponding formula elements, including the word SUM, the symbol (:), and the characters A1 and A3. Based on these formula elements, the type of target data processing instruction and its composition information can be further identified.
[0081] Step S3022: Based on the syntax rules corresponding to the constituent elements, establish an abstract syntax tree corresponding to the target data processing instructions.
[0082] Specifically, after extracting the formula elements, these elements need to be further categorized, and the relationships between them need to be identified to determine the calculation logic involved in the target data processing instruction and the corresponding fields to be filled. This step can be implemented using the abstract syntax tree algorithm, which will be described in further detail below.
[0083] Furthermore, such as Figure 3d The diagram shown is a flowchart of the method for generating an abstract syntax tree, which includes the following steps:
[0084] Step A1: Use the formula elements of the same syntax rule as the constituent elements of a node in the abstract syntax tree.
[0085] The constituent elements include operators, fields, and functions.
[0086] Specifically, users can define different syntax rules to identify different formula elements, such as functions as one type of formula element (i.e., functions), symbols and numbers as another type of formula element (i.e., operators or fields), or different types of specific symbols (such as colons or parentheses) as a specific formula element.
[0087] By treating formula elements that correspond to the same syntax rule as nodes in an abstract syntax tree, the extraction of formula elements by node can be achieved.
[0088] Step A2: Traverse each syntax rule to determine the constituent elements of each node in the abstract syntax tree.
[0089] Specifically, by taking each formula element corresponding to a different syntax rule as a node in the abstract syntax tree and repeatedly traversing the syntax rules, the node division of all formula elements can be completed.
[0090] Step A3: Based on the correspondence between functions in different nodes, the function and its corresponding constituent elements that are included in the operator corresponding to the previous function are taken as child nodes.
[0091] The preceding function and its constituent elements are the parent nodes of the child nodes.
[0092] Specifically, after completing the node division of the abstract syntax tree, it is necessary to layer the abstract syntax tree according to the correspondence between different constituent elements. For example, the function whose corresponding parentheses are enclosed and the parentheses are treated as the child nodes of the function outside the parentheses (which can also be treated as the child nodes of the element outside the parentheses, and the element outside the parentheses is the parent node).
[0093] For example, in the target data processing instruction SUM(max(),min()), the function SUM() is the parent node of the functions max() and min(), and the latter two are child nodes.
[0094] In some embodiments, the fields and / or operators corresponding to a function can also be considered as child nodes of the function. For example, in the target data processing instruction PJSR(0,0,@p), the function PJSR() is the parent node of the fields 0, 0 and @p.
[0095] Step A4: Determine the parent-child relationships among all constituent elements to obtain the abstract syntax tree corresponding to the target data processing instructions.
[0096] Specifically, by splitting the constituent elements of child nodes and parent nodes into their respective layers, and then combining all the layers of the target data processing instructions, an abstract syntax tree can be obtained.
[0097] In some embodiments, if the target data processing instruction contains custom logic, the operation relationship corresponding to the custom logic is added to the abstract syntax tree.
[0098] Specifically, in addition to the target data processing instruction that directly calls the function in the aforementioned example, the target data processing instruction can also be a type containing custom logic. For example, the target data processing instruction can be SUM()-max() / min(), where the combination of subtraction and division is the custom logic. This custom logic can also be a node in the abstract syntax tree, and the level of this node is the same as the level of the function corresponding to the corresponding operator.
[0099] Step S3023: Determine that the constituent elements in the abstract syntax tree meet the verification requirements.
[0100] Specifically, after obtaining the abstract syntax tree, it is necessary to verify the constituent elements in the abstract syntax tree to ensure that the constituent elements meet the corresponding verification requirements and to avoid omissions relative to formula elements when extracting constituent elements.
[0101] Furthermore, such as Figure 3e The diagram shown is a flowchart of the testing method for the constituent elements, which includes the following steps:
[0102] Step B1: Determine the number and type of the constituent elements in the abstract syntax tree to correspond to the elements of the existing data processing instructions in the data processing tool.
[0103] Specifically, the data processing tool internally stores elements corresponding to various existing data processing instructions, including the names and quantities of functions, operators, and fields of the existing data processing instructions. Therefore, for each function in the abstract syntax tree, the number of its corresponding operators and fields should be the same as the corresponding elements of the existing data processing instructions stored internally by the data processing tool, and the types of each operator and field should be the same.
[0104] Step B2: Determine if the operators in the abstract syntax tree meet the set requirements.
[0105] Specifically, considering that the abstract syntax tree may also contain custom logic between different functions, and that custom logic is generally represented by operators (and the relative positional relationship between operators and each function), it is necessary to determine whether the operators corresponding to the custom logic in the abstract syntax tree conform to the corresponding operator relationships (i.e., type and positional relationships) in the existing data processing instructions. Alternatively, if the existing data processing instructions do not contain the operators corresponding to the custom logic in the abstract syntax tree, it is necessary to determine whether the corresponding operators meet the operator configuration requirements in general formulas (for example, only one operator can exist between two adjacent functions or between two adjacent fields).
[0106] These operator configuration requirements and operator relationships (i.e., setting requirements) are pre-stored in the data processing tool, which can call these setting requirements to check the operators.
[0107] By verifying the elements based on existing data processing instructions and checking the operators, it can be effectively ensured that the abstract syntax tree matches the input target data processing instructions and can be recognized and processed by data processing tools.
[0108] Step S3024: Determine the type of target data processing instruction based on the functions in the abstract syntax tree.
[0109] Specifically, based on the examined abstract syntax tree, the types of functions involved in the target data processing instructions can be determined, and the types of target data processing instructions can be determined according to the types of functions, such as corresponding to a certain existing data processing instruction, or a combination of several existing data processing instructions through custom logic.
[0110] Step S3025: Based on the fields in the abstract syntax tree, determine the information to be filled in for the target data processing instruction.
[0111] Specifically, by combining the fields in the abstract syntax tree, we can determine the feature information corresponding to the data to be filled in the target data processing instruction, that is, the information to be filled.
[0112] In this embodiment, the fields include at least three types: constant fields, variable fields, and text fields.
[0113] like Figure 3f The diagram shown is a flowchart of the method for determining the data to be filled, which includes the following steps:
[0114] Step C1: Based on the element configuration information of the existing data processing instructions corresponding to the function in the data processing tool, determine the name of the data to be filled in the target data processing instruction from the fields.
[0115] Specifically, existing data processing instructions will configure the corresponding data field name for each field. For example, the field corresponding to a certain function can correspond to different types of field names such as time, subject, amount, etc., so that data can be filtered from the corresponding data form based on these field names.
[0116] Therefore, we can first determine the field names (i.e., the data names) involved in the data to be filled based on the field names in the existing data processing instructions corresponding to the function.
[0117] Step C2: Determine the type of data to be filled based on the name of the data to be filled and the type of the corresponding field.
[0118] Specifically, after determining the name of the data to be filled, it is also necessary to determine the type of data to be filled by combining the types of fields in the existing data processing instructions. For example, the data to be filled may be a text field, a variable field, or a constant field. For example, the field corresponding to the subject is usually a text field, the field corresponding to the time is a constant field, and the field corresponding to the amount is a variable field, etc.
[0119] Step C3: Determine the information to be filled based on the name and type of the data to be filled.
[0120] Specifically, by combining the name and type of the data to be filled, the characteristics of the data to be filled can be determined, and based on these characteristics, the reference information of the data to be filled, i.e., the information to be filled, can be determined.
[0121] Step S303: In response to the received second operation, the data source determined by the second operation is used as the data source to be filled.
[0122] Specifically, the second operation can consist of multiple specific operations that select the data to be filled.
[0123] After determining the information to be filled, the data processing tool will narrow down the range of selectable data and provide corresponding selection buttons or selection controls to select the corresponding data by triggering the operation of the corresponding control (i.e., the second operation).
[0124] First, you need to select the data source, which is the database and data form corresponding to the data to be populated.
[0125] Step S304: The data field determined in the second operation is selected as the target field for the data to be filled.
[0126] Specifically, after selecting the database and data form, you also need to select the target field in the data source. Based on the information to be filled, data processing instructions can narrow down the range of information to be filled, but there may still be multiple fields available. For example, if a form has multiple fields containing "date" available, you need to select the corresponding target field from them.
[0127] Step S305: The data filtering conditions determined in the second operation are used as the data filtering conditions for the data to be filled.
[0128] Specifically, after selecting the target field, it is very likely that only a portion of the data in the target field needs to be extracted. In this case, further data filtering conditions need to be provided, such as data within a certain numerical range or containing a specific value (e.g., data containing all dates of a certain year).
[0129] Step S306: The data source, target field, and data filtering conditions are determined as reference information for the data to be populated.
[0130] Specifically, by combining the data source, target field, and data filtering conditions, we can obtain the reference information for the data to be populated. The operation of determining this reference information is the second step.
[0131] In some embodiments, when performing the second operation, the data processing tool can provide explanatory text to explain the fields that need to be selected, such as "Please select the starting date corresponding to the income and expenditure summation formula".
[0132] Step S307: Based on the type of the target data processing instruction and the information to be filled, determine the execution code corresponding to the target data processing instruction.
[0133] Specifically, for each type of target data processing instruction, the data processing tool contains corresponding executable code. However, the position of the information to be filled in the executable code is empty or is a specific placeholder. By inputting the reference information of the data to be filled, the complete executable code can be obtained.
[0134] Step S308: Based on the execution code, determine the execution result corresponding to the target data processing instruction.
[0135] Specifically, the data processing tool sends executable code to the financial processing tool, and then obtains the execution result returned by the financial processing tool, such as a calculated value, or fills the calculated value into a form.
[0136] Below is an application example based on the above method steps:
[0137] The target data processing instruction determined by the first operation (clicking the corresponding button) is:
[0138] KMJE(0, 0, 1000, 0, 0L, 0, @1181, JFYE);
[0139] By parsing the target data processing instructions, including:
[0140] First, lexical analysis and recognition: the function expression is broken down into a series of tags, such as function name, parentheses, commas, numbers, variables, and field names. In this example, it includes KMJE,(,0,,,1000,@1181,JFYE,)(the first and last two commas are used to separate the tags, and the middle comma is the original comma in the function expression).
[0141] Next comes syntax analysis and recognition: the parser organizes the tokens into an Abstract Syntax Tree (AST) according to grammatical rules. Since there is only one function, the function can be directly used as the root node of the AST, and the function's fields are its child nodes. Based on the order of function calls and parameters, corresponding AST nodes are generated for each node. Nodes may include function call nodes, constant nodes (1000), variable nodes (0, @1181), field nodes (JFYE), etc. Figure 3g As shown, it is a schematic diagram of the abstract syntax tree corresponding to the KMJE function.
[0142] By comparing it with existing data processing instructions, we can determine that it corresponds to an existing data processing instruction:
[0143]
Function: Account Amount
[0144] Then, the constituent elements are validated, including verifying the correctness of the formula based on semantic analysis, including the number of parameters and the matching of brackets; at the same time, the validity of fields and functions is verified, such as checking whether the year conforms to the format; it also includes type checking based on the node type, checking whether the field conforms to the dictionary value, and converting it into a compound query with IN statement in SQL, etc.
[0145] Therefore, the execution code body of the target data processing instruction can be obtained by resolving the function name, and then the reference information corresponding to each field can be obtained as follows:
[0146] Fiscal year: 0, which is the default current year;
[0147] Accounting period: 0, which is the default current period;
[0148] Company code: 1000;
[0149] Profit center: 0, defaults to all profit centers;
[0150] Ledger: 0L, indicating Ledger 0L;
[0151] Business scope: 0, representing all business scopes;
[0152] Subject number: @1181, which is the code for all subjects starting with 1181;
[0153] Value type: JFYE, which is the value type for the debit balance.
[0154] Next, corresponding controls can be provided based on the number of fields and their reference information, allowing users to select the data to be filled through a second operation, thereby generating complete execution code. Then, by sending the execution code to the ERP system, the value of "Subject Amount" can be output to the current form.
[0155] The data processing method provided in this disclosure automatically determines a target data processing instruction upon receiving a user's first operation, then parses the instruction to extract its corresponding component information, receives a second user operation, and determines the reference information of the data to be filled corresponding to the target data processing instruction based on the second operation. This generates corresponding execution code, which is then sent to the financial processing program to obtain the corresponding execution result. Therefore, throughout the entire data processing process, the user only needs to interact with controls without needing to input code, significantly reducing the difficulty of data processing and improving its efficiency.
[0156] Figure 4 This is a schematic diagram of the structure of a data processing apparatus provided in one embodiment of this disclosure. Figure 4 As shown, the data processing device 400 includes: a determining module 410, an extracting module 420, a generating module 430, and an executing module 440. Wherein:
[0157] The determination module 410 is used to respond to the received first operation to determine the target data processing instruction and the composition information of the target data processing instruction. The target data processing instruction is used to instruct the target data in the data form to be calculated and the corresponding calculation result to be output. The composition information includes the type of target data processing instruction and the information to be filled in the target data processing instruction. The information to be filled is used to indicate the reference address of the target data involved in the calculation of the target data processing instruction.
[0158] Extraction module 420 is used to determine the information to be filled in response to the received second operation;
[0159] The generation module 430 is used to determine the execution code corresponding to the target data processing instruction based on the type of the target data processing instruction and the information to be filled.
[0160] The execution module 440 is used to determine the execution result corresponding to the target data processing instruction based on the execution code.
[0161] Optionally, the determining module 410 is specifically used to, in response to the received first operation, determine the target data processing instruction; and extract the component information of the target data processing instruction based on the set parsing algorithm.
[0162] Optionally, the determining module 410 is specifically used to: if the data processing method is applied to a data processing tool, the data processing tool includes a first interface, the first interface includes a first control for selecting a target data processing instruction and a display bar for displaying the target data processing instruction, and based on the triggering operation of the first control, determine the data processing instruction corresponding to the first control as the target data processing instruction; or, in response to the input operation in the display bar, determine the data processing instruction input in the display bar as the target data processing instruction.
[0163] Optionally, the determining module 410 is specifically used to: extract formula elements from the target data processing instruction based on a lexical analysis tool, the formula elements including words, numbers, and symbols; establish an abstract syntax tree corresponding to the target data processing instruction based on the grammar rules corresponding to the constituent elements; determine that the constituent elements in the abstract syntax tree meet the verification requirements, the constituent elements including operators, fields, and functions; determine the type of the target data processing instruction based on the functions in the abstract syntax tree; and determine the information to be filled in the target data processing instruction based on the fields in the abstract syntax tree.
[0164] Optionally, the determining module 410 is specifically used to: take the formula elements of the same syntax rule as the constituent elements of a node in the abstract syntax tree; traverse each syntax rule to determine the constituent elements of each node in the abstract syntax tree; based on the correspondence between functions in different nodes, take the function and its corresponding constituent elements contained in the operator corresponding to the previous function as child nodes, and the previous function and its constituent elements as the parent nodes of the child nodes; determine the parent-child relationship between all constituent elements to obtain the abstract syntax tree corresponding to the target data processing instruction.
[0165] Optionally, the determining module 410 is specifically used to determine whether the number and type of the constituent elements in the abstract syntax tree correspond to the elements of the existing data processing instructions in the data processing tool; and to determine whether the operators in the abstract syntax tree meet the set requirements.
[0166] Optionally, the determining module 410 is further configured to, after extracting the formula elements in the target data processing instruction based on the lexical analysis tool, add the operation relationship corresponding to the custom logic to the abstract syntax tree if the target data processing instruction contains custom logic.
[0167] Optionally, the determining module 410 is specifically used to: if the field includes at least three types, the types of the field include constant fields, variable fields, and text fields; determine the name of the data to be filled in the target data processing instruction from the field based on the element configuration information of the existing data processing instruction corresponding to the function in the data processing tool; determine the type of data to be filled based on the name of the data to be filled and the type of the corresponding field; and determine the information to be filled based on the name of the data to be filled and the type of data to be filled.
[0168] Optionally, the extraction module 420 is specifically used to, in response to the received second operation, take the data source determined by the second operation as the data source of the data to be filled; determine the data field determined by the second operation as the target field of the data to be filled; determine the data filtering conditions determined by the second operation as the data filtering conditions of the data to be filled; and determine the data source, target field, and data filtering conditions as reference information of the data to be filled.
[0169] In this embodiment, the data processing device, through the combination of various modules, solves the problems of low efficiency and error-proneness in the related technology of users manually entering calculation formulas and data processing instructions. It eliminates the need for relevant personnel to manually enter the corresponding code, significantly reduces the inefficiency and error-proneness caused by manually entering target data processing instruction codes, significantly improves data processing efficiency, and facilitates users to quickly complete data processing.
[0170] Figure 5 This is a schematic diagram of the structure of a control device provided in one embodiment of the present disclosure, as shown below. Figure 5 As shown, the control device 500 includes a memory 510 and a processor 520.
[0171] The memory 510 stores a computer program that can be executed by at least one processor 520. This computer program is executed by at least one processor 520 to enable the control device to implement the material removal method or the data processing method provided in any of the above embodiments.
[0172] The memory 510 and the processor 520 can be connected via a bus 530.
[0173] The relevant explanations can be understood by referring to the corresponding descriptions and effects in the method embodiments, and will not be repeated here.
[0174] The relevant explanations can be understood by referring to the corresponding descriptions and effects in the method embodiments, and will not be repeated here.
[0175] One embodiment of this disclosure provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the material removal method or the data processing method provided in any of the above method embodiments.
[0176] The computer-readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0177] One embodiment of this disclosure provides a computer program product comprising computer-executable instructions that, when executed by a processor, are used to implement a material removal method as described in the above method embodiments or a data processing method as provided in any of the foregoing embodiments.
[0178] In the several embodiments provided in this disclosure, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0179] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0180] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A data processing method, characterized in that, include: In response to the received first operation, a target data processing instruction and the component information of the target data processing instruction are determined, wherein the target data processing instruction is used to instruct the target data in the data form to be calculated and the corresponding calculation result is output, and the component information includes the type of the target data processing instruction and the information to be filled in the target data processing instruction, wherein the information to be filled is used to instruct the reference address of the target data involved in the calculation of the target data processing instruction; In response to the received second operation, the information to be filled is determined; Based on the type of the target data processing instruction and the information to be filled, determine the execution code corresponding to the target data processing instruction; Based on the execution code, the execution result corresponding to the target data processing instruction is determined.
2. The method according to claim 1, characterized in that, The step of determining the target data processing instruction and its component information in response to the received first operation includes: In response to the first received operation, determine the target data processing instruction; Based on the set parsing algorithm, the component information of the target data processing instructions is extracted.
3. The method according to claim 2, characterized in that, The data processing method is applied to a data processing tool, which includes a first interface. The first interface includes a first control for selecting a target data processing instruction and a display bar for displaying the target data processing instruction. The step of determining the target data processing instruction in response to the received first operation includes: Based on the triggering operation of the first control, the data processing instruction corresponding to the first control is determined as the target data processing instruction; or, In response to an input operation in the display bar, the data processing instruction entered in the display bar is determined as the target data processing instruction.
4. The method according to claim 2, characterized in that, The extraction of the component information of the target data processing instruction based on the set parsing algorithm includes: Based on lexical analysis tools, formula elements are extracted from the target data processing instructions, and the formula elements include words, numbers, and symbols. Based on the syntax rules corresponding to the constituent elements, an abstract syntax tree corresponding to the target data processing instruction is established; Determine that the constituent elements in the abstract syntax tree meet the verification requirements; the constituent elements include operators, fields, and functions. Based on the functions in the abstract syntax tree, the type of the target data processing instruction is determined; Based on the fields in the abstract syntax tree, the information to be filled in for the target data processing instruction is determined.
5. The method according to claim 4, characterized in that, The step of establishing an abstract syntax tree corresponding to the target data processing instruction based on the syntax rules corresponding to the constituent elements includes: Formula elements corresponding to the same syntax rule are used as constituent elements of a node in the abstract syntax tree; Traverse each syntax rule to determine the constituent elements of each node in the abstract syntax tree; Based on the correspondence between functions in different nodes, the function and its corresponding constituent elements that are included in the operator corresponding to the previous function are taken as child nodes, and the previous function and its constituent elements are the parent nodes of the child nodes. Determine the parent-child relationships among all constituent elements to obtain the abstract syntax tree corresponding to the target data processing instruction.
6. The method according to claim 4, characterized in that, The step of determining whether the constituent elements in the abstract syntax tree satisfy the formula verification requirements includes: Determine the number and type of the constituent elements in the abstract syntax tree to correspond to the elements of the existing data processing instructions in the data processing tool; Determine that the operators in the abstract syntax tree meet the set requirements.
7. The method according to claim 4, characterized in that, After extracting the formula elements from the target data processing instructions using the lexical analysis tool, the method further includes: If the target data processing instruction contains custom logic, the operation relationship corresponding to the custom logic is added to the abstract syntax tree.
8. The method according to claim 4, characterized in that, The fields include at least three types, namely constant fields, variable fields, and text fields. Based on the fields in the abstract syntax tree, the information to be filled in for the target data processing instruction is determined, including: Based on the element configuration information of the existing data processing instructions corresponding to the function in the data processing tool, the name of the data to be filled in the target data processing instruction is determined from the field; The type of data to be filled is determined based on the name of the data to be filled and the type of the corresponding field; The information to be filled is determined based on the name of the data to be filled and the type of the data to be filled.
9. The method according to any one of claims 1 to 8, characterized in that, The step of determining the reference information of the data to be filled in response to the received second operation includes: In response to the received second operation, the data source determined by the second operation is used as the data source for the data to be populated; The data field determined in the second operation is selected as the target field of the data to be filled. The data filtering conditions determined in the second operation are used as the data filtering conditions for the data to be filled. The data source, target field, and data filtering conditions are determined as the reference information for the data to be populated.
10. A data processing apparatus, characterized in that, The data processing device includes: A determination module is used to determine, in response to a received first operation, a target data processing instruction and the component information of the target data processing instruction, wherein the target data processing instruction is used to instruct the target data in the data form to be calculated and the corresponding calculation result to be output, and the component information includes the type of the target data processing instruction and the information to be filled in the target data processing instruction, wherein the information to be filled is used to instruct the reference address of the target data involved in the calculation of the target data processing instruction; The extraction module is used to determine the information to be filled in response to the received second operation; A generation module is used to determine the execution code corresponding to the target data processing instruction based on the type of the target data processing instruction and the information to be filled. An execution module is used to determine the execution result corresponding to the target data processing instruction based on the execution code.
11. A control device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, cause the control device to perform the data processing method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the data processing method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, The computer program product includes computer execution instructions, which, when executed by a processor, are used to implement the data processing method as described in any one of claims 1 to 9.