Data processing method and device and electronic equipment

By selecting and orchestrating multiple target rule nodes in the rule engine to form a target rule model, the problem of low processing efficiency of massive data in the existing technology is solved, and resource conservation and processing efficiency are improved.

CN119441286APending Publication Date: 2025-02-14CHINA SATELLITE NETWORK EXPLORATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410624916.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing data processing method based on rules engines consumes a lot of resources and has low data processing efficiency when facing massive data.

Method used

By responding to the rule node selection operation of the target object, multiple target rule nodes are selected from the rule database, and these nodes are orchestrated to form a target rule model to execute multiple data processing logic required for the target data.

Benefits of technology

This method reduces resource consumption, improves data processing efficiency, and does not need to match target data with rule nodes in the rule database separately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441286A_ABST
    Figure CN119441286A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device and electronic equipment, and relates to the technical field of combination of rule engines and data processing.The method comprises the steps that a plurality of target rule nodes are selected from a rule database in response to rule node selection operation of a target object; and arranging the plurality of target rule nodes to obtain a target rule model. Through the method, resource consumption can be reduced, and data processing efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of combining a rule engine with data processing, and in particular to a data processing method, device and electronic device. Background Art

[0002] The rule engine is one of the key components in the IoT system. It is used to manage and process the device or sensor data stream in the IoT system. Its main function is to define, execute and manage rules to trigger specific actions, decisions or alerts based on the received data. The rule engine allows users to achieve automated, real-time data processing and control in the IoT environment to meet various application needs.

[0003] At present, the process of data processing based on rule engines mainly involves first using programming languages ​​to add or update rule classes to the rule base of the rule engine, then matching the rule classes corresponding to the target data in the rule base based on the preset algorithm, and making decisions on the target data based on the rule engine corresponding to the rule class. However, this method consumes a lot of resources and has low data processing efficiency when facing massive data. Summary of the invention

[0004] The present application provides a data processing method, device and electronic device, which can solve the problem that the current data processing process based on rule engines not only consumes a lot of resources but also has low data processing efficiency when facing massive data.

[0005] In a first aspect, the present application provides a data processing method, the method comprising:

[0006] In response to a rule node selection operation of a target object, multiple target rule nodes are selected from a rule database, wherein different target rule nodes are used to execute different data processing logics;

[0007] The multiple target rule nodes are arranged to obtain a target rule model, where the target rule model is used to execute multiple data processing logics required for the target data.

[0008] Through the above method, the target rule nodes can be freely selected according to the specific needs of the target object, and the target rule model can be obtained by arranging the target rule nodes, without matching the target data with the rule nodes in the rule database respectively, which can not only reduce resource consumption but also improve data processing efficiency.

[0009] In a possible design, in response to the rule node selection operation of the target object, multiple target rule nodes are selected from the rule database, including:

[0010] Displaying a node arrangement interface, wherein the first sub-interface in the node arrangement interface is used to display some rule nodes in the rule database;

[0011] In response to the rule node selection operation of the target object on the first sub-interface, the multiple target rule nodes in the partial rule nodes are displayed in the second sub-interface of the node arrangement interface.

[0012] Through the above method, multiple target rule nodes can be displayed to facilitate flexible arrangement and processing of target objects.

[0013] In a possible design, the node arrangement interface further includes a third sub-interface, and the third sub-interface is used to present at least one rule node search option, and different rule node search options are set according to different rule node attributes;

[0014] The method further comprises:

[0015] In response to a target rule node search instruction of the target object for the third sub-interface, selecting a first target rule node from the plurality of target rule nodes from the rule database;

[0016] The first target rule node is displayed in the first sub-interface.

[0017] Through the above method, it is convenient for the target object to flexibly search for the target rule node.

[0018] In a possible design, the partial rule nodes also include at least one general rule node.

[0019] In a possible design, the arranging the multiple target rule nodes to obtain a target rule model includes:

[0020] In response to the rule node arrangement operation of the target object on the second sub-interface, determining a first connection relationship between the plurality of target rule nodes;

[0021] The multiple target rule nodes are arranged based on the first connection relationship to obtain a target rule model.

[0022] Through the above method, it is convenient for the target object to flexibly arrange multiple target rule nodes.

[0023] In a possible design, after arranging the multiple target rule nodes to obtain the target rule model, the method further includes:

[0024] In response to a data processing request for the target data, obtaining a target rule engine corresponding to the target rule model;

[0025] The target data is processed based on the target rule engine.

[0026] In a possible design, the processing the target data based on the target rule engine includes:

[0027] According to the set time window, the target data is divided into a plurality of target sub-data;

[0028] Determine the target rule nodes corresponding to the plurality of target sub-data respectively;

