CN110321211B - Asynchronous scheduling method and device for service system - Google Patents

Asynchronous scheduling method and device for service system Download PDF

Info

Publication number
CN110321211B
CN110321211B CN201910583150.2A CN201910583150A CN110321211B CN 110321211 B CN110321211 B CN 110321211B CN 201910583150 A CN201910583150 A CN 201910583150A CN 110321211 B CN110321211 B CN 110321211B
Authority
CN
China
Prior art keywords
processing
event
asynchronous
service system
component
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.)
Active
Application number
CN201910583150.2A
Other languages
Chinese (zh)
Other versions
CN110321211A (en
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.)
Shanghai Shuhe Information Technology Co Ltd
Original Assignee
Shanghai Shuhe Information Technology 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 Shanghai Shuhe Information Technology Co Ltd filed Critical Shanghai Shuhe Information Technology Co Ltd
Priority to CN201910583150.2A priority Critical patent/CN110321211B/en
Publication of CN110321211A publication Critical patent/CN110321211A/en
Application granted granted Critical
Publication of CN110321211B publication Critical patent/CN110321211B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an asynchronous scheduling method and device for a service system. The method comprises the steps that in an asynchronous processing scene, events are submitted according to a standard event processing interface; storing the data processed in the asynchronous processing scene into a database at an event storage interface; further comprising: processing one or more of the events in the asynchronous scheduling component; determining an event processing class according to the event type, and calling the event processing class of the service system according to the event processing class; and receiving a processing result returned by the service system at the asynchronous scheduling component. The method and the device solve the technical problem of high asynchronous processing cost. The method and the device have the advantages that the asynchronous processing scene is conceptualized and abstracted. The embeddable component in the application is easy to integrate with a business system. And no extra deployment is needed, so that hardware resources are saved.

Description

