A data processing method and device

The task processing platform unifiedly manages task processing in the distributed system, reducing the processing complexity and cost of the client, solving the problem of low task processing efficiency in the distributed system, and realizing unified storage and management of task results.

CN113688175BActive Publication Date: 2024-10-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010417552.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-18
Publication Date
2024-10-18
Estimated Expiration
2040-05-18

AI Technical Summary

Technical Problem

In a distributed system, the client is inefficient when processing tasks alone, resulting in increased access complexity and cost, as well as inconvenient task management.

Method used

Through the task processing platform, the pending tasks and callback information are submitted, and instructions are sent to the client through the interface identification. The client responds to the business processing logic to process the task, and the results are stored in the distributed system database, which reduces repeated code writing on the client. Requirements and task management complexity.

Benefits of technology

It reduces the access complexity and cost of distributed systems, simplifies task management, and improves task processing efficiency and unified result management capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113688175B_ABST
    Figure CN113688175B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method and device, the method comprising: submitting a pending task and corresponding callback information to a task processing platform, so that when the task platform processes the pending task, the task platform sends an instruction to the client to call the business processing logic corresponding to the logic identifier in the callback information through the interface corresponding to the interface identifier in the callback information; when receiving the instruction sent by the task processing platform, the corresponding business processing logic is found according to the logic identifier carried in the instruction, and the response is given to the task processing platform, so that the task processing platform uses the business processing logic to process the pending task, and the task processing result is stored in the database of the distributed system. This method can reduce the access complexity and implementation cost of the distributed system, and facilitate the management of task information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer processing technology, and in particular to a data processing method and device. Background Art

[0002] In a distributed system, each client performs some task processing. As the number of applications increases and the number of processing tasks increases, the efficiency of each client performing task processing alone is low.

[0003] In the process of implementing this application, the inventor found that the client handles a large number of tasks, such as importing and exporting Excel, and each client needs to develop its own task processing function. When the types and numbers of tasks are large, it is necessary to repeatedly write code on each client, which greatly increases the complexity of access, causes a waste of manpower and material resources, and is inconvenient for the management of task processing results. Summary of the invention

[0004] In view of this, the present application provides a data processing method and device, which can reduce the access complexity and implementation cost of a distributed system and facilitate the management of task information.

[0005] To solve the above technical problems, the technical solution of this application is implemented as follows:

[0006] In one embodiment, a data processing method is provided, the method comprising:

[0007] Submitting the pending task and the corresponding callback information to the task processing platform, so that when the task platform processes the pending task, it sends an instruction to the client to call the business processing logic corresponding to the logic identifier in the callback information through the interface corresponding to the interface identifier in the callback information;

[0008] When receiving the instruction sent by the task processing platform, the corresponding business processing logic is found according to the logic identifier carried in the instruction, and a response is given to the task processing platform, so that the task processing platform uses the business processing logic to process the task to be processed, and stores the task processing results in the database of the distributed system.

[0009] In another embodiment, a data processing method is provided, the method comprising:

[0010] When receiving the pending tasks submitted by the client and the callback information, they are stored in the database of the distributed system; wherein the callback information includes: the interface identifier of the interface of the callback business processing logic and the logic identifier of the business processing logic;

[0011] When processing the pending task, sending an instruction to call the business processing logic corresponding to the logic identifier to the client through the interface corresponding to the interface identifier;

[0012] When the business processing logic corresponding to the logic identifier responded by the client is received, the task to be processed is processed using the business processing logic, and the task processing result is stored in the database of the distributed system.

[0013] In another embodiment, a data processing device is provided, the device comprising: a sending unit, a receiving unit and a searching unit;

[0014] The sending unit is used to submit the pending task and the corresponding callback information to the task processing platform, so that when the task platform processes the pending task, it sends an instruction to call the business processing logic corresponding to the logic identifier in the callback information to the client through the interface corresponding to the interface identifier in the callback information; responds the business processing logic found by the search unit to the task processing platform, so that the task processing platform uses the business processing logic to process the pending task, and stores the task processing result in the database of the distributed system;

[0015] The receiving unit is used to receive the instruction sent by the task processing platform;