[0029] The multiple target sub-data are processed based on the target rule engine and the target rule nodes respectively corresponding to the multiple target sub-data.

[0030] Through the above method, a rule matching mechanism based on time window is provided, which can realize real-time monitoring and processing of data and discover and handle problems more quickly.

[0031] In a possible design, after determining the target rule nodes to which the plurality of target sub-data respectively correspond, the method further includes:

[0032] For the multiple target sub-data, the following operations are performed respectively:

[0033] Determine a state machine of a target rule node corresponding to a target sub-data;

[0034] Based on the state information of the state machine, a data processing result of the one target sub-data is determined.

[0035] In a possible design, after arranging the multiple target rule nodes to obtain the target rule model, the method further includes:

[0036] Obtaining the plurality of target rule nodes and a plurality of sub-connection relationships in a first connection relationship between the plurality of target rule nodes based on the target rule model, wherein each sub-connection relationship corresponds to two target rule nodes;

[0037] In response to an update operation of the target object on the target rule model, selecting at least one target rule node from the multiple target rule nodes, and determining a second connection relationship between the at least one target rule node based on the multiple sub-connection relationships;

[0038] The at least one target rule node is arranged based on the second connection relationship to obtain an updated target rule model.

[0039] Through the above method, the rule nodes of the target rule model can be deleted, thereby improving the flexibility of the target rule model and the user experience.

[0040] In a possible design, the updating operation of the target rule model in response to the target object further includes:

[0041] Selecting a second target rule node other than the plurality of target rule nodes from the rule database;

[0042] Determine a third connection relationship of the second target rule node among the multiple target rule nodes;

[0043] Based on the first connection relationship and the third connection relationship, the second target rule node and the multiple target rule nodes are arranged to obtain an updated target rule model.

[0044] Through the above method, rule nodes can be added to the target rule model to improve the flexibility of the target rule model and user experience.

[0045] In a second aspect, the present application provides a data processing device, the device comprising:

[0046] A selection module, configured to select a plurality of target rule nodes from a rule database in response to a rule node selection operation of a target object, wherein different target rule nodes are used to execute different data processing logics;

[0047] The orchestration module is used to orchestrate the multiple target rule nodes to obtain a target rule model, where the target rule model is used to execute multiple data processing logics required for the target data.

[0048] In a possible design, the selection module is specifically used for:

[0049] Displaying a node arrangement interface, wherein the first sub-interface in the node arrangement interface is used to display some rule nodes in the rule database;

[0050] In response to the rule node selection operation of the target object on the first sub-interface, the multiple target rule nodes in the partial rule nodes are displayed in the second sub-interface of the node arrangement interface.

[0051] In a possible design, the node arrangement interface further includes a third sub-interface, and the third sub-interface is used to present at least one rule node search option, and different rule node search options are set according to different rule node attributes;

[0052] The selection module is also used for:

[0053] In response to a target rule node search instruction of the target object for the third sub-interface, selecting a first target rule node from the plurality of target rule nodes from the rule database;

[0054] The first target rule node is displayed in the first sub-interface.

[0055] In a possible design, the partial rule nodes also include at least one general rule node.

[0056] In a possible design, the arrangement module is specifically used to:

[0057] In response to the rule node arrangement operation of the target object on the second sub-interface, determining a first connection relationship between the plurality of target rule nodes;

[0058] The multiple target rule nodes are arranged based on the first connection relationship to obtain a target rule model.

[0059] In one possible design, the device further includes:

[0060] A first acquisition module, configured to acquire a target rule engine corresponding to the target rule model in response to a data processing request of the target data;

[0061] A data processing module is used to process the target data based on the target rule engine.

[0062] In a possible design, the data processing module is specifically used for:

[0063] According to the set time window, the target data is divided into a plurality of target sub-data;

[0064] Determine the target rule nodes corresponding to the plurality of target sub-data respectively;

[0065] The multiple target sub-data are processed based on the target rule engine and the target rule nodes respectively corresponding to the multiple target sub-data.

[0066] In a possible design, the data processing module is further used for:

[0067] For the multiple target sub-data, the following operations are performed respectively:

[0068] Determine a state machine of a target rule node corresponding to a target sub-data;

[0069] Based on the state information of the state machine, a data processing result of the one target sub-data is determined.

[0070] In one possible design, the device further includes:

[0071] A second acquisition module, configured to obtain the plurality of target rule nodes and a plurality of sub-connection relationships in a first connection relationship between the plurality of target rule nodes based on the target rule model, wherein each sub-connection relationship corresponds to two target rule nodes;

