Data batch processing method, device, electronic device and medium based on cluster computing

By distributing big data batch processing tasks to multiple cache servers for parallel processing, the problems of low efficiency and response delay of big data batch processing in the existing technology are solved, and the processing speed and user experience are improved.

CN109376004BInactive Publication Date: 2024-10-18CHINA PING AN LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201810947775.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-08-20
Publication Date
2024-10-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, big data batch processing has low efficiency and poor convenience, resulting in response delays and reduced user experience.

Method used

Using a cluster computing-based method, batches of data to be processed are distributed to multiple cache servers for parallel processing, reducing substantial processing on the central server and improving cache server usage efficiency and data processing response speed.

Benefits of technology

It significantly improves the response speed of large batch data processing, avoids the delay problem caused by the central server processing batch data, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109376004B_ABST
    Figure CN109376004B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of computer virtualization services, and discloses a data batch processing method, device, electronic device and medium based on cluster computing, wherein the data batch processing method based on cluster computing includes: obtaining batches of data to be processed; sending each of the obtained batches of data to be processed to the corresponding cache server according to a preset distribution rule, so that each cache server processes the batches of data to be processed in parallel; and receiving the data processing results returned by each cache service. The method of the embodiment of the present application enables each cache server to process the batches of data to be processed in parallel, which not only improves the utilization efficiency of the cache server, but also greatly improves the data processing response speed in the case of large batches of data, effectively avoiding the problem of response delay caused by the central server processing batch data, and greatly improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computing virtualization services. Specifically, the present application relates to a data batch processing method, device, electronic device and medium based on cluster computing. Background Art

[0002] With the advent of the big data era, batch processing of big data has attracted more and more attention and has been widely used in data processing in all aspects of enterprise operations. Enterprises' demands for big data processing are becoming more and more diversified.

[0003] Batch processing is a batch data processing environment that can support the entire batch of data processing processes. It is usually submitted in the automatic control process to handle batch access or update of databases or files. Under the condition of perfect automatic control process, the entire batch process can be completed without human intervention.

[0004] However, in order to realize batch processing of big data under the existing technology, it is necessary to input operation commands one by one in the form of command lines to perform batch processing operations of big data in the central server. However, the processing capacity of the central server is limited after all. When faced with a large amount of batch data to be processed, there are not only the disadvantages of low processing efficiency and poor processing convenience, but also the problem of response delay, which causes users to wait for a long time before obtaining the return results of the batch operation, greatly reducing the user experience. Summary of the invention

[0005] The purpose of this application is to solve at least one of the above-mentioned technical defects, especially the technical defects of low processing efficiency, poor processing convenience and response delay.

[0006] In a first aspect, a data batch processing method based on cluster computing is provided, comprising:

[0007] Get batches of data to be processed;

[0008] Each of the acquired batches of data to be processed is sent to the corresponding cache server according to a preset distribution rule, so that each cache server processes the batches of data to be processed in parallel;

[0009] Receive the data processing results returned by each cache service.

[0010] In a second aspect, a data batch processing device based on cluster computing is provided, comprising:

[0011] The acquisition module is used to obtain batches of data to be processed;

[0012] A processing module, used to send each of the acquired batches of data to be processed to the corresponding cache server according to a preset distribution rule, so that each cache server processes the batches of data to be processed in parallel;

[0013] The receiving module is used to receive the data processing results returned by each cache service.

[0014] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the above-mentioned data batch processing method based on cluster computing is implemented.

[0015] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned data batch processing method based on cluster computing is implemented.

[0016] The data batch processing method based on cluster computing provided by the implementation of the present application obtains batch data to be processed, lays the foundation for subsequent processing operations of the batch data to be processed, and sends each data to be processed in the obtained batch data to be processed to the corresponding cache server according to the preset distribution rule, so that each cache server processes the batch data to be processed in parallel, so that the central server does not perform any substantial processing on the batch data to be processed, and each cache server executes the specific processing of the batch data to be processed in parallel, which not only improves the utilization efficiency of the cache server, but also greatly improves the data processing response speed in the case of large batch data, effectively avoids the problem of response delay caused by the central server processing batch data, and greatly improves the user experience.

