Data processing methods, apparatus, devices and readable storage media

By setting information identifiers for variables and using sub-models in the data processing model to determine variable values, the problem of software design difficulty caused by complex variable dependencies is solved, achieving the effects of simplifying program coding and improving applicability.

CN116187088BActive Publication Date: 2026-05-26SHANG HAI QING YI GONG YE RUAN JIAN YOU XIAN GONG SI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANG HAI QING YI GONG YE RUAN JIAN YOU XIAN GONG SI
Filing Date
2023-03-31
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In software programs, complex dependencies between variables increase the difficulty of coding and software design.

Method used

By setting information identifiers for each variable and inputting the variables and information identifiers into the data processing model, different sub-models can determine the variable values ​​based on the information identifiers, thus simplifying the program coding process.

Benefits of technology

It reduces the difficulty of software design, improves the applicability and flexibility of data processing models, and simplifies the program coding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116187088B_ABST
    Figure CN116187088B_ABST
Patent Text Reader

Abstract

This invention discloses a data processing method, apparatus, device, and readable storage medium. The data processing method includes acquiring business data from a target business scenario and determining variables used for data transmission during business data processing. Each variable has an information identifier and a value to be determined; the information identifier characterizes the method for determining the variable value. The method inputs the variables and their information identifiers into a data processing model, which includes at least one sub-model. Each determination method has a corresponding sub-model, and different sub-models are required to determine variable values ​​based on different determination methods. The method then determines a target sub-model required to determine variable values ​​according to the determination method represented by the information identifier. Finally, the method runs the target sub-model to determine the variable values. This approach can reduce the complexity of software design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer software, and more specifically to a data processing method, apparatus, device, and readable storage medium. Background Technology

[0002] Currently, in some business scenarios, data related to these scenarios is collected and processed by software programs to obtain data processing results. For example, in the field of mold design, data such as the length, width, and height of the mold are collected, and then processed by software programs to obtain the area or volume of the mold. In software programs, this business data and data processing results are transmitted through variables. When a variable depends on other variables, the program coding for that variable can be quite complex. For instance, when determining the data to be transmitted for variable A, if variable A depends on variables B, C, and D (e.g., A = B + C / D), and variable B depends on variables E and C, variable E depends on variable C, and variable C depends on variable G, then during program coding, it is necessary to manually analyze the dependencies between these variables in the program code to ultimately determine the data to be transmitted for variable A. This undoubtedly increases the difficulty of software design. Summary of the Invention

[0003] In view of this, embodiments of the present invention provide a data processing method, a data processing apparatus, an electronic device, and a computer-readable storage medium, which can reduce the difficulty of software design.

[0004] This invention provides a data processing method, the method comprising:

[0005] Acquire business data for the target business scenario and determine the variables used for data transmission when processing the business data, wherein the variables have information identifiers and variable values ​​to be determined, and the information identifiers are used to characterize the method of determining the variable values;

[0006] The variables and their information identifiers are input into a data processing model, wherein the data processing model includes at least one sub-model;

[0007] Determine the target sub-model required to determine the variable value according to the determination method of the information identifier representation, wherein each determination method has a corresponding sub-model, and the sub-model required to determine the variable value is different based on different determination methods; and

[0008] Run the target sub-model to determine the variable values.

[0009] In another aspect, the present invention provides a data processing apparatus, the apparatus comprising:

[0010] The data acquisition module is used to acquire business data of the target business scenario and determine the variables used for data transmission when processing the business data. The variables have information identifiers and variable values ​​to be determined. The information identifiers are used to characterize the method of determining the variable values.

[0011] A data processing module is used to input the variables and the information identifiers of the variables into a data processing model, wherein the data processing model includes at least one sub-model;

[0012] The model decision module is used to determine the target sub-model required when determining the variable value according to the determination method of the information identifier representation, wherein each determination method has a corresponding sub-model, and the sub-model required when determining the variable value is different based on different determination methods; and

[0013] The model running module is used to run the target sub-model to determine the variable values.

[0014] In another aspect, the present invention provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the method described above.

[0015] In another aspect, the present invention provides an electronic device comprising a processor and a memory, the memory being used to store a computer program which, when executed by the processor, implements the method described above.

[0016] In some embodiments of this application, the data processing model determines the target sub-model required to determine variable values ​​according to the determination method represented by the information identifiers of the variables, and runs the target sub-model to obtain the variable values. Thus, during program coding, the variable values ​​of each variable can be determined by calling the data processing model, eliminating the need to include code reflecting the calculation process of each variable during program coding, thereby simplifying program coding and reducing the difficulty of software design.

[0017] In addition, each determination method has its own corresponding sub-model. The sub-models required to determine variable values ​​are different based on different determination methods, which allows the sub-models in the data processing model to be extended according to actual needs, making it more applicable. Attached Figure Description