[0016] The search unit is used to search for the corresponding business processing logic according to the logic identifier carried in the instruction when the receiving unit receives the instruction sent by the task processing platform.

[0017] In another embodiment, a data processing device is provided, the device comprising: a receiving unit, a storage unit, a sending unit and a processing unit;

[0018] The receiving unit is used to receive the pending task submitted by the client and the callback information; receive the business processing logic corresponding to the logical identifier responded by the client;

[0019] The storage unit is used to store the pending tasks and callback information submitted by the client to the database of the distributed system when the receiving unit receives them; wherein the callback information includes: the interface identifier of the interface of the callback business processing logic and the logic identifier of the business processing logic; the task processing result obtained by the processing unit is stored in the database of the distributed system;

[0020] The sending unit is used to send an instruction to call the business processing logic corresponding to the logic identifier to the client through the interface corresponding to the interface identifier when processing the pending task received by the receiving unit;

[0021] The processing unit is used to process the task to be processed using the business processing logic when the receiving unit receives the business processing logic corresponding to the logic identifier responded by the client.

[0022] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method on the client side when executing the program.

[0023] In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the data processing method on the client side are implemented.

[0024] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method on the task processing platform side when executing the program.

[0025] In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the data processing method on the task processing platform side are implemented.

[0026] As can be seen from the above technical solution, in the above embodiment, the client configures the business processing logic for processing pending tasks, and when the pending task processing platform processes pending tasks submitted by the client, the business processing logic configured by the client is called back to process the pending tasks submitted by the client to the task processing platform, and the task processing results are uniformly stored in the database of the distributed system. This solution can reduce the access complexity and implementation cost of the distributed system, and facilitate the management of task information. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0028] Figure 1 This is a schematic diagram of a distributed task processing system in an embodiment of the present application;

[0029] Figure 2 This is a schematic diagram of the data processing flow in Example 1 of the present application;

[0030] Figure 3 This is a schematic diagram of the task information query process in the second embodiment of the present application;

[0031] Figure 4 This is a schematic diagram of the data processing flow in the third embodiment of the present application;

[0032] Figure 5 This is a schematic diagram of the data processing flow in the fourth embodiment of the present application;

[0033] Figure 6 This is a schematic diagram of the task information query process in Example 5 of this application;

[0034] Figure 7 A schematic diagram of the data content corresponding to the task to be processed submitted in the embodiment of the present application;

[0035] Figure 8 In the embodiments of this application, Figure 7 The content corresponding to the processing result after the pending tasks are processed;

[0036] Fig. 9 A schematic diagram of query information that can be queried by a client for a task;

[0037] Fig.10 This is a schematic diagram of the structure of a data processing device applied to the above client in an embodiment of the present application;

[0038] Fig.11 This is a schematic diagram of the structure of a data processing device applied to the above-mentioned task processing platform in an embodiment of the present application;

[0039] Fig.12 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention;

[0040] Fig.13 A schematic diagram of the physical structure of another electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0042] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0043] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0044] The present application provides a data processing method for use in a distributed task processing system. Figure 1 , Figure 1 Schematic diagram of a distributed task processing system in an embodiment of the present application. Figure 1 It includes multiple clients and a task processing platform, that is, a distributed system is composed of multiple clients and a task processing platform; wherein the task processing platform can be composed of one or more devices, which is not limited in the embodiments of the present application.

[0045] When implementing this application, the client also needs to perform the following configuration:

[0046] The client will configure the business processing logic for processing pending tasks. New business processing logic can be added for newly added pending tasks, or it can be the same as the previously configured business processing logic, or the configured business processing logic can be used directly. A unique logic identifier is assigned to each business processing logic.

[0047] The unique logical identifier assigned to each business processing logic here only needs to be unique in this client.

[0048] For example, the logical identifier of the business processing logic corresponding to the pending task 1 is configured as 1, the logical identifier of the business processing logic corresponding to the pending task 2 is configured as 2, and the logical identifier of the business logic corresponding to the pending task 3 is configured as 1.