[0017] Additional aspects and advantages of the present application will be partially given in the following description, which will become apparent from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0019] Figure 1 A schematic diagram of a data batch processing method based on cluster computing according to an embodiment of the present application;

[0020] Figure 2 A schematic diagram of the basic structure of a data batch processing device based on cluster computing according to an embodiment of the present application;

[0021] Figure 3 A detailed structural diagram of a data batch processing device based on cluster computing according to an embodiment of the present application;

[0022] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0024] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0025] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0026] To realize batch processing of big data under the existing technology, it is necessary to input operation commands one by one in the form of command line to perform batch processing operations of big data in the central server. However, the processing capacity of the central server is limited after all. When faced with a large amount of batch data to be processed, there are not only the disadvantages of low processing efficiency and poor processing convenience, but also the problem of response delay, which causes users to wait for a long time before obtaining the return results of the batch operation, greatly reducing the user experience.

[0027] The data batch processing method, device, electronic device and medium based on cluster computing provided in this application are intended to solve the above technical problems in the prior art.

[0028] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0029] Embodiment 1

[0030] The present application embodiment provides a data batch processing method based on cluster computing, such as Figure 1 As shown, including:

[0031] Step S100, obtaining batches of data to be processed.

[0032] Specifically, the central server obtains batches of to-be-processed data sent by the client, wherein the central server is at the business layer and directly interacts with the client. The client is a program that provides local services to users. The client can be an application program installed on terminal devices such as desktop computers, laptops, or touch-screen phones.

[0033] Step S200 , each piece of to-be-processed data in the acquired batch of to-be-processed data is sent to a corresponding cache server according to a preset distribution rule, so that each cache server processes the batch of to-be-processed data in parallel.

[0034] Specifically, the central server at the business layer is connected to several cache servers to form a server cluster with a star topology, in which users can directly establish a connection with the central server through the client, but cannot directly establish a connection with each cache server through the client. Instead, they can only establish a connection with the central server through the client, and then indirectly establish a connection with each cache server through the central server. That is, the central server is equivalent to the agent of each cache server, which is used to handle external "data communication", that is, the relationship between the central server and each cache server is similar to the relationship between an agent and a proxy.

[0035] Furthermore, temporary data in the central server is stored in its memory, and data services in each cache server are stored using a redis-based memory database (i.e., redis database), where the redis database is a Key-Value database, that is, data services are stored in each cache server in a key-value manner.

[0036] Furthermore, after the central server obtains the batch of data to be processed, due to the limited processing capacity of the central server, the central server does not perform any substantial processing operations on the batch of data to be processed, but sends each data to be processed in the obtained batch of data to be processed to the corresponding cache server according to the preset distribution rules. Each cache server processes the batch of data to be processed in parallel, that is, the cache server executes the specific processing operations of the batch of data to be processed, which not only improves the utilization efficiency of the cache server, but also greatly improves the data processing response speed in the case of large batch data, effectively avoids the problem of response delay caused by the central server processing batch data, and improves the user experience.

[0037] Step S300: receiving data processing results returned by each cache service.

[0038] Specifically, after processing the data to be processed distributed to it, each cache server feeds back the processing result to the central server, that is, the central server receives the data processing results returned by each cache server.

[0039] Compared with the prior art, the data batch processing method based on cluster computing provided in the embodiment of the present application obtains batches of data to be processed, lays the foundation for subsequent processing operations of the batches of data to be processed, and sends each piece of data to be processed in the obtained batches of data to be processed to the corresponding cache server according to a preset distribution rule, so that each cache server processes the batches of data to be processed in parallel, so that the central server does not perform any substantial processing on the batches of data to be processed, and each cache server performs specific processing of the batches of data to be processed in parallel, which not only improves the utilization efficiency of the cache servers, but also greatly improves the data processing response speed in the case of large batches of data, effectively avoids the problem of response delay caused by the central server processing batch data, and greatly improves the user experience.

