CN113010306A - Service data processing method and device, computer equipment and storage medium - Google Patents

Service data processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113010306A
CN113010306A CN202110205415.2A CN202110205415A CN113010306A CN 113010306 A CN113010306 A CN 113010306A CN 202110205415 A CN202110205415 A CN 202110205415A CN 113010306 A CN113010306 A CN 113010306A
Authority
CN
China
Prior art keywords
sub
event
task
processing
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110205415.2A
Other languages
Chinese (zh)
Inventor
胡世海
王锴
赵宇
杨占琛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN202110205415.2A priority Critical patent/CN113010306A/en
Publication of CN113010306A publication Critical patent/CN113010306A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms

Abstract

The application relates to a business data processing method, a business data processing device, a computer device and a storage medium. The method comprises the following steps: acquiring service data of different service types and service operation logics corresponding to each service type which is pre-configured; respectively generating each sub-event task corresponding to the service type according to the service data; the sub-event tasks are used for combining into target event tasks based on business operation logics corresponding to the business types; binding the sub-event task with the corresponding service aiming at each sub-event task; distributing the sub-event tasks to each processing server corresponding to the service respectively to instruct each processing server to asynchronously process the sub-event tasks; and receiving the sub-processing results fed back after each processing server asynchronously processes the sub-event tasks, and summarizing the sub-processing results to obtain the target processing result of the target event task. By adopting the method, the service data processing efficiency can be improved.

Description

