Method and device for batch processing of data
By distributing tasks between batch processing nodes and scheduling nodes, and using multiple task nodes for data processing, it solves the problem that SpringBatch's single machine and multi-threading cannot meet the demand for massive data processing, achieves elastic computing and stability of the financial system, and reduces the cost of data processing. cost.
Patent Information
- Application Number
- CN202010396773.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-05-12
AI Technical Summary
SpringBatch's single-machine multi-threading cannot meet the elastic computing needs in massive data and data incremental scenarios, and the distributed solution is complex and cannot meet the stability and availability requirements of the financial system.
By distributing tasks between batch processing nodes and scheduling nodes, multiple task nodes are used for data processing, and node distributors and database node distribution tables are used to implement data sharding processing. Task nodes and scheduling nodes use technical frameworks such as Java and Python. Achieve horizontal expansion and fault tolerance.
It achieves lightweight and efficient processing of massive data, reduces the risk of single task node failure, and ensures system robustness and low-cost technical implementation.
Smart Images

Figure CN113657987B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to a method and device for batch processing of data. Background Art
[0002] Risk management is the core of modern finance, or to be more precise, financial risk management is the core of the modern financial system. Thanks to the rapid development of software technology and Internet technology, financial risk management is established and implemented through software technology and Internet technology, thus establishing an efficient, low-cost, big data modern risk management system.
[0003] Traditional banks use "IOE" as a high-end business solution, but its construction cost is high and its operation and maintenance cost is high. Modern Internet finance mainly uses open source technologies such as Linux, Java, MySQL, etc., which are maintainable and low-cost. In the risk management of modern Internet finance facing big data, simple iterative processing cannot meet the processing requirements with large data volume and large computing volume.
[0004] See also Figure 1 , based on the batch processing framework of SpringBatch, batch risk management is implemented, and the task splitting processing is realized through the multi-threaded mode. After obtaining the risk control subject to be processed, the risk control logic is executed in the Job, and finally the decision result is output.
[0005] However, in scenarios with massive amounts of data and continuous data growth, SpringBatch's single-machine multi-threading cannot meet the needs of elastic computing, and SpringBatch's distributed solution is complex and cannot meet the stability and availability requirements of the financial system. Summary of the invention
[0006] An object of an embodiment of the present invention is to provide a method and device for batch processing of data to solve the problem that SpringBatch single-machine multi-threading cannot meet elastic computing requirements.
[0007] In a first aspect, an embodiment of the present invention provides a method for batch processing data, which is applied to a batch processing node, wherein the batch processing node includes a plurality of task nodes, including:
[0008] Acquire information of the to-be-processed data objects of the task nodes in the batch processing nodes from the scheduling node;
[0009] According to the information of the data object to be processed, obtaining the data object to be processed from the data source;
[0010] Processing the data object to be processed according to the processing rules configured in the task node;
[0011] Feedback the processing result of the data object to be processed to the scheduling node.
[0012] Optionally, before acquiring the information of the to-be-processed data object of the task node in the batch processing node from the scheduling node, the method further comprises:
[0013] Sending a request message to the scheduling node, the request message is used to request to obtain information of the data object to be processed, the information of the data object to be processed includes: an address offset of the data object to be processed in the data source;
[0014] The acquiring the data object to be processed of the task node from the data source according to the information of the data object to be processed includes:
[0015] According to the address offset, the data object to be processed is obtained from the data source.
[0016] Optionally, the method further comprises:
[0017] Obtaining information about data objects of task failures reported by other task nodes from the scheduling node through an idle task node;
[0018] Obtain data objects that failed to be processed by other task nodes from the data source through the information of the data object
[0019] Processing the data objects that failed to be processed by the other task nodes through the processing rules configured in the idle task node;
[0020] Feedback to the scheduling node the processing results of the data objects that failed to be processed by the other task nodes.
[0021] Optionally, the scheduling node is implemented by a node distributor, and the node distributor is implemented by setting a database node distribution table in a database. The technical framework of the task node adopts any one of the technical systems of Java, Python, C++, C#, and PHP.
[0022] In a second aspect, an embodiment of the present invention provides a method for batch processing data, which is applied to a scheduling node, including:
[0023] Sending information of the data object to be processed to the task node in the batch processing node;
[0024] A processing result is received from the task node, where the processing result is obtained by the task node processing the data object to be processed according to the processing rule configured by the task node.
[0025] Optionally, the method further comprises:
[0026] Sending information about data objects of failed tasks fed back by other task nodes to idle task nodes in the batch processing nodes.
[0027] Optionally, the technical framework of the task node adopts a Java system, and the technical framework of the scheduling node adopts a MySQL system.
[0028] In a third aspect, an embodiment of the present invention further provides a batch processing node, including:
[0029] A first acquisition module, used for acquiring information of to-be-processed data objects of task nodes in the batch processing nodes from a scheduling node;
[0030] A second acquisition module, used to acquire the data object to be processed from a data source according to the information of the data object to be processed;
[0031] A processing module, used to process the data object to be processed according to the processing rules configured in the task node;
[0032] A feedback module is used to feed back the processing result of the data object to be processed to the scheduling node.
[0033] In a fourth aspect, an embodiment of the present invention further provides a scheduling node, including:
[0034] The second sending module is used to send information of the data object to be processed to the task node in the batch processing node;
[0035] The receiving module is used to receive a processing result from the task node, where the processing result is obtained by the task node processing the data object to be processed according to the processing rule configured by the task node.
[0036] In a fifth aspect, an embodiment of the present invention further provides a server, comprising: a batch processing module and a scheduling module;
[0037] The batch processing module is used to obtain information about the data objects to be processed of the task module in the batch processing module from the scheduling module; obtain the data objects to be processed from the data source according to the information about the data objects to be processed; process the data objects to be processed according to the processing rules configured in the task module; and feed back the processing results of the data objects to be processed to the scheduling module;
[0038] The scheduling module is used to send information about the data object to be processed to the task module in the batch processing module; and receive processing results from the task module, where the processing results are obtained by the task module processing the data object to be processed according to the processing rules configured therein.
[0039] In a sixth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for batch processing data as described in the first aspect or the second aspect are implemented.
[0040] In an embodiment of the present invention, the scheduling node can control the processing logic of multiple task nodes, which not only disperses the pressure of massive data calculation and processing, but also realizes elastic processing through simple horizontal expansion in the face of ever-increasing data scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0042] Figure 1 A schematic diagram of the existing batch processing framework based on SpringBatch;
[0043] Figure 2 One of the flow charts of the method for batch processing of data according to an embodiment of the present invention;
[0044] Figure 3 This is a second flowchart of the method for batch processing of data according to an embodiment of the present invention;
[0045] Figure 4 This is one of the schematic diagrams of a batch processing framework based on a Java system and a MySQL system according to an embodiment of the present invention;
[0046] Figure 5 This is a second schematic diagram of a batch processing framework based on a Java system and a MySQL system according to an embodiment of the present invention;
[0047] Figure 6 A schematic diagram of a batch processing node according to an embodiment of the present invention;
[0048] Figure 7 is a schematic diagram of a scheduling node according to an embodiment of the present invention;
[0049] Figure 8 Schematic diagram of a server according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to facilitate understanding of the embodiments of the present invention, the following technical terms are first introduced below.
[0051] SpringBatch: SpringBatch is a lightweight, comprehensive batch processing framework provided by the Spring community that can be used to develop critical data batch processing services in enterprise information systems.
[0052] IOE: The English abbreviation of IBM's minicomputer, Oracle database, and EMC storage device. It is a traditional high-end solution and is widely used in traditional financial systems.
[0053] JVM: JVM is the abbreviation of Java Virtual Machine. Java Virtual Machine is essentially a program. When it is started on the command line, it starts to execute the instructions stored in a bytecode file. As long as any platform has a Java virtual machine for that platform installed, the bytecode file can run on that platform. This is "compile once, run many times".
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] The term "comprise" and any variation thereof in the specification and claims of the present application are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. In addition, the use of "and / or" in the specification and claims to indicate at least one of the connected objects, such as A and / or B, means that A alone, B alone, and A and B exist in three cases.
[0056] In the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0057] See also Figure 2 The embodiment of the present invention provides a method for batch processing data. The execution subject of the method is a batch processing node. The batch processing node includes multiple task nodes. The specific steps include: step 201, step 202, and step 203.
[0058] Step 201: Acquire information of data objects to be processed of task nodes in the batch processing node from the scheduling node;
[0059] See also Figure 4 and Figure 5 The above-mentioned batch processing nodes may include multiple task nodes. A task node is a node with logical processing capabilities. For example, it can be implemented through an instance on a virtual machine, that is, a task node can also be called a node instance. Since multiple task nodes can process multiple data objects to be processed at the same time, for example, each task node processes different data objects at the same time, the pressure of massive data calculation and processing can be dispersed through multiple task nodes.
[0060] It is understandable that the embodiment of the present invention does not specifically limit the number of task nodes in the batch processing node.
[0061] It should be noted that the batch processing nodes and scheduling nodes can be physical devices or virtual devices, such as virtual machines, and the batch processing nodes and scheduling nodes can be deployed in the same server or in different servers. That is, in the embodiments of the present invention, there is no specific limitation on the deployment form of the batch processing nodes and scheduling nodes.
[0062] Continue to see Figure 4 and Figure 5 The batch processing node can interact with the scheduling node, update the status of the task nodes in the batch processing node to the scheduling node, and can also obtain the tasks of the idle task nodes from the scheduling node. Since the task nodes in the batch processing node are equal, the overall batch processing performance can be improved by expanding the number of task nodes, which facilitates the horizontal expansion of the task nodes in the batch processing node, reduces the risk of failure of a single task node, and ensures the robustness of the batch processing node.
[0063] The above-mentioned scheduling node is used to control the tasks of each task node in the batch processing node, including one or more of the tasks such as recording task type, task status flow, address offset management of data objects, and redistribution of abnormal failed tasks.
[0064] For example, the batch processing node interacts with the scheduling node to obtain the tasks of each task node, and the batch processing node obtains the to-be-processed data objects of each task node from the data source according to the obtained tasks.
[0065] In some implementations, the technical framework of the task node and the scheduling node adopts a non-Spring system. The scheduling node is implemented by a node distributor, and the node distributor is implemented by setting a database node distribution table in a database, wherein the database can be any of the mainstream databases such as MySQL, Oracle, SQL Server, DB2, Sybase, etc. The technical framework of the task node adopts any of the technical systems of Java, Python, C++, C#, and PHP. For example, the technical framework of the task node adopts the Java system, that is, the processing logic of the task node is implemented by a Java program, and the technical framework of the scheduling node adopts the MySQL system, see Figure 4 .
[0066] It is understandable that in the embodiments of the present invention, the technical framework used by the task node and the scheduling node is not specifically limited. For example, the task node and the scheduling node can be implemented using a mature technical framework, so that lightweight and efficient batch processing of massive data can be achieved at a low technical cost. Furthermore, the task node and the scheduling node can get rid of the constraints of the technical framework, and by adopting a basic technical system, low intrusion is achieved to ensure the stability of the entire system.
[0067] Optionally, a request message is sent to the scheduling node, the request message being used to request to obtain the information of the data object. That is, the scheduling node can feed back the information of the data object to the task node based on the request of the task node.
[0068] Optionally, the request message may include one or more of the following: the type of data object that the task node in the batch processing node requests to process; the state of the task node; the address offset of the data object, etc. For example, the address offset of the data object is 10, and the address of the current data object is 50, and the request message is used to request to obtain information of data objects with an address range of 50-59.
[0069] Step 202: acquiring the data object to be processed from the data source according to the information of the data object to be processed;
[0070] For example, the data object to be processed is obtained from the data source according to the address offset of the data object to be processed in the data source.
[0071] The above data source stores data objects to be processed, which can be obtained by address offset to support batch processing nodes to obtain a part of data objects from the data source according to a certain address offset, so as to realize the ability of sharding processing of batch processing node data objects.
[0072] Step 203: Processing the data object to be processed according to the processing rules configured in the task node;
[0073] Each task node can be configured with a processing rule, and the task node can process the data object according to the configured processing rule to determine whether the data object meets the requirements. It can be understood that the above processing rules are business-related rules, for example, the processing rules are used to determine whether the business applied for by the requester meets the preset requirements.
[0074] Taking financial business as an example, the processing rules may be risk control rules, and the data objects may be risk control objects, such as personal risk control objects, enterprise risk control objects, etc. That is, in some implementations, the task node may process the risk control object according to the risk control rules to determine whether the risk control object satisfies the risk control rules. For example, the above financial business is a loan business, and the task node determines whether the credit limit of the risk control object meets the requirements according to the risk control rules. If the requirements are met, the loan business may be approved, and if the requirements are not met, the loan business will not be approved.
[0075] It should be noted that the processing rules are not specifically limited in the embodiments of the present invention.
[0076] Step 204: Feedback the processing result of the to-be-processed data object to the scheduling node.
[0077] Optionally, the processing result includes one or more of the following:
[0078] (1) Task completion means that the data object to be processed is executed normally on the task node;
[0079] The above-mentioned normal execution can be understood as no abnormality occurs when the task node processes the data object to be processed according to the processing rules.
[0080] (2) Task failure indicates that an exception occurs when the data object to be processed is executed on the task node.
[0081] Among them, the execution exceptions include the following two situations:
[0082] Case 1: Exception caused by data object;
[0083] For example, a problem with the encoding of a data object may cause a task node to be unable to complete the task when processing the data object, resulting in an exception. In this case, the processing results can be notified to the data collector to re-collect the data.
[0084] Case 2: Exception caused by task node.
[0085] For example, if there is a hardware or software problem with a task node, the task node cannot complete the task when processing the data object, resulting in an exception. At this time, the processing result can be notified to the maintenance personnel so that the maintenance personnel can promptly repair the problem that caused the exception.
[0086] In some embodiments, the method further includes: obtaining information about data objects on which other task nodes have failed to process feedback from the scheduling node through an idle task node; obtaining data objects on which other task nodes have failed to process from the data source through the information about the data objects; processing the data objects on which other task nodes have failed to process through processing rules configured in the idle task node; and feeding back to the scheduling node the processing results of the data objects on which other task nodes have failed to process.
[0087] In the embodiment of the present invention, the data objects that failed to execute previously are re-executed through idle task nodes, thereby improving the fault tolerance of the batch processing nodes and ensuring the robustness of the batch processing nodes.
[0088] In the embodiment of the present invention, the task node obtains multiple data objects to be processed and controls the processing logic of multiple task nodes in combination with the scheduling node, which not only disperses the pressure of massive data calculation and processing, but also can achieve elastic processing through simple horizontal expansion in the face of increasing data scenarios. Since the task node and the scheduling node are based on the technical framework of the current system, they do not need to rely on other third-party technical frameworks such as Spring, Struts, Hibernate, etc., that is, users do not need to integrate or introduce third-party technical frameworks, and can achieve lightweight and efficient processing of risk management tasks of massive data with very low technical costs, and the invasiveness to existing systems is low.
[0089] See also Figure 3 , an embodiment of the present invention provides a method for batch processing of data, the execution subject of the method can schedule nodes, and the specific steps include: step 301 and step 302.
[0090] Step 301: Send information of the data object to be processed to the task node in the batch processing node;
[0091] Step 302: receiving a processing result from the task node, wherein the processing result is obtained by the task node processing the data object to be processed according to the processing rule configured therein.
[0092] In some implementations, the method may further include: sending information about a data object to be processed to an idle task node in the batch processing node, where the data object to be processed is a data object for which task failure is reported by other task nodes.
[0093] In some implementations, the scheduling node may store one or more of the following:
[0094] (1) Type of data object;
[0095] (2) The state of the data object;
[0096] (3) The address offset of the data object in the data source.
[0097] In some implementations, the state of the data object may include one or more of the following:
[0098] (1) The task is not completed;
[0099] (2) Task completion, indicating that the data object to be processed is executed normally on the task node;
[0100] (3) Task failure indicates that an exception occurs when the data object to be processed is executed on the task node.
[0101] In some implementations, the technical framework of the task node and the scheduling node adopts a non-Spring system. The scheduling node is implemented by a node distributor, and the node distributor is implemented by setting a database node distribution table in a database. The database can be any of the mainstream databases such as MySQL, Oracle, SQL Server, DB2, Sybase, etc. The technical framework of the task node adopts any of the technical systems of Java, Python, C++, C#, and PHP. In a preferred embodiment, the technical framework of the task node adopts the Java system, and the technical framework of the scheduling node adopts the MySQL system.
[0102] In the embodiment of the present invention, the task node obtains multiple data objects to be processed and controls the processing logic of multiple task nodes in combination with the scheduling node, which not only disperses the pressure of massive data calculation and processing, but also can achieve elastic processing through simple horizontal expansion in the face of increasing data scenarios. Since the task node and the scheduling node are based on the technical framework of the current system, they do not need to rely on other third-party technical frameworks such as Spring, Struts, Hibernate, etc., that is, users do not need to integrate or introduce third-party technical frameworks, and can achieve lightweight and efficient processing of risk management tasks of massive data with very low technical costs, and the invasiveness to the current system is low.
[0103] The following takes the batch processing of risk control objects in financial business as an example to introduce.
[0104] See also Figure 4 and Figure 5In this embodiment, the technical framework of the task node (Node) in the batch processing node adopts the Java system, and each task node is configured with a risk control rule (short for risk control rule, RiskRule). It can be understood that the number of task nodes is not specifically limited in the embodiment of the present invention.
[0105] The technical framework of the scheduling node adopts the MySQL system. The node dispatch table (NodeDispatcher) set by MySQL records one or more of the following: (1) the type of data object; (2) the status of the data object; (3) the address offset of the data object in the data source.
[0106] The task node obtains the information of the risk control object (RiskObject) through interaction with the scheduling node, and obtains the risk control object from the data source based on the information, specifically obtaining a part of the risk control object from the data source according to a certain address offset. The risk control object is processed by the risk control rules configured in the task node to obtain the decision result.
[0107] After the task node completes the execution, it will feedback the completion of the risk control object to the scheduling node, obtain the information of the new risk control object to be processed, and NodeDispatcher will record the completion of the risk control object. It can be understood that if the task node in the batch processing node is a risk control object obtained based on the address offset, then after the risk control object within the address offset range is executed, the corresponding task node will feedback the completion status, and the NodeDispatcher in the scheduling node will record the completion of the risk control object within the address offset range.
[0108] If a task node fails to execute and process a risk control object, the task node will also provide feedback. The NodeDispatcher in the scheduling node will record the failure of the risk control object and then distribute it to the idle task node to re-execute the previously failed risk control object.
[0109] In an embodiment of the present invention, in a risk management scenario, the task node actively pulls the risk management shard object (that is, multiple data objects to be processed) and combines with the scheduling node to control the processing logic of multiple task nodes, which not only disperses the pressure of massive data calculation and processing, but also can achieve elastic processing through simple horizontal expansion in the face of increasing data scenarios. Since the task node and the scheduling node are based on the technical framework of the current system, they do not need to rely on other third-party technical frameworks such as Spring, Struts, Hibernate, etc., that is, the user does not need to integrate or introduce a third-party technical framework, so the risk management task of massive data can be lightweight and efficient with very low technical cost, and the invasiveness to the existing system is low.
[0110] See also Figure 6 The embodiment of the present invention further provides a batch processing node, the batch processing node 600 includes:
[0111] A first acquisition module 601 is used to acquire information of to-be-processed data objects of task nodes in the batch processing node from a scheduling node;
[0112] A second acquisition module 602 is used to obtain the data object to be processed from the data source according to the information of the data object to be processed;
[0113] The processing module 603 is used to process the data object to be processed according to the processing rules configured in the task node;
[0114] The feedback module 604 is used to feed back the processing result of the data object to be processed to the scheduling node.
[0115] In some implementations, the batch processing node 600 further includes:
[0116] A first sending module is used to send a request message to the scheduling node, wherein the request message is used to request to obtain information of the data object to be processed, and the information of the data object to be processed includes: an address offset of the data object to be processed in the data source;
[0117] The second acquisition module 602 is further used to: acquire the to-be-processed data object from the data source according to the address offset.
[0118] In some implementations, the first acquisition module 601 is further used to: acquire information of data objects of task failures reported by other task nodes from the scheduling node through an idle task node;
[0119] The second acquisition module 602 is further used to: acquire data objects that failed to be processed by other task nodes from the data source through the information of the data object;
[0120] The processing module 603 is further used to: process the data objects that failed to be processed by the other task nodes according to the processing rules configured in the idle task nodes;
[0121] The feedback module 604 is further used to: feedback to the scheduling node the processing results of the data objects that failed to be processed by the other task nodes.
[0122] In some embodiments, the processing result includes one or more of the following:
[0123] The task is completed, indicating that the data object to be processed is executed normally on the task node;
[0124] Task failure indicates that an exception occurs when the data object to be processed is executed on the task node.
[0125] The batch processing node provided in the embodiment of the present invention can execute the above Figure 2 The implementation principle and technical effect of the method embodiment shown are similar, and this embodiment will not be repeated here.
[0126] See also Figure 7 The embodiment of the present invention further provides a scheduling node, the scheduling node 700 includes:
[0127] The second sending module 701 is used to send information of the data object to be processed to the task node in the batch processing node;
[0128] The receiving module 702 is used to receive a processing result from a task node, where the processing result is obtained by the task node processing the data object to be processed according to the processing rule configured by the task node.
[0129] In some implementations, the scheduling node 700 further includes:
[0130] The third sending module is used to send information about data objects of failed tasks reported by other task nodes to the idle task nodes in the batch processing nodes.
[0131] The scheduling node provided in the embodiment of the present invention can execute the above Figure 3 The implementation principle and technical effect of the method embodiment shown are similar, and this embodiment will not be repeated here.
[0132] See also Figure 8 , the embodiment of the present invention further provides a server, the server 800 includes: a batch processing module 801 and a scheduling module 802;
[0133] The batch processing module 801 is used to obtain information about the data object to be processed of the task module 8011 in the batch processing module 801 from the scheduling module 802; obtain the data object to be processed from the data source according to the information about the data object to be processed; process the data object to be processed according to the processing rules configured in the task module 8011; and feed back the processing result of the data object to be processed to the scheduling module 802;
[0134] The scheduling module 802 is used to send information about the data object to be processed to the task module 8011 in the batch processing module 801; and receive processing results from the task module 8011, where the processing results are obtained by the task module 8011 processing the data object to be processed according to the processing rules configured therein.
[0135] For example, the technical framework of the task module 8011 in the batch processing module 801 can adopt the Java system, each task module 8011 is configured with risk control rules, and the technical framework of the scheduling module 802 can adopt the MySQL system.
[0136] It is understandable that in the embodiment of the present invention, there is no specific limitation on the number of task modules 8011 and the technical framework adopted, and there is no limitation on the technical framework adopted by the scheduling module 802.
[0137] The steps of the method or algorithm described in conjunction with the disclosure of the present invention may be implemented in hardware or by a processor executing software instructions. The software instructions may be composed of corresponding software modules, and the software modules may be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disks, mobile hard disks, read-only optical disks, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium may also be a component of the processor. The processor and the storage medium may be located in an ASIC. In addition, the ASIC may be located in a core network interface device. Of course, the processor and the storage medium may also exist in a core network interface device as discrete components.
[0138] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented using software, the functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium may be any available medium that a general or special-purpose computer can access.
[0139] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.
[0140] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present invention may take the form of complete hardware embodiments, complete software embodiments, or embodiments combining software and hardware. Moreover, the embodiments of the present invention may take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0141] The embodiments of the present invention are described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the 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 generate 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 provides the functions specified in a block or multiple blocks.
[0142] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate 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.
[0143] 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 in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0144] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the embodiments 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 method for batch processing data, applied to a batch processing node, wherein the batch processing node includes a plurality of task nodes, It is characterized in that include: Acquire information of the to-be-processed data objects of the task nodes in the batch processing nodes from the scheduling node; According to the information of the data object to be processed, obtaining the data object to be processed from the data source; Processing the data object to be processed by the processing rule configured in the task node, wherein the processing rule is used to determine whether the data object to be processed meets the requirements; Feedback the processing result of the data object to be processed to the scheduling node.
2. The method according to claim 1, It is characterized in that Before acquiring the information of the to-be-processed data objects of the task nodes in the batch processing nodes from the scheduling node, the method further includes: Sending a request message to the scheduling node, the request message is used to request to obtain information of the data object to be processed, the information of the data object to be processed includes: an address offset of the data object to be processed in the data source; The acquiring the data object to be processed of the task node from the data source according to the information of the data object to be processed includes: According to the address offset, the data object to be processed is obtained from the data source.
3. The method according to claim 1, It is characterized in that The method further comprises: Obtaining information about data objects of task failures reported by other task nodes from the scheduling node through an idle task node; Obtaining data objects that failed to be processed by other task nodes from the data source through the information of the data object; Processing the data objects that failed to be processed by the other task nodes through the processing rules configured in the idle task node; Feedback to the scheduling node the processing results of the data objects that failed to be processed by the other task nodes.
4. The method according to claim 1, It is characterized in that The scheduling node is implemented by a node distributor, and the node distributor is implemented by setting a database node distribution table in a database. The technical framework of the task node adopts any technical system of Java, Python, C++, C#, and PHP.
5. A method for batch processing of data, applied to scheduling nodes, It is characterized in that include: Sending information of the data object to be processed to the task node in the batch processing node; A processing result is received from the task node, where the processing result is obtained by the task node processing the data object to be processed according to a processing rule configured by the task node, wherein the processing rule is used to determine whether the data object to be processed meets requirements.
6. The method according to claim 4, It is characterized in that The method further comprises: Sending information about data objects of failed tasks fed back by other task nodes to idle task nodes in the batch processing nodes.
7. A batch processing node, It is characterized in that include: A first acquisition module, used for acquiring information of to-be-processed data objects of task nodes in the batch processing nodes from a scheduling node; A second acquisition module, used to acquire the data object to be processed from a data source according to the information of the data object to be processed; A processing module, used to process the data object to be processed according to the processing rules configured in the task node, wherein the processing rules are used to determine whether the data object to be processed meets the requirements; A feedback module is used to feed back the processing result of the data object to be processed to the scheduling node.
8. A scheduling node, It is characterized in that include: The second sending module is used to send information of the data object to be processed to the task node in the batch processing node; A receiving module is used to receive a processing result from the task node, wherein the processing result is obtained by the task node processing the data object to be processed according to the processing rule configured by the task node, wherein the processing rule is used to determine whether the data object to be processed meets the requirements.
9. A server, It is characterized in that include: Batch processing module and scheduling module; The batch processing module is used to obtain information about the data objects to be processed of the task module in the batch processing module from the scheduling module; obtain the data objects to be processed from the data source according to the information about the data objects to be processed; and process the data objects to be processed according to the processing rules configured in the task module; Feedback the processing result of the data object to be processed to the scheduling module, wherein the processing rule is used to determine whether the data object to be processed meets the requirements; The scheduling module is used to send information about the data object to be processed to the task module in the batch processing module; and receive processing results from the task module, where the processing results are obtained by the task module processing the data object to be processed according to the processing rules configured therein.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for batch processing data according to any one of claims 1 to 6 are implemented.