[0040] Embodiment 2

[0041] The embodiment of the present application provides another possible implementation method, which, based on the first embodiment, also includes the method shown in the second embodiment, wherein:

[0042] Step S100 includes step S101 (not labeled in the figure) and step S102 (not labeled in the figure), wherein:

[0043] Step S101: receiving data processing information sent by the client.

[0044] Step S102: Obtain batches of data to be processed according to the data processing information.

[0045] The data processing information includes any one of the following: batch data to be processed; a data processing request carrying the batch data to be processed; a data processing request carrying at least one storage address of the batch data to be processed.

[0046] Specifically, the central server at the business layer directly interacts with the client, such as receiving a request from the client terminal, then processing the received request, and then returning the processing result to the client terminal. Among them, the user can send data processing information to the central server through the client of a terminal device such as a desktop computer, laptop computer or touch screen mobile phone, or send data processing information to the central server through the client's web page to start batch data processing operations. The data processing information can specifically include requests for creating, transferring or deleting folders.

[0047] Furthermore, the central server may obtain the batch data to be processed by receiving the data processing information sent by the client, or may directly receive the batch data to be processed sent by the client. The data processing information sent by the client may carry the batch data to be processed, or may carry the storage path of the batch data to be processed, that is, the data processing information includes any one of the batch data to be processed, the data processing request carrying the batch data to be processed, and the data processing request carrying at least one storage address of the batch data to be processed.

[0048] Furthermore, when the data processing information carries batch data to be processed, the central server directly obtains the batch data to be processed by parsing the data processing information; when the data processing information carries the storage address of the batch data to be processed, the central server obtains the storage address of the batch data to be processed by parsing the data processing information, and then obtains the batch data to be processed according to the storage address.

[0049] Furthermore, when the data processing information carries the storage address of a batch of data to be processed and each data to be processed corresponds to a storage address, since the central server does not perform substantial processing operations on the batch of data to be processed, the central server may not obtain each data to be processed from the storage address in advance, but directly distributes the storage address corresponding to each data to be processed to the corresponding cache servers, and each cache server obtains the corresponding data to be processed from the storage address, thereby further reducing the workload of the central server and improving the efficiency of data processing.

[0050] For the embodiment of the present application, batches of data to be processed are obtained through received data processing information, so that the central server can obtain batches of data to be processed according to a variety of feasible methods, thereby increasing the flexibility of obtaining batches of data to be processed.

[0051] Embodiment 3

[0052] The present application embodiment provides another possible implementation method, which, based on the second embodiment, also includes the method shown in the third embodiment, wherein:

[0053] Step S200 includes step S202 (not marked in the figure): when the data processing information includes batches of data to be processed or the data processing request carries batches of data to be processed, determine the key value of each data to be processed in the batch of data to be processed; and determine the cache server identification code corresponding to each key value according to the CRC16 algorithm; and determine the corresponding cache server based on each cache server identification code, and send each data to be processed to the corresponding cache server found.

[0054] Before step S202, step S201 (not marked in the figure) is also included: saving the logical execution order of each to-be-processed data in the batch to-be-processed data.

[0055] Specifically, when the data processing information includes batch data to be processed or the data processing request carries batch data to be processed, that is, the central server has pre-acquired the batch data to be processed, the central server can distribute the acquired batch data to be processed to the corresponding cache servers, so that the corresponding cache servers can perform parallel processing on the batch data to be processed.

[0056] Furthermore, the central server converts the received batches of data to be processed into a unified internal format, wherein the unified internal format includes the data operation type, the operation address identifier, the table name to which the data belongs, and multiple data columns, where the data columns include one or more key values ​​(such as primary keys and foreign keys), thereby obtaining the key values ​​corresponding to each piece of data to be processed in the batch of data to be processed.