Service data processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing service data, a computer device, and a storage medium.
Background
With the development of computer technology, more and more business systems are applied to daily work of people, and people can process various businesses through the business systems. However, there are often heavy and lengthy long service call chains in the service system, and the service system needs to spend a long time to process these heavy and lengthy event tasks, and resources are locked for a long time, thereby resulting in inefficient service data processing.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a business data processing method, a business data processing apparatus, a computer device, and a storage medium, which can improve the business data processing efficiency.
A method for processing service data, the method comprising:
acquiring service data of different service types and service operation logic corresponding to each service type which is pre-configured;
respectively generating sub-event tasks corresponding to the service types according to the service data; the sub-event tasks are used for combining into a target event task based on the business operation logic corresponding to the business type;
for each sub-event task, binding the sub-event task with a corresponding service;
distributing the sub-event tasks to processing servers corresponding to the services respectively so as to instruct the processing servers to asynchronously process the sub-event tasks;
and receiving sub-processing results fed back after the sub-event tasks are asynchronously processed by the processing servers, and summarizing the sub-processing results to obtain a target processing result of the target event task.
In one embodiment, the receiving sub-processing results fed back after the processing servers asynchronously process the sub-event tasks, and performing summary processing on the sub-processing results to obtain a target processing result of the target event task includes:
monitoring the processing state of the sub-event task in real time;
after all the sub-event tasks belonging to the same target event task are processed, acquiring the sub-processing result of each sub-event task;
and summarizing the sub-processing results of the sub-event tasks to obtain the target processing result of the target event task.
In one embodiment, the method further comprises:
after processing of any sub-event task of the Chinese angelica, which belongs to the same target event task, corresponding intermediate state prompt information is generated;
and sending the intermediate state prompt information to a terminal corresponding to the target event task.
In one embodiment, after the distributing the sub-event tasks to the processing servers corresponding to the services respectively, the method further includes:
inquiring whether task distribution success information corresponding to the sub-event task exists or not;
when the task distribution success information is inquired and task receiving success information corresponding to the task distribution success information is received, judging that the sub-event task distribution is successful; the task receiving success information is generated after the processing server receives the sub-event task;
and when the task distribution success information is not inquired and/or the task reception success information corresponding to the task distribution success information is not received, judging that the sub-event task distribution fails.
In one embodiment, the method further comprises:
when the distribution of the sub-event task fails, generating failure alarm information;
and returning the step of respectively distributing the sub-event tasks to each processing server corresponding to the service according to the failure alarm information so as to continue executing until the sub-event tasks are successfully distributed.
In one embodiment, the method further comprises:
monitoring the service state of the processing server in real time;
when the service state of the processing server is abnormal, selecting a processing server with a normal service state from the server cluster where the processing server is located;
and redistributing the sub event tasks distributed to the processing server with the abnormal service state to the processing server with the normal service state.
In one embodiment, the method further comprises:
when the processing server with the abnormal service state recovers the service, judging whether the sub-event task is processed by other processing servers in the server cluster according to the task identifier of the sub-event task;
when the sub-event task is processed by other processing servers in the server cluster, notifying the processing server recovering service to filter the sub-event task corresponding to the task identifier;
and when the sub-event task is not processed by other processing servers in the server cluster, informing the processing server of the recovery service to process the sub-event task corresponding to the task identifier.
A traffic data processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring service data of different service types and service operation logics corresponding to the service types which are pre-configured;
the generating module is used for respectively generating each sub-event task corresponding to the service type according to the service data; the sub-event tasks are used for combining into a target event task based on the business operation logic corresponding to the business type;
the binding module is used for binding each sub-event task with the corresponding service;
the sending module is used for respectively distributing the sub-event tasks to each processing server corresponding to the service so as to instruct each processing server to asynchronously process the sub-event tasks;
and the receiving module is used for receiving the sub-processing results fed back after the sub-event tasks are asynchronously processed by the processing servers, and summarizing the sub-processing results to obtain the target processing result of the target event task.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring service data of different service types and service operation logic corresponding to each service type which is pre-configured;
respectively generating sub-event tasks corresponding to the service types according to the service data; the sub-event tasks are used for combining into a target event task based on the business operation logic corresponding to the business type;
for each sub-event task, binding the sub-event task with a corresponding service;
distributing the sub-event tasks to processing servers corresponding to the services respectively so as to instruct the processing servers to asynchronously process the sub-event tasks;
and receiving sub-processing results fed back after the sub-event tasks are asynchronously processed by the processing servers, and summarizing the sub-processing results to obtain a target processing result of the target event task.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring service data of different service types and service operation logic corresponding to each service type which is pre-configured;
respectively generating sub-event tasks corresponding to the service types according to the service data; the sub-event tasks are used for combining into a target event task based on the business operation logic corresponding to the business type;
for each sub-event task, binding the sub-event task with a corresponding service;
distributing the sub-event tasks to processing servers corresponding to the services respectively so as to instruct the processing servers to asynchronously process the sub-event tasks;
and receiving sub-processing results fed back after the sub-event tasks are asynchronously processed by the processing servers, and summarizing the sub-processing results to obtain a target processing result of the target event task.
The service data processing method, the device, the computer equipment and the storage medium acquire the service data of different service types and the service operation logic corresponding to each service type which is pre-configured; respectively generating each sub-event task corresponding to the service type according to the service data; the sub-event tasks are used for combining into target event tasks based on business operation logics corresponding to the business types; binding the sub-event task with the corresponding service aiming at each sub-event task; distributing the sub-event tasks to each processing server corresponding to the service respectively to instruct each processing server to asynchronously process the sub-event tasks; and receiving the sub-processing results fed back after each processing server asynchronously processes the sub-event tasks, and summarizing the sub-processing results to obtain the target processing result of the target event task. In this way, by distributing a plurality of sub-event tasks to different processing servers and asynchronously processing the corresponding sub-event tasks by each processing server, the time spent for processing the service data is reduced when heavy and lengthy target event tasks are processed, and the resources are prevented from being locked for a long time, thereby improving the service data processing efficiency.
Drawings
Fig. 1 is an application scenario diagram of a service data processing method in an embodiment;
FIG. 2 is a flow chart illustrating a method for processing service data according to an embodiment;
FIG. 3 is a schematic diagram of traffic data processing in one embodiment;
fig. 4 is a schematic flow chart of a service data processing method in another embodiment;
FIG. 5 is a block diagram of a business data processing apparatus in one embodiment;
fig. 6 is a block diagram showing the construction of a service data processing apparatus according to another embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The service data processing method provided by the application can be applied to the application environment shown in fig. 1. The application environment includes a distribution server 102 and more than one processing server 104. The distribution server 102 communicates with each processing server 104 via a network. The distribution server 102 and the processing server 104 may be implemented by separate servers or a server cluster composed of a plurality of servers. Those skilled in the art will understand that the application environment shown in fig. 1 is only a part of the scenario related to the present application, and does not constitute a limitation to the application environment of the present application.
The distribution server 102 acquires service data of different service types and service operation logics corresponding to each service type which is pre-configured, and respectively generates each sub-event task corresponding to the service type according to the service data; and the sub-event tasks are used for combining into the target event task based on the business operation logic corresponding to the business type. For each sub-event task, the distribution server 102 binds the sub-event task with the corresponding service, and distributes the sub-event task to each processing server 104 corresponding to the service, respectively, to instruct each processing server 104 to asynchronously process the sub-event task. The distribution server 102 receives the sub-processing results fed back by the processing servers 104 after asynchronously processing the sub-event tasks, and performs summary processing on the sub-processing results to obtain a target processing result of the target event task.
In one embodiment, as shown in fig. 2, a business data processing method is provided, which is described by taking the method as an example applied to the distribution server 102 in fig. 1, and includes the following steps:
s202, acquiring service data of different service types and service operation logic corresponding to each service type which is pre-configured.
The service data is data generated by performing service processing.
Specifically, each piece of service data carries respective service type information, and each service type is preconfigured with a corresponding service operation logic, and further, the distribution server can obtain service data of different service types and service operation logics corresponding to the preconfigured service types.
S204, respectively generating each sub-event task corresponding to the service type according to the service data; and the sub-event tasks are used for combining into the target event task based on the business operation logic corresponding to the business type.
Wherein the sub-event tasks are each independent event task in the long service invocation chain. The target event task is a combination of all sub-event tasks in the long service invocation chain.
Specifically, the distribution server may generate each sub-event task corresponding to the service type of the service data according to the acquired service data. The distribution server can combine all the sub-event tasks into a target event task based on the business operation logic corresponding to all the business types.
S206, aiming at each sub-event task, binding the sub-event task and the corresponding service.
Wherein, the service is an application program type, and the service can provide some specific service functions for users.
Specifically, each sub-event task may correspond to a specific service, and for each sub-event task, the distribution server may bind the sub-event task with the corresponding service.
And S208, distributing the sub-event tasks to each processing server corresponding to the service respectively so as to instruct each processing server to asynchronously process the sub-event tasks.
Specifically, each service corresponds to a respective processing server, the distribution server can communicate with a plurality of processing servers, the distribution server can distribute the sub-event tasks to the processing servers corresponding to the services, and the processing servers can receive the sub-event tasks sent by the distribution server and perform asynchronous processing on the sub-event tasks.
And S210, receiving the sub-processing results fed back after each processing server asynchronously processes the sub-event tasks, and summarizing the sub-processing results to obtain the target processing result of the target event task.
Specifically, after each processing server performs asynchronous processing on the sub-event task, a corresponding sub-processing result may be generated. Each processing server can feed back the generated sub-processing results to the distribution server, and the distribution server can receive the sub-processing results fed back after each processing server asynchronously processes the sub-event tasks and carries out summary processing on the sub-processing results to obtain the target processing results of the target event tasks.
In the service data processing method, service data of different service types and service operation logics corresponding to each service type which are pre-configured are obtained; respectively generating each sub-event task corresponding to the service type according to the service data; the sub-event tasks are used for combining into target event tasks based on business operation logics corresponding to the business types; binding the sub-event task with the corresponding service aiming at each sub-event task; distributing the sub-event tasks to each processing server corresponding to the service respectively to instruct each processing server to asynchronously process the sub-event tasks; and receiving the sub-processing results fed back after each processing server asynchronously processes the sub-event tasks, and summarizing the sub-processing results to obtain the target processing result of the target event task. In this way, by distributing a plurality of sub-event tasks to different processing servers and asynchronously processing the corresponding sub-event tasks by each processing server, the time spent for processing the service data is reduced when heavy and lengthy target event tasks are processed, and the resources are prevented from being locked for a long time, thereby improving the service data processing efficiency.
In an embodiment, the step S210 is a step of receiving sub-processing results fed back after each processing server asynchronously processes the sub-event tasks, and performing summary processing on each sub-processing result to obtain a target processing result of the target event task, and specifically includes: monitoring the processing state of the sub-event task in real time; after all the sub-event tasks belonging to the same target event task are processed, acquiring the sub-processing result of each sub-event task; and summarizing the sub-processing results of the sub-event tasks to obtain the target processing result of the target event task.
Specifically, the distribution server may monitor the processing state of the sub-event task in real time to obtain the processing progress of each sub-event task belonging to the same target event task. After all the sub-event tasks belonging to the same target event task are processed, the distribution server can obtain the sub-processing results of the sub-event tasks, and according to the business operation logic corresponding to the business type of the business data, the sub-processing results of the sub-event tasks are summarized to obtain the target processing result of the target event task.
In the embodiment, the processing state of the sub-event task is monitored in real time, so that the target processing result of the target event task can be calculated in time, and the timeliness of service data processing is improved.
In an embodiment, the method for processing service data specifically further includes: after processing of any sub-event task of the Chinese angelica, which belongs to the same target event task, corresponding intermediate state prompt information is generated; and sending the intermediate state prompt information to a terminal corresponding to the target event task.
The intermediate state prompt information is the state prompt information generated by the distribution server before all the sub event tasks belonging to the same target event task are processed.
Specifically, after processing of any sub-event task belonging to the same target event task is finished, the distribution server may generate corresponding intermediate state prompt information and send the intermediate state prompt information to a terminal corresponding to the target event task, and the terminal may receive the intermediate state prompt information and display the intermediate state prompt information.
In the embodiment, after the sub-event task is processed, the corresponding intermediate state prompt information is generated to prompt the processing state of the user service data, so that the user can be liberated from lengthy system waiting to process other services.
In an embodiment, after the step of distributing the sub-event task to each processing server corresponding to the service in step S208, the method for processing the business data specifically further includes: inquiring whether task distribution success information corresponding to the sub-event task exists or not; when the task distribution success information is inquired and the task receiving success information corresponding to the task distribution success information is received, judging that the sub-event task distribution is successful; the task receiving success information is generated after the processing server receives the sub-event task; and when the task distribution success information is not inquired and/or the task reception success information corresponding to the task distribution success information is not received, judging that the sub-event task distribution fails.
The task distribution success information is information generated when the distribution server successfully distributes the sub-event task to the corresponding processing server. The task reception success information is information generated when the processing server successfully receives the sub-event task.
Specifically, the distribution server can generate and store task distribution success information locally when successfully distributing the sub-event task to the corresponding processing server, and the processing server can generate and feed back the task reception success information to the distribution server when successfully receiving the sub-event task. The distribution server can inquire whether the task distribution success information corresponding to the sub-event task exists locally. When the task distribution success information is inquired and the task reception success information corresponding to the task distribution success information is received, the distribution server can judge that the sub-event task distribution is successful. When the task distribution success information is not inquired and/or the task reception success information corresponding to the task distribution success information is not received, the distribution server can judge that the sub-event task distribution fails.
In the embodiment, the distribution state of the sub-event task is judged by monitoring the task distribution success information and the task receiving success information, so that the reliability of message distribution is ensured.
In an embodiment, the method for processing service data specifically further includes: when the distribution of the sub-event task fails, generating failure alarm information; and returning the step of respectively distributing the sub-event tasks to each processing server corresponding to the service according to the failure alarm information to continue executing until the sub-event tasks are successfully distributed.
Specifically, when the distribution of the sub-event task fails, the distribution server may locate a distribution node causing the distribution failure, and generate failure alarm information according to the distribution node causing the distribution failure. The distribution server can return the step of distributing the sub-event tasks to each processing server corresponding to the service respectively according to the failure alarm information to continue execution until the sub-event tasks are successfully distributed.
In the above embodiment, when the distribution of the sub-event task fails, the sub-event task which is failed to distribute is redistributed, so as to ensure that the sub-event task is successfully distributed.
In an embodiment, the method for processing service data specifically further includes: monitoring the service state of the processing server in real time; when the service state of the processing server is abnormal, selecting a processing server with a normal service state from the server cluster where the processing server is located; and redistributing the sub-event tasks distributed to the processing server with the abnormal service state to the processing server with the normal service state.
Specifically, the distribution server can monitor the service state of each processing server in real time. When the abnormal service state of the processing server is monitored, the distribution server can select a processing server with a normal service state from the server cluster where the processing server is located, and can redistribute the sub-event task distributed to the processing server with the abnormal service state to the processing server with the normal service state, and the processing server with the normal service state can process the sub-event task after receiving the sub-event task.
In the embodiment, by monitoring the service state of the processing server in real time, when the service state of the processing server is abnormal, the sub-event task is redistributed to the processing server with a normal service state, so that normal processing of the sub-event task is ensured, and the service data processing efficiency is further improved.
In one embodiment, the method for processing service data specifically includes: when the processing server with abnormal service state recovers service, judging whether the sub-event task is processed by other processing servers in the server cluster according to the task identifier of the sub-event task; when the sub-event task is processed by other processing servers in the server cluster, informing the processing server for recovering the service to filter the sub-event task corresponding to the task identifier; and when the sub-event task is not processed by other processing servers in the server cluster, notifying the processing server of the recovery service of processing the sub-event task corresponding to the task identification.
Wherein, the task identifier is a character string for uniquely identifying the sub-event task. The task identification may include at least one of letters, numbers, and special characters. The special character may specifically include any one of a percentile, a pound sign key, an asterisk key, an underline, and the like.
Specifically, each sub-event task carries a corresponding task identifier. When the processing server with abnormal service state recovers service, the distribution server can judge whether the sub-event task is processed by other processing servers in the server cluster according to the task identifier of the sub-event task. When the sub-event task is processed by other processing servers in the server cluster, in order to avoid the sub-event task being processed repeatedly, the distribution server may notify the processing server recovering the service to filter the sub-event task corresponding to the task identifier, that is, notify the processing server recovering the service not to process the sub-event task carrying the task identifier. And when the sub-event task is not processed by other processing servers in the server cluster, notifying the processing server of the recovery service of processing the sub-event task corresponding to the task identification.
In one embodiment, the distribution Server may distribute the task identification for each sub-event task via Redis (Remote Dictionary service). Redis is a Key-Value pair database.
In the above embodiment, whether the sub-event task has been processed by another processing server in the server cluster is determined according to the task identifier of the sub-event task, so that the repeated processing of the sub-event task is avoided.
In one embodiment, as shown in fig. 3, the distribution server may combine the sub-event tasks into event groups, each of which may be regarded as a target event task, and bind the sub-event tasks in the event groups with corresponding services, respectively, where the services may include a consistency service, a serial-parallel orchestration service, a plug-in registration service, a retry policy service, and the like. The event execution control center in the distribution server can control each sub-event task, such as event group disassembly, failure processing, result summarization, object management and control, retry mechanism, process monitoring and the like. In fig. 3, the processing list in the MQ (Message Queue) of the sub-event task 1 may include processes 1 (process 1), processes 2 (process 2), …, and process sn (process n), and the processing server corresponding to the sub-event task 1 may process processes 1 (process 1), processes 2 (process 2), …, and process sn (process n) in sequence. The distribution server can also process the event log, monitor the event processing flow, monitor the distribution state and the like.
In one embodiment, the message queue may comprise any of a RabbitMQ, a RocktMQ, an ActiveMQ, a ZeroMQ, Kafka, and IBM WebSphere, among others.
In one embodiment, as shown in fig. 4, the distribution server may query the event binding center whether there is a registered sub-event task, and if the registered sub-event task is queried, the distribution server may distribute the sub-event task to the corresponding processing server. When the distribution fails, the distribution server may redistribute the sub-event tasks. When the distribution is successful, the corresponding distribution processing server can process the sub-event task. The distribution server can judge whether the sub-event task is processed according to the task identifier of the sub-event task. And when the sub-event is not processed, processing the sub-event task through the corresponding processing server. When the sub-event tasks in the event group are not processed, the distribution server can judge whether a local error occurs in the sub-event task processing process. When a local error occurs, the distribution server may start a retry mechanism until the sub-event task is successfully processed. After the sub-event tasks in the event group are processed, the distribution server can process the event logs and perform summary processing on the sub-processing results corresponding to the sub-event tasks to obtain target processing results of the target event tasks.
It should be understood that although the various steps of fig. 2 are shown in order, the steps are not necessarily performed in order. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a service data processing apparatus 500, including: an obtaining module 501, a generating module 502, a binding module 503, a sending module 504 and a receiving module 505, wherein:
an obtaining module 501, configured to obtain service data of different service types and service operation logics corresponding to each service type that is preconfigured.
A generating module 502, configured to generate each sub-event task corresponding to a service type according to the service data; and the sub-event tasks are used for combining into the target event task based on the business operation logic corresponding to the business type.
A binding module 503, configured to bind, for each sub-event task, the sub-event task and the corresponding service.
The sending module 504 is configured to distribute the sub-event tasks to the processing servers corresponding to the services, respectively, so as to instruct the processing servers to asynchronously process the sub-event tasks.
And the receiving module 505 is configured to receive the sub-processing results fed back after the sub-event tasks are asynchronously processed by the processing servers, and perform summarization processing on the sub-processing results to obtain a target processing result of the target event task.
In one embodiment, the receiving module 505 is further configured to monitor the processing status of the sub-event task in real time; after all the sub-event tasks belonging to the same target event task are processed, acquiring the sub-processing result of each sub-event task; and summarizing the sub-processing results of the sub-event tasks to obtain the target processing result of the target event task.
In one embodiment, the generating module 502 is further configured to generate corresponding intermediate state prompt information after processing of any sub-event task belonging to the same target event task is finished; and sending the intermediate state prompt information to a terminal corresponding to the target event task.
In one embodiment, the generating module 502 is further configured to generate failure warning information when the distribution of the sub-event task fails; according to the failure alarm information, the notification sending module 504 respectively distributes the sub-event tasks to each processing server corresponding to the service to continue execution until the sub-event tasks are successfully distributed.
Referring to fig. 6, in one embodiment, the service data processing apparatus 500 further includes: a query module 506, a monitoring module 507 and a judgment module 508, wherein:
the query module 506 is configured to query whether task distribution success information corresponding to the sub-event task exists; when the task distribution success information is inquired and the task receiving success information corresponding to the task distribution success information is received, judging that the sub-event task distribution is successful; the task receiving success information is generated after the processing server receives the sub-event task; and when the task distribution success information is not inquired and/or the task reception success information corresponding to the task distribution success information is not received, judging that the sub-event task distribution fails.
A monitoring module 507, configured to monitor a service state of the processing server in real time; when the service state of the processing server is abnormal, selecting a processing server with a normal service state from the server cluster where the processing server is located; and redistributing the sub-event tasks distributed to the processing server with the abnormal service state to the processing server with the normal service state.
A determining module 508, configured to determine, when a processing server with an abnormal service state recovers service, whether a sub-event task has been processed by another processing server in the server cluster according to the task identifier of the sub-event task; when the sub-event task is processed by other processing servers in the server cluster, informing the processing server for recovering the service to filter the sub-event task corresponding to the task identifier; and when the sub-event task is not processed by other processing servers in the server cluster, notifying the processing server of the recovery service of processing the sub-event task corresponding to the task identification.
The service data processing device acquires service data of different service types and service operation logics corresponding to each service type which is pre-configured; respectively generating each sub-event task corresponding to the service type according to the service data; the sub-event tasks are used for combining into target event tasks based on business operation logics corresponding to the business types; binding the sub-event task with the corresponding service aiming at each sub-event task; distributing the sub-event tasks to each processing server corresponding to the service respectively to instruct each processing server to asynchronously process the sub-event tasks; and receiving the sub-processing results fed back after each processing server asynchronously processes the sub-event tasks, and summarizing the sub-processing results to obtain the target processing result of the target event task. In this way, by distributing a plurality of sub-event tasks to different processing servers and asynchronously processing the corresponding sub-event tasks by each processing server, the time spent for processing the service data is reduced when heavy and lengthy target event tasks are processed, and the resources are prevented from being locked for a long time, thereby improving the service data processing efficiency.
For specific limitations of the service data processing apparatus, reference may be made to the above limitations of the service data processing method, which is not described herein again. The modules in the business data processing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be the distribution server 102 in fig. 1 described above, and its internal structure diagram may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the business data processing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a business data processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
acquiring service data of different service types and service operation logics corresponding to each service type which is pre-configured;
respectively generating each sub-event task corresponding to the service type according to the service data; the sub-event tasks are used for combining into target event tasks based on business operation logics corresponding to the business types;
binding the sub-event task with the corresponding service aiming at each sub-event task;
distributing the sub-event tasks to each processing server corresponding to the service respectively to instruct each processing server to asynchronously process the sub-event tasks;
and receiving the sub-processing results fed back after each processing server asynchronously processes the sub-event tasks, and summarizing the sub-processing results to obtain the target processing result of the target event task.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
monitoring the processing state of the sub-event task in real time;
after all the sub-event tasks belonging to the same target event task are processed, acquiring the sub-processing result of each sub-event task;
and summarizing the sub-processing results of the sub-event tasks to obtain the target processing result of the target event task.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
after processing of any sub-event task of the Chinese angelica, which belongs to the same target event task, corresponding intermediate state prompt information is generated;
and sending the intermediate state prompt information to a terminal corresponding to the target event task.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
inquiring whether task distribution success information corresponding to the sub-event task exists or not;
when the task distribution success information is inquired and the task receiving success information corresponding to the task distribution success information is received, judging that the sub-event task distribution is successful; the task receiving success information is generated after the processing server receives the sub-event task;
and when the task distribution success information is not inquired and/or the task reception success information corresponding to the task distribution success information is not received, judging that the sub-event task distribution fails.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the distribution of the sub-event task fails, generating failure alarm information;
and returning the step of respectively distributing the sub-event tasks to each processing server corresponding to the service according to the failure alarm information to continue executing until the sub-event tasks are successfully distributed.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
monitoring the service state of the processing server in real time;
when the service state of the processing server is abnormal, selecting a processing server with a normal service state from the server cluster where the processing server is located;
and redistributing the sub-event tasks distributed to the processing server with the abnormal service state to the processing server with the normal service state.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
when the processing server with abnormal service state recovers service, judging whether the sub-event task is processed by other processing servers in the server cluster according to the task identifier of the sub-event task;
when the sub-event task is processed by other processing servers in the server cluster, informing the processing server for recovering the service to filter the sub-event task corresponding to the task identifier;
and when the sub-event task is not processed by other processing servers in the server cluster, notifying the processing server of the recovery service of processing the sub-event task corresponding to the task identification.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
acquiring service data of different service types and service operation logics corresponding to each service type which is pre-configured;
respectively generating each sub-event task corresponding to the service type according to the service data; the sub-event tasks are used for combining into target event tasks based on business operation logics corresponding to the business types;
binding the sub-event task with the corresponding service aiming at each sub-event task;
distributing the sub-event tasks to each processing server corresponding to the service respectively to instruct each processing server to asynchronously process the sub-event tasks;
and receiving the sub-processing results fed back after each processing server asynchronously processes the sub-event tasks, and summarizing the sub-processing results to obtain the target processing result of the target event task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
monitoring the processing state of the sub-event task in real time;
after all the sub-event tasks belonging to the same target event task are processed, acquiring the sub-processing result of each sub-event task;
and summarizing the sub-processing results of the sub-event tasks to obtain the target processing result of the target event task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
after processing of any sub-event task of the Chinese angelica, which belongs to the same target event task, corresponding intermediate state prompt information is generated;
and sending the intermediate state prompt information to a terminal corresponding to the target event task.
In one embodiment, the computer program when executed by the processor further performs the steps of:
inquiring whether task distribution success information corresponding to the sub-event task exists or not;
when the task distribution success information is inquired and the task receiving success information corresponding to the task distribution success information is received, judging that the sub-event task distribution is successful; the task receiving success information is generated after the processing server receives the sub-event task;
and when the task distribution success information is not inquired and/or the task reception success information corresponding to the task distribution success information is not received, judging that the sub-event task distribution fails.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the distribution of the sub-event task fails, generating failure alarm information;
and returning the step of respectively distributing the sub-event tasks to each processing server corresponding to the service according to the failure alarm information to continue executing until the sub-event tasks are successfully distributed.
In one embodiment, the computer program when executed by the processor further performs the steps of:
monitoring the service state of the processing server in real time;
when the service state of the processing server is abnormal, selecting a processing server with a normal service state from the server cluster where the processing server is located;
and redistributing the sub-event tasks distributed to the processing server with the abnormal service state to the processing server with the normal service state.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the processing server with abnormal service state recovers service, judging whether the sub-event task is processed by other processing servers in the server cluster according to the task identifier of the sub-event task;
when the sub-event task is processed by other processing servers in the server cluster, informing the processing server for recovering the service to filter the sub-event task corresponding to the task identifier;
and when the sub-event task is not processed by other processing servers in the server cluster, notifying the processing server of the recovery service of processing the sub-event task corresponding to the task identification.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for processing service data, the method comprising:
acquiring service data of different service types and service operation logic corresponding to each service type which is pre-configured;
respectively generating sub-event tasks corresponding to the service types according to the service data; the sub-event tasks are used for combining into a target event task based on the business operation logic corresponding to the business type;
for each sub-event task, binding the sub-event task with a corresponding service;
distributing the sub-event tasks to processing servers corresponding to the services respectively so as to instruct the processing servers to asynchronously process the sub-event tasks;
and receiving sub-processing results fed back after the sub-event tasks are asynchronously processed by the processing servers, and summarizing the sub-processing results to obtain a target processing result of the target event task.
2. The method according to claim 1, wherein the receiving sub-processing results fed back after the processing servers asynchronously process the sub-event tasks, and performing summary processing on the sub-processing results to obtain a target processing result of the target event task includes:
monitoring the processing state of the sub-event task in real time;
after all the sub-event tasks belonging to the same target event task are processed, acquiring the sub-processing result of each sub-event task;
and summarizing the sub-processing results of the sub-event tasks to obtain the target processing result of the target event task.
3. The method of claim 2, further comprising:
after processing of any sub-event task of the Chinese angelica, which belongs to the same target event task, corresponding intermediate state prompt information is generated;
and sending the intermediate state prompt information to a terminal corresponding to the target event task.
4. The method of claim 1, wherein after the distributing the sub-event tasks to the respective processing servers corresponding to the services, the method further comprises:
inquiring whether task distribution success information corresponding to the sub-event task exists or not;
when the task distribution success information is inquired and task receiving success information corresponding to the task distribution success information is received, judging that the sub-event task distribution is successful; the task receiving success information is generated after the processing server receives the sub-event task;
and when the task distribution success information is not inquired and/or the task reception success information corresponding to the task distribution success information is not received, judging that the sub-event task distribution fails.
5. The method of claim 4, further comprising:
when the distribution of the sub-event task fails, generating failure alarm information;
and returning the step of respectively distributing the sub-event tasks to each processing server corresponding to the service according to the failure alarm information so as to continue executing until the sub-event tasks are successfully distributed.
6. The method according to any one of claims 1 to 5, further comprising:
monitoring the service state of the processing server in real time;
when the service state of the processing server is abnormal, selecting a processing server with a normal service state from the server cluster where the processing server is located;
and redistributing the sub event tasks distributed to the processing server with the abnormal service state to the processing server with the normal service state.
7. The method of claim 6, further comprising:
when the processing server with the abnormal service state recovers the service, judging whether the sub-event task is processed by other processing servers in the server cluster according to the task identifier of the sub-event task;
when the sub-event task is processed by other processing servers in the server cluster, notifying the processing server recovering service to filter the sub-event task corresponding to the task identifier;
and when the sub-event task is not processed by other processing servers in the server cluster, informing the processing server of the recovery service to process the sub-event task corresponding to the task identifier.
8. A service data processing apparatus, characterized in that the apparatus comprises:
the acquisition module is used for acquiring service data of different service types and service operation logics corresponding to the service types which are pre-configured;
the generating module is used for respectively generating each sub-event task corresponding to the service type according to the service data; the sub-event tasks are used for combining into a target event task based on the business operation logic corresponding to the business type;
the binding module is used for binding each sub-event task with the corresponding service;
the sending module is used for respectively distributing the sub-event tasks to each processing server corresponding to the service so as to instruct each processing server to asynchronously process the sub-event tasks;
and the receiving module is used for receiving the sub-processing results fed back after the sub-event tasks are asynchronously processed by the processing servers, and summarizing the sub-processing results to obtain the target processing result of the target event task.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110205415.2A 2021-02-24 2021-02-24 Service data processing method and device, computer equipment and storage medium Pending CN113010306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110205415.2A CN113010306A (en) 2021-02-24 2021-02-24 Service data processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110205415.2A CN113010306A (en) 2021-02-24 2021-02-24 Service data processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113010306A true CN113010306A (en) 2021-06-22