Asynchronous scheduling method and device for service system
Technical Field
The present application relates to the field of asynchronous processing of a service system, and in particular, to an asynchronous scheduling method and apparatus for a service system.
Background
There are many scenarios that may exist in a business system that need to be transferred to asynchronous processing.
The inventor finds that the existing asynchronous processing adopts a centralized solution mode, and the access cost of a service system is high. Further, maintenance costs are increased.
Aiming at the problem of high asynchronous processing cost in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide an asynchronous scheduling method and an asynchronous scheduling device for a service system, so as to solve the problem of high asynchronous processing cost.
To achieve the above object, according to one aspect of the present application, there is provided an asynchronous scheduling method for a service system, in which an asynchronous scheduling component is embedded.
The asynchronous scheduling method for the business system comprises the following steps: in an asynchronous processing scene, submitting events according to a standard event processing interface, wherein one or more events refer to the conversion result of a service scene needing asynchronous processing through an asynchronous scheduling component; storing the data processed in the asynchronous processing scene into a database at an event storage interface; further comprising: processing one or more of the events in the asynchronous scheduling component; determining an event processing class according to the event type, and calling the event processing class of the service system according to the event processing class; and receiving a processing result returned by the service system at the asynchronous scheduling component.
Further, in the asynchronous processing scenario, before submitting an event according to the standard event processing interface, the method further includes: an asynchronous scheduling component initialization step, the asynchronous scheduling component initialization step comprising: loading a component in a service system, and starting the initialization of the component; the component scans an event processing class in the service system and binds the event processing class and the mapping of the event type; component initialization is completed at the business system.
Further, receiving, at the asynchronous scheduling component, the processing result returned by the business system includes: if the processing result returned by the service system is successful, modifying the event processing state into the successful processing; and converting the event into cold data to finish event processing.
Further, receiving, at the asynchronous scheduling component, the processing result returned by the business system includes: if the processing result returned by the service system is retry, modifying the event processing state into processing; and calculating the next processing time of the event, and waiting for the next event to call processing.
Further, receiving, at the asynchronous scheduling component, the processing result returned by the business system includes: if the processing result returned by the service system is failure, modifying the event processing state into processing failure; and increasing the failure times of the processing, and calculating the next processing time according to the failure times, wherein the more the failure times, the larger the next processing time interval is calculated.
Further, the asynchronous scheduling group further includes: an alarming step, wherein the alarming step comprises the following steps: judging whether the failure times of the asynchronous scheduling component in the processing result returned by the service system exceeds a processing threshold value or not; and if the failure times in the processing result returned by the service system received by the asynchronous scheduling component exceed the processing threshold value, sending a processing failure alarm and terminating the event processing.
Further, the asynchronous scheduling group further includes: the step of clearing or archiving the events, namely receiving the events which are successfully processed and converted into cold data in the processing results returned by the business system according to the asynchronous scheduling component; cold data in the event is periodically archived or cleaned up.
In order to achieve the above object, according to another aspect of the present application, there is provided an asynchronous scheduling apparatus for a service system, in which an asynchronous scheduling component is embedded.
The asynchronous scheduling device for the business system comprises: the system comprises a submitting module, a processing module and a processing module, wherein the submitting module is used for submitting events according to a standard event processing interface in an asynchronous processing scene, and one or more events refer to the conversion result of a service scene needing asynchronous processing through an asynchronous scheduling component; the saving module is used for storing the data processed in the asynchronous processing scene to a database at the event saving interface; further comprising: a processing module to process one or more of the events in the asynchronous scheduling component; the calling module is used for determining an event processing class according to the event type and calling the event processing class of the service system according to the event processing class; and the return module is used for receiving the processing result returned by the service system at the asynchronous scheduling component.
Further, still include: the initialization module is used for loading the components in the service system and starting the initialization of the components; the component scans an event processing class in the service system and binds the event processing class and the mapping of the event type; component initialization is completed at the business system.
Further, the asynchronous scheduling component further comprises: the warning module is used for judging whether the failure times of the asynchronous dispatching component in the processing result returned by the service system exceeds a processing threshold value or not; if the failure times in the processing result returned by the service system received by the asynchronous scheduling component exceed the processing threshold value, sending a processing failure alarm and terminating the event processing; the data archiving or cleaning module is used for receiving the event which is successfully processed and is converted into cold data in the processing result returned by the business system according to the asynchronous scheduling component; cold data in the event is periodically archived or cleaned up.
In the asynchronous scheduling method and device for the business system in the embodiment of the application, an asynchronous scheduling component is embedded in the business system, events are submitted according to a standard event processing interface in an asynchronous processing scene, data processed in the asynchronous processing scene is stored in a database in an event storage interface, and one or more events are processed in the asynchronous scheduling component; determining an event processing class according to the event type, and calling the event processing class of the service system according to the event processing class; and receiving a processing result returned by the service system at the asynchronous scheduling component. The method achieves the purposes of conceptualization and abstraction of the asynchronous processing scene, thereby realizing the technical effects of standardizing and programming the whole process of event processing and further solving the technical problem of high asynchronous processing cost.
Furthermore, cold and hot data are automatically separated, so that the data to be processed can be always kept in a controllable range, and the problem that the processing efficiency is influenced due to overlarge data accumulation caused by the increase of time is avoided. By processing the failure attenuation strategy, meaningless retry can be avoided, and server resources are saved. By introducing an alarm mechanism, when the event cannot be processed, the event can be timely notified to a service responsible person, and the timeliness of finding the problem is improved. In addition, the cold data regular filing or cleaning function is provided, and database resources can be saved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
fig. 1 is a schematic flowchart of an asynchronous scheduling method for a business system according to a first embodiment of the present application;
FIG. 2 is a flowchart illustrating an asynchronous scheduling method for a business system according to a second embodiment of the present application;
FIG. 3 is a flowchart illustrating an asynchronous scheduling method for a business system according to a third embodiment of the present application;
FIG. 4 is a flowchart illustrating an asynchronous scheduling method for a business system according to a fourth embodiment of the present application;
FIG. 5 is a flowchart illustrating an asynchronous scheduling method for a business system according to a fifth embodiment of the present application;
FIG. 6 is a flowchart illustrating an asynchronous scheduling method for a business system according to a sixth embodiment of the present application;
FIG. 7 is a flowchart illustrating an asynchronous scheduling method for a business system according to a seventh embodiment of the present application;
fig. 8 is a schematic structural diagram of an asynchronous scheduling device for a business system according to a first embodiment of the present application;
fig. 9 is a schematic structural diagram of an asynchronous dispatching device for a business system according to a second embodiment of the present application;
FIG. 10 is a schematic diagram illustrating the operation of a scheduling component according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings. These terms are used primarily to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meaning of these terms in this application will be understood by those of ordinary skill in the art as appropriate.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements or components. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
As shown in fig. 1, the method includes steps S102 to S110 as follows:
step S102, in an asynchronous processing scene, submitting an event according to a standard event processing interface;
specifically, the lightweight asynchronous scheduling component can be embedded into a business system, the asynchronous scheduling component has a core concept called event (event), and all business scenes needing asynchronous processing can be converted into one event for the component. One or more events refer to the conversion result of the business scene needing asynchronous processing through the asynchronous scheduling component.
Step S104, storing the data processed in the asynchronous processing scene into a database at an event storage interface;
specifically, the service system only needs to realize a standard event processing interface provided by the component for a scene needing asynchronous processing, data is stored in the database through an event storage interface provided by the component at a proper time, and subsequent communication is completed by the component, so that the intrusion to the service system is very small, and the access cost is very low.
Further comprising:
step S106, processing one or more events in the asynchronous scheduling component;
step S108, determining an event processing class according to the event type, and calling the event processing class of the service system according to the event processing class;
step S110, receiving a processing result returned by the service system at the asynchronous scheduling component.
The above operations are performed by embedding an asynchronous scheduling component in a service system, where the asynchronous scheduling component can process one or a plurality of events in batch, determine an event processing class according to an event type, then call the event processing class in the service system according to the event processing class, and receive a processing result returned by the service system at the asynchronous scheduling component. The method is realized by uniformly dispatching the asynchronous dispatching components by abstracting a scene needing asynchronous processing into the concept of one or more events and packaging the whole flow of the processing of the one or more events in one asynchronous dispatching component.
Specifically, a batch of events to be processed can be fished through event scheduling, and each event to be processed is processed in a loop. And finding an event processing class according to the event type, and calling the event processing class in the service system to process the event.
From the above description, it can be seen that the following technical effects are achieved by the present application:
the method comprises the steps that an asynchronous scheduling component is embedded into a business system, events are submitted according to a standard event processing interface in an asynchronous processing scene, data processed in the asynchronous processing scene are stored into a database in an event storage interface, and one or more events are processed in the asynchronous scheduling component; determining an event processing class according to the event type, and calling the event processing class of the service system according to the event processing class; and receiving a processing result returned by the service system at the asynchronous scheduling component. The method achieves the purposes of conceptualization and abstraction of the asynchronous processing scene, thereby realizing the technical effects of standardizing and programming the whole process of event processing and further solving the technical problem of high asynchronous processing cost.
According to the embodiment of the present application, as a preferred embodiment in the present application, as shown in fig. 2, before submitting an event according to a standard event processing interface in an asynchronous processing scenario, the method further includes: an asynchronous scheduling component initialization step, the asynchronous scheduling component initialization step comprising:
step S202, loading the component in the service system, and starting the initialization of the component;
step S204, the component scans an event processing class in the service system and binds the mapping between the event processing class and the event type;
step S206, the service system completes the initialization of the component.
Specifically, the initialization of the asynchronous scheduling component can be completed through the above operations. Starting service in the service system, loading the assembly in the service system, initializing the assembly to start scanning the event processing class in the service system, then binding the mapping between the event processing class and the event type, and finishing initializing the assembly.
Preferably, the cold data and the hot data are automatically separated in the embodiment of the application, so that the data to be processed can be always kept in a controllable range, and the problem that the processing efficiency is influenced due to overlarge data accumulation caused by the increase of time is avoided.
According to the embodiment of the present application, as a preferred embodiment in the present application, as shown in fig. 3, the receiving, at the asynchronous scheduling component, the processing result returned by the service system includes:
step S302, if the processing result returned by the service system is successful, the event processing state is modified to be successful;
and step S304, converting the event into cold data and finishing event processing.
Specifically, the asynchronous scheduling component employs a standard event storage structure SQL.
The asynchronous scheduling component supports single event processing or scheduling processing, and if the processing result returned by the service system is successful, the event processing state is modified to be successful. The asynchronous scheduling component supports single-threaded or multi-threaded scheduling event processing. And the asynchronous scheduling component automatically separates cold data from hot data and is used for converting the event into cold data and finishing event processing.
According to the embodiment of the present application, as a preferred embodiment in the present application, as shown in fig. 4, the receiving, at the asynchronous scheduling component, the processing result returned by the service system includes:
step S402, if the processing result returned by the service system is retry, the event processing state is modified to be in processing;
step S404, calculating the next processing time of the event, and waiting for the next event calling processing.
Specifically, the asynchronous scheduling component employs a standard event storage structure SQL.
The asynchronous scheduling component supports single event processing or scheduling processing, and if the processing result returned by the service system is retry, the event processing state is modified into processing. The asynchronous scheduling component supports single-thread or multi-thread scheduling event processing, further calculates the next processing time of the event, and waits for the next event calling processing.
According to the embodiment of the present application, as a preferred embodiment in the present application, as shown in fig. 5, the receiving, at the asynchronous scheduling component, the processing result returned by the service system includes:
step S502, if the processing result returned by the service system is failure, the event processing state is modified to processing failure;
step S504, increasing failure times of processing, and calculating next processing time according to the failure times, wherein the more the failure times, the larger the next processing time interval is calculated.
Specifically, the asynchronous scheduling component adopts a scheduling attenuation mechanism in an abnormal state, and supports a custom attenuation strategy.
The asynchronous scheduling component supports single event processing or scheduling processing, and if the processing result returned by the service system is failure, the event processing state is modified to be processing failure. The asynchronous scheduling component supports single-thread or multi-thread scheduling event processing, increases the failure times of processing, and calculates the next processing time according to the failure times.
Preferably, by introducing the processing failure attenuation strategy, meaningless retry can be avoided, and server resources are saved.
According to the embodiment of the present application, as shown in fig. 6, as a preferred option in the embodiment, the asynchronous scheduling group further includes: an alarming step, wherein the alarming step comprises the following steps:
step S602, judging whether the failure times of the asynchronous dispatching component in the processing result returned by the service system exceeds the processing threshold value;
step S604, if it is determined that the number of failures in the processing result returned by the asynchronous scheduling component from the service system exceeds the processing threshold, sending a processing failure alarm and terminating the event processing.
In particular, the asynchronous scheduling component supports an alarm mechanism that fails above a processing threshold. And if the failure times of the asynchronous scheduling component in the processing result returned by the service system exceed the processing threshold value, stopping processing the event and finishing the event scheduling, and waiting for the next scheduling. The asynchronous scheduling component supports a custom decay strategy, and the failure times are not less than the maximum allowed attempt times and can be configured.
Preferably, by introducing an alarm mechanism, when the event cannot be processed, the event can be timely notified to the service responsible person, so that the timeliness of finding the problem is improved.
According to the embodiment of the present application, as shown in fig. 7, as a preferred option in the embodiment, the asynchronous scheduling group further includes: a step of cleaning up or archiving the event,
step S702, receiving an event which is successfully processed and is converted into cold data in a processing result returned by the service system according to an asynchronous scheduling component;
step S704, the cold data in the event is periodically archived or cleaned.
In particular, the asynchronous scheduling component supports data archiving and cleaning functions.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
Preferably, database resources can be conserved by providing a cold data periodic archiving or cleaning function.
According to an embodiment of the present application, there is also provided an asynchronous scheduling apparatus for a service system, for implementing the foregoing method, as shown in fig. 8, an asynchronous scheduling component is embedded in the service system, and the apparatus includes: a submitting module 10, configured to submit events according to a standard event processing interface in an asynchronous processing scenario, where one or more of the events refer to a conversion result of a service scenario that needs to be processed asynchronously through an asynchronous scheduling component; a saving module 20, configured to store, in the event saving interface, data processed in the asynchronous processing scenario in the database; further comprising: a processing module 30 for processing one or more of the events in the asynchronous scheduling component; the calling module 40 is configured to determine an event handling class according to an event type, and call the event handling class of the service system according to the event handling class; and a returning module 50, configured to receive, at the asynchronous scheduling component, a processing result returned by the service system.
In the submission module 10 of the embodiment of the present application, specifically, a lightweight asynchronous scheduling component that can be embedded into a service system, the asynchronous scheduling component has a core concept called event (event), and all service scenarios that need asynchronous processing can be converted into an event for the component. One or more events refer to the conversion result of the business scene needing asynchronous processing through the asynchronous scheduling component.
In the saving module 20 of the embodiment of the present application, specifically, the service system only needs to implement the standard event processing interface provided by the component for the scene that needs asynchronous processing, and stores the data into the database through the event saving interface provided by the component at a suitable time, and the subsequent traffic is completed by the component, so that the intrusion to the service system is very small, and the access cost is very small.
In the processing module 30, the calling module 40, and the returning module 50 of the embodiment of the present application, an asynchronous scheduling component is embedded in a service system to perform the above operations, and the asynchronous scheduling component may process one or a plurality of events in batch, determine the event processing class according to the event type, then call the event processing class in the service system according to the event processing class, and receive the processing result returned by the service system at the asynchronous scheduling component. The method is realized by uniformly dispatching the asynchronous dispatching components by abstracting a scene needing asynchronous processing into the concept of one or more events and packaging the whole flow of the processing of the one or more events in one asynchronous dispatching component.
Specifically, a batch of events to be processed can be fished through event scheduling, and each event to be processed is processed in a loop. And finding an event processing class according to the event type, and calling the event processing class in the service system to process the event.
According to the embodiment of the present application, as shown in fig. 9, it is preferable that: an initialization module for loading components in the business system and starting component initialization 60; the component scans an event processing class in the service system and binds the event processing class and the mapping of the event type; component initialization is completed at the business system.
Specifically, the initialization of the asynchronous scheduling component can be completed through the above operations. Starting service in the service system, loading the assembly in the service system, initializing the assembly to start scanning the event processing class in the service system, then binding the mapping between the event processing class and the event type, and finishing initializing the assembly.
Preferably, the cold data and the hot data are automatically separated in the embodiment of the application, so that the data to be processed can be always kept in a controllable range, and the problem that the processing efficiency is influenced due to overlarge data accumulation caused by the increase of time is avoided.
According to the embodiment of the present application, as a preferred embodiment in the present application, as shown in fig. 9, the asynchronous scheduling component further includes: an alarm module 70, configured to determine whether the number of failures in the processing result returned by the asynchronous scheduling component from receiving the service system exceeds a processing threshold; if the failure times in the processing result returned by the service system received by the asynchronous scheduling component exceed the processing threshold value, sending a processing failure alarm and terminating the event processing; a data archiving or cleaning module 80, configured to receive, according to the asynchronous scheduling component, an event that is successfully processed and has been converted into cold data in the processing result returned by the business system; cold data in the event is periodically archived or cleaned up.
In particular, the asynchronous scheduling component supports an alarm mechanism that fails above a processing threshold. And if the failure times of the asynchronous scheduling component in the processing result returned by the service system exceed the processing threshold value, stopping processing the event and finishing the event scheduling, and waiting for the next scheduling. The asynchronous scheduling component supports a custom decay strategy, and the failure times are not less than the maximum allowed attempt times and can be configured.
Preferably, by introducing an alarm mechanism, when the event cannot be processed, the event can be timely notified to the service responsible person, so that the timeliness of finding the problem is improved.
In particular, the asynchronous scheduling component supports data archiving and cleaning functions.
Fig. 10 illustrates an implementation principle of an asynchronous scheduling method for a service system according to an embodiment of the present application.
Specifically, the service system only needs to realize a standard event processing interface provided by the component for a scene needing asynchronous processing, data is stored in the database through an event storage interface provided by the component at a proper time, and subsequent communication is completed by the component, so that the intrusion to the service system is very small, and the access cost is very low.
An asynchronous scheduling component is embedded in the business system, and the scheduling component is used for storing Structures (SQL) according to standard events.
The scheduling component supports single event processing and scheduling type processing; the scheduling component supports single-thread or multi-thread scheduling event processing; the scheduling component supports automatic separation of cold and hot data; the scheduling component supports a scheduling attenuation mechanism when the exception occurs; the scheduling component supports a custom attenuation strategy; the scheduling component supports an alarm mechanism that fails to exceed a processing threshold; the scheduling component supports data archiving and cleaning functions.
The embedded component in the embodiment of the application is easy to integrate with a business system. And no extra deployment is needed, so that hardware resources are saved.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. An asynchronous scheduling method for a traffic system, wherein an asynchronous scheduling component is embedded in the traffic system, the method comprising:
in an asynchronous processing scene, submitting events according to a standard event processing interface, wherein one or more events refer to the conversion result of a service scene needing asynchronous processing through an asynchronous scheduling component;
storing the data processed in the asynchronous processing scene into a database at an event storage interface;
further comprising:
processing one or more of the events in the asynchronous scheduling component;
determining an event processing class according to the event type, and calling the event processing class of the service system according to the event processing class;
and receiving a processing result returned by the service system at the asynchronous scheduling component.
2. The asynchronous scheduling method for service system as claimed in claim 1, wherein before submitting the event according to the standard event processing interface in the asynchronous processing scenario, further comprising: an asynchronous scheduling component initialization step, the asynchronous scheduling component initialization step comprising:
loading a component in a service system, and starting the initialization of the component;
the component scans an event processing class in the service system and binds the event processing class and the mapping of the event type;
component initialization is completed at the business system.
3. The asynchronous scheduling method for business systems of claim 1 wherein receiving, at the asynchronous scheduling component, the processing results returned by the business system comprises:
if the processing result returned by the service system is successful, modifying the event processing state into the successful processing;
and converting the event into cold data to finish event processing.
4. The asynchronous scheduling method for business systems of claim 1 wherein receiving, at the asynchronous scheduling component, the processing results returned by the business system comprises:
if the processing result returned by the service system is retry, modifying the event processing state into processing;
and calculating the next processing time of the event, and waiting for the next event to call processing.
5. The asynchronous scheduling method for business systems of claim 1 wherein receiving, at the asynchronous scheduling component, the processing results returned by the business system comprises:
if the processing result returned by the service system is failure, modifying the event processing state into processing failure;
and increasing the failure times of the processing, and calculating the next processing time according to the failure times, wherein the more the failure times, the larger the next processing time interval is calculated.
6. The asynchronous scheduling method for service system as claimed in claim 1, wherein the asynchronous scheduling group further comprises: an alarming step, wherein the alarming step comprises the following steps:
judging whether the failure times of the asynchronous scheduling component in the processing result returned by the service system exceeds a processing threshold value or not;
and if the failure times in the processing result returned by the service system received by the asynchronous scheduling component exceed the processing threshold value, sending a processing failure alarm and terminating the event processing.
7. The asynchronous scheduling method for service system as claimed in claim 1, wherein the asynchronous scheduling group further comprises: a step of cleaning up or archiving the event,
receiving an event which is successfully processed and is converted into cold data in a processing result returned by the service system according to the asynchronous scheduling component;
cold data in the event is periodically archived or cleaned up.
8. An asynchronous scheduling apparatus for a traffic system, wherein an asynchronous scheduling component is embedded in the traffic system, the apparatus comprising:
the system comprises a submitting module, a processing module and a processing module, wherein the submitting module is used for submitting events according to a standard event processing interface in an asynchronous processing scene, and one or more events refer to the conversion result of a service scene needing asynchronous processing through an asynchronous scheduling component;
the saving module is used for storing the data processed in the asynchronous processing scene to a database at the event saving interface;
further comprising:
a processing module to process one or more of the events in the asynchronous scheduling component;
the calling module is used for determining an event processing class according to the event type and calling the event processing class of the service system according to the event processing class;
and the return module is used for receiving the processing result returned by the service system at the asynchronous scheduling component.
9. The asynchronous scheduler for traffic system according to claim 8, further comprising: an initialization module for
Loading a component in a service system, and starting the initialization of the component;
the component scans an event processing class in the service system and binds the event processing class and the mapping of the event type;
component initialization is completed at the business system.
10. The asynchronous scheduling device for a business system of claim 8 wherein the asynchronous scheduling component further comprises:
the warning module is used for judging whether the failure times of the asynchronous dispatching component in the processing result returned by the service system exceeds a processing threshold value or not;
if the failure times in the processing result returned by the service system received by the asynchronous scheduling component exceed the processing threshold value, sending a processing failure alarm and terminating the event processing;
the data archiving or cleaning module is used for receiving the event which is successfully processed and is converted into cold data in the processing result returned by the business system according to the asynchronous scheduling component;
cold data in the event is periodically archived or cleaned up.
CN201910583150.2A 2019-06-27 2019-06-27 Asynchronous scheduling method and device for service system Active CN110321211B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910583150.2A CN110321211B (en) 2019-06-27 2019-06-27 Asynchronous scheduling method and device for service system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910583150.2A CN110321211B (en) 2019-06-27 2019-06-27 Asynchronous scheduling method and device for service system