[0057] Furthermore, the central server determines the cache server identification code corresponding to each key value key according to the CRC16 (Cyclical Redundancy Check) algorithm, and searches for the corresponding cache server from the preset database based on the cache server identification code, thereby distributing the data to be processed corresponding to the cache server identification code to the corresponding cache server, so that each cache server performs parallel data processing operations on the corresponding data to be processed, for example, cache server 1 processes data to be processed 1, cache server 2 processes data to be processed 2, ..., cache server N processes data to be processed N, wherein each cache server performs data processing operations at the same time without affecting each other. In addition, a one-to-one correspondence between cache server identification codes and cache servers is pre-stored in the preset database, for example, cache server identification code 1 corresponds to cache server 1, cache server identification code 2 corresponds to cache server 2, ..., cache server identification code N corresponds to cache server N.

[0058] Furthermore, in the process of distributing the data to be processed corresponding to the cache server identification code to the corresponding cache server, the key value of the data to be processed corresponding to the cache server identification code can also be sent to the corresponding cache server. After each cache server receives the key value of the data to be processed, it determines whether the cache server identification code corresponding to the key value key is its own cache server identification code according to the CRC16 algorithm. If so, it continues to process the data to be processed. If not, it returns the data to be processed to the central server, and the central server re-determines the corresponding cache server.

[0059] Furthermore, in the process of distributing the to-be-processed data corresponding to each key value to the corresponding cache server based on the cache server identification code, the central server saves the logical execution order of each to-be-processed data in the batch to-be-processed data, so that the processing results of each cache server can be combined, packaged, etc. based on the logical execution order. The logical execution order refers to the execution order of each to-be-processed data in a logical relationship, for example, the processing of to-be-processed data 1 should be before the processing of to-be-processed data 2, and the processing of to-be-processed data 2 should be before the processing of to-be-processed data 3, etc.

[0060] For the embodiments of the present application, the central server can quickly and accurately determine the cache server corresponding to each piece of data to be processed based on the data key value and the CRC16 algorithm, thereby reducing the time overhead of distributing each piece of data to be processed. The cache servers perform the specific processing of batch data to be processed in parallel, which not only improves the utilization efficiency of the cache servers, but also greatly improves the data processing response speed in the case of large batches of data, effectively avoiding the problem of response delay caused by the central server processing batch data, and greatly improving the user experience.

[0061] Embodiment 4

[0062] The present application embodiment provides another possible implementation method, which, based on the third embodiment, also includes the method shown in the fourth embodiment, wherein:

[0063] Step S200 includes step S204 (not marked in the figure): when the data processing request carries multiple storage addresses of batch data to be processed, the cache server corresponding to each data to be processed is determined according to each storage address, so that each cache server obtains the data to be processed from the corresponding storage address.

[0064] Before step S204, step S203 (not marked in the figure) is also included: saving the order of arrangement of each storage address.

[0065] Specifically, when the central server receives data processing information sent by the client and the data processing information carries the storage address of batch data to be processed, if there are multiple storage addresses, for example, each data to be processed corresponds to a storage address, the central server may not obtain the batch data to be processed from the storage address, but determine the cache server corresponding to each storage address according to the preset correspondence between the storage address and the cache server, and each cache server obtains the data to be processed from the storage address corresponding to it and performs corresponding processing. At this time, the central server records the order of storage paths of the batch data to be processed carried in the data processing information, for example, storage path 1 is before storage path 2, and storage path 2 is before storage path 3, so that the processing results of each cache server can be combined, packaged, etc. based on the order of storage paths.

[0066] Furthermore, if there is only one storage address for the batch of data to be processed, it is impossible to determine the cache servers corresponding to the batch of data to be processed based on the storage address. At this time, the central server can first obtain the batch of data to be processed based on the storage address, and then determine the cache servers corresponding to each key value based on the key value corresponding to each data to be processed in the batch of data to be processed. Each cache server processes the corresponding data to be processed in parallel. For details, please see the relevant instructions of Implementation 3 above, which will not be repeated here.