[0018] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:

[0019] Figure 1 A flowchart illustrating a data processing method provided in one embodiment of this application is shown;

[0020] Figure 2 A schematic diagram of a computing engine module provided in one embodiment of this application is shown;

[0021] Figure 3 For based on Figure 2 A flowchart illustrating the data computation process performed by the computing engine in the system;

[0022] Figure 4 A schematic diagram of a data processing apparatus provided in one embodiment of this application is shown;

[0023] Figure 5 A schematic diagram of an electronic device provided in one embodiment of this application is shown. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] The data processing method provided in this application can be applied to industrial software or to electronic devices running such software. These electronic devices may include laptops, desktop computers, smartphones, tablets, etc. The industrial software can analyze, calculate, and process raw data collected during industrial production to obtain data processing results. Based on these results, it can control the industrial production process or display the results to facilitate monitoring by staff. For example, in mold production, the industrial software can use the collected actual length and width of the mold as raw data. Based on these dimensions, it can calculate the actual volume of the mold and compare it with the theoretically required volume. If the actual volume does not match the theoretically required volume, the production process can be adjusted and controlled to ensure that the actual volume matches the theoretically required volume.

[0026] Based on the above description, please refer to Figure 1 This is a flowchart illustrating a data processing method provided in one embodiment of this application. The data processing method may include the following steps:

[0027] Step S11: Obtain business data for the target business scenario and determine the variables used for data transmission when processing the business data. The variables have information identifiers and variable values ​​to be determined. The information identifiers are used to characterize the method of determining the variable values.

[0028] In some embodiments, the target business scenario can be the business scenario in which the industrial software is applied. Examples include the mold and general machinery manufacturing industry, the electrical and equipment manufacturing industry, and the transportation industry. The business data of the target business scenario can be data directly collected by data acquisition devices (such as sensors) within the target business scenario. For example, in the transportation industry, this could be the speed of transportation vehicles collected by speed sensors.

[0029] Industrial software can include program code, which processes business data. When processing business data, variables can be used to pass this data and the processing result. For example, business data A can be passed through variable A, business data B through variable B, and the sum of business data A and business data B through variable C. The data passed through variables is also called variable value.

[0030] Specifically, when writing program code to process business data, multiple different variables can be predefined, each used to pass different data. Each time the program code runs to process the business data, one or more predefined variables can be used for data transfer as needed. For example, the program code predefines variables A, B, and C. Variable A is used to pass business data A, variable B is used to pass business data B, and variable C is used to pass the value obtained by adding business data C and business data D. When processing business data in a target business scenario, it may be necessary to use variables A and C for data transfer (i.e., running program code that includes variables A and C). Therefore, variables A and C are the variables used for data transfer.

[0031] Understandably, when using variables to transmit data, it is first necessary to determine the data to be transmitted for each variable, i.e., the variable value of each variable. For example, suppose variable C is used to transmit the value obtained by adding business data A and business data B. Then, business data A and business data B need to be added together, and the result is used as the variable value and assigned to variable C. When determining the value of a variable, if the calculation process is complex or the dependencies between variables are complex, directly representing this calculation process in the program code would increase the difficulty of software design. Therefore, in the data processing method of this application, the calculation processes of all variables can be pre-categorized, and the calculation process corresponding to each category is implemented through a model. Then, when determining the value of a variable, the variable value can be determined directly through model calling, without having to reflect this calculation process in the program code, thereby reducing the difficulty of software design. For details, please refer to the relevant descriptions of steps S22 to S24, which will not be repeated here.

[0032] The categories obtained after dividing the calculation process of variables as described above can also be called the methods of determining variable values. Different methods of determining variable values ​​can be represented by different information identifiers. It can be understood that, based on the calculation process corresponding to each variable, each variable has a corresponding information identifier to characterize the method of determining the variable value. The information identifiers of each variable can be pre-specified during the programming process.

[0033] Step S12: Input the variables and their information identifiers into the data processing model. The data processing model includes at least one sub-model. Each determination method has a corresponding sub-model. The sub-model required to determine the variable value is different based on different determination methods.

[0034] In some embodiments, different sub-models are independent of each other, and each sub-model can run independently. Each sub-model can determine variable values ​​in a defined manner. Different sub-models can determine variable values ​​in different ways. During the execution of the program code, when it is necessary to determine the value of a variable, the variable and its information identifier can be input into the data processing model. This allows the corresponding sub-model to be run based on the information identifier to calculate the variable value.

[0035] In this embodiment, the sub-models in the data processing model can be divided into two main categories. One type of sub-model determines the variable values ​​according to a first determination method, while the other type of sub-model determines the variable values ​​according to a second determination method.