[0049] In the embodiment of the present application, the business processing logic corresponding to different tasks to be processed may be the same or different.

[0050] In the embodiment of the present application, there is no restriction on the type of task to be processed, such as export, export to Excel, table, PDF, etc. In the embodiment of the present application, importing and exporting to Excel are used as examples to describe the data processing.

[0051] Configure an interface for submitting tasks to the business processing platform; the interface for submitting tasks to be processed is an interface exposed to the outside by the task processing platform;

[0052] Configure the callback business processing logic interface, which is used by the task processing platform to call the business logic interface on a client;

[0053] Configure the interface for querying task information. When the user client needs to obtain task information, it sends a request, and the task processing platform responds to the task information.

[0054] In the specific implementation, the relevant classes required for the task can be extracted into common classes (such as data types: excel, list, word, etc.), and the relevant interfaces for interacting with the task processing platform can be encapsulated into an SDK, so that when executing task processing related matters, the SDK can be introduced.

[0055] The task processing platform does not perform relevant configuration of the business processing logic. When obtaining the pending tasks submitted by the client and performing task processing, it calls the corresponding business processing logic on the client through a generalized call to process the pending tasks, and stores the processing results, processing status and other task information in real time in the database of the distributed system for client query.

[0056] When the embodiment of the present application is specifically implemented, the task submission and task information query interface can be provided to the client in the form of a page, so that the user can easily implement it, that is, users who do not understand the code can also submit tasks and query task information through the client; and the queried task information can be presented on the client in the form of a page or table.

[0057] The process of implementing data processing in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0058] Embodiment 1

[0059] See also Figure 2 , Figure 2 This is a schematic diagram of the data processing flow in Example 1 of this application. The specific steps are:

[0060] Step 201, the client submits the pending task and the corresponding callback information to the task processing platform, so that the task platform sends an instruction to the client to call the business processing logic corresponding to the callback information when processing the pending task.

[0061] The callback information includes: an interface identifier of an interface for calling back the service processing logic and a logic identifier of the service processing logic.

[0062] When the client has a task to be processed, it is called a pending task. The pending task and callback information are submitted to the task processing platform without submitting the business processing logic.

[0063] In the specific implementation of this embodiment, a data set needs to be submitted, where the data set is the return value of the successful data request for importing into Excel: the value returned after each data in Excel calls the business logic;

[0064] You can also submit one or any combination of the following information: custom parameters, request success return value, application name, task unique identifier, operator;

[0065] The application name is the name corresponding to each client application, which is used to distinguish the application on the client from other applications;

[0066] The task unique identifier is a unique value for each pending task;

[0067] Who is the operator who submits the pending tasks?

[0068] After the task processing platform receives the pending tasks and stores them in the database of the distributed system, it can wait for processing or process them in real time. As for when to process them, it is determined according to the specific situation of the task processing platform when to process the pending tasks;

[0069] When determining to process the pending task, an instruction to call the business processing logic corresponding to the logic identifier is sent to the client that submitted the task according to the callback information. Specifically, the business processing logic corresponding to the logic identifier is called through the interface corresponding to the interface identifier in the callback information.

[0070] Step 202, when receiving the instruction sent by the task processing platform, find the corresponding business processing logic according to the callback information carried in the instruction, and respond to the task processing platform, so that the task processing platform uses the business processing logic to process the task to be processed, and stores the task processing results in the database of the distributed system.

[0071] When the client receives the instruction, it searches for the corresponding business processing logic locally according to the logic identifier carried in the instruction; and sends the business processing logic to the task processing platform through the interface corresponding to the interface identifier.

[0072] When the task processing platform obtains the business processing logic, it processes the pending tasks according to the business processing logic, and stores the processing results in the database of the distributed system. The database corresponding to the distributed system here is a database from which the corresponding client can obtain relevant information. The task information of the relevant tasks of this client can be viewed, and the access rights of each client can be configured according to actual needs. For example, client A can view the relevant task information of client B and client C. The configuration of permission information is not restricted in the embodiment of the present application and can be configured according to actual needs.

[0073] Such an implementation scheme facilitates the task processing platform to uniformly manage the task information of the tasks.