Family

ID=76385581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110205415.2A Pending CN113010306A (en) 2021-02-24 2021-02-24 Service data processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113010306A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113867600A (en) * 2021-08-25 2021-12-31 上海浦东发展银行股份有限公司 Development method and device for processing streaming data and computer equipment
CN116954871A (en) * 2023-09-20 2023-10-27 联通在线信息科技有限公司 Asynchronous distribution task data chain management method and system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180004568A1 (en) * 2015-12-30 2018-01-04 Sengled Optoelectronics Co., Ltd. Distributed task system and service processing method based on internet of things
WO2018103318A1 (en) * 2016-12-06 2018-06-14 上海壹账通金融科技有限公司 Distributed transaction handling method and system
CN108829508A (en) * 2018-03-30 2018-11-16 北京趣拿信息技术有限公司 task processing method and device
CN111078423A (en) * 2019-11-21 2020-04-28 京东数字科技控股有限公司 Data processing method, device, system and computer readable storage medium
CN111182061A (en) * 2019-12-30 2020-05-19 苏宁云计算有限公司 Task distribution processing method, system, computer device and storage medium
WO2020103426A1 (en) * 2018-11-21 2020-05-28 华为技术有限公司 Service collaborative processing method and device
CN111340340A (en) * 2020-02-17 2020-06-26 腾讯科技(深圳)有限公司 Event processing method and device
CN111651285A (en) * 2020-05-27 2020-09-11 平安养老保险股份有限公司 Batch business data processing method and device, computer equipment and storage medium
CN111784525A (en) * 2020-07-10 2020-10-16 支付宝(杭州)信息技术有限公司 Method, device and system for processing insurance claim settlement request based on multi-party security calculation
WO2020211579A1 (en) * 2019-04-17 2020-10-22 深圳前海微众银行股份有限公司 Processing method, device and system for distributed bulk processing system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180004568A1 (en) * 2015-12-30 2018-01-04 Sengled Optoelectronics Co., Ltd. Distributed task system and service processing method based on internet of things
WO2018103318A1 (en) * 2016-12-06 2018-06-14 上海壹账通金融科技有限公司 Distributed transaction handling method and system
CN108829508A (en) * 2018-03-30 2018-11-16 北京趣拿信息技术有限公司 task processing method and device
WO2020103426A1 (en) * 2018-11-21 2020-05-28 华为技术有限公司 Service collaborative processing method and device
WO2020211579A1 (en) * 2019-04-17 2020-10-22 深圳前海微众银行股份有限公司 Processing method, device and system for distributed bulk processing system
CN111078423A (en) * 2019-11-21 2020-04-28 京东数字科技控股有限公司 Data processing method, device, system and computer readable storage medium
CN111182061A (en) * 2019-12-30 2020-05-19 苏宁云计算有限公司 Task distribution processing method, system, computer device and storage medium
CN111340340A (en) * 2020-02-17 2020-06-26 腾讯科技(深圳)有限公司 Event processing method and device
CN111651285A (en) * 2020-05-27 2020-09-11 平安养老保险股份有限公司 Batch business data processing method and device, computer equipment and storage medium
CN111784525A (en) * 2020-07-10 2020-10-16 支付宝(杭州)信息技术有限公司 Method, device and system for processing insurance claim settlement request based on multi-party security calculation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘云恒;刘耀宗;: "基于Hadoop的公安视频大数据的处理方法", 计算机科学, no. 1 *
郭敏等: ""基于多任务异步处理的电力系统序网络拓扑分析"", 《电测与仪表》, vol. 53, no. 5 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113867600A (en) * 2021-08-25 2021-12-31 上海浦东发展银行股份有限公司 Development method and device for processing streaming data and computer equipment
CN116954871A (en) * 2023-09-20 2023-10-27 联通在线信息科技有限公司 Asynchronous distribution task data chain management method and system
CN116954871B (en) * 2023-09-20 2024-02-27 联通在线信息科技有限公司 Asynchronous distribution task data chain management method and system