[0036] The first method of determination will be explained below.

[0037] In some embodiments, the first determination method can be to obtain the variable value based on a preset target expression. This target expression can be pre-set in the first type of sub-model. The calculation logic of the target expression can be determined based on the actual calculation logic required by the variable in the program code. For example, if variable A needs to be determined by the expression 3x+2y in the program code, then the expression 3x+2y can be used as the target expression. Or, if variable A needs to be fixedly assigned the value 123 in the program code, then the target expression can be set to 123. Specifically:

[0038] In some embodiments, the first determination method may include a formula determination method, and correspondingly, the target expression may include a calculation formula. When obtaining a variable value based on the calculation formula, the result calculated based on the calculation formula can be used as the variable value. For example, assuming the calculation formula is 5x+3y+2z, and the result calculated based on the calculation formula is 10, then 10 can be used as the variable value (i.e., the variable value).

[0039] In some embodiments, the first determination method may include a matching determination method, whereby the target expression includes matching conditions, and the matching conditions have corresponding matching information. When obtaining variable values ​​based on matching conditions, the matching information corresponding to the matching conditions can be used as the variable value if the matching conditions are determined to be true. For example, assuming there is a matching condition A, and the matching information corresponding to matching condition A is 20, then 20 can be used as the variable value if matching condition A is true. For details on how to determine if a matching condition is true, please refer to the subsequent descriptions; they will not be elaborated here.

[0040] In some embodiments, the first determining method includes a concatenation determining method, and correspondingly, the target expression includes a concatenation formula. When obtaining variable values ​​based on the concatenation formula, the information obtained by concatenating based on the concatenation formula can be used as the variable value. For example, assuming the concatenation formula uses the concatenation character '&' to concatenate the letters A and B into A&B, then the concatenated A&B can be used as the variable value.

[0041] The second determination method is explained below.

[0042] In some embodiments, the second determination method may be to invoke a target application to obtain variable values. The target application may be a template document containing the target expression (such as an Excel document containing concatenated formulas) or a third-party application. After determining the variable values ​​based on the target expression, the third-party application returns the variable values ​​to the data processing model, which then assigns values ​​to the variables.

[0043] For a detailed explanation of how to determine variable values ​​based on the target expression or by calling the target application, please refer to the relevant description in step S14, which will not be repeated here.

[0044] In some embodiments, when inputting variables and their information identifiers into the data processing model, the values ​​of at least some of the sub-variables on which the variable depends can also be input into the data processing model. This allows the sub-variable values ​​to be substituted into the target expression to obtain the variable value when determining the variable value based on the target expression; or, when calling the target application, the sub-variable values ​​can be sent to the target application so that the target application can obtain the variable value based on the sub-variable values. Here, the sub-variables on which the variable depends refer to the sub-variables required to determine the variable value. The sub-variable value refers to the value of the sub-variable. For example, assuming the calculation formula is A = 3x + 2y + 5z, then variables x, y, and z can be the sub-variables on which variable A depends. When inputting variable A and its information identifier into the data processing model, the values ​​of the sub-variables x, y, and z (i.e., the variable values) can also be input into the data processing model so that the values ​​of the sub-variables x, y, and z can be substituted into the calculation formula to obtain the variable value of variable A. For example, when determining the value of variable B, if the matching condition x+y>5 is true, the matching information 0 corresponding to the matching condition x+y>5 should be used as the variable value. Here, the sub-variables x and y in the matching condition are the sub-variables that variable B depends on. When inputting variable B and its information identifier into the data processing model, the sub-variable values ​​of sub-variables x and y can also be input into the data processing model.

[0045] In some embodiments, to reduce the amount of data input, dependency trees corresponding to variables can be pre-defined in the sub-model. A dependency tree represents the dependencies between variables and their sub-variables, as well as the dependencies between sub-variables themselves. Based on this dependency tree, any sub-variable value that can be obtained through the dependency tree does not need to be input again. For example, suppose the calculation formula is A = 3x + 2y + 5z, and z = x + y. Then the dependency tree could be A depends on x, y, and z, and z depends on x and y. When obtaining sub-variable values, only the sub-variable values ​​of x and y need to be obtained. Substituting the sub-variable values ​​of x and y into z = x + y yields the value of sub-variable z. Substituting the sub-variable values ​​of x, y, and z into A = 3x + 2y + 5z yields the value of variable A. This reduces the amount of data input to the data processing model.

[0046] In some embodiments, the sub-variable values ​​can also be stored in a specified storage location and automatically obtained by the data processing model during the calculation process. That is, in this case, it is not necessary to manually input the sub-variable values ​​into the data processing model.