Publications (2)

Publication Number Publication Date
CN110321211A CN110321211A (en) 2019-10-11
CN110321211B true CN110321211B (en) 2020-05-12

Family

ID=68121923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910583150.2A Active CN110321211B (en) 2019-06-27 2019-06-27 Asynchronous scheduling method and device for service system

Country Status (1)

Country Link
CN (1) CN110321211B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112435004A (en) * 2020-11-20 2021-03-02 金蝶软件(中国)有限公司 Method and device for realizing service flow processing
CN114710569A (en) * 2022-03-11 2022-07-05 珠海派诺科技股份有限公司 Self-scaling TCP link maintenance method, system and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425024A (en) * 2008-10-24 2009-05-06 中国移动通信集团山东有限公司 Multitasking method and device
CN101882161A (en) * 2010-06-23 2010-11-10 中国工商银行股份有限公司 Application level asynchronous task scheduling system and method
CN106598705A (en) * 2015-10-15 2017-04-26 阿里巴巴集团控股有限公司 Asynchronous task scheduling method, device and system and electronic equipment
CN108073447A (en) * 2016-11-15 2018-05-25 平安科技(深圳)有限公司 Based on the asynchronous insurance task processing method and device under more applying
CN109118344A (en) * 2018-07-06 2019-01-01 阿里巴巴集团控股有限公司 A kind of business retries method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7984330B2 (en) * 2009-02-27 2011-07-19 Yahoo! Inc. Smart recovery of asynchronous processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101425024A (en) * 2008-10-24 2009-05-06 中国移动通信集团山东有限公司 Multitasking method and device
CN101882161A (en) * 2010-06-23 2010-11-10 中国工商银行股份有限公司 Application level asynchronous task scheduling system and method
CN106598705A (en) * 2015-10-15 2017-04-26 阿里巴巴集团控股有限公司 Asynchronous task scheduling method, device and system and electronic equipment
CN108073447A (en) * 2016-11-15 2018-05-25 平安科技(深圳)有限公司 Based on the asynchronous insurance task processing method and device under more applying
CN109118344A (en) * 2018-07-06 2019-01-01 阿里巴巴集团控股有限公司 A kind of business retries method and apparatus