[0072] a determination module, configured to select at least one target rule node from the plurality of target rule nodes in response to an update operation of the target object on the target rule model, and determine a second connection relationship between the at least one target rule node based on the plurality of sub-connection relationships;

[0073] An updating module is used to arrange the at least one target rule node based on the second connection relationship to obtain an updated target rule model.

[0074] In one possible design, the determining module is further used to:

[0075] Selecting a second target rule node other than the plurality of target rule nodes from the rule database;

[0076] Determine a third connection relationship of the second target rule node among the multiple target rule nodes;

[0077] Based on the first connection relationship and the third connection relationship, the second target rule node and the multiple target rule nodes are arranged to obtain an updated target rule model.

[0078] In a third aspect, the present application provides an electronic device, including:

[0079] Memory, used to store computer programs;

[0080] The processor is used to implement the data processing method of the first aspect when executing the computer program stored in the memory.

[0081] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data processing method of the first aspect is implemented.

[0082] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes the data processing method of the first aspect.

[0083] The technical effects that can be achieved in each of the above-mentioned second to fifth aspects and each of the above-mentioned aspects refer to the technical effects that can be achieved in the above-mentioned first aspect or various possible schemes in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 A schematic diagram of a rule engine workflow;

[0085] Figure 2 A flowchart of a data processing method provided in an embodiment of the present application;

[0086] Figure 3 A schematic diagram of a node arrangement interface provided in an embodiment of the present application;

[0087] Figure 4 A schematic diagram of a second sub-interface in a node arrangement interface provided in an embodiment of the present application;

[0088] Figure 5 A schematic diagram of the architecture of a target rule engine provided in an embodiment of the present application;

[0089] Figure 6 A logical diagram of data analysis provided in an embodiment of the present application;

[0090] Figure 7a A logical diagram of data merging provided in an embodiment of the present application;

[0091] Figure 7b A logic diagram of actuator initialization provided in an embodiment of the present application;

[0092] Figure 8 A logical schematic diagram of a target rule model update provided in an embodiment of the present application;

[0093] Fig. 9 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0094] Fig.10 A schematic diagram of the structure of another data processing device provided in an embodiment of the present application;

[0095] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0096] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, and A and B exist, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0097] This is described in detail below in conjunction with the accompanying drawings and specific embodiments. Although the embodiments of the present application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided in the embodiments of the present application. The method may be executed or executed in parallel in the order of the method shown in the embodiments or drawings during the actual processing process or when the device is executed.

[0098] Figure 1 The flowchart of a rule engine operation includes matching the rule class corresponding to the target data in the rule base of the rule engine based on a preset algorithm (for example, the Rate algorithm), and then making a decision on the target data based on the rule engine corresponding to the rule class to obtain the decision result of the target data. However, this method not only consumes a lot of resources but also has low data processing efficiency when facing massive data. For example, the rule class corresponding to the target data d1 is abc, and the rule class corresponding to the target data d2 is acb. The rule classes abc and acb need to be stored in the rule base, which leads to high storage pressure and high resource consumption of the rule base, and also leads to low data processing efficiency.

[0099] In order to solve the above problems, a data processing method provided in an embodiment of the present application freely selects a target rule node according to the specific needs of the target object, and obtains a target rule model by arranging the target rule node, and there is no need to match the target data with the rule nodes in the rule database respectively, thereby not only reducing resource consumption but also improving data processing efficiency. Among them, the method and device described in the embodiment of the present application are based on the same technical concept. Since the principles of the problems solved by the method and the device are similar, the embodiments of the device and the method can refer to each other, and the repeated parts will not be repeated.

[0100] Figure 2 This is a flow chart of a data processing method provided in an embodiment of the present application. The process can be executed by a data processing device, which can be implemented by software, hardware, or a combination of software and hardware to improve data processing efficiency. Figure 2 As shown, the process includes the following steps:

[0101] S201, in response to a rule node selection operation of a target object, selecting a plurality of target rule nodes from a rule database;

[0102] In an embodiment of the present application, in order to achieve separation of data processing and application code, the target object can implement customized rule logic by defining rule nodes, where the rule nodes are composed of input, output and processing logic, and the rule nodes are stored in a rule database.

[0103] Optionally, the rule nodes in the rule database may include: input nodes, parsing nodes, merging nodes, switching nodes, and output nodes, etc., wherein the Parse node is used to decode data, the Merge node is used to splice data, and the Switch node is used to identify and forward data.

[0104] In response to the rule node selection operation of the target object, multiple target rule nodes are selected from the rule database, wherein different target rule nodes are used to execute different data processing logics. Specifically:

[0105] A node orchestration interface is displayed. The first sub-interface in the node orchestration interface is used to display some rule nodes in the rule database. In response to a rule node selection operation of the target object on the first sub-interface, multiple target rule nodes in the partial rule nodes are displayed in the second sub-interface of the node orchestration interface.