[0047] Understandably, in a data processing model, the number of sub-models, the method of determining each sub-model, and the pre-set calculation formulas, matching conditions, and concatenation formulas in each sub-model can all be set according to the actual situation. For example, in scenario 1, if the variable value needs to be determined according to calculation formula 1, matching condition 1, or third-party application A, then three sub-models can be pre-created in the data processing model. Formula 1 can be pre-set in the first sub-model, matching condition 1 can be pre-set in the second sub-model, and the calling information of third application A can be pre-set in the third sub-model. In scenario 2, if the variable value needs to be determined according to calculation formula 2 or concatenation formula 2, then two sub-models can be pre-created in the data processing model. Calculation formula 2 can be pre-set in the first sub-model, and concatenation formula 2 can be pre-set in the second sub-model.

[0048] Furthermore, considering that in some scenarios, multiple target expressions or application call information may need to be pre-set for the same determination method, these can be distinguished based on variable names. For example, in some scenarios, it might be necessary to determine the value of variable A based on the formula 5x+3 and the value of variable B based on the formula 3z / 2b. In such cases, these can be set within the same sub-model:

[0049] Formula 1: A = 5x + 3

[0050] Formula 2: B = 3z / 2b

[0051] When variable A is obtained, the sub-model is run to determine the value of variable A based on calculation formula 1.

[0052] When variable B is obtained, the sub-model is run to determine the value of variable B based on calculation formula 2.

[0053] Step S13: Determine the target sub-model required when determining variable values ​​according to the determination method of information identification representation.

[0054] In some embodiments, each sub-model may have a sub-model identifier. A correspondence between information identifiers and sub-model identifiers can be established in advance. After obtaining the information identifier in step S12, the sub-model corresponding to the information identifier can be used as the target sub-model based on this correspondence.

[0055] Step S14: Run the target sub-model to determine the variable values.

[0056] Based on the descriptions of steps S11 and S13 above, it can be understood that when the determination method of information identification representation is the first determination method, the target sub-model corresponding to the first determination method can be run, so that the target sub-model obtains variable values ​​based on the preset target expression; when the determination method of information identification representation is the second determination method, the target sub-model corresponding to the second determination method can be run, so that the target sub-model obtains variable values ​​by calling the target application.

[0057] The following examples illustrate the principles of determining variable values ​​for target sub-models corresponding to different determination methods.

[0058] In some embodiments, for a target sub-model that determines variable values ​​based on a calculation formula, the target sub-model may use the result calculated based on the calculation formula as the variable value.

[0059] For example, suppose that in the target sub-model, the calculation formula is as shown in Table 1.

[0060] Table 1 Calculation Formula

[0061] variable Calculation formula A1 2x + y + 3z, and z = 3 / y B1 123 C1 3x+2y

[0062] Table 1 defines the calculation formulas for variables A1, B1, and C1 in the target sub-model.

[0063] In the calculation formulas corresponding to variables A1 and C1, the sub-variables on which the variables depend are involved. Therefore, when determining the values ​​of variables A and C, the values ​​of at least some of the sub-variables on which variables A and B depend can be substituted into the corresponding calculation formulas for calculation, and the calculation results can be used as the values ​​of variables A1 and C1.

[0064] In the calculation formula corresponding to variable B1, the variable value of variable B1 is directly specified as 123. Therefore, when determining the variable value of variable B, 123 is directly used as the variable value of variable B1.

[0065] In some embodiments, for a target sub-model that determines variable values ​​based on matching conditions, the target sub-model can use the matching information corresponding to the matching conditions as variable values ​​if the matching conditions are met. Matching conditions can be implemented in various ways. Two examples are listed below.

[0066] The first method for implementing matching conditions is as follows: Assume that multiple conditional formulas, as shown in Table 2, are set in the target sub-model. When one of the conditional formulas is true, the matching information corresponding to that conditional formula is used as the variable value.

[0067] Table 2 Conditional Formulas

[0068] conditional formula VariableA Variable B Conditional formula A A1 B1 Conditional Formula B A2 B2 Conditional formula C A3 B3

[0069] Specifically, in Table 2, when the condition formula A is true, A1 can be used as the variable value of variable A, and B1 can be used as the variable value of variable B.

[0070] If conditional formula A is not true, continue to check if conditional formula B is true. If conditional formula B is true, use A2 as the variable value of variable A and B2 as the variable value of variable B.

[0071] If conditional formula B is not true, then continue to check if conditional formula C is true. If conditional formula C is true, then A3 is used as the variable value of variable A, and B3 is used as the variable value of variable B.

[0072] The conditional formulas in Table 2 can be expressions related to the child variables that the variables depend on. Of course, these conditional formulas can also be expressions unrelated to the child variables that the variables depend on.