[0074] In this embodiment, the client configures the business processing logic for processing pending tasks. When the pending task processing platform processes the pending tasks, the corresponding business processing logic is responded to the task processing platform, so that the task processing platform processes the tasks and uniformly stores the task processing results in the database of the distributed system. This solution does not require repeated access code on the client, can reduce the cost of task processing, and facilitates the management of task processing results.

[0075] Embodiment 2

[0076] See also Figure 3 , Figure 3 This is a schematic diagram of the task information query process in Example 2 of this application. The specific steps are:

[0077] Step 301, when a request for querying task information is received, the request is sent to a task processing platform through the interface for querying task information.

[0078] The task information here can be the processing status of the task, such as whether the processing is successful, whether it is being processed, whether the processing has been completed, etc. It can also be the data corresponding to the task submitted by the client, which can be downloaded; it can also be the data corresponding to the completed task, which can be downloaded, etc.; it can also be any combination of the above task information, and the task information that the client can obtain from the task processing platform can be configured according to actual needs, which is not limited in the embodiments of the present application.

[0079] When the task processing platform receives the request, it matches the corresponding task information according to the task identifier carried in the instruction and the identifier of the task information, and responds to the client.

[0080] Step 302: upon receiving the task information requested by the request sent by the task processing platform, output is performed.

[0081] In the embodiment of the present application, the task information can be output in the form of a table, a page, etc. If the output information is downloaded, it is the corresponding data.

[0082] In this embodiment, the task processing platform uniformly stores the tasks submitted by each client in the distributed system, the status of task processing, the results of task processing, etc. When the client needs to obtain certain task information, it can conveniently and efficiently obtain the corresponding information through the configured interface for interacting with the platform. The client side does not need to store and maintain a large amount of data information, saving storage and maintenance resources.

[0083] Embodiment 3

[0084] See also Figure 4 , Figure 4 This is a schematic diagram of the data processing flow in Example 3 of this application. The specific steps are:

[0085] Step 401: When the task processing platform receives the pending tasks submitted by the client and the callback information, it stores them in the database of the distributed system.

[0086] The callback information includes: an interface identifier of an interface for calling back the service processing logic and a logic identifier of the service processing logic;

[0087] Step 402: When processing the pending task, an instruction for calling the business processing logic corresponding to the logic identifier is sent to the client through the interface corresponding to the interface identifier.

[0088] The task processing platform uses a generalized call method to obtain the corresponding business processing logic from the corresponding client to process the pending tasks, and does not configure the business processing logic on the task processing platform.

[0089] Step 403: When receiving the business processing logic corresponding to the logic identifier responded by the client, use the business processing logic to process the task to be processed, and store the task processing result in the database of the distributed system.

[0090] In this embodiment, the task processing results are stored in a distributed system file to facilitate the unified management of the task processing results by the task processing platform. The client can also query the corresponding task information through the configured interface for interacting with the task management platform. The client does not need to store and maintain the corresponding task information, saving storage space, management resources, etc. The access to task information between clients can also be controlled through permissions, which facilitates data interaction in the distributed system and does not occupy network transmission resources.

[0091] Embodiment 4

[0092] See also Figure 5 , Figure 5This is a schematic diagram of the data processing flow in the fourth embodiment of this application. The specific steps are:

[0093] Step 501: When the task processing platform receives the pending task submitted by the client and the callback information, it stores them in the database of the distributed system and writes the task identifier of the pending task into the message queue.

[0094] When the client has tasks to be processed, it does not process them locally, but submits the tasks to be processed and callback information corresponding to the tasks to be processed to the task processing platform.

[0095] When the task processing platform receives pending tasks submitted by the client, it stores the pending tasks in the database of the distributed system and backs up a copy of the data for the client to view the original data.

[0096] When the embodiment of the present application is specifically implemented, the task identifier of the task to be processed only needs to be written into the message queue, and there is no need to write related data.

[0097] When the embodiment of the present application is specifically implemented, the corresponding tasks to be processed can be executed in the order in which they are written to the message queue by default;