[0106] Optionally, the node arrangement interface also includes a third sub-interface, which is used to present at least one rule node search option, and different rule node search options are set according to different rule node attributes (for example, node ID, node type, node name, size, color).

[0107] In response to the target rule node search instruction of the target object for the third sub-interface, a first target rule node among multiple target rule nodes is selected from the rule database, and the first target rule node is displayed in the first sub-interface.

[0108] Optionally, some rule nodes also include at least one general rule node.

[0109] like Figure 3As shown, it is a schematic diagram of a node arrangement interface provided by an embodiment of the present application, including a first sub-interface 3a, a second sub-interface 3b and a third sub-interface 3c. Some of the rule nodes displayed in the first sub-interface 3a include general rule nodes: Merge node, Input node and Output node. In addition, the rule node search options presented in the third sub-interface 3c include node ID, node type, node name, size and color. In response to the target object's target rule node search instruction for the third sub-interface 3c, that is, the target object types "conversion" in the node type of the node type search option, the first target rule node: Parse node and Switch node can be selected from the rule database, and the Parse node and Switch node are displayed in the first sub-interface 3a.

[0110] Further, in response to the target object's rule node selection operation on the first sub-interface 3a, multiple target rule nodes (Merge nodes, Input nodes, Output nodes and Parse nodes) in some rule nodes are displayed in the second sub-interface 3b of the node arrangement interface.

[0111] S202, arranging multiple target rule nodes to obtain a target rule model.

[0112] In an embodiment of the present application, in response to the rule node orchestration operation of the target object on the second sub-interface, a first connection relationship between multiple target rule nodes is determined, and the multiple target rule nodes are orchestrated based on the first connection relationship to obtain a target rule model.

[0113] like Figure 4 As shown, it is a schematic diagram of the second sub-interface in a node arrangement interface provided in an embodiment of the present application, including multiple target rule nodes: Merge node, Input node, Output node and Parse node, and the Input node, Merge node, Parse node and Output node are connected in sequence.

[0114] After obtaining the target rule model, you can also add corresponding identification information to the target rule model. For example, you can use the device ID corresponding to the target data or the data type corresponding to the target data as the identification information of the target rule model. In this way, for all data generated by the same device and data of the same data type, you only need to use the device ID and data type to match the corresponding rule model, thereby reducing resource consumption.

[0115] In response to a data processing request for target data, a target rule engine corresponding to a target rule model is obtained, and the target data is processed based on the target rule engine. Specifically, in response to a data processing request for target data, the target rule model is started, and each target rule node in the target rule model is registered in the event bus, thereby obtaining the target rule engine.

[0116] In order to ensure the real-time performance of data processing, the event subscription and publishing method can be adopted to organize and coordinate the target rule nodes through the event bus. Therefore, multiple target rule nodes can be subscribed and published to the event bus in sequence according to their respective execution order (which can be obtained according to the first connection relationship), that is, multiple target rule nodes can subscribe to data through the event bus in sequence according to their respective execution order, so that when data is generated, the event bus can asynchronously transmit the data to the corresponding target rule node.

[0117] Through the above method, when faced with a large amount of data, the data is separated from the processing process of the rule node, and asynchronously transmitted through the event bus, thereby ensuring the efficient performance of the rule engine and supporting integration with external systems, including message queues, databases, Web services, etc. Users can implement more complex rule logic and business processes by integrating external systems. Specifically, users can provide customized rules by defining data trigger conditions, data processing logic, etc., supporting multiple data types, including device status changes, data reporting, etc.; and by managing and combining these customized rules, complex rule logic can be implemented, and data streams can be aggregated, filtered, calculated, etc., to achieve real-time processing and analysis of data generated by devices.

[0118] It should be noted that each target rule node in the target rule model runs independently, and a thread control class is used to provide an interface to manage the running status of a single target rule node. Data interaction obtains related target rule nodes through context (the context of the rule node when it is running, including the input and output of the rule node, etc.).

[0119] Optionally, the method for processing target data based on the target rule engine may be:

[0120] In response to the target data being transmitted to the target rule node with the first execution order in the target rule engine, the target data is matched by rules, and when the match is successful, the target data is processed based on the target rule node with the first execution order, and a first result is output. Then, the first result is transmitted to the target rule node of the next execution order through the event bus and the first connection relationship, so that the target rule node of the next execution order performs rule matching on the first result, and when the match is successful, a second result is output, until there is no target rule node of the next execution order, and the current result is used as the decision result of the target data. Through the above method, when processing the target data, rule matching is performed first, which can ensure the security of the data, thereby improving the security and reliability of the rule engine.