Also Published As

Publication number Publication date
CN110321211A (en) 2019-10-11

Similar Documents

Publication Publication Date Title
CN110321211B (en) Asynchronous scheduling method and device for service system
CN109918141B (en) Thread execution method, thread execution device, terminal and storage medium
US8930584B2 (en) System and method for providing a linearizable request manager
CN110049113A (en) Service message processing method and device
CN103562890A (en) Managing message subscription in publish/subscribe messaging system
US9110715B2 (en) System and method for using a sequencer in a concurrent priority queue
AU2020203022A1 (en) Method and apparatus for sending express delivery information, storage medium, and express delivery locker
CN112866136A (en) Service data processing method and device
US6907606B1 (en) Method for implementing event transfer system of real time operating system
CN103677988A (en) Multi-process communication method and system for software system
CN103580883A (en) Business disaster recovery method and business disaster recovery system
CN106170013B (en) A kind of Kafka message uniqueness method based on Redis
CN106559447A (en) The method for processing business and system of JSLEE containers
CN116414534A (en) Task scheduling method, device, integrated circuit, network equipment and storage medium
CN110365786A (en) Job processing system, asynchronous operation dispatching method and computer equipment
CN107491350B (en) Interface task call method and device
CN113364857A (en) Service data processing method and device and server
CN108830724B (en) Resource data packet processing method and terminal equipment
CN110109764A (en) Delayed tasks creation method, device, medium and electronic equipment
KR100662167B1 (en) Method and system for transmitting a chain of messages for database
CN108121580B (en) Method and device for realizing application program notification service
CN107402752B (en) Timing triggering method and device for application
CN1135471C (en) Process management method
CN115550280B (en) Multi-level message queue implementation method, system, electronic device and readable storage medium
CN111611193B (en) Event processing method, device and equipment

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
GR01 Patent grant
GR01 Patent grant