[0098] Preset rules may also be configured to sort the pending tasks in the message queue, that is, to sort the pending tasks in the message queue according to the preset rules, and to process the pending tasks in the sorted order.

[0099] The configuration of the preset rules here is not restricted. For example, the tasks can be executed in the order of writing time, and priorities can be assigned to the tasks to be processed, and the tasks to be processed can be sorted according to the priority.

[0100] The priority configuration here can be configured by the client or by the task processing platform. For example, high priority can be configured for some pending tasks that need to be processed first; priority can also be partially configured, and some tasks are not configured with priority. Tasks without priority configuration are processed at the lowest priority by default; it can also be implemented according to the client configuration priority, etc. If the client side configures the priority, the corresponding priority needs to be submitted to the task processing platform when submitting the task; if not submitted, the default lowest priority is used. For pending tasks of the same priority, they are sorted in the order of the time when the client submits the task, that is, they are sorted in the order of the time when they are written to the message queue.

[0101] The task sorting method in the above message queue is only an example. During specific implementation, the implementation method can be configured according to actual needs and is not limited to the above implementation method.

[0102] Step 502: When processing the task to be processed, an instruction for calling the business processing logic corresponding to the logic identifier is sent to the client through the interface corresponding to the interface identifier.

[0103] The task processing platform uses a generalized call method to obtain the corresponding business processing logic from the corresponding client to process the pending tasks, and does not configure the business processing logic on the task processing platform.

[0104] Step 503: When receiving the business processing logic corresponding to the logic identifier responded by the client, use the business processing logic to process the task to be processed, and store the task processing result in the database of the distributed system.

[0105] In this embodiment, the task processing platform writes the task identifier of the pending task submitted by the client into the message queue for queuing, thereby avoiding data loss, and can also cut peaks, be asynchronous, and decouple. The task processing results are stored in the distributed system file to facilitate the unified management of the task processing results by the task processing platform. The client can also query the corresponding task information through the configured interface for interaction with the task management platform. The client does not need to store and maintain the corresponding task information, saving storage space, management resources, etc. The access to task information between clients can also be controlled through permissions, which facilitates data interaction in the distributed system and does not occupy network transmission resources.

[0106] Embodiment 5

[0107] See also Figure 6 , Figure 6 This is a schematic diagram of the task information query process in Example 5 of this application. The specific steps are:

[0108] Step 601: When the task processing platform receives a request for querying task information sent by the client, the task processing platform obtains the task information requested by the request from a database of the distributed system.

[0109] The task information here can be the processing status of the task, such as whether the processing is successful, whether it is being processed, whether the processing has been completed, etc. It can also be the data corresponding to the task submitted by the client, which can be downloaded; it can also be the data corresponding to the completed task, which can be downloaded, etc.; it can also be any combination of the above task information, and the task information that the client can obtain from the task processing platform can be configured according to actual needs, which is not limited in the embodiments of the present application.

[0110] When the task processing platform receives the instruction, it matches the corresponding task information according to the task identifier carried in the instruction and the identifier of the task information.

[0111] Step 602: The task processing platform responds to the client with the retrieved task information.

[0112] In this embodiment, the task information related to the task submitted by the client is stored in the distributed system file to facilitate the unified management of the task information by the task processing platform, so that the client does not need to store and maintain the corresponding task information, saving storage space, management resources, etc., and can also control the access to task information between clients through permissions, which facilitates data interaction in the distributed system and does not occupy network transmission resources.

[0113] Embodiment 6

[0114] This embodiment takes uploading product information to the product pool as an example.

[0115] In the embodiment of the present application, when importing tasks, an interface can be developed to implement the import and export of data, and the task submission can be implemented through the import and export buttons, or other methods can be used to submit the tasks to be processed.

[0116] Client 1 submits the task to be processed and the callback information (interface identifier 1 and logic identifier 5) corresponding to the task to be processed to the task processing platform;

[0117] See also Figure 7 , Figure 7 Schematic diagram of the data content corresponding to the task to be processed submitted in the embodiment of this application. Figure 7 The corresponding contents shown are distributor code, product code, distribution price and tenant code.