[0121] like Figure 5 FIG. 1 is a schematic diagram of the architecture of a target rule engine provided by an embodiment of the present application. Figure 5 In the target rule model, multiple target rule nodes are: Input node, Parse node, Merge node, Switch node, weather Parse node, special Parse node and Output node, and multiple target rule nodes are subscribed to related topics in the event bus according to their respective execution order. Specifically:

[0122] First, after the Input node consumes the target data from the event bus, it forwards it to the Parse node. The Parse node is used to subscribe to the target data forwarded by the Input node and parse it, such as Figure 6 FIG. 1 is a logical diagram of data parsing provided in an embodiment of the present application, which specifically includes the following steps:

[0123] 601: Determine whether the length of the remaining unprocessed data in the target data is greater than the variable length defined by the parsing rule, wherein the parsing rule is the rule defined by the Parse node. If so, proceed to 602; if not, proceed to 606.

[0124] 602: Obtain first target data from unprocessed data according to the variable length.

[0125] Optionally, the first target data may be acquired in the time sequence of the unprocessed data, or may be acquired randomly. The specific acquisition method depends on the circumstances and is not specifically limited here.

[0126] 603: Determine whether to decode the first target data, if yes, proceed to 604, if not, proceed to 605.

[0127] 604 : Decode the first target data to obtain second target data, and proceed to 605 .

[0128] 605: Store the data into the dictionary Map and transfer to 601.

[0129] 606: Returns the data in the dictionary.

[0130] After the Parse node completes data parsing through the above method, it forwards the parsed data to the Merge node. The Merge node is used to subscribe to the data published by the Parse node and merge it. Figure 7a FIG. 1 is a logical diagram of data merging provided in an embodiment of the present application, which specifically includes the following steps:

[0131] 701a: Load the target rule parameters corresponding to the current target rule node from the rule database.

[0132] 702a: Based on the target rule parameters, determine whether the current target rule node type is a merge rule node type. If so, proceed to 703a; if not, end the process.

[0133] 703a: Initialize the executor, merge the data output by the executor, and output the corresponding merged result or log.

[0134] like Figure 7b As shown, it is a logical schematic diagram of an actuator initialization provided in an embodiment of the present application, which specifically includes the following steps:

[0135] 701b: Parse the received data into execution rules and submit them to the thread pool for processing to obtain the context message corresponding to the received data.

[0136] 702b: Parse the context message and determine different remote dictionary service directories and message bus event topics according to the message category.

[0137] 703b: Determine whether the message sequence meets the merging condition. If so, proceed to 704b; if not, proceed to 708b.

[0138] 704b: Read all data under the Topic or message directory in the remote dictionary service or search data analysis engine, extract the payload, merge it according to the rule of the current target rule node, and obtain the merged result.

[0139] 705b: Check whether the merge result is correct. If so, proceed to 706b; if not, proceed to 707b.

[0140] 706b: Output the merge result, and the message bus pushes a merge success message.

[0141] 707b: The message bus pushes the merge failure message.

[0142] 708b: Parse the message and save the payload of the message to a remote dictionary service or a search data analysis engine according to the sequence number or the Topic category.

[0143] It should be noted that Parse nodes and Merge nodes process data in the same way, but the data comes from different sources.

[0144] Furthermore, the Switch node subscribes to the data packets merged by the Merge node, pushes the data packets, and then outputs them to the Output node. Specifically, the Switch node subscribes to the message with the Topic " / {target rule engine rule-engine} / {rule instance ID} / {Switch node ID} / Input node" in the event bus. After receiving the message, it determines the data type, for example, whether it is a weather message. If so, the message is pushed to the corresponding Topic in the event bus, and then pushed to the corresponding weather Parse node, and the node completes the subsequent message flow; if not, the message is pushed to the Topic named " / {target rule engine rule-engine} / {rule instance ID} / {special Parse node ID} / Input node".

[0145] Since the above data processing process is a multi-threaded, high-concurrency and efficient rule execution, in order to ensure data processing efficiency, when the Switch node needs to push multiple subscribed messages to different Parse nodes, it can also set priorities for different Parse nodes. The specific priority depends on the situation and is not specifically limited here, so that users can more flexibly control the execution order of the target rule nodes.

[0146] Finally, the Output node constructs a message based on the parent node and Topic (for example, constructs a message pushed by the weather Parse node), and then pushes it to the specified Topic of the message bus to complete the data flow and output the decision result of the target data.