[0067] Furthermore, when there is only one storage address for batch data to be processed, it is impossible to determine the cache servers corresponding to the batch data to be processed based on the storage address. At this time, if the storage address stores the batch data to be processed and the data identifiers of each data to be processed in the batch data to be processed, the cache servers corresponding to each data identifier can be determined based on the preset correspondence between the data identifier and the cache server, and each cache server obtains the data to be processed from the storage address corresponding to the data identifier based on the data identifier and performs corresponding processing. At this time, the central server records the order of storage paths of the batch data to be processed carried in the data processing information, for example, storage path 1 is before storage path 2, and storage path 2 is before storage path 3, so that the processing results of each cache server can be combined, packaged, etc. based on the order of storage paths.

[0068] For the embodiments of the present application, the central server can also quickly and accurately determine the cache server corresponding to each piece of data to be processed based on the storage address of each piece of data to be processed or the data identifier of each piece of data to be processed stored in the storage address of a batch of data to be processed, thereby reducing the time overhead of distributing each piece of data to be processed. The specific processing of the batch of data to be processed is performed in parallel by each cache server, which not only improves the utilization efficiency of the cache server, but also greatly improves the data processing response speed in the case of large batches of data, effectively avoiding the problem of response delay caused by the central server processing batch data, and greatly improving the user experience.

[0069] Embodiment 5

[0070] The present application embodiment provides another possible implementation method, which, based on the fourth embodiment, also includes the method shown in the fifth embodiment, wherein:

[0071] Step S300 further includes steps S301 (not labeled in the figure), S302 (not labeled in the figure) and S303 (not labeled in the figure), wherein:

[0072] Step S301: based on the logical execution order of each data to be processed or the arrangement order of each storage address, the data processing results received and returned by each cache server are reassembled.

[0073] Step S302: Packaging the reassembled data processing results as a whole to obtain a data packet.

[0074] Step S303: Send the data packet to the client.

[0075] Specifically, after processing the data to be processed distributed to it, each cache server feeds back the processing result to the central server, that is, the central server receives the data processing results returned by each cache server. After receiving the data processing results returned by each cache server, the central server reassembles the processing results fed back by each cache server based on the previously saved logical execution order of each data to be processed or the order of arrangement of the storage addresses, and packages the combined processing results as a whole to obtain a data packet, and sends the data packet to the client terminal to respond to the data processing request of the client terminal.

[0076] Furthermore, the central server may obtain the processing results of the cache servers by periodically reading the processing results in each cache server.

[0077] Furthermore, the central server may parse and calculate the processing progress of the batch of data to be processed by periodically reading the processing results in each cache server, and return the processing progress to the client to present it to the user.

[0078] For the embodiment of the present application, the processing results fed back by each cache server are recombined according to the logical execution order of each data to be processed or the order of arrangement of the storage addresses, ensuring that the combined processing results completely match the order of the received batch data to be processed, and then returning accurate processing results to the client.

[0079] Embodiment 6

[0080] Figure 2 A schematic diagram of a data batch processing device based on cluster computing provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the device 20 may include an acquisition module 21, a processing module 22 and a receiving module 23, wherein:

[0081] The acquisition module 21 is used to acquire batches of data to be processed;

[0082] The processing module 22 is used to send each of the acquired batches of data to be processed to the corresponding cache server according to a preset distribution rule, so that each cache server processes the batches of data to be processed in parallel;

[0083] The receiving module 23 is used to receive the data processing results returned by each cache service.

[0084] Furthermore, the acquisition module 21 includes an information receiving submodule 211 and a data acquisition submodule 212. Figure 3 As shown,

[0085] The information receiving submodule 211 is used to receive data processing information sent by the client;

[0086] The data acquisition submodule 212 is used to acquire batches of data to be processed according to the data processing information;

[0087] The data processing information includes any one of the following: batch data to be processed; a data processing request carrying the batch data to be processed; a data processing request carrying at least one storage address of the batch data to be processed.

[0088] Further, when the data processing information includes batches of data to be processed or the data processing request carries batches of data to be processed, the processing module includes a key value determination submodule 221, an identification code determination submodule 222 and a data sending submodule 223, such as Figure 3 As shown,