[0118] The task processing platform stores the data information corresponding to the pending task in the database of the distributed system, writes the task identifier 8 of the pending task into the message queue, binds the callback information with the task identifier of the pending task and writes it into the message queue, or binds it to a storage space outside the message queue. Among them, the task identifier is globally unique, that is, the identifiers of the pending tasks reported by all clients are globally unique, or they can be unique on the corresponding client. In this case, it is necessary to add a client identifier to distinguish each task.

[0119] Assuming that none of the pending tasks in the message queue are configured with priorities, the pending tasks are arranged in the order of their corresponding writing times and executed sequentially.

[0120] When it is the turn of the pending task corresponding to the task identifier 8 reported by the client 1 to be processed, the business processing logic corresponding to the logic identifier 5 is called back to the client 1 through the interface 1 according to the callback information of the pending task 8.

[0121] The client obtains the business processing logic corresponding to the logic identifier 5 locally and responds to the task processing platform.

[0122] The task processing platform processes the pending task 8 according to the business processing logic responded by the client 1 .

[0123] Assume that in the embodiment of the present application Figure 7 The corresponding business processing logic of the pending task configuration is: add distribution products, check whether the tenant is empty, whether the minimum order quantity is empty, and save the product information to the product pool when all the checks are passed.

[0124] See also Figure 8 , Figure 8 In the embodiments of this application, Figure 7 The content corresponding to the processing result after the pending tasks are processed is shown.

[0125] like Figure 8 The contents shown correspond to the result, error message, distributor code, product code, distribution price and tenant code.

[0126] The processing results are stored in the database of the distributed system for client query.

[0127] See also Fig. 9 , Fig. 9 This is a schematic diagram of the query information that a client can query for a task. Fig. 9 As shown, the information that can be queried includes: task identification (business ID), task name, task progress, completion / failure, operator (ERP), execution time, completion time, creation time, initial data and execution result.

[0128] The queryable information given above is an example in the embodiment of the present application. In specific implementation, the queryable content and display method can be set according to actual needs. The queryable information is stored in the database of the distributed system for query by each client of the distributed system.

[0129] Based on the same inventive concept, the present application also provides a data processing device in an embodiment. Fig.10 , Fig.10 This is a schematic diagram of the structure of a data processing device applied to the above client in an embodiment of the present application. The device includes: a sending unit 1001, a receiving unit 1002 and a searching unit 1003;

[0130] The sending unit 1001 is used to submit the pending task and the corresponding callback information to the task processing platform, so that when the task platform processes the pending task, it sends an instruction to call the business processing logic corresponding to the logic identifier in the callback information to the client through the interface corresponding to the interface identifier in the callback information; responds the business processing logic found by the searching unit 1003 to the task processing platform, so that the task processing platform uses the business processing logic to process the pending task, and stores the task processing result in the database of the distributed system;

[0131] A receiving unit 1002, configured to receive instructions sent by the task processing platform;

[0132] The searching unit 1003 is configured to search for the corresponding business processing logic according to the logic identifier carried in the instruction when the receiving unit 1002 receives the instruction sent by the task processing platform.

[0133] Preferably, the apparatus further comprises: a configuration unit 1004;

[0134] Configuration unit 1004 is used to configure the business processing logic for processing the task to be processed and allocate a unique logic identifier; configure an interface for submitting tasks to the business processing platform, an interface for calling back the business processing logic, and an interface for querying task information.

[0135] Preferably, the device further comprises: an output unit 1005;

[0136] The sending unit 1001 is further configured to send a request for querying task information to the task processing platform through the interface for querying task information configured by the configuration unit;

[0137] A receiving unit 1002 is used to receive task information sent by the task processing platform;

[0138] The output unit 1005 is used to output the task information requested by the request sent by the task processing platform when the receiving unit 1002 receives the task information.

[0139] Based on the same inventive concept, the present application also provides a data processing device in an embodiment. Fig.11 , Fig.11 This is a schematic diagram of the structure of a data processing device applied to the above-mentioned task processing platform in an embodiment of the present application. The device includes: a receiving unit 1101, a storage unit 1102, a sending unit 1103 and a processing unit 1104;