[0073] For example, the conditional formula A could be x+y>20;

[0074] Conditional formula B can be x+y>15;

[0075] The condition formula C can be x+y>10.

[0076] x and y are child variables on which variables A and B depend. If the sum of the values ​​of child variables x and y is greater than 20, then A1 is used as the value of variable A, and B1 is used as the value of variable B. If the sum of the values ​​of child variables x and y is not greater than 20 but is greater than 15, then A2 is used as the value of variable A, and B2 is used as the value of variable B. If the sum of the values ​​of child variables x and y is not greater than 15 but is greater than 10, then A3 is used as the value of variable A, and B3 is used as the value of variable B.

[0077] The second matching condition is implemented as follows: Assume that multiple control conditions, as shown in Table 3, are set in the target sub-model. When one of the control conditions is met, the information corresponding to the control condition is used as the variable value.

[0078] Table 3 Comparison Conditions

[0079] Subvariable A Subvariable B Variable C Variable D A1 B1 C1 D1 A2 C2 D2 A3 HASVALUE() C3 D3

[0080] Specifically, in Table 3, assuming that the value of sub-variable A is A1 and the value of sub-variable B is B1, it means that the first comparison condition is true, and C1 can be used as the value of variable C and D1 can be used as the value of variable D.

[0081] If the value of child variable A is A2, then we do not care about the value of child variable B. We can directly determine that the second comparison condition is true, and we can take C2 as the value of variable C and D2 as the value of variable D.

[0082] Assuming that the value of sub-variable A is A3, and that sub-variable B has a value (i.e., we do not care about the specific value of sub-variable B), then the third comparison condition is true. We can take C3 as the value of variable C and D3 as the value of variable D.

[0083] In some embodiments, for a target sub-model that determines variable values ​​based on a concatenation formula, the information obtained by concatenating the values ​​using the concatenation formula can be used as variable values. The concatenation formula may include concatenated characters and concatenated data.

[0084] For example, suppose that in the target sub-model, concatenated characters and concatenated data are set as shown in Table 4.

[0085] Table 4 Concatenation Formula

[0086]

[0087] In Table 4, the first concatenated data 1+2+3 is calculated to get 6. Assuming the value of sub-variable A is A, after concatenating the three concatenated data using concatenation characters, the final value of the variable is 6-A-abc.

[0088] In some embodiments, taking an Excel template as an example, for a target sub-model that calls a template document including a target expression to determine variable values, an Excel template can be pre-uploaded into the target sub-model. Variable values ​​are obtained using different methods for different Excel template formats. Specifically, this can include the following two scenarios:

[0089] 1) Input and output data are located on the same sheet page of the Excel template. In this case, input and output cells are defined on the same sheet page of the Excel document. The input data needed to calculate the variable value is entered into the input cell, and after the Excel template performs the calculation, the determined variable value (i.e., the output data) is output into the output cell.

[0090] For example, as shown in Tables 5 and 6, input cells and output cells are defined in the Excel Sheet, and the information stored in each input cell and the variables corresponding to each output cell are also defined.

[0091] Table 5 Input Cells

[0092] Enter cell location Input data A1 1+2+3 B1 {Subvariable O} C1 abc

[0093] Table 6 Output Cells

[0094] Output cell position variable A2 VariableA B2 Variable B C2 Variable C

[0095] Thus, when the target sub-model runs, the calculation result 6 of 1+2+3 will be written into cell A1 of the Sheet, the value of sub-variable O will be written into cell B1, and the string abc will be written into cell C1.

[0096] Once all data has been written, the Excel template will be driven to perform calculations.

[0097] After the calculation is complete, save the results to cells A2, B2, and C2 of the first sheet of the Excel template. Finally, assign the value in cell A2 to variable A, the value in cell B2 to variable B, and the value in cell C2 to variable C.

[0098] 2) Input and output data reside on different sheets in the Excel template. This is essentially similar to case 1), the main difference being that the input and output cells are on different sheets. Furthermore, each input and output cell is assigned a unique code. The code of each input cell determines the storage location of the input data within the Excel template, and the code of each output cell determines the variables to which the data in each output cell should be assigned. For clarity, please refer to Tables 7 and 8 for examples of input and output cells.

[0099] Table 7 Input Page

[0100] coding Input data Enter A 1+2+3 Enter B {Subvariable O} Enter C abc

[0101] Table 8 Output Page

[0102] coding variable Output A VariableA Output B Variable B Output C Variable C

[0103] The information in Tables 7 and 8 represents:

[0104] In the input page of the Excel template, enter the calculation result 6 of 1+2+3 in the input data cell coded "Input A", enter the variable value of sub-variable O in the input data cell coded "Input B", and enter the string "abc" in the input data cell coded "Input C".