[0147] In some possible scenarios, in order to achieve efficient response to the real-time requirements of data processing, this application also introduces a matching mechanism based on a time window. According to the set time window, the target data is divided into multiple target sub-data, and the target rule nodes corresponding to the multiple target sub-data are determined. Then, based on the target rule engine and the target rule nodes corresponding to the multiple target sub-data, the multiple target sub-data are processed. Among them, the size of the time window and the moving interval can be controlled by the time window length and the sliding step. The time window length can be a fixed length of a period of time, such as 30 seconds or 1 minute, which is not limited here; the sliding step is the interval at which the time window slides forward, for example, a time window slides forward every 5 seconds or 10 seconds, which is not limited here. The sliding of the time window can be achieved through a timer or other event-driven mechanism.

[0148] Optionally, the target rule engine also uses a state machine-based algorithm to determine the data processing result based on the state information of the state machine. This algorithm can efficiently process a large amount of data and can flexibly handle the relationship between multiple target rule nodes. Specifically, after determining the target rule nodes corresponding to multiple target sub-data, the following operations are performed for each of the multiple target sub-data:

[0149] Among the multiple target rule nodes of the target rule engine, the state machine of the target rule node corresponding to a target sub-data is determined. At this time, the time window will display the state information of the state machine in real time, such as success, failure, interruption, etc. Therefore, by obtaining the state information of the state machine, the data processing result of a target sub-data can be determined.

[0150] In some possible scenarios, when the target object wants to add and / or delete target rule nodes in the target rule model, first, multiple target rule nodes are obtained based on the target rule model, and multiple sub-connection relationships in the first connection relationship between the multiple target rule nodes, wherein each sub-connection relationship corresponds to two target rule nodes.

[0151] In response to the target object's update operation on the target rule model, at least one target rule node is selected from multiple target rule nodes, and a second connection relationship between at least one target rule node is determined based on multiple sub-connection relationships, and then, at least one target rule node is arranged based on the second connection relationship to obtain an updated target rule model, thereby completing the operation of deleting the target rule node from the target rule model. And / or, in response to the target object's update operation on the target rule model, a second target rule node other than multiple target rule nodes is selected from the rule database, and a third connection relationship of the second target rule node in multiple target rule nodes is determined, and then, based on the first connection relationship and the third connection relationship, the second target rule node and multiple target rule nodes are arranged to obtain an updated target rule model, thereby completing the operation of adding a target rule node to the target rule model.

[0152] like Figure 8 As shown, a logical schematic diagram of a target rule model update provided in an embodiment of the present application is provided. First, multiple target rule nodes and multiple sub-connection relationships in a first connection relationship between multiple target rule nodes are obtained based on the target rule model, wherein the target rule model can be obtained by parsing the input target rule instance object. Then, the scheduler converts the multiple target rule nodes and the multiple sub-connection relationships into a unified scheduling model. Finally, in response to the update operation of the target object on the target rule model, the task executor generates and executes the respective scheduling tasks of the multiple target rule nodes and the multiple sub-connection relationships based on the scheduling model to obtain an updated target rule model.

[0153] Through the above data processing method, multiple target rule nodes can be freely configured according to the specific needs of the target object to form a target rule model, and subscribe and publish with the event bus. Efficient communication between multiple target rule nodes can be achieved through the event bus.

[0154] Based on the same inventive concept, the present application also provides a data processing device, such as Fig. 9 FIG. 1 is a schematic diagram of a data processing device provided in an embodiment of the present application, the device comprising:

[0155] A selection module 901 is used to select a plurality of target rule nodes from a rule database in response to a rule node selection operation of a target object, wherein different target rule nodes are used to execute different data processing logics;

[0156] The orchestration module 902 is used to orchestrate multiple target rule nodes to obtain a target rule model, and the target rule model is used to execute multiple data processing logics required by the target data.

[0157] In a possible design, the selection module 901 is specifically used for:

[0158] Display the node arrangement interface, the first sub-interface in the node arrangement interface is used to display some rule nodes in the rule database;

[0159] In response to the rule node selection operation of the target object on the first sub-interface, multiple target rule nodes in the partial rule nodes are displayed in the second sub-interface of the node arrangement interface.

[0160] In a possible design, the node arrangement interface further includes a third sub-interface, and the third sub-interface is used to present at least one rule node search option, and different rule node search options are set according to different rule node attributes;

[0161] The selection module 901 is also used for:

[0162] In response to a target rule node search instruction of the target object for the third sub-interface, selecting a first target rule node from a plurality of target rule nodes from a rule database;

[0163] The first target rule node is displayed in the first sub-interface.

[0164] In a possible design, some rule nodes also include at least one general rule node.

[0165] In a possible design, the arrangement module 902 is specifically used to:

[0166] In response to the rule node arrangement operation of the target object on the second sub-interface, determining a first connection relationship between a plurality of target rule nodes;