[0140] The receiving unit 1101 is used to receive the pending task submitted by the client and the callback information; and receive the business processing logic corresponding to the logical identifier responded by the client;

[0141] The storage unit 1102 is used to store the pending task submitted by the client and the callback information received by the receiving unit 1101 in the database of the distributed system; wherein the callback information includes: the interface identifier of the interface of the callback business processing logic and the logic identifier of the business processing logic; and store the task processing result obtained by the processing unit 1104 in the database of the distributed system;

[0142] The sending unit 1103 is used to send an instruction to call the business processing logic corresponding to the logic identifier to the client through the interface corresponding to the interface identifier when processing the pending task received by the receiving unit 1101;

[0143] The processing unit 1104 is configured to process the task to be processed using the business processing logic when the receiving unit 1101 receives the business processing logic corresponding to the logic identifier responded by the client.

[0144] Preferably,

[0145] The storage unit 1102 is further configured to write the task identifier of the task to be processed into a message queue.

[0146] Preferably, the device further comprises: a sorting unit 1105;

[0147] The sorting unit 1105 is used to sort the pending tasks in the message queue according to a preset rule, so that the processing unit 1104 processes the pending tasks according to the sorting order.

[0148] Preferably, the device further comprises: an acquisition unit 1106;

[0149] The receiving unit 1101 is further configured to receive a request;

[0150] The acquiring unit 1106 is configured to acquire the task information requested by the request from the database of the distributed system when the receiving unit 1101 receives the request for querying task information sent by the client;

[0151] The sending unit 1103 is used to respond to the client with the task information acquired by the acquiring unit 1106 .

[0152] The units in the above-mentioned embodiments may be integrated into one body or deployed separately; they may be combined into one unit or further divided into multiple sub-units.

[0153] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the client-side data processing method when executing the program.

[0154] In another embodiment, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps in the data processing method on the client side can be implemented.

[0155] Fig.12 The following is a schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention. Fig.12As shown, the electronic device may include: a processor (Processor) 1210, a communication interface (Communications Interface) 1220, a memory (Memory) 1230 and a communication bus 1240, wherein the processor 1210, the communication interface 1220, and the memory 1230 communicate with each other through the communication bus 1240. The processor 1210 may call the logic instructions in the memory 1230 to execute the following method:

[0156] Submitting the pending task and the corresponding callback information to the task processing platform, so that when the task platform processes the pending task, it sends an instruction to the client to call the business processing logic corresponding to the logic identifier in the callback information through the interface corresponding to the interface identifier in the callback information;

[0157] When receiving the instruction sent by the task processing platform, the corresponding business processing logic is found according to the logic identifier carried in the instruction, and a response is given to the task processing platform, so that the task processing platform uses the business processing logic to process the task to be processed, and stores the task processing results in the database of the distributed system.

[0158] In addition, the logic instructions in the above-mentioned memory 1230 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0159] In another embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the data processing method on the task processing platform side when executing the program.

[0160] In another embodiment, a computer-readable storage medium is provided, on which computer instructions are stored. When the instructions are executed by a processor, the steps in the data processing method on the task processing platform side can be implemented.

[0161] Fig.13 FIG. 1 is a schematic diagram of the physical structure of another electronic device provided by an embodiment of the present invention. Fig.13 As shown, the electronic device may include: a processor (Processor) 1310, a communication interface (Communications Interface) 1320, a memory (Memory) 1330 and a communication bus 1340, wherein the processor 1310, the communication interface 1320, and the memory 1330 communicate with each other through the communication bus 1340. The processor 1310 may call the logic instructions in the memory 1330 to execute the following method:

[0162] When receiving the pending tasks submitted by the client and the callback information, they are stored in the database of the distributed system; wherein the callback information includes: the interface identifier of the interface of the callback business processing logic and the logic identifier of the business processing logic;

[0163] When processing the pending task, sending an instruction to call the business processing logic corresponding to the logic identifier to the client through the interface corresponding to the interface identifier;

[0164] When the business processing logic corresponding to the logic identifier responded by the client is received, the task to be processed is processed using the business processing logic, and the task processing result is stored in the database of the distributed system.