[0105] Once all data has been written, the Excel template will be driven to perform calculations.

[0106] After the calculation is completed, data is read from the cell coded "Output A" and assigned to "Variable A" from the output page of the Excel template, data is read from the cell coded "Output B" and assigned to "Variable B", and data is read from the cell coded "Output C" and assigned to "Variable C".

[0107] In some embodiments, for a target sub-model that calls a third-party application to obtain variable values, the calling information of the third-party application and the data format when the target sub-model interacts with the third-party application can be pre-set in the target sub-model. The data format can be used to define the encoding of each input parameter sent by the target sub-model to the third-party application, as well as the correspondence between the output parameters and the variables.

[0108] For ease of understanding, please refer to Table 9, which provides an example definition of the invocation information of third-party applications and the data format when the target sub-model interacts with third-party applications.

[0109]

[0110]

[0111] Based on Table 9, the input values ​​can be calculated first, and then the calculated values ​​can be combined with the input codes to form an object group and passed to a third-party application for calculation. For example, in Table 9, "Input A" is 6, "Input B" is the value of sub-variable O, and "Input C" is the string "abc". "Input A" and 6 are combined, the value of variable O ("Input B") is combined, and "Input C" and the string "abc" are combined. Finally, the combined object is passed to the third-party application.

[0112] After the third-party application finishes its calculations, it returns an array of objects to the target sub-model. The target sub-model reads the results from this array and assigns them to variables. For example, in Table 9, the read "Output A" is assigned to "Variable A", "Output B" is assigned to "Variable B", and "Output C" is assigned to "Variable C".

[0113] The above provides an exemplary explanation of the principles governing the determination of variable values ​​in target sub-models corresponding to different determination methods.

[0114] In summary, in the technical solutions of some embodiments of this application, the data processing model determines the target sub-model required to determine the variable value according to the determination method represented by the information identifier based on the variable's information identifier, and runs the target sub-model to obtain the variable value. Thus, during program coding, the variable value of each variable can be determined by calling the data processing model, eliminating the need to include code reflecting the calculation process of each variable during program coding, thereby simplifying program coding and reducing the difficulty of software design. Furthermore, each determination method has a corresponding sub-model, and the sub-model required to determine the variable value differs depending on the determination method, allowing the sub-models in the data processing model to be extended according to actual needs, thus enhancing applicability.

[0115] For example, suppose that during program coding, it is necessary to determine the value of variable A, and the formula for calculating variable A is 2x + 3y + 6z, where x = 2a, a = w + 4y, and w = m + n. Understandably, implementing the entire calculation process of variable A in the program code would undoubtedly increase the complexity of the code and the difficulty of software design. In this application, it is only necessary to call the data processing model and send variable A and its information identifier to the model. By comparison, it can be seen that this application can greatly simplify program coding and reduce the difficulty of software design.

[0116] In some embodiments, after running the target sub-model and obtaining the variable values, the data processing method of this application further includes:

[0117] The acquired variable values ​​are saved to a linked bucket, which stores variables for which values ​​have been acquired, along with their values. Thus, once a variable's value has been determined, subsequent determinations of that variable's value can be performed without re-running the corresponding target sub-model; the value can be directly retrieved from the linked bucket, improving the speed of variable retrieval.

[0118] In view of the above, in some embodiments, the data processing method of this application further includes:

[0119] Determine if the variable is in the acquisition chain; if so, skip the execution of the target sub-model. The acquisition chain is used to store the variable whose value is currently being acquired; and / or

[0120] Determine if the variable is in the link bucket. If so, skip the execution of the target sub-model and determine the variable value from the link bucket. The link bucket is used to store variables whose values ​​have been obtained, as well as the variable values ​​themselves.

[0121] This prevents the target sub-model from being run repeatedly to obtain variable values.

[0122] For ease of understanding, a specific example is provided below. Please refer to [link / reference]. Figure 2 This is a schematic diagram of a computing engine 300 provided in one embodiment of this application.

[0123] Figure 2 In this context, the calculation engine 300 can be equated to the aforementioned data processing model. The calculation engine 300 serves as a unified calculation entry point. That is, whenever it's necessary to determine the values ​​of different variables, the calculation engine 300 can be invoked to determine those values. Specifically, the calculation engine 300 may include a calculator providing interface 32, a calculator interface 33, a basic extended parameter module 34, and a calculator 331. The calculator 331 can be equated to the aforementioned sub-model. Different calculators 331 can implement different calculation methods. Specifically, the calculator 331 may include a skip calculator 331. Invoking the skip calculator 331 indicates that no calculation is performed. Of course, the calculator 331 may also include multiple calculators 331 with different calculation logics. These calculators 331 with different calculation logics are created according to the actual situation.