[0089] The key value determination submodule 221 is used to determine the key value of each to-be-processed data in the batch to-be-processed data;

[0090] The identification code determination submodule 222 is used to determine the cache server identification code corresponding to each key value according to the CRC16 algorithm;

[0091] The data sending submodule 223 is used to determine the corresponding cache server according to each cache server identification code, and send each to-be-processed data to the corresponding cache server found.

[0092] Furthermore, when the data processing request carries multiple storage addresses of batch data to be processed, the processing module 22 is specifically configured to determine the cache server corresponding to each data to be processed according to each storage address, so that each cache server obtains the data to be processed from the corresponding storage address.

[0093] Furthermore, the device also includes a first storage module 24, such as Figure 3 As shown, the first saving module 24 is used to save the logical execution order of each to-be-processed data in the batch to-be-processed data.

[0094] Furthermore, the device also includes a second storage module 25, such as Figure 3 As shown, the second storage module 26 is used to store the order in which each storage address is arranged.

[0095] Furthermore, the device also includes a data reorganization module 26, a packaging processing module 27 and a sending module 28. Figure 3 As shown,

[0096] The data reorganization module 26 is used to reorganize the data processing results returned by each cache server based on the execution order of each to-be-processed data in a logical relationship or the arrangement order of each storage address;

[0097] The packaging processing module 27 is used to package the reassembled data processing results as a whole to obtain a data packet;

[0098] The sending module 28 is used to send data packets to the client.

[0099] Compared with the prior art, the device provided in the embodiment of the present application obtains batches of data to be processed, lays a foundation for subsequent processing operations of the batches of data to be processed, and sends each piece of data to be processed in the obtained batches of data to be processed to the corresponding cache server according to a preset distribution rule, so that each cache server processes the batches of data to be processed in parallel, so that the central server does not perform any substantial processing on the batches of data to be processed, and each cache server performs specific processing of the batches of data to be processed in parallel, which not only improves the utilization efficiency of the cache servers, but also greatly improves the data processing response speed in the case of large batches of data, effectively avoids the problem of response delay caused by the central server processing batch data, and greatly improves the user experience.

[0100] Embodiment 7

[0101] The present application embodiment provides an electronic device, such as Figure 4 As shown, Figure 4 The electronic device 400 shown includes: a processor 401 and a memory 403. The processor 401 and the memory 403 are connected, such as through a bus 402. Further, the electronic device 400 may also include a transceiver 404. It should be noted that in actual applications, the transceiver 404 is not limited to one, and the structure of the electronic device 400 does not constitute a limitation on the embodiments of the present application.

[0102] The processor 401 is used in the embodiment of the present application to implement Figure 2 The transceiver 404 includes a receiver and a transmitter. The transceiver 404 is used in the embodiment of the present application to implement Figure 2 The functionality of the acquisition module is shown.

[0103] Processor 401 may be a CPU, a general purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 401 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0104] The bus 402 may include a path to transmit information between the above components. The bus 402 may be a PCI bus or an EISA bus, etc. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0105] The memory 403 may be a ROM or other type of static storage device that can store static information and instructions, a RAM or other type of dynamic storage device that can store information and instructions, or an EEPROM, a CD-ROM or other optical disk storage, an optical disk storage (including a compressed optical disk, a laser disk, an optical disk, a digital versatile disk, a Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0106] The memory 403 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 401. The processor 401 is used to execute the application code stored in the memory 403 to implement Figure 2 The illustrated embodiment provides actions of a data batch processing device based on cluster computing.

[0107] The electronic device provided in the embodiment of the present application includes a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, compared with the prior art, it can achieve: obtaining batches of data to be processed, laying a foundation for subsequent processing operations of the batches of data to be processed, and sending each piece of data to be processed in the obtained batches of data to be processed to the corresponding cache server according to a preset distribution rule, so that each cache server processes the batches of data to be processed in parallel, so that the central server does not perform any substantial processing on the batches of data to be processed, and each cache server performs specific processing of the batches of data to be processed in parallel, which not only improves the utilization efficiency of the cache servers, but also greatly improves the data processing response speed in the case of large batches of data, effectively avoids the problem of response delay caused by the central server processing batch data, and greatly improves the user experience.