[0165] In addition, the logic instructions in the above-mentioned memory 1330 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0166] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0167] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0168] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that: The method comprises: Submitting the pending task and the corresponding callback information to the task processing platform, so that when the task processing platform processes the pending task, it sends an instruction to the client to call the business processing logic corresponding to the logic identifier in the callback information through the interface corresponding to the interface identifier in the callback information; When receiving the instruction sent by the task processing platform, the corresponding business processing logic is found according to the logic identifier carried in the instruction, and a response is given to the task processing platform, so that the task processing platform uses the business processing logic to process the task to be processed, and stores the task processing results in the database of the distributed system.

2. The method according to claim 1, characterized in that Before submitting the to-be-processed task to the task processing platform, the method further comprises: Configure the business processing logic for processing the task to be processed and assign a unique logic identifier; Configure an interface for submitting tasks to the business processing platform, an interface for calling back business processing logic, and an interface for querying task information.

3. The method according to claim 2, characterized in that The method further comprises: Sending a request for querying task information to the task processing platform through the interface for querying task information; When receiving the task information requested by the request sent by the task processing platform, output is performed.

4. A data processing method, characterized in that: The method comprises: When receiving the pending tasks submitted by the client and the callback information, they are stored in the database of the distributed system; wherein the callback information includes: the interface identifier of the interface for calling back the business processing logic and the logic identifier of the business processing logic; When processing the pending task, sending an instruction to call the business processing logic corresponding to the logic identifier to the client through the interface corresponding to the interface identifier; When the business processing logic corresponding to the logic identifier responded by the client is received, the task to be processed is processed using the business processing logic, and the task processing result is stored in the database of the distributed system.

5. The method according to claim 4, characterized in that When receiving the pending task submitted by the client and the callback information, the method further includes: The task identifier of the task to be processed is written into the message queue.

6. The method according to claim 5, characterized in that The method further comprises: The pending tasks in the message queue are sorted according to preset rules, and the pending tasks are processed in the sorted order.

7. The method according to any one of claims 4 to 6, characterized in that: The method further comprises: When receiving a request for querying task information sent by the client, the task information requested by the request is obtained from the database of the distributed system, and a response is given to the client.

8. A data processing device, characterized in that: The device comprises: a sending unit, a receiving unit and a searching unit; The sending unit is used to submit the pending task and the corresponding callback information to the task processing platform, so that when the task processing platform processes the pending task, it sends an instruction to call the business processing logic corresponding to the logic identifier in the callback information to the client through the interface corresponding to the interface identifier in the callback information; responds the business processing logic found by the search unit to the task processing platform, so that the task processing platform uses the business processing logic to process the pending task, and stores the task processing result in the database of the distributed system; The receiving unit is used to receive the instruction sent by the task processing platform; The search unit is used to search for the corresponding business processing logic according to the logic identifier carried in the instruction when the receiving unit receives the instruction sent by the task processing platform.

9. A data processing device, characterized in that: The device comprises: a receiving unit, a storage unit, a sending unit and a processing unit; The receiving unit is used to receive the pending task submitted by the client and the callback information; receive the business processing logic corresponding to the logical identifier responded by the client; The storage unit is used to store the pending tasks and callback information submitted by the client to the database of the distributed system when the receiving unit receives them; wherein the callback information includes: the interface identifier of the interface of the callback business processing logic and the logic identifier of the business processing logic; the task processing result obtained by the processing unit is stored in the database of the distributed system; The sending unit is used to send an instruction to call the business processing logic corresponding to the logic identifier to the client through the interface corresponding to the interface identifier when processing the pending task received by the receiving unit; The processing unit is used to process the task to be processed using the business processing logic when the receiving unit receives the business processing logic corresponding to the logic identifier responded by the client.

10. 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 according to any one of claims 1 to 3 is implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 3 is implemented.

12. An electronic device 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 method according to any one of claims 4 to 7 is implemented.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 4 to 7 is implemented.

Citation Information

Patent Citations

  • Service optimization method and device

    CN110309931A

  • Services Cloud System and Service Realization Method

    US20120317164A1