[0167] A plurality of target rule nodes are arranged based on the first connection relationship to obtain a target rule model.

[0168] In other embodiments, in addition to the above Fig. 9 In addition to the modules shown in FIG. 1 , the system may further include a first acquisition module, a data processing module, a second acquisition module, a determination module, and an update module, such as Fig.10 , which is a schematic diagram of the structure of another data processing device provided in an embodiment of the present application. The device comprises: a selection module 901, an arrangement module 902, a first acquisition module 1001, a data processing module 1002, a second acquisition module 1003, a determination module 1004 and an update module 1005.

[0169] The first acquisition module 1001 is used to obtain a target rule engine corresponding to a target rule model in response to a data processing request of target data;

[0170] The data processing module 1002 is used to process the target data based on the target rule engine.

[0171] The second acquisition module 1003 is used to obtain multiple target rule nodes and multiple sub-connection relationships in the first connection relationship between the multiple target rule nodes based on the target rule model, wherein each sub-connection relationship corresponds to two target rule nodes;

[0172] The determining module 1004 is used to select at least one target rule node from multiple target rule nodes in response to an update operation of the target object on the target rule model, and determine a second connection relationship between the at least one target rule node based on multiple sub-connection relationships;

[0173] The updating module 1005 is used to arrange at least one target rule node based on the second connection relationship to obtain an updated target rule model.

[0174] In a possible design, the data processing module 1002 is specifically used for:

[0175] According to the set time window, the target data is divided into multiple target sub-data;

[0176] Determine target rule nodes corresponding to the multiple target sub-data respectively;

[0177] Based on the target rule engine and the target rule nodes respectively corresponding to the multiple target sub-data, the multiple target sub-data are processed.

[0178] In a possible design, the data processing module 1002 is further used for:

[0179] For multiple target sub-data, perform the following operations respectively:

[0180] Determine a state machine of a target rule node corresponding to a target sub-data;

[0181] Based on the state information of the state machine, a data processing result of a target sub-data is determined.

[0182] In a possible design, the determining module 1004 is further configured to:

[0183] Selecting a second target rule node other than the plurality of target rule nodes from the rule database;

[0184] Determine a third connection relationship of the second target rule node among the plurality of target rule nodes;

[0185] Based on the first connection relationship and the third connection relationship, the second target rule node and the plurality of target rule nodes are arranged to obtain an updated target rule model.

[0186] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps in the above-mentioned method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0187] Based on the same inventive concept, an electronic device is also provided in the embodiment of the present application, and the electronic device can realize the functions of the aforementioned data processing device, referring to Fig.11 , the electronic device comprises:

[0188] At least one processor 1101, and a memory 1102 connected to the at least one processor 1101. The specific connection medium between the processor 1101 and the memory 1102 is not limited in the embodiment of the present application. Fig.11 In the example, the processor 1101 and the memory 1102 are connected via the bus 1100. The bus 1100 is Fig.11 The bus 1100 is represented by a bold line, and the connection between other components is only for schematic illustration and is not intended to be limiting. The bus 1100 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 1101 can also be called a controller, and there is no limitation on the name.

[0189] In the embodiment of the present application, the memory 1102 stores instructions that can be executed by at least one processor 1101. The at least one processor 1101 can execute the data processing method discussed above by executing the instructions stored in the memory 1102. The processor 1101 can implement Fig. 9 Or the functions of each module in the device shown in 10.

[0190] Among them, the processor 1101 is the control center of the device, and can use various interfaces and lines to connect the various parts of the entire control device. By running or executing instructions stored in the memory 1102 and calling the data stored in the memory 1102, the various functions of the device and processing data, the device can be monitored as a whole.

[0191] In one possible design, the processor 1101 may include one or more processing units, and the processor 1101 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1101. In some embodiments, the processor 1101 and the memory 1102 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on separate chips.

[0192] Processor 1101 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the data processing method disclosed in the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.

[0193] Memory 1102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Memory 1102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (Random Access Memory, RAM), static random access memory (Static Random Access Memory, SRAM), programmable read-only memory (Programmable Read Only Memory, PROM), read-only memory (Read Only Memory, ROM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic memory, disk, optical disk, etc. Memory 1102 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 1102 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0194] By designing and programming the processor 1101, the code corresponding to the data processing method described in the above embodiment can be fixed into the chip, so that the chip can execute the code when running. Figure 2The steps of the data processing method of the embodiment shown are as follows: How to design and program the processor 1101 is a technique known to those skilled in the art and will not be described in detail here.