Similar Documents

Publication Publication Date Title
CN107016480B (en) Task scheduling method, device and system
CN108446172B (en) Data calling method and device, computer equipment and storage medium
CN108959385B (en) Database deployment method, device, computer equipment and storage medium
CN110768873B (en) Distributed heartbeat detection method, system and device and computer equipment
CN110633160A (en) Interface calling method and device, computer equipment and storage medium
CN113010306A (en) Service data processing method and device, computer equipment and storage medium
CN108366132B (en) Method and device for managing service between servers, computer equipment and storage medium
CN109257396B (en) Distributed lock scheduling method and device
US7937611B2 (en) Method, system and machine accessible medium of a reconnect mechanism in a distributed system (cluster-wide reconnect mechanism)
CN112003895A (en) Cloud host evacuation method, device, equipment and storage medium in OpenStack cloud platform
CN111258741B (en) Warehouse task execution method, distributed server cluster and computer equipment
CN111382976B (en) Early warning data processing method and device, computer equipment and storage medium
CN110908801B (en) Data processing method and device based on block chain, computer equipment and storage medium
CN108241616B (en) Message pushing method and device
CN111309456B (en) Task execution method and system
CN112070585A (en) Order state unified management method and device, computer equipment and storage medium
CN111047187B (en) Information matching processing method, device, computer equipment and storage medium
CN112818204B (en) Service processing method, device, equipment and storage medium
CN111708795B (en) Object identification generation method, object identification updating device, computer equipment and medium
CN111061576B (en) Method and system for creating entity object
CN110489208B (en) Virtual machine configuration parameter checking method, system, computer equipment and storage medium
CN112231601A (en) Link management method, device, equipment and computer storage medium
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN110889539A (en) Method, system and device for organizing spot market clearing cases based on cloud platform
CN110750366A (en) Message processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination