Data processing method, apparatus, device, and storage medium
By automatically generating target code files and executing data processing steps sequentially based on node information, the problem of low development efficiency in existing technologies is solved, achieving efficient and flexible data processing and supporting multiple data sources and hot reloading.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CONTEMPORARY AMPEREX FUTURE ENERGY RES INST (SHANGHAI) LTD
- Filing Date
- 2025-04-09
- Publication Date
- 2026-04-30
AI Technical Summary
In existing technologies, data processing requires developers to customize programs according to user needs, resulting in low development efficiency.
By acquiring node information from multiple nodes, a target code file is generated. Based on the node dependencies, data processing steps are automatically generated, enabling the sequential execution of nodes. The target class is then generated, and the execution module is called to obtain the data processing results.
It eliminates the need for user-customized development, improves development efficiency, automates and flexibly processes data, supports data processing from multiple data sources, and enables hot reloading and flexible updates.
Smart Images

Figure CN2025088131_30042026_PF_FP_ABST
Abstract
Description
A data processing method, apparatus, device, and storage medium Cross-referencing
[0001] This application claims priority to Chinese Patent Application No. 2024115086598, filed on October 25, 2024, entitled "A data processing method, apparatus, device and storage medium", the entire contents of which are incorporated herein by reference. [Technical Field]
[0002] This application relates to the field of data processing, and in particular to a data processing method, apparatus, device, and storage medium. [Background Technology]
[0003] In scenarios where data metrics exist, there is a widespread need for data processing; for example, calculating power generation efficiency. Determining these metrics typically involves querying data from data sources, and in some cases, may also involve performing calculations on the retrieved data.
[0004] When users have a need for automated data processing, developers usually need to customize and develop corresponding programs based on the data processing logic required by the users in order to achieve automated data processing. [Summary of the Invention]
[0005] This application provides at least one data processing method, apparatus, device, and storage medium.
[0006] This application provides a data processing method, including: obtaining node information of multiple nodes, wherein the node information indicates the data processing steps corresponding to the nodes and indicates the dependencies between the nodes and other nodes; generating a target code file based on the node information of multiple nodes, wherein when the target code file is executed, the corresponding data processing steps are executed sequentially according to the dependencies of the multiple nodes to obtain the data processing result.
[0007] In the above solution, target code files are automatically generated based on the node information of multiple nodes. This allows for the sequential execution of corresponding data processing steps according to the dependencies of each node, resulting in data processing results. This eliminates the need for users to customize development based on their data processing needs, thereby improving development efficiency.
[0008] In some embodiments, the target code file is used to define a target class, the target class's attributes include a node container, the node container is used to store multiple nodes; the target code file includes a class constructor module corresponding to the target class; generating the target code file based on the node information of multiple nodes includes: generating a node constructor module corresponding to each node based on the node information, so as to serve as a class constructor module.
[0009] In the above scheme, a corresponding node construction module is generated based on the node information, which serves as the class construction module corresponding to the target class, thereby realizing the automatic generation of target code files based on node information.
[0010] In some embodiments, node information includes data corresponding to at least one data item in node identifier, node type, dependent node information, and processing instructions; generating a node construction module corresponding to each node based on each node information includes: using each data in the node information as the attribute value of the node's corresponding attribute to generate a node construction module, and when the node construction module is executed, it constructs a node with attribute values.
[0011] In the above scheme, each piece of data included in the node information is used as the attribute value of the node to generate a node construction module, thereby realizing the automatic generation of node construction modules based on the node information to obtain the target code file.
[0012] In some embodiments, node information includes node type, which includes query type and computation type. The query type includes at least two of database, cache and message queue, and multiple nodes include nodes with at least two query types.
[0013] In the above scheme, multiple nodes include nodes with at least two query types, so that the target code file can obtain data from multiple types of data sources.
[0014] In some embodiments, the target code file is used to define the target class, and the target code file includes the execution module corresponding to the target class; the method further includes: loading the target class; and calling the execution module corresponding to the target class to obtain the data processing result.
[0015] In the above scheme, the target code file is used to define the target class. When the execution module corresponding to the target class is called, it executes the data processing steps sequentially to obtain the data processing result. The data processing logic is implemented by calling the execution module corresponding to the target class. The application itself that calls the execution module does not change its code, which can realize hot loading of the data processing logic without restarting the application.
[0016] In some embodiments, the target code file includes a class constructor module corresponding to the target class; the attributes of the target class include a root identifier and a node container; loading the target class includes: calling the class constructor module to generate nodes that match the node information; saving each node into the node container; finding the root node and using the node identifier of the root node as the root identifier, which is used to determine the dependency relationship of multiple nodes.
[0017] In the above scheme, by calling the class constructor module, nodes can be generated and saved into the node container, and the root identifier can be assigned a value to determine the attributes of the target class, so as to facilitate the subsequent calling of the execution module corresponding to the target class.
[0018] In some embodiments, the target class attributes include a root identifier and a node container, the node container being used to store nodes; the node attributes include dependent node information, dependent node processing results, and processing instructions; calling the execution module corresponding to the target class to obtain the data processing results includes: determining the dependency relationships of multiple nodes based on the root identifier and the dependent node information of each node, wherein the node corresponding to the root identifier is the final root node; executing the processing instructions corresponding to each node according to the dependency relationships to obtain the processing results of each node, wherein the processing results of non-first nodes are determined based on the processing results of the node's dependent nodes, and the processing instructions are query instructions or calculation instructions; and obtaining the processing result of the root node as the data processing result.
[0019] In the above scheme, the execution module corresponding to the target class is called to determine the dependency relationship of multiple nodes using the root identifier and dependency node information, and then the corresponding processing instructions are executed in sequence according to the dependency relationship, thereby realizing the acquisition of data processing results.
[0020] In some embodiments, the processing instruction is a query instruction; before executing the processing instruction corresponding to the node, the method further includes: in response to the query instruction containing a target data item, searching for target data corresponding to the target data item from the processing results of the dependent node; replacing the target data item corresponding to the query instruction with the target data to obtain an executable query instruction.
[0021] In the above scheme, the target data is retrieved from the processing results of the dependent nodes to obtain the executable query instructions, which enables the execution of the data processing steps of the current node based on the processing results of the preceding nodes.
[0022] In some embodiments, the node attribute further includes a node type; before executing the processing instructions corresponding to the node, the method further includes: finding a target processor from a plurality of preset processors whose processor type is consistent with the node type, the target processor being used to execute the processing instructions of the node.
[0023] In the above scheme, by using the processor type and node type, it is possible to execute processing instructions using the corresponding processor.
[0024] In some embodiments, the processing instruction is a calculation instruction, which is used to calculate the processing result of at least one dependent node and obtain the calculation result as the processing result; executing the processing instruction corresponding to each node to obtain the processing result of each node includes: in response to the existence of a dependent node processing result being empty, determining that the processing result of the node is empty; in response to the existence of a dependent node processing result being empty, selecting several sets of data to be calculated from the processing results of each dependent node based on the result type of the processing results of each dependent node, performing corresponding calculations on each set of data to be calculated, and obtaining the processing result, wherein the result type includes single-value result and multi-value result.
[0025] In the above scheme, if the result of a dependent node is empty, no calculation is required. If the result of a dependent node is empty, the corresponding operation is performed according to the result type to obtain the calculation result of the calculation node.
[0026] In some embodiments, when the calculation instruction is used to calculate the processing results of two or more dependent nodes, multiple calculation processes are performed to obtain the processing result. Each calculation process involves two results, and the result is either the processing result of the dependent node or the calculation result of the processing result of the dependent node. Based on the result type of each dependent node processing result, several sets of data to be calculated are selected from the processing results of each dependent node, including: in response to both results being single-valued results, directly treating the two results as a set of data to be calculated; in response to one of the two results being a single-valued result and the other a multi-valued result, refining each value in the multi-valued result separately. Combined with single-valued results, several sets of data to be calculated are obtained; in response to the fact that both results involved in the calculation are multi-valued results and there is no calculation condition, each value in the first multi-valued result of the two results is combined with each value in the second multi-valued result of the two results to obtain several sets of data to be calculated; in response to the fact that both results involved in the calculation are multi-valued results and there is a calculation condition, and the calculation condition is a conditional data item, the first target value and the second target value are selected from the third and fourth multi-valued results of the two results respectively and combined to obtain several sets of data to be calculated, wherein the conditional data corresponding to the conditional data items in the first target value and the second target value are the same.
[0027] In the above scheme, data is selected for calculation in a manner corresponding to the result type, and the data calculation steps are implemented to obtain the corresponding data processing results.
[0028] In some embodiments, the step of loading the target class is executed in response to a query instruction that determines that the target class has not yet been loaded. The method further includes the step of directly executing the execution module corresponding to the target class to obtain the data processing result in response to a query instruction that determines that the target class has been loaded.
[0029] The above solution avoids repeatedly loading the same class, thus improving efficiency.
[0030] In some embodiments, the method further includes at least one of the following steps: updating the target code file in response to a change operation; and reloading the target class at preset intervals.
[0031] The above solution enables the updating of target code files and performs corresponding data processing according to user needs, thereby improving the flexibility of data processing.
[0032] This application provides a data processing apparatus, including an acquisition module and a generation module. The acquisition module is used to acquire node information of multiple nodes, the node information indicating the data processing steps corresponding to the nodes and indicating the dependencies between the nodes and other nodes; the generation module is used to generate a target code file based on the node information of the multiple nodes, and when the target code file is executed, it executes the corresponding data processing steps sequentially according to the dependencies of the multiple nodes to obtain the data processing result.
[0033] This application provides an electronic device, including a memory and a processor, wherein the memory stores program instructions, and the program instructions are executed by the processor to implement the above-described method.
[0034] This application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the above-described method.
[0035] In the above solution, target code files are automatically generated based on the node information of multiple nodes. This allows for the sequential execution of corresponding data processing steps according to the dependencies of each node, resulting in data processing results. This eliminates the need for users to customize development based on their data processing needs, thereby improving development efficiency.
[0036] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. [Attached Image Description]
[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0038] Figure 1 is a first flowchart of a data processing method provided in some embodiments of this application;
[0039] Figure 2 is a first schematic diagram of multiple nodes provided in some embodiments of this application;
[0040] Figure 3 is a second schematic diagram of multiple nodes provided in some embodiments of this application;
[0041] Figure 4 is a second flowchart of a data processing method provided in some embodiments of this application;
[0042] Figure 5 is a schematic diagram of data calculation provided in some embodiments of this application;
[0043] Figure 6 is a schematic diagram of the framework of a data processing apparatus provided in some embodiments of this application;
[0044] Figure 7 is a schematic diagram of the framework of an electronic device provided in some embodiments of this application;
[0045] Figure 8 is a schematic diagram of the framework of a computer-readable storage medium provided in some embodiments of this application.
Detailed Implementation Methods
[0046] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0047] In the following description, specific details such as particular subsystem structures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0048] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0049] Current data processing methods typically involve developers customizing programs based on user-defined data processing logic to automate the process. However, this approach requires developers to manually write code for each data processing logic step-by-step, resulting in low efficiency. Therefore, this embodiment proposes the following data processing method, which improves development efficiency compared to customized development. The data processing method disclosed in this application can be applied to scenarios with data metrics and can be used to determine these metrics.
[0050] Please refer to Figure 1, which is a first flowchart illustrating a data processing method provided in some embodiments of this application. Specifically, the method includes:
[0051] Step S110: Obtain node information for multiple nodes.
[0052] Each node's information can indicate its data processing steps and its dependencies on other nodes. Dependencies indicate that a node's data processing steps depend on the data processing results of other nodes.
[0053] In some embodiments, node information includes data corresponding to several data items. These data items may include dependent node information and processing instructions. The dependent node information indicates the nodes that the node depends on. Specifically, the dependent node precedes the current node, and the processing result of the dependent node can be used to participate in the data processing steps of the current node.
[0054] The data processing steps can be either data query steps or data calculation steps. The node corresponding to the data query step can be called a query node, and the node corresponding to the data calculation step can be called a calculation node.
[0055] It's understandable that the first node in the list can be a query node, and subsequent nodes can also be query nodes or computation nodes. There can be one or more nodes at the very beginning of the list.
[0056] Please refer to Figure 2, which is a first schematic diagram of multiple nodes provided in some embodiments of this application.
[0057] As shown in Figure 2, the arrows between nodes indicate the dependencies between them, representing the direction of data flow. The first compute node depends on the first and second query nodes, and the second compute node depends on both the first and third query nodes. The first, second, and third query nodes have no dependencies and are therefore the first nodes in the queue.
[0058] In some embodiments, node information includes node identifier, node type, dependent node information, and data corresponding to at least one data item in the processing instructions.
[0059] Understandably, node information can be determined based on the user's node creation action.
[0060] In a specific application scenario, when a user creates a node, they can select the node type and input processing instructions; additionally, arrows can be used to connect the nodes to represent the dependencies between them. For example, an arrow pointing from node A to node B indicates that node A is a dependent node of node B.
[0061] The node identifier can be automatically generated, or it can be obtained by incrementing from 0 based on the node's creation time, serving as the node's unique identifier.
[0062] The node types include query types and computation types. Query types are further categorized by the data source type, including at least two from databases, caches, and message queues. Query types are not limited to those listed above and can be configured according to specific application needs. Computation nodes are non-query nodes, primarily responsible for combining and calculating the results from dependent nodes.
[0063] In this context, dependency node information represents the nodes that a node depends on. Specifically, dependency node information may include the identifiers of the dependent nodes. Dependency node information can be in list form. It can also indicate the dependent nodes preceding a node. For example, as shown in Figure 2, the second compute node depends on the first compute node and the third query node. In one implementation scenario, dependency node information can be determined based on the arrows connected by the user during node creation.
[0064] The processing instructions represent the data processing steps corresponding to a node. Specifically, the processing instructions for a query node can include connection information for the entity (data source) and instructions to be executed. The connection information is used to access the data source, and the instructions to be executed are used to query data from the data source. For example, the connection information can include a Uniform Resource Locator (URL) connection, a username and password (used to access the specific entity). The form of the instructions can differ depending on the query type; for example, a database corresponds to a Structured Query Language (SQL) query statement, a cache corresponds to a key, and a message queue has a query message topic.
[0065] Step S120: Generate target code files based on node information of multiple nodes.
[0066] When the target code file is executed, it can sequentially execute the corresponding data processing steps according to the dependencies of multiple nodes to obtain the data processing results.
[0067] In the above solution, target code files are automatically generated based on the node information of multiple nodes. This allows for the sequential execution of corresponding data processing steps according to the dependencies of each node, resulting in data processing results. This eliminates the need for users to customize development based on their data processing needs, thereby improving development efficiency.
[0068] In a specific application scenario, the aforementioned data processing method can be used to determine a certain indicator. For example, the target code file is used to query photovoltaic power generation and irradiance respectively, and further calculate the data corresponding to power generation efficiency.
[0069] The above data processing methods can be applied to the determination of different data indicators. They can automatically generate code files for obtaining indicators without requiring developers to customize development for each indicator, thus greatly improving development efficiency.
[0070] In a specific application scenario, users can be provided with a combination configuration function to configure the nodes and node information corresponding to different indicators, thereby automatically generating target code files to achieve automated data processing to obtain the corresponding indicators.
[0071] In a specific application scenario, multiple nodes' corresponding metrics (codes) can be obtained simultaneously as identification information for the target code file. For example, the code can be used as the name of the target code file.
[0072] In some embodiments, the target code file is used to define the target class. The target class's attributes include a node container (NodeHolder), which is used to store nodes. Each node is used to implement its corresponding data processing steps. By using the nodes stored in the node container, the corresponding data processing steps can be executed sequentially to obtain the corresponding data processing results.
[0073] In some embodiments, the target code file includes a class constructor module corresponding to the target class, which is the code module corresponding to the class constructor method of the target class. The class constructor method can be executed during the loading phase of the target class. The class constructor module includes node constructor modules corresponding to each node, which are the code modules corresponding to the node constructor methods. Generating the target code file based on the node information of multiple nodes may include: generating node constructor modules corresponding to each node based on the node information of each node, so as to serve as the class constructor module of the target class.
[0074] It is understandable that the class construction modules differ between the target code files generated for different metrics; specifically, the node construction modules differ.
[0075] In a specific application scenario, the class constructor of the target class is executed, which includes the execution of the node constructors of each node, enabling the construction of nodes that correspond one-to-one with the node information.
[0076] In a specific application scenario, the nodes stored in the node container are instances of the node class. The node constructor is generated based on node information and is used to construct nodes. The node information can be used to determine the node's attributes.
[0077] It should be noted that node information can include data corresponding to multiple data items, and each data item can be used as the attribute value of the node.
[0078] In some embodiments, when the node construction method is executed, it constructs a node, and the node's attribute values are matched with the node information. A node construction module that generates a node based on the node information may include: using each piece of data in the node information as the attribute value of the corresponding node attribute to generate a node construction module; when this node construction module is executed, it constructs a node possessing the aforementioned attribute values.
[0079] In some embodiments, the attributes of a node include at least one of node identifier, node type, dependent node information, dependent node processing results, and processing instructions.
[0080] The initial value of the result of the dependent node is empty, and it can be updated after the dependent node has finished executing.
[0081] In a specific application scenario, a Node class is constructed, with each Node class corresponding one-to-one with a user-constructed node. A Node has the following attributes: Node Identifier (Id): Starting from 0 and auto-incrementing based on creation time, representing its unique identifier. Node Type (Type): Identifies the node type, such as MySQL, Redis (Remote Dictionary Server), etc., representing a specific query node type or computed node. Dependency Node Information (Child): A list containing the node identifiers of all dependent nodes. Dependency Node Processing Result (ChildResult): Stores the result obtained after the dependent node has completed execution. Processing Instruction (Cmd): If it is a query node, it contains the entity connection information and the execution instructions, such as SQL statements; if it is a computed node, it contains the computation instructions. For example, lambda expressions can be used as computation instructions.
[0082] In a specific application scenario, each piece of data in the node information is used as the attribute value of the corresponding node attribute to generate a node construction module. When the node construction module is executed, it constructs nodes with the corresponding attribute values. This allows for the generation of nodes one-to-one based on multiple pieces of node information.
[0083] It should be noted that the class constructor module of the target class includes the node constructor modules of each node, and may also include other code modules.
[0084] Furthermore, the class constructor module of the target class also includes a save module, which can be used to save the generated nodes to a node container, so that the executed method can access the node container to obtain the nodes.
[0085] In a specific application scenario, the target class's class constructor module also includes a storage module. This storage module can be used to save the generated nodes to a node container, and it can also be used to find the root node's identifier, using that identifier as the root identifier. The root identifier can then be used to determine the dependencies between nodes.
[0086] In some embodiments, all nodes include nodes with at least two query types. The automatic generation of the target code file enables data querying for multiple different types of entities.
[0087] In some embodiments, the target code file is used to define the target class. The target code file includes a class constructor module and an execution module corresponding to the target class. The class constructor module is the code module corresponding to the class constructor method, and the execution module is the code module corresponding to the execution method of the target class. The class constructor method can be used to determine the attributes of the target class, including a node container for storing nodes. The execution method can be used to sequentially execute the data processing steps corresponding to each node to obtain the data processing result.
[0088] In some embodiments, after generating the target code file, the method may further include: loading the target class, calling the execution module corresponding to the target class, and obtaining the data processing result.
[0089] It should be noted that the target code file is used to define the target class. The target code file includes the target class's attribute module, class constructor module, and execution module, which are used to load the target class and provide execution methods for invocation.
[0090] In some embodiments, loading the target class may include: calling the class constructor module to generate nodes that match the node information, saving each node to a node container, finding the root node, and using the node identifier of the root node as the root identifier.
[0091] Please refer to Figure 3, which is a second schematic diagram of multiple nodes provided in some embodiments of this application.
[0092] Taking the calculation of photovoltaic power generation efficiency as an example, the indicator (code) is Efficiency. It involves three nodes: the first node queries the photovoltaic power generation, the second node queries the irradiance, and the third node calculates the power generation efficiency. The first and second nodes are dependent nodes of the third node, and the processing result of the third node is based on the processing results of the first and second nodes.
[0093] Obtain node information for three nodes and generate a target code file based on that information. Specifically, an example of the automatically generated target code file is shown below; some content is omitted in the code below for illustrative purposes only:
[0094] public class Efficiency{
[0095] int root; / / Root node
[0096] Map nodeHolder; / / Stores node nodes
[0097] Efficiency(){
[0098] / / Create a node
[0099] Node node1 = new Node(xxx);
[0100] Node node2 = new Node(xxx);
[0101] Node node3 = new Node(xxx);
[0102] post-treatment() / / Saves the generated Node to nodeHolder and assigns the root node's ID to root.
[0103] }
[0104]
[0105] exec() / / Execution method
[0106] }
[0107] The target code file can be generated based on the obtained node information and code template. The template consists of four parts: a root identifier template, a node container template, a class constructor module template, and an execution module template. The root identifier and node container are attributes of the class. The root identifier is a node identifier without any subsequent nodes, serving as the final output point. The node container can be used to store generated nodes and to retrieve nodes based on their identifiers. The execution module is used to retrieve the root node based on the root identifier and execute it, returning the result. The above content represents fixed code.
[0108] The class constructor module consists of two sub-modules. The first sub-module constructs nodes, and the second sub-module places nodes into a node container, iterates through all nodes, finds nodes without successor nodes, and assigns the identifier of the found node to the root identifier. The class constructor module is dynamically generated based on node information. Specifically, the first sub-module for constructing nodes is dynamically generated; it includes converting node information into the corresponding node constructor module.
[0109] This indicator can be broken down into three parts: first, the daily photovoltaic power generation is calculated; second, the daily irradiance is calculated; and finally, the ratio of the two is calculated to obtain the power generation efficiency. The nodes obtained by executing the above construction method are as follows:
[0110] Nodes used to query photovoltaic power generation:
[0111] {
[0112] Id:0,
[0113] Type: MYSQL,
[0114] Child:[],
[0115] Cmd:{
[0116] sql:select sum(eda)from photovoltaic
[0117] }
[0118] }
[0119] Nodes used to query irradiance:
[0120] {
[0121] Id:1,
[0122] Type: MYSQL,
[0123] Child:[],
[0124] Cmd:{
[0125] sql:select sum(radion)from station
[0126] }
[0127] }
[0128] Nodes used to calculate power generation efficiency:
[0129] {
[0130] Id:2,
[0131] Type: CALCULATE,
[0132] Child:[0,1],
[0133] Cmd:{
[0134] exp:${value1} / ${value2}
[0135] }
[0136] }
[0137] In some embodiments, before loading the target class, the method further includes: in response to a query instruction, querying whether the target class has already been loaded; if it has not been loaded, then performing the step of loading the target class. If the target class has already been loaded, then it is not necessary to repeat the step of loading the target class, and then the execution module of the target class can be called.
[0138] In one implementation scenario, an IndicatorHolder class is provided. This class provides methods to obtain the target class based on the identifier information (code) of the target code file. If the target class has already been loaded, the result is returned; otherwise, the loading logic is executed, the class is saved, and the result is returned.
[0139] In a specific application scenario, when querying, the Efficiency is obtained from the indicator container and its exec method is called to get the result.
[0140] In some embodiments, the contents of the target code file can be modified and updated in response to user changes.
[0141] In a specific application scenario, the definition of the same metric can be changed, and correspondingly, the target code file can be changed accordingly.
[0142] In some embodiments, after loading the target class, the target class can be reloaded at preset intervals. Specifically, the preset interval can be set according to the actual application needs; for example, it can be set to 30 seconds.
[0143] In a specific application scenario, an IndicatorHolder class is provided. This class provides methods to obtain the target class based on the identifier information (code) of the target code file. The expiration time of the IndicatorHolder can be set; the default cache expires after thirty seconds and needs to be reloaded.
[0144] Please refer to Figure 4, which is a second flowchart of a data processing method provided in some embodiments of this application.
[0145] It should be noted that the data processing method is implemented by the application service. It obtains the indicator (code) to be queried, sends the code as a parameter to the application service, and the application service uses the class loader to load the Java class file named with the code, and then executes the query method to return the query result.
[0146] The data processing logic is implemented through the target class, and the application service's own code remains unchanged. This approach allows for hot loading of the configured query and calculation logic after user configuration, without requiring the application to be restarted.
[0147] To avoid repeatedly loading classes using the loading mechanism for each query, an `IndicatorHolder` class is used. This class provides a method to retrieve the class based on the code. If the class corresponding to the code has already been loaded, the result is returned; otherwise, the loading logic is executed, the class is saved, and the result is returned. If the class corresponding to the code cannot be retrieved, the process ends, and no data processing result is obtained.
[0148] In a specific application scenario, IndicatorHolder stores the code and its corresponding class in the form of key-value pairs. For example, Efficiency and its corresponding class.
[0149] In some embodiments, calling the execution module of the target class to obtain the data processing result includes: determining the dependency relationship of multiple nodes based on the root identifier and the dependency node information of each node, wherein the node corresponding to the root identifier is the last root node; executing the processing instructions corresponding to each node according to the dependency relationship to obtain the processing result of each node, wherein the processing result of a non-first node is determined based on the processing result of its dependent nodes, and the processing instructions are query instructions or calculation instructions; and obtaining the processing result of the root node as the data processing result.
[0150] In a specific application scenario, the execution method of the target class is called, such as the `exec` method in the previous example, to retrieve the root node from the node container based on the root identifier, execute the root node's method, and return the result. Specifically, for each node, executing the node's method includes: in response to the existence of child nodes that have not yet been executed, retrieving the child node from the node container, executing the child node's method to obtain the child node's processing result, and updating the child node's processing result using the child node's processing result; in response to the existence of no child nodes that have not yet been executed, executing the node's processing instructions to obtain the node's processing result. In this process, the node methods are executed recursively from the root node backward, thereby executing the corresponding processing instructions according to the node's dependency relationship (the root node's processing instructions are executed last).
[0151] The first node has no dependent nodes, so it directly executes the node's processing instructions and obtains the node's processing result. The processing result of non-first nodes is determined based on the processing results of their dependent nodes.
[0152] In a specific application scenario, the data processing results can also be displayed for users to view. This enables the display of the results corresponding to the user's configured data processing logic.
[0153] In a specific application scenario, the above data processing logic can be configured to be executed once at a preset time interval. For example, at the preset time interval, the code is used as a parameter to request the application service and then the subsequent steps are executed.
[0154] In some embodiments, when the processing instruction is a query instruction, before executing the processing instruction corresponding to the node, the method may further include: in response to the query instruction containing a target data item, searching for the target data corresponding to the target data item from the processing results of the dependent node, replacing the target data item corresponding to the query instruction with the target data, and obtaining an executable query instruction.
[0155] It should be noted that nodes can be used to execute query commands, which can instruct queries to be performed based on the processing results of their dependent nodes.
[0156] In one implementation scenario, the system checks if a query command contains a part of the form ${key}, where key is a variable data item. It then searches the processing results of dependent nodes for the data item corresponding to that item, replaces the corresponding data item with the actual data, and obtains the executable command.
[0157] In a specific application scenario, taking the query type of the node as a database as an example, the corresponding query command is an SQL query statement. The query command is select * from table where id in(${id}), the target data item is id, and the query results with id as the key are 1 and 2. Therefore, the final query statement is select * from table where id in(1,2).
[0158] In some embodiments, if the target data corresponding to the target data item does not exist in the processing result of the dependent node, the processing instruction can be not executed, and the processing result can be determined to be an empty result.
[0159] In some embodiments, the node attribute also includes a node type. Before executing the processing instructions corresponding to the node, the method may further include: finding a target processor from a plurality of preset processors whose processor type is consistent with the node type, for executing the processing instructions of the corresponding node.
[0160] It should be noted that different node types have different processing instruction formats. Different preset processors can be used to process different types of processing instructions. The preset processor's attributes include the processor type, which indicates the types of processing instructions the processor can execute.
[0161] In a specific application scenario, a target processor whose processor type matches the node type is selected from multiple preset processors. The target processor is then used to execute the corresponding node's processing instructions.
[0162] It should be noted that the processing result can include one or more records. Based on the number of records, the processing result can be divided into two types: single-value result and multi-value result.
[0163] In a specific application scenario, each record can be encapsulated as a map and stored as key-value pairs. Single-value results and multi-value results are in single-value and list formats, respectively.
[0164] In a specific application scenario, each record in the result is encapsulated in a map format and stored as a key-value pair. This unified result format allows for consistent processing logic, eliminating the need for additional logic checks on the results of dependent nodes. Dependent node results are stored in ChildResult in two formats: single-value and list. Single-value results contain exactly one record, typically a single key-value pair, such as a backend configuration value or an aggregated value. Multi-value results contain multiple records, but can also contain only one record or be empty. For example, multi-value results can be time-series data.
[0165] In some embodiments, when the processing instruction is a calculation instruction, the calculation instruction is used to calculate the processing results of two or more dependent nodes.
[0166] In some embodiments, in response to the absence of a dependent node and its processing result being empty, the processing result of a determined node is also empty; in response to the absence of a dependent node and its processing result being empty, a calculation instruction is executed to obtain a processing result. Specifically, based on the result type of each dependent node's processing result, several sets of data to be calculated are obtained from the dependent node's processing result, and corresponding calculations are performed on each set of data to be calculated to obtain a processing result. The result type can be a single-valued result or a multi-valued result.
[0167] When there are multiple sets of data to be calculated, the corresponding calculation is performed on each set of data to obtain the calculation result for that set. The calculation results of all sets are combined to form a multi-valued result.
[0168] In some implementation scenarios, computation instructions are used to perform calculations on the processing results of two dependent nodes.
[0169] The result of a dependent node can be a single-valued result or a multi-valued result. When calculating the results of two dependent nodes, the calculation can be performed according to the result types of the two results. Specifically, based on the result types of the two results, several sets of data to be calculated are obtained from the results of the dependent nodes, and corresponding calculations are performed on each set of data to obtain the processing result.
[0170] Furthermore, the result types of the two results can include the following three cases: both are single-valued results; one is a single-valued result and the other is a multi-valued result; both are multi-valued results.
[0171] In cases where both results are single-valued, the two results can be directly treated as a set of data to be calculated.
[0172] When one result is a single-valued result and the other is a multi-valued result, each value in the multi-valued result is combined with the single-valued result to obtain multiple sets of data to be calculated. Each set of data is then subjected to its corresponding calculation, and the results of each set are combined to form a multi-valued result, which serves as the final processing result.
[0173] If both results are multi-valued, and there are no calculation conditions, the two results are the first multi-valued result and the second multi-valued result, respectively. Each value in the first multi-valued result is combined with each value in the second multi-valued result to obtain multiple sets of data to be calculated.
[0174] You can also add calculation conditions to the calculations between multi-valued results. For example, the calculation conditions can be set as conditional data items, indicating that the calculation is performed on two values with the same conditional data.
[0175] If calculation conditions exist, and these conditions are conditional data items, the two results are the third multi-valued result and the fourth multi-valued result, respectively. The first target value and the second target value are selected from the third and fourth multi-valued results and combined to obtain several sets of data to be calculated. The conditional data items corresponding to the conditional data items in the first and second target values are the same.
[0176] In a specific application scenario, there are three cases for computation: single-value-single-value, single-value-multiple-value, and multiple-value-multiple-value. Single-value-single-value: Returns the result of the computation of the values of two nodes; the result is still a single value. Single-value-multiple-value: The value of the single value is added to the value of each multiple value corresponding to its key; the result is a list. Multiple-value-multiple-value: Divided into conditional and unconditional types. With conditions, records whose conditional keys in the first result set and the conditional keys in the second result set are selected, and then the corresponding values of the keys to be operated on are calculated. In practice, the data can be sorted according to the conditional keys, and then the computation can be performed using a two-pointer method. Without conditions, the value of each record in the first result set is operated on with each record in the second set, and the result is their Cartesian product.
[0177] In some implementation scenarios, computation instructions are used to perform calculations on the processing results of two or more dependent nodes.
[0178] It is understandable that the calculation of the results of processing two or more dependent nodes can be completed directly in a single calculation. Alternatively, it can be divided into multiple calculations, with each calculation involving two or more results. These results can be either the results of processing dependent nodes or the calculation results of those dependent nodes. For example, to calculate A, B, and C, A and B can be calculated first, and then their results can be combined with C in a subsequent calculation.
[0179] If the entire calculation is divided into multiple calculation processes, the result of the last calculation process is taken as the final result. If there are two results involved in a single calculation process, refer to the description above for calculating the results of two dependent nodes. If there are multiple results involved in a single calculation process, several sets of data to be calculated can be selected according to the result type of each result involved in the calculation. The operation logic is similar to that described above for calculating the results of two dependent nodes.
[0180] In a specific application scenario, the operation of multiple nodes also follows the above logic. First, the multi-value result set is sorted according to the condition key, and then the multi-pointer method is used to find the records with equal condition keys and perform the operation.
[0181] Please refer to Figure 5, which is a schematic diagram of data calculation provided in some embodiments of this application.
[0182] In Figure 5, a represents the calculation between two single-valued results, b represents the calculation between a single-valued result and a multi-valued result, c represents the calculation of two multi-valued results without any calculation conditions, and d represents the calculation of two multi-valued results with calculation conditions, and the calculation conditions are conditional data items.
[0183] Please refer to Figure 6, which is a schematic diagram of the framework of a data processing apparatus provided in some embodiments of this application.
[0184] The data processing device 60 includes an acquisition module 61 and a generation module 62. The acquisition module 61 is used to acquire node information of multiple nodes, the node information indicating the data processing steps corresponding to the nodes and indicating the dependencies between the nodes and other nodes; the generation module 62 is used to generate a target code file based on the node information of multiple nodes, and when the target code file is executed, it realizes the execution of the corresponding data processing steps in sequence according to the dependencies of multiple nodes to obtain the data processing result.
[0185] In the above solution, target code files are automatically generated based on the node information of multiple nodes. This allows for the sequential execution of corresponding data processing steps according to the dependencies of each node, resulting in data processing results. This eliminates the need for users to customize development based on their data processing needs, thereby improving development efficiency.
[0186] In some embodiments, the target code file is used to define a target class, the target class's attributes include a node container, the node container is used to store multiple nodes; the target code file includes a class constructor module corresponding to the target class; the generation module 62 is used to generate a target code file based on the node information of multiple nodes, specifically including: generating a node constructor module corresponding to each node based on the node information, so as to serve as a class constructor module.
[0187] In the above scheme, a corresponding node construction module is generated based on the node information, which serves as the class construction module corresponding to the target class, thereby realizing the automatic generation of target code files based on node information.
[0188] In some embodiments, node information includes data corresponding to at least one data item in node identifier, node type, dependent node information, and processing instructions; the generation module 62 is used to generate a node construction module corresponding to each node based on each node information, specifically including: using each data in the node information as the attribute value of the corresponding attribute of the node to generate a node construction module, and when the node construction module is executed, it constructs a node with attribute values.
[0189] In the above scheme, each piece of data included in the node information is used as the attribute value of the node to generate a node construction module, thereby realizing the automatic generation of node construction modules based on the node information to obtain the target code file.
[0190] In some embodiments, node information includes node type, which includes query type and computation type. The query type includes at least two of database, cache and message queue, and multiple nodes include nodes with at least two query types.
[0191] In the above scheme, multiple nodes include nodes with at least two query types, so that the target code file can obtain data from multiple types of data sources.
[0192] In some embodiments, the data processing device 60 includes a loading module and a calling module. The target code file is used to define a target class and includes an execution module corresponding to the target class. The loading module is used to load the target class. The calling module is used to call the execution module corresponding to the target class to obtain the data processing result.
[0193] In the above scheme, the target code file is used to define the target class. When the execution module corresponding to the target class is called, it executes the data processing steps sequentially to obtain the data processing result. The data processing logic is implemented by calling the execution module corresponding to the target class. The application itself that calls the execution module does not change its code, which can realize hot loading of the data processing logic without restarting the application.
[0194] In some embodiments, the target code file includes a class constructor module corresponding to the target class; the attributes of the target class include a root identifier and a node container; the loading module is used to load the target class, specifically including: calling the class constructor module to generate nodes that match the node information; saving each node to the node container; finding the root node, and using the node identifier of the root node as the root identifier, the root identifier being used to determine the dependency relationship of multiple nodes.
[0195] In the above scheme, by calling the class constructor module, nodes can be generated and saved into the node container, and the root identifier can be assigned a value to determine the attributes of the target class, so as to facilitate the subsequent calling of the execution module corresponding to the target class.
[0196] In some embodiments, the target class attributes include a root identifier and a node container, the node container being used to store nodes; the node attributes include dependent node information, dependent node processing results, and processing instructions; the calling module is used to call the execution module corresponding to the target class to obtain the data processing results, specifically including: determining the dependency relationship of multiple nodes based on the root identifier and the dependent node information of each node, wherein the node corresponding to the root identifier is the last root node; executing the processing instructions corresponding to each node according to the dependency relationship to obtain the processing results of each node, wherein the processing result of a non-first node is determined based on the processing results of the node's dependent nodes, and the processing instructions are query instructions or calculation instructions; and obtaining the processing result of the root node as the data processing result.
[0197] In the above scheme, the execution module corresponding to the target class is called to determine the dependency relationship of multiple nodes using the root identifier and dependent node information, and then the corresponding processing instructions are executed according to the dependency relationship, thereby realizing the acquisition of data processing results.
[0198] In some embodiments, the processing instruction is a query instruction; the data processing device 60 further includes a replacement module, which, before executing the processing instruction corresponding to the execution node, searches for target data corresponding to the target data item in the processing results of the dependent node in response to the query instruction containing the target data item; and replaces the corresponding target data item in the query instruction with the target data to obtain an executable query instruction.
[0199] In the above scheme, the target data is retrieved from the processing results of the dependent nodes to obtain the executable query instructions, which enables the execution of the data processing steps of the current node based on the processing results of the preceding nodes.
[0200] In some embodiments, the node attributes further include a node type; the data processing device 60 further includes a lookup module, used to find a target processor whose processor type is consistent with the node type from a plurality of preset processors before executing the processing instructions corresponding to the node, the target processor being used to execute the processing instructions of the node.
[0201] In the above scheme, by using the processor type and node type, it is possible to execute processing instructions using the corresponding processor.
[0202] In some embodiments, the processing instruction is a calculation instruction, which is used to calculate the processing result of at least one dependent node and obtain the calculation result as the processing result; the calling module is used to execute the processing instruction corresponding to each node and obtain the processing result of each node, specifically including: in response to the existence of a dependent node processing result being empty, determining that the processing result of the node is empty; in response to the existence of a dependent node processing result being empty, selecting several sets of data to be calculated from the processing results of each dependent node based on the result type of each dependent node processing result, performing corresponding calculations on each set of data to be calculated, and obtaining the processing result, wherein the result type includes single-value result and multi-value result.
[0203] In the above scheme, if the result of a dependent node is empty, no calculation is required. If the result of a dependent node is empty, the corresponding operation is performed according to the result type to obtain the calculation result of the calculation node.
[0204] In some embodiments, when the calculation instruction is used to calculate the processing results of two or more dependent nodes, multiple calculation processes are performed to obtain the processing result. Each calculation process involves two results, and the result is either the processing result of the dependent node or the calculation result of the processing result of the dependent node. The calling module is used to select several sets of data to be calculated from the processing results of each dependent node based on the result type of each dependent node's processing result. Specifically, this includes: in response to both results involved in the calculation being single-valued results, directly treating the two results as a set of data to be calculated; in response to one of the two results involved in the calculation being a single-valued result and the other being a multi-valued result, selecting the multi-valued result... Each value is combined with a single-value result to obtain several sets of data to be calculated; in response to the fact that both results involved in the calculation are multi-value results and there is no calculation condition, each value in the first multi-value result of the two results is combined with each value in the second multi-value result of the two results to obtain several sets of data to be calculated; in response to the fact that both results involved in the calculation are multi-value results and there is a calculation condition, and the calculation condition is a conditional data item, the first target value and the second target value are selected from the third and fourth multi-value results of the two results respectively and combined to obtain several sets of data to be calculated, and the conditional data corresponding to the conditional data items in the first target value and the second target value are the same.
[0205] In the above scheme, data is selected for calculation in a manner corresponding to the result type, and the data calculation steps are implemented to obtain the corresponding data processing results.
[0206] In some embodiments, the data processing apparatus 60 further includes a determining module, configured to perform a step of loading the target class in response to a query instruction that determines that the target class has not yet been loaded, and to directly execute a step of calling the execution module corresponding to the target class to obtain the data processing result in response to a query instruction that determines that the target class has been loaded.
[0207] The above solution avoids repeatedly loading the same class, thus improving efficiency.
[0208] In some embodiments, the data processing apparatus 60 further includes an update module for performing at least one of the following steps: updating the target code file in response to a change operation; and reloading the target class at preset intervals.
[0209] The above solution enables the updating of target code files and performs corresponding data processing according to user needs, thereby improving the flexibility of data processing.
[0210] Please refer to Figure 7, which is a schematic diagram of the framework of an electronic device provided in some embodiments of this application.
[0211] The electronic device 70 includes a memory 71 and a processor 72. The processor 72 is used to execute program instructions stored in the memory 71 to implement any of the above-described data processing methods. In a specific implementation scenario, the electronic device 70 may include, but is not limited to, computer equipment, electrical equipment, microcomputers, desktop computers, and servers. In addition, the electronic device 70 may also include mobile devices such as laptops and tablets, which are not limited here.
[0212] Specifically, processor 72 controls itself and memory 71 to implement any of the aforementioned data processing methods. Processor 72 can also be called a CPU (Central Processing Unit). Processor 72 may be an integrated circuit chip with signal processing capabilities. Processor 72 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 72 can be implemented using integrated circuit chips.
[0213] Please refer to Figure 8, which is a schematic diagram of the framework of a computer-readable storage medium provided in some embodiments of this application.
[0214] The computer-readable storage medium 80 stores program instructions 81 that can be executed by a processor. When the program instructions 81 are executed by the processor, they are used to implement any of the above-described data processing methods.
[0215] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0216] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another subsystem, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0217] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A data processing method, characterized in that, The method includes: Obtain node information for multiple nodes, wherein the node information indicates the data processing steps corresponding to the node and the dependency relationships between the node and other nodes; A target code file is generated based on the node information of the multiple nodes. When the target code file is executed, the corresponding data processing steps are executed sequentially according to the dependency relationship of the multiple nodes to obtain the data processing result.
2. The method according to claim 1, characterized in that, The target code file is used to define the target class, and the target class includes a node container as an attribute, which is used to store the multiple nodes; The target code file includes the class constructor module corresponding to the target class; The generation of the target code file based on the node information of the multiple nodes includes: Based on the information of each node, a node construction module corresponding to each node is generated to serve as the class construction module.
3. The method according to claim 2, characterized in that, The node information includes data corresponding to at least one of the following data items: node identifier, node type, dependent node information, and processing instructions. The node construction module that generates the corresponding node based on the node information includes: Each piece of data in the node information is used as the attribute value of the corresponding attribute of the node to generate the node construction module. When the node construction module is executed, it constructs the node with the attribute value. And / or, the node information includes node type, the node type includes query type and computation type, the query type includes at least two of database, cache and message queue, and the plurality of nodes includes nodes of at least two query types.
4. The method according to any one of claims 1 to 3, characterized in that, The target code file is used to define the target class, and the target code file includes the execution module corresponding to the target class; the method further includes: Load the target class; The execution module corresponding to the target class is invoked to obtain the data processing result.
5. The method according to claim 4, characterized in that, The target code file includes the class constructor module corresponding to the target class; the attributes of the target class include a root identifier and a node container; Loading the target class includes: The class constructor module is invoked to generate nodes that match the node information; each node is then saved into the node container. Find the root node and use its node identifier as the root identifier. The root identifier is used to determine the dependency relationship between the multiple nodes.
6. The method according to claim 4 or 5, characterized in that, The target class attributes include a root identifier and a node container, the node container being used to store the node; the node attributes include dependent node information, dependent node processing results, and processing instructions. The step of calling the execution module corresponding to the target class to obtain the data processing result includes: The dependency relationship of the plurality of nodes is determined based on the root identifier and the dependent node information of each node, wherein the node corresponding to the root identifier is the last root node; According to the dependency relationship, the processing instructions corresponding to each node are executed to obtain the processing results of each node. The processing result of a non-first node is determined based on the processing results of the dependent nodes of the node. The processing instructions are query instructions or calculation instructions. The processing result of the root node is obtained as the data processing result.
7. The method according to claim 6, characterized in that, The processing instruction is a query instruction; before executing the processing instruction corresponding to the node, the method further includes: In response to the query instruction containing a target data item, the target data corresponding to the target data item is retrieved from the processing results of the dependent node; The corresponding target data item in the query instruction is replaced with the target data to obtain the executable query instruction.
8. The method according to claim 6 or 7, characterized in that, The node attributes also include the node type; before executing the processing instructions corresponding to the node, the method further includes: From a plurality of preset processors, a target processor whose processor type matches the node type is selected, and the target processor is used to execute the processing instructions of the node.
9. The method according to claim 6, characterized in that, The processing instruction is a calculation instruction, which is used to calculate the processing result of at least one of the dependent nodes and obtain the calculation result as the processing result; The process of executing the processing instructions corresponding to each node to obtain the processing results of each node includes: In response to the existence of a dependent node whose processing result is empty, it is determined that the processing result of the node is empty; In response to the absence of the dependent node and the empty processing result, based on the result type of each dependent node processing result, several groups of data to be calculated are selected from the processing results of each dependent node, and corresponding calculations are performed on each group of data to be calculated to obtain the processing result. The result type includes single-value results and multi-value results.
10. The method according to claim 9, characterized in that, The calculation instruction is used to perform multiple calculations to obtain the processing result when calculating the processing results of two or more dependent nodes. Each calculation involves two results, and the result is either the processing result of the dependent node or the calculation result of the processing result of the dependent node. The selection of several sets of data to be calculated from the processing results of each dependent node, based on the result type of each dependent node processing result, includes: Since both results involved in the calculation are single-value results, the two results are directly used as a set of data to be calculated. In response to the fact that one of the two results involved in the calculation is the single-valued result and the other is the multi-valued result, each value in the multi-valued result is combined with the single-valued result to obtain the plurality of sets of data to be calculated; In response to the fact that both results involved in the calculation are the multi-valued results and there is no calculation condition, each value in the first multi-valued result of the two results is combined with each value in the second multi-valued result of the two results to obtain the several sets of data to be calculated; In response to the fact that both of the results involved in the calculation are multi-valued results and there are calculation conditions, and the calculation conditions are conditional data items, a first target value and a second target value are selected from the third multi-valued result and the fourth multi-valued result of the two results respectively and combined to obtain the plurality of sets of data to be calculated, wherein the conditional data corresponding to the conditional data items in the first target value and the second target value are the same.
11. The method according to any one of claims 4 to 10, characterized in that, The step of loading the target class is executed in response to a query instruction that determines that the target class has not yet been loaded, and the method further includes: The step of responding to a query command that determines that the target class has been loaded, directly executing the execution module corresponding to the target class, and obtaining the data processing result.
12. The method according to any one of claims 4 to 10, characterized in that, The method further includes at least one of the following steps: Update the target code file in response to the change operation; The target class is reloaded at preset intervals.
13. A data processing apparatus, characterized in that, include: The acquisition module is used to acquire node information of multiple nodes, wherein the node information indicates the data processing steps corresponding to the node and the dependency relationship between the node and other nodes; The generation module is used to generate a target code file based on the node information of the multiple nodes. When the target code file is executed, it executes the corresponding data processing steps in sequence according to the dependency relationship of the multiple nodes to obtain the data processing result.
14. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores program instructions that, when executed by the processor, are used to perform the method described in any one of claims 1 to 12.
15. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the method described in any one of claims 1 to 12.
Citation Information
Patent Citations
Code generation method and device, computer equipment and storage medium
CN114924721A
Task processing method and device
CN115480732A
Intelligent data processing method and device, equipment and storage medium
CN115599520A
Code generation method, electronic equipment and storage medium
CN117555533A
Code dependency calculation
US20140109106A1