[0195] Based on the same inventive concept, the embodiment of the present disclosure provides a computer storage medium, the computer storage medium includes: computer program code, when the computer program code is run on a computer, the computer executes any one of the data processing methods discussed above. Since the principle of solving the problem by the above computer storage medium is similar to that of a data processing method, the implementation of the above computer storage medium can refer to the implementation of the method, and the repeated parts will not be repeated.

[0196] In the specific implementation process, the computer storage medium may include: Universal Serial Bus Flash Drive (USB), mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other storage media that can store program codes.

[0197] Based on the same inventive concept, the embodiment of the present disclosure also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any one of the data processing methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of a data processing method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0198] The computer program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more conductors, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0199] The method in the present application can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the present application is executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device, a core network device, an OAM or other programmable device.

[0200] The computer program or instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0201] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0202] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that has the functions specified in one or more boxes.

[0203] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0204] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0205] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that: The method comprises: In response to a rule node selection operation of a target object, multiple target rule nodes are selected from a rule database, wherein different target rule nodes are used to execute different data processing logics; The multiple target rule nodes are arranged to obtain a target rule model, where the target rule model is used to execute multiple data processing logics required for the target data.

2. The method according to claim 1, characterized in that The step of selecting a plurality of target rule nodes from a rule database in response to a rule node selection operation of a target object includes: Displaying a node arrangement interface, wherein the first sub-interface in the node arrangement interface is used to display some rule nodes in the rule database; In response to the rule node selection operation of the target object on the first sub-interface, the multiple target rule nodes in the partial rule nodes are displayed in the second sub-interface of the node arrangement interface.

3. The method according to claim 2, characterized in that The node arrangement interface further includes a third sub-interface, wherein the third sub-interface is used to present at least one rule node search option, and different rule node search options are set according to different rule node attributes; The method further comprises: In response to a target rule node search instruction of the target object for the third sub-interface, selecting a first target rule node from the plurality of target rule nodes from the rule database; The first target rule node is displayed in the first sub-interface.

4. The method according to claim 3, characterized in that The partial rule nodes also include at least one general rule node.

5. The method according to claim 2, characterized in that The step of arranging the multiple target rule nodes to obtain a target rule model includes: In response to the rule node arrangement operation of the target object on the second sub-interface, determining a first connection relationship between the plurality of target rule nodes; The multiple target rule nodes are arranged based on the first connection relationship to obtain a target rule model.

6. The method according to any one of claims 1 to 5, characterized in that After arranging the multiple target rule nodes to obtain the target rule model, the method further includes: In response to a data processing request for the target data, obtaining a target rule engine corresponding to the target rule model; The target data is processed based on the target rule engine.

7. The method according to claim 6, characterized in that The processing of the target data based on the target rule engine includes: According to the set time window, the target data is divided into a plurality of target sub-data; Determine the target rule nodes corresponding to the plurality of target sub-data respectively; The multiple target sub-data are processed based on the target rule engine and the target rule nodes respectively corresponding to the multiple target sub-data.

8. The method according to claim 7, characterized in that After determining the target rule nodes corresponding to the plurality of target sub-data respectively, the method further includes: For the multiple target sub-data, the following operations are performed respectively: Determine a state machine of a target rule node corresponding to a target sub-data; Based on the state information of the state machine, a data processing result of the one target sub-data is determined.

9. The method according to any one of claims 1 to 5, characterized in that After arranging the multiple target rule nodes to obtain the target rule model, the method further includes: Obtaining the plurality of target rule nodes and a plurality of sub-connection relationships in a first connection relationship between the plurality of target rule nodes based on the target rule model, wherein each sub-connection relationship corresponds to two target rule nodes; In response to an update operation of the target object on the target rule model, selecting at least one target rule node from the multiple target rule nodes, and determining a second connection relationship between the at least one target rule node based on the multiple sub-connection relationships; The at least one target rule node is arranged based on the second connection relationship to obtain an updated target rule model.

10. The method according to claim 9, characterized in that The updating operation of the target rule model in response to the target object further includes: Selecting a second target rule node other than the plurality of target rule nodes from the rule database; Determine a third connection relationship of the second target rule node among the multiple target rule nodes; Based on the first connection relationship and the third connection relationship, the second target rule node and the multiple target rule nodes are arranged to obtain an updated target rule model.

11. A data processing device, characterized in that: The device comprises: A selection module, configured to select a plurality of target rule nodes from a rule database in response to a rule node selection operation of a target object, wherein different target rule nodes are used to execute different data processing logics; The orchestration module is used to orchestrate the multiple target rule nodes to obtain a target rule model, where the target rule model is used to execute multiple data processing logics required for the target data.

12. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method according to any one of claims 1 to 10 when executing the computer program stored in the memory.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

14. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is caused to execute the method according to any one of claims 1 to 10.