[0124] In some embodiments, the calculation engine 300 can automatically analyze the dependencies between variables and obtain the corresponding calculator 331 to perform calculations on the variables.

[0125] In some embodiments, since different calculators 311 have different calculation methods and corresponding input / output formats, the input and output of different calculators 311 can be standardized through the calculator interface 32, that is, different calculators 311 can be called through the calculation interface 32. The calculation interface 32 serves as a unified calculation interface. In this way, calculators 311 with different calculation methods can be flexibly expanded.

[0126] In some embodiments, the calculator provides an interface 33 for determining the calculator 331 used for calculation based on information identification. The calculator 331 used for calculation may be equivalent to the target sub-model described above.

[0127] In some embodiments, the basic extended parameter module 34 is used to store extended parameters. These extended parameters can be equivalent to the sub-variables stored in a specified location as described above. This effectively improves the calculator's flexibility.

[0128] Please see Figure 3 , for the basis Figure 2 This is a flowchart illustrating the data computation process performed by the computing engine 300. The computation process may include the following steps:

[0129] Step S411: Obtain the variables to be calculated. Specifically, the variables to be calculated can be obtained through the unified calculation entry point of the calculation engine 300.

[0130] Step S412: Determine whether the variable has been calculated. Specifically, check if the variable value exists in the link bucket. If it exists, it means the variable has been calculated, and the variable value is directly obtained from the link bucket, then proceed to step S424; if it does not exist, it means the variable has not been calculated, then proceed to step S413.

[0131] Step S413: Determine whether variable calculations need to be ignored. Specifically, a list of variables to be ignored can be pre-set in the calculation engine 300. If the variable to be calculated is in the list of ignored variables, it means that the variable needs to be ignored, and the pre-set default return value can be directly used as the calculation result (e.g., 0), and step S424 is executed; if the variable to be calculated is not in the list of ignored variables, it means that the variable does not need to be ignored, and step S414 is executed.

[0132] Step S414: Obtain the calculator for calculation. Specifically, the calculator for calculation can be obtained from the calculation engine 300 based on the variable information identifier.

[0133] Step S415: Determine if a calculator exists. Specifically, if no calculator exists corresponding to the information identifier, it means there is no calculator, and proceed to step S416; if a calculator exists corresponding to the information identifier, it means there is a calculator, and proceed to step S418.

[0134] Step S416: Determine whether to skip the error. If yes, the pre-set default return value can be used as the calculation result, and step S424 can be executed; otherwise, step S417 can be executed.

[0135] Step S417: Display an error message.

[0136] Step S418: Determine whether the calculation is skipped. Specifically, if the calculator corresponding to the variable's information identifier is a skip calculator, then the calculation is skipped, and the preset default return value can be used as the calculation result. Proceed to step S424. If the calculator corresponding to the variable's information identifier is not a skip calculator, then the calculation is not skipped. Proceed to step S419.

[0137] Step S419: Determine if the variable already exists in the computation chain. Specifically, if the variable already exists in the computation chain, proceed to step S420; if the variable does not exist in the computation chain, proceed to step S422.

[0138] Step S420: Determine whether to skip the error. If yes, the pre-set default return value can be used as the calculation result, and proceed to step S424; otherwise, proceed to step S421.

[0139] Step S421: Display an error message.

[0140] Step S422: Add to the calculation chain and use the calculator to perform the calculation. Specifically, the calculator corresponding to the variable's information identifier can be used to calculate the variable value. At the same time, the variable is added to the calculation chain to indicate that the variable's value is being calculated.

[0141] Step S423: Remove from the calculation chain and add the calculation result to the output list. Specifically, after the variable value is calculated, the variable can be removed from the calculation chain, and the calculation result can be output through the calculator interface 13. In some embodiments, the calculation result can also be saved as an intermediate variable to the basic extended parameter module for subsequent calculations.

[0142] Step S424: Return the result.

[0143] Please see Figure 4 This is a schematic diagram of a data processing apparatus provided in one embodiment of this application. The apparatus includes a data processing model, which comprises at least one sub-model; the data processing apparatus includes:

[0144] The data acquisition module is used to acquire business data of the target business scenario and determine the variables used for data transmission when processing the business data. The variables have information identifiers and variable values ​​to be determined. The information identifiers are used to characterize the method of determining the variable values.

[0145] A data processing module is used to input the variable and the information identifier of the variable into a data processing model, wherein the data processing model includes at least one sub-model, each determination method has a corresponding sub-model, and the sub-model required to determine the variable value is different based on different determination methods;

[0146] The model decision module is used to determine the target sub-model required when determining variable values ​​according to the method of determining information identification representation; and

[0147] The model running module is used to run the target sub-model to determine variable values.