[0108] The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the method shown in the first embodiment is implemented. Compared with the prior art, batches of data to be processed are obtained to lay the foundation for subsequent processing operations of the batches of data to be processed, and each of the acquired batches of data to be processed is sent to the corresponding cache server according to the preset distribution rules, so that each cache server processes the batches of data to be processed in parallel, so that the central server does not perform any substantial processing on the batches of data to be processed, and each cache server performs specific processing of the batches of data to be processed in parallel, which not only improves the use efficiency of the cache server, but also greatly improves the data processing response speed in the case of large batches of data, effectively avoids the problem of response delay caused by the central server processing batch data, and greatly improves the user experience.

[0109] The computer-readable storage medium provided in the embodiments of the present application is applicable to any embodiment of the above method, and will not be described in detail here.

[0110] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0111] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data batch processing method based on cluster computing, characterized in that: The method is applied to a data batch processing system, the data batch processing system includes a central server and multiple cache servers, the central server is connected to the multiple cache servers, and the method is executed by the central server, including: Receive data processing information sent by the client; Acquire batches of data to be processed according to the data processing information; wherein the data processing information includes: any one of a data processing request carrying the batches of data to be processed, or a data processing request carrying at least one storage address of the batches of data to be processed; Preserving the logical execution order of each piece of data to be processed in the batch of data to be processed or the arrangement order of each storage address; Sending each piece of data to be processed in the batch of data to be processed to a corresponding cache server according to a preset distribution rule, so that each cache server processes the batch of data to be processed in parallel; Receive data processing results returned by each cache server; Recombining the data processing results returned by each cache server based on the logical execution order of each data to be processed or the order of each storage address; Packing the reassembled data processing results as a whole to obtain a data packet; Sending the data packet to the client; The steps of sending each of the acquired batches of data to be processed to the corresponding cache server according to a preset distribution rule include: Determine the key value of each piece of data to be processed in the batch of data to be processed; Determine the cache server identification code corresponding to each key value according to the CRC16 algorithm; The corresponding cache server is determined according to each cache server identification code, and each piece of data to be processed is sent to the corresponding cache server found.

2. The method according to claim 1, characterized in that When the data processing request carries multiple storage addresses of batch data to be processed, sending each piece of the acquired batch data to be processed to the corresponding cache server according to a preset distribution rule includes: The cache server corresponding to each to-be-processed data is determined according to each storage address, so that each cache server obtains the to-be-processed data from the corresponding storage address.

3. A data batch processing device based on cluster computing, characterized in that: The device is deployed in a central server in a data batch processing system, the data batch processing system includes a central server and multiple cache servers, the central server is connected to the multiple cache servers, and the device includes: An acquisition module, configured to receive data processing information sent by a client; and acquire batches of data to be processed according to the data processing information; wherein the data processing information includes: a data processing request carrying batches of data to be processed, or a data processing request carrying at least one storage address of the batches of data to be processed; A processing module, used to save the logical execution order of each data to be processed in the batch of data to be processed or the arrangement order of each storage address; send each data to be processed in the batch of data to be processed to the corresponding cache server according to a preset distribution rule, so that each cache server processes the batch of data to be processed in parallel; used to determine the key value of each data to be processed in the batch of data to be processed, determine the cache server identification code corresponding to each key value according to the CRC16 algorithm, determine the corresponding cache server according to each cache server identification code, and send each data to be processed to the corresponding cache server found; A receiving module is used to receive data processing results returned by each cache server; based on the logical execution order of each data to be processed or the chronological arrangement order of each storage address, reassemble the data processing results returned by each cache server; package the reassembled data processing results as a whole to obtain a data packet; and send the data packet to the client.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for data batch processing based on cluster computing described in any one of claims 1-2 is implemented.

5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for data batch processing based on cluster computing as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Data processing method and apparatus

    CN105740063A