[0148] Please see Figure 5 The diagram below illustrates an electronic device according to an embodiment of this application. The electronic device includes a processor and a memory, the memory storing a computer program that, when executed by the processor, implements the method described above.

[0149] The processor can be a central processing unit (CPU). It can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.

[0150] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of this invention. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and modules stored in the memory, thereby implementing the methods described in the above embodiments.

[0151] The memory may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0152] One embodiment of this application also provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the above-described method.

[0153] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A data processing method, characterized in that, The method includes: Acquire business data for a target business scenario, and determine the variables used for data transmission and the sub-variable values ​​of at least some of the sub-variables on which the variables depend when processing the business data, wherein the variables have information identifiers and variable values ​​to be determined, and the information identifiers are used to characterize the method of determining the variable values; The variable and the information identifier of the variable are input into the data processing model, wherein the data processing model includes at least one sub-model, each determination method has a corresponding sub-model, and the sub-model required to determine the variable value is different based on different determination methods; Determine the target sub-model required to determine the variable values ​​according to the determination method of the information identifier representation; and Run the target sub-model to determine the variable values; The step of running the target sub-model to determine the variable values ​​includes: Analyze the dependencies between all the child variables that the variable depends on; Based on the obtained sub-variable values, according to the dependencies between the sub-variables, the sub-variable values ​​of all the sub-variables that the variable depends on are obtained in sequence, and the variable value is obtained based on the sub-variable values ​​of all the sub-variables.

2. The method as described in claim 1, characterized in that, Running the target sub-model to determine the variable values ​​includes: When the determination method of the information identifier representation is the first determination method, the target sub-model corresponding to the first determination method is run, so that the target sub-model obtains the variable value based on the preset target expression; When the information identifier representation is determined by the second determination method, the target sub-model corresponding to the second determination method is run, so that the target sub-model obtains the variable value by calling the target application.

3. The method as described in claim 2, characterized in that, The first determination method includes a formula determination method, and correspondingly, the target expression includes a calculation formula; The process of obtaining the variable value based on the preset target expression includes: The result calculated based on the aforementioned formula shall be used as the variable value.

4. The method as described in claim 2, characterized in that, The first determination method includes a matching determination method, and correspondingly, the target expression includes matching conditions, and the matching conditions have corresponding matching information; The process of obtaining the variable value based on the preset target expression includes: If the matching condition is found to be true, the matching information corresponding to the matching condition is used as the variable value.

5. The method as described in claim 2, characterized in that, The first determining method includes a splicing determining method, and correspondingly, the target expression includes a splicing formula; The process of obtaining the variable value based on the preset target expression includes: The information obtained by splicing based on the splicing formula is used as the variable value.

6. The method as described in claim 2, characterized in that, The step of obtaining the variable value by calling the target application includes: The variable value is obtained by invoking a template document that includes the target expression; and / or The variable value is obtained by calling a third-party application.

7. The method as described in claim 1, characterized in that, Before running the target sub-model, the method further includes: Determine whether the variable is located in the acquisition chain. If so, skip the execution of the target sub-model. The acquisition chain is used to store the variable whose value is currently being acquired; and / or Determine whether the variable is located in the link bucket. If so, skip the execution of the target sub-model and determine the variable value from the link bucket. The link bucket is used to store variables whose variable values ​​have been obtained and the variable values ​​of the variables.

8. The method as described in claim 1, characterized in that, After running the target sub-model and obtaining the variable values, the method further includes: The obtained variable values ​​are saved to the link bucket, which is used to store the variables whose variable values ​​have been obtained and the variable values ​​of the variables.

9. A data processing apparatus, characterized in that, The device includes: A data acquisition module is used to acquire business data of a target business scenario and determine the variables used for data transmission and the sub-variable values ​​of at least some of the sub-variables on which the variables depend when processing the business data. The variables have information identifiers and variable values ​​to be determined, and the information identifiers are used to characterize the method of determining the variable values. A data processing module is used to input the variable and the information identifier of the variable into a data processing model, wherein the data processing model includes at least one sub-model, each determination method has a corresponding sub-model, and the sub-model required to determine the variable value is different based on different determination methods; The model decision module is used to determine the target sub-model required when determining the variable values ​​according to the determination method of the information identifier representation; and The model running module is used to run the target sub-model to determine the variable value. Specifically, it analyzes the dependencies between all sub-variables on which the variable depends; based on the obtained sub-variable values, it sequentially obtains the sub-variable values ​​of all sub-variables on which the variable depends according to the dependencies between the sub-variables, and obtains the variable value based on the sub-variable values ​​of all the sub-variables.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 8.

11. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory being used to store a computer program that, when executed by the processor, implements the method as described in any one of claims 1 to 8.