CN112486478A - Event processing method and device based on domain driving - Google Patents

Event processing method and device based on domain driving Download PDF

Info

Publication number
CN112486478A
CN112486478A CN202011353778.2A CN202011353778A CN112486478A CN 112486478 A CN112486478 A CN 112486478A CN 202011353778 A CN202011353778 A CN 202011353778A CN 112486478 A CN112486478 A CN 112486478A
Authority
CN
China
Prior art keywords
event
target
event processing
type
message
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.)
Granted
Application number
CN202011353778.2A
Other languages
Chinese (zh)
Other versions
CN112486478B (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 Yueyi Network Information Technology Co Ltd
Original Assignee
Shanghai Yueyi Network 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 Yueyi Network Information Technology Co Ltd filed Critical Shanghai Yueyi Network Information Technology Co Ltd
Priority to CN202011353778.2A priority Critical patent/CN112486478B/en
Publication of CN112486478A publication Critical patent/CN112486478A/en
Application granted granted Critical
Publication of CN112486478B publication Critical patent/CN112486478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • 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/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application aims at providing an event processing method and device based on domain driving, and the event processor component is introduced into a service system and registers corresponding event processing centers and event processing basic information of the event processing centers for different domain models; when the service system is started, the event processor component associates consumers of different event types for the event processing center, and allocates thread pool and message queue MQ processing resources; the domain model of the publisher publishes the publishing event of the target event type and the event message thereof to the corresponding target event processing center; the target event processing center sends the event message to the corresponding target consumer for processing according to the target event type and the event processing basic information, so that a plurality of event processing modes are provided for the service system through the event processor assembly, the use super cost of different event processing modes is reduced, and the reusability of codes is improved.

Description

Event processing method and device based on domain driving
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for processing events based on domain driving.
Background
In the code development process of a domain driving mode, building a domain model and dividing a business boundary are two important steps, wherein a scheme for clearly dividing the business boundary generally isolates and decouples the model with dependency relationship among a plurality of domains through an event mode. The current practice schemes of the event mode mainly include three, namely, local event synchronous processing based on a subscription publishing mode; secondly, performing asynchronous processing on local events based on the queue thread pool; and thirdly, remote event asynchronous processing based on MQ middleware, but because each technical scheme in the existing practical scheme needs additional development cost, the multiplexing cost is higher, a uniform interface is not provided for processing events, and the access and switching costs of different event processing modes are high.
Disclosure of Invention
An object of the present application is to provide a method and an apparatus for event processing based on domain driving, which implement integration of existing event processing modes, reduce the use super cost of different event processing modes, and improve the reusability of codes.
According to an aspect of the present application, there is provided a domain-driven event processing method, wherein the method includes:
introducing an event processor assembly into a business system, wherein the event processor assembly registers corresponding event processing centers and event processing basic information of the event processing centers for different domain models;
when the service system is started, the event processor component associates consumers of different event types for the event processing center, and allocates thread pools and message queue MQ processing resources;
the domain model of the publisher publishes a publishing event of a target event type and an event message thereof to a target event processing center corresponding to the domain model of the publisher;
and the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message.
Further, in the above method, the event processing basic information of the event processing center includes: the name of the event processing center, the event type and the event processing mode corresponding to the event type.
Further, in the above method, when the business system relates to an event of a domain model of a subscriber, a corresponding consumer is registered in an event processing center corresponding to the domain model of the publisher, and a processing mode of the consumer for receiving the event and a type of the consumed event are preset.
Further, in the above method, the issuing of the issue event of the target event type and the event message thereof to the target event processing center corresponding to the domain model of the issuer by the domain model of the issuer includes:
the method comprises the steps that a domain model of a publisher acquires context related information of a published event of a published target event type;
packaging the context related information of the release event into an event message object to obtain an event message of the release event;
and sending the event message of the release event to a target event processing center corresponding to the domain model of the release party.
Further, in the above method, the sending, by the target event processing center, the event message to the corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, includes:
the target event processing center determines an event processing mode corresponding to the type of the target event according to the event processing basic information of the target event processing center;
and the target event processing center sends the event message to a corresponding target consumer through an event processing mode corresponding to the target event type, so that the target consumer processes the release event based on the event message.
Further, in the above method, the event types in the event processing basic information of the event processing center include a local synchronous type event, a local asynchronous type event, and a remote asynchronous type event.
Further, in the foregoing method, if the target event type is a local synchronization type event, where the target event processing center sends the event message to a corresponding target consumer in an event processing manner corresponding to the target event type, the method includes:
and the target event processing center directly sends the event message to a corresponding target consumer.
Further, in the above method, if the target event type is a local asynchronous event, where the target event processing center sends the event message to a corresponding target consumer in an event processing manner corresponding to the target event type, the method includes:
and asynchronously sending the event message to the corresponding target consumer through the thread pool distributed by the target event processing center.
Further, in the above method, the MQ processing resource includes an MQ sender, an MQ middleware, and an MQ consumer, wherein if the target event type is a remote asynchronous type event, the target event processing center sends the event message to the corresponding target consumer in an event processing manner corresponding to the target event type, including:
and sending the event message to a target MQ middleware distributed by the target event processing center through a target MQ sender distributed by the target event processing center, wherein the target MQ middleware forwards the event message to a target MQ consumer distributed by the target event processing center, and the target MQ consumer sends the event message to a corresponding target consumer.
According to another aspect of the present application, there is also provided a non-volatile storage medium having computer-readable instructions stored thereon, which, when executed by a processor, cause the processor to implement the domain-based driven event processing method as described above.
According to another aspect of the present application, there is also provided an apparatus for event processing based on domain driving, wherein the apparatus includes:
one or more processors;
a computer-readable medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement the domain-based driven event processing method described above.
Compared with the prior art, the event processor assembly is introduced into the service system, and registers corresponding event processing centers and the event processing basic information of the event processing centers for different domain models; when the service system is started, the event processor component associates consumers of different event types for the event processing center, and allocates thread pools and message queue MQ processing resources; the domain model of the publisher publishes a publishing event of a target event type and an event message thereof to a target event processing center corresponding to the domain model of the publisher; the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the published event based on the event message, the published event sent to the event processing center by a service system is sent to a consumer subscribing the target event type according to the event processing mode corresponding to the target event type of the published event, so that the consumer processes the published event, a plurality of event processing modes are provided for the service system through an event processor component, support for unified access and use is provided, the plurality of event processing modes are packaged in the form of the event processing center, a standardized event sending and processing interface is provided, integration of the existing event processing modes is achieved, and use super cost of different event processing modes is reduced, the reusability of the codes is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 illustrates a flow diagram of a domain-driven based event processing method in accordance with an aspect of the subject application;
FIG. 2 is a schematic diagram illustrating an example application scenario of a domain-driven event processing method according to an aspect of the present application.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
As shown in fig. 1, an aspect of the present application provides a flowchart of a domain-driven event processing method, where the method includes: step S11, step S12, step S13, and step S14, wherein the method specifically includes the steps of:
step S11, introducing an event processor component into the service system, wherein the event processor component registers corresponding event processing centers and the event processing basic information of the event processing centers for different domain models; here, the event processing basic information of the event processing center includes: the name of the event processing center, the event type and the event processing mode corresponding to the event type. For example, in step S11, an event handler component is introduced into the business system, where the event handler component registers corresponding event handling centers for different domain models to which an event notification needs to be issued, that is, the different domain models correspond to respective event handling centers, and when registering an event handling center corresponding to a different domain model, it is necessary to determine basic information of event handling of the event handling center, for example, a name of the event handling center, an event handling manner supported by the time handling center, an event type that can be handled, and different event handling manners corresponding to different event types, that is, configuration information about different event handling manners and different event handling manners corresponding to different event types.
In step S11, when the business system relates to an event of the domain model of the subscriber, it is necessary to register a corresponding consumer in the event processing center corresponding to the domain model of the publisher, and preset a processing manner of the event received by the consumer and a type of the consumed event, so as to process the published event corresponding to the subscribed event type.
Step S12, when the service system is started, the event handler component associates consumers of different event types with the event processing center, and allocates a thread pool and MQ (Message Queue) processing resources, so that the allocated thread pool and MQ processing resources and the like can be directly invoked when the event processing center to which the issue event belongs is determined in the following, and the issue event and event messages thereof are sent to the consumer corresponding to the event type associated with the event processing center to which the issue event belongs, so as to improve the issue efficiency of the issue event. Here, the MQ processing resources include an MQ sender, an MQ middleware, and an MQ consumer, facilitating subsequent forwarding of event messages publishing events.
Step S13, the domain model of the publisher publishes the publishing event of the target event type and the event message to the target event processing center corresponding to the domain model of the publisher;
step S14, the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, so that the consumer processes the release event.
Through the steps S11 to S14, the event handler component provides a plurality of event processing modes to the service system, and supports unified access use, encapsulates the plurality of event processing modes in the form of an event processing center, and provides a standardized event sending and processing interface, thereby achieving integration of the existing event processing modes, reducing the use super cost of different event processing modes, and improving the reusability of codes.
Further, the step S13 of issuing the issue event of the target event type and the event message thereof to the target event processing center corresponding to the domain model of the issuer by the domain model of the issuer specifically includes:
the method comprises the steps that a domain model of a publisher acquires context related information of a published event of a published target event type;
packaging the context related information of the release event into an event message object to obtain an event message of the release event;
and sending the event message of the release event to a target event processing center corresponding to the domain model of the release party.
For example, when a domain model in a business system needs to issue an event notification, the domain model of the issuer first obtains context-related information of an issue event of a target event type that needs to be issued; then, packaging the context related information of the release event into an event message object to obtain the event message of the release event; and finally, sending the event message of the release event to a target event processing center corresponding to the domain model of the release party so as to send the event message of the release event through the target event processing center corresponding to the domain model of the release party, packaging the event message of the release event needing to be released by the domain model of the release party, and sending the event message to the target event processing center corresponding to the domain model of the release party to send the release event and the event message thereof.
Further, the step S14, the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message, which specifically includes:
the target event processing center determines an event processing mode corresponding to the type of the target event according to the event processing basic information of the target event processing center; here, the event processing basic information of the event processing center includes: the name of the event processing center, the event type and the event processing mode corresponding to the event type.
And the target event processing center sends the event message to a corresponding target consumer through an event processing mode corresponding to the target event type, so that the target consumer processes the release event based on the event message.
For example, an event processing center registered in an event handler component may distribute events corresponding to different event types to consumers through a handler of an event processing manner corresponding to different event types, so that, in an application scenario of an actual published event, when a domain model in a business system needs to publish an event notification, the domain model of the publisher sends an event fact of the published event needing to be published to a target event processing center corresponding to the domain model of the publisher, so as to send an event message of the published event through the target event processing center corresponding to the domain model of the publisher; the target event processing center determines an event processing mode corresponding to the target event type according to the event processing basic information registered by the target event processing center, and then sends the event message to the corresponding target consumer through the event processing mode corresponding to the target event type, so that the target consumer processes the release event based on the event message, and the event message of the release event is sent through the target event processing center by adopting the corresponding event processing mode.
Further, the event types in the event processing basic information of the event processing center include a local synchronous type event, a local asynchronous type event, and a remote asynchronous type event.
In this embodiment, if the target event type is a local synchronization type event, and the target event processing center sends the event message to the corresponding target consumer in an event processing manner corresponding to the target event type, the target event processing center directly sends the local synchronization type event and the event message thereof to the corresponding target consumer, so as to implement direct sending and processing of the local synchronization type event.
In this embodiment, if the target event type is a local asynchronous type event, and the target event processing center sends the event message to the corresponding target consumer in an event processing manner corresponding to the target event type, the local asynchronous type event and the event message thereof are asynchronously sent to the corresponding target consumer through a thread pool allocated by the target event processing center, so that sending processing of the local asynchronous type event is realized through the thread pool allocated by the target event processing center.
In this embodiment, the MQ processing resources include an MQ sender, an MQ middleware, and an MQ consumer, where, if the target event type is a remote asynchronous event, where the target event processing center sends the event message to a corresponding target consumer in an event processing manner corresponding to the target event type, the target MQ middleware forwards the remote asynchronous event and the event message thereof to the target MQ consumer distributed by the target event processing center through a target MQ sender distributed by the target event processing center, and the target MQ consumer sends the remote asynchronous event and the event message thereof to the corresponding target MQ consumer, so that the MQ processing resource distributed by the target event processing center handles sending of the remote asynchronous event.
As shown in fig. 2, a schematic diagram of an actual application scenario of a domain-driven event processing method is provided in an aspect of the present application, where a domain model a is a domain model of a publisher, and a domain model B and a domain model C are domain models of subscribers, and in an embodiment of the present application, an event handler is introduced, and the event handler provides support for unified access and use of multiple event processing modes to a service system in a component form. The method comprises the following steps of packaging a plurality of event processing modes, such as event processing modes corresponding to a local synchronous event, a local asynchronous event and a remote asynchronous event, in a form of an event processing center object registered in an event processor component, providing a standardized event sending and processing interface, namely the event processing center, sending events sent to the event processing center by a service system to consumers subscribing the event type according to the event processing modes corresponding to the event type subscribed by the consumers in sequence for processing, and specifically comprising the following steps: in an actual application scenario, an event handler component is introduced into a business system, and the event handler component registers corresponding event handling centers for different domain models to which an event notification needs to be issued, that is, the different domain models correspond to respective event handling centers, and when registering an event handling center corresponding to a different domain model, basic event handling information of the event handling center needs to be determined, for example, a name of the event handling center, an event handling manner supported by a time handling center, an event type that can be handled, and different event handling manners corresponding to different event types, that is, related configuration information of different event handling manners and different event handling manners corresponding to different event types, and the like.
When the business system relates to an event of a domain model of a subscriber, a corresponding consumer needs to be registered in an event processing center corresponding to the domain model of the publisher, and a processing mode of receiving the event by the consumer and a consumed event type are preset, so that the published event corresponding to the subscribed event type is processed.
When the service system is started, the event processor component associates consumers of different event types with the event processing center, and allocates thread pool and Message Queue (MQ) processing resources, so that the allocated thread pool and MQ processing resources and the like can be directly called when the event processing center to which the issued event belongs is determined in the following, and the issued event and event messages thereof and the like are sent to the consumer corresponding to the event type associated with the event processing center to which the issued event belongs, so as to improve the issuing efficiency of the issued event. The MQ processing resources comprise an MQ sender, an MQ middleware and an MQ consumer, and are convenient for forwarding the event message of the published event subsequently. Here, the consumer corresponds to the domain model of the subscriber in fig. 2, such as domain model B and domain model C in fig. 2.
When a domain model A of a publisher in a service system publishes an event notification, firstly, the context related information of the published event is encapsulated into an event message object to obtain an event message of the published event, and then the published event and the event message thereof are sent through a target event processing center corresponding to the target event type of the published event.
The target event processing center distributes different types of published events to consumers through corresponding processors with different event processing modes, wherein the consumers comprise a domain model B and/or a domain model C, as shown in FIG. 2. If the release event is a local synchronous type event, the target event processing center directly sends the local synchronous type event and the event message thereof to the consumer; and if the target event type is a local asynchronous type event, the local asynchronous type event and the event message thereof are asynchronously sent to the corresponding target consumer through a thread pool distributed by the target event processing center. If the release event is a remote asynchronous type event, the remote asynchronous type event and the event message thereof are firstly sent to a target MQ middleware distributed by the target event processing center through a target MQ sender distributed by the target event processing center, the target MQ middleware forwards the remote asynchronous type event and the event message thereof to a target MQ consumer distributed by the target event processing center, and the target MQ consumer sends the remote asynchronous type event and the event message thereof to corresponding target consumers, as shown in FIG. 2, the events of different event types are sent to different domain models B and domain models C.
The consumer automatically processes the published event corresponding to the event message after receiving the event message, the event processor assembly is responsible for monitoring, exception handling and the like in the event processing process in the field model of the subscriber during the process of processing the published event, such as processing monitoring and log printer exception alarm lamps, and finally the event processor assembly realizes the isolation of event interaction in different processing modes among different field models in a uniform access mode.
Through the embodiment of the application, the existing event processing mode is integrated, the use cost of different event processing modes is reduced, and the reusability of codes is improved; the method for accessing the event processing is also unified, and the standardization of the event processing and the quick switching of different event processing modes are realized; event processor components uniformly manage the event processing process to realize uniform monitoring and exception handling; the performance of various event processing operations is improved.
According to another aspect of the present application, there is also provided a non-volatile storage medium having computer-readable instructions stored thereon, which, when executed by a processor, cause the processor to implement the domain-based driven event processing method as described above.
According to another aspect of the present application, there is also provided an apparatus for event processing based on domain driving, wherein the apparatus includes:
one or more processors;
a computer-readable medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement the domain-based driven event processing method described above.
Here, for details of each embodiment in the device for processing an event based on domain driving, reference may be specifically made to corresponding parts of the embodiment of the above method for processing an event based on domain driving, and details are not described here again.
In summary, the application introduces an event handler component into a service system, where the event handler component registers corresponding event processing centers and event processing basic information of the event processing centers for different domain models; when the service system is started, the event processor component associates consumers of different event types for the event processing center, and allocates thread pools and message queue MQ processing resources; the domain model of the publisher publishes a publishing event of a target event type and an event message thereof to a target event processing center corresponding to the domain model of the publisher; the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the published event based on the event message, the published event sent to the event processing center by a service system is sent to a consumer subscribing the target event type according to the event processing mode corresponding to the target event type of the published event, so that the consumer processes the published event, a plurality of event processing modes are provided for the service system through an event processor component, support for unified access and use is provided, the plurality of event processing modes are packaged in the form of the event processing center, a standardized event sending and processing interface is provided, integration of the existing event processing modes is achieved, and use super cost of different event processing modes is reduced, the reusability of the codes is improved.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (11)

1. A domain-driven based event processing method, wherein the method comprises the following steps:
introducing an event processor assembly into a business system, wherein the event processor assembly registers corresponding event processing centers and event processing basic information of the event processing centers for different domain models;
when the service system is started, the event processor component associates consumers of different event types for the event processing center, and allocates thread pools and message queue MQ processing resources;
the domain model of the publisher publishes a publishing event of a target event type and an event message thereof to a target event processing center corresponding to the domain model of the publisher;
and the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the release event based on the event message.
2. The method of claim 1, wherein the event processing basic information of the event processing center comprises: the name of the event processing center, the event type and the event processing mode corresponding to the event type.
3. The method of claim 2, wherein when the business system relates to an event of the domain model of the subscriber, registering a corresponding consumer in an event processing center corresponding to the domain model of the publisher, and presetting a processing mode of the event received by the consumer and a type of the consumed event.
4. The method of claim 3, wherein the domain model of the publisher publishes the published event of the target event type and the event message thereof to a target event processing center corresponding to the domain model of the publisher, including:
the method comprises the steps that a domain model of a publisher acquires context related information of a published event of a published target event type;
packaging the context related information of the release event into an event message object to obtain an event message of the release event;
and sending the event message of the release event to a target event processing center corresponding to the domain model of the release party.
5. The method of claim 4, wherein the target event processing center sends the event message to a corresponding target consumer according to the target event type and the event processing basic information, so that the target consumer processes the published event based on the event message, comprising:
the target event processing center determines an event processing mode corresponding to the type of the target event according to the event processing basic information of the target event processing center;
and the target event processing center sends the event message to a corresponding target consumer through an event processing mode corresponding to the target event type, so that the target consumer processes the release event based on the event message.
6. The method of claim 5, wherein the event types in the event processing basic information of the event processing center include a local synchronous type event, a local asynchronous type event, and a remote asynchronous type event.
7. The method of claim 6, wherein if the target event type is a local synchronization type event, wherein the target event processing center sends the event message to a corresponding target consumer in an event processing manner corresponding to the target event type, the method comprises:
and the target event processing center directly sends the event message to a corresponding target consumer.
8. The method of claim 6, wherein if the target event type is a local asynchronous type event, wherein the target event processing center sends the event message to a corresponding target consumer in an event processing manner corresponding to the target event type, the method comprises:
and asynchronously sending the event message to the corresponding target consumer through the thread pool distributed by the target event processing center.
9. The method as claimed in claim 6, wherein the MQ processing resources comprise an MQ sender, an MQ middleware, and an MQ consumer, wherein, if the target event type is a remote asynchronous type event, wherein the target event processing center sends the event message to the corresponding target consumer through an event processing manner corresponding to the target event type, comprises:
and sending the event message to a target MQ middleware distributed by the target event processing center through a target MQ sender distributed by the target event processing center, wherein the target MQ middleware forwards the event message to a target MQ consumer distributed by the target event processing center, and the target MQ consumer sends the event message to a corresponding target consumer.
10. A non-transitory storage medium having stored thereon computer readable instructions which, when executed by a processor, cause the processor to implement the method of any one of claims 1 to 9.
11. An apparatus for domain-driven event processing, wherein the apparatus comprises:
one or more processors;
a computer-readable medium for storing one or more computer-readable instructions,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
CN202011353778.2A 2020-11-26 2020-11-26 Event processing method and device based on field driving Active CN112486478B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011353778.2A CN112486478B (en) 2020-11-26 2020-11-26 Event processing method and device based on field driving

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011353778.2A CN112486478B (en) 2020-11-26 2020-11-26 Event processing method and device based on field driving

Publications (2)

Publication Number Publication Date
CN112486478A true CN112486478A (en) 2021-03-12
CN112486478B CN112486478B (en) 2023-08-11

Family

ID=74935614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011353778.2A Active CN112486478B (en) 2020-11-26 2020-11-26 Event processing method and device based on field driving

Country Status (1)

Country Link
CN (1) CN112486478B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006116497A2 (en) * 2005-04-25 2006-11-02 Invensys Systems, Inc. Recording and tracing non-trending production data and events in an industrial process control environment
CN102340495A (en) * 2010-07-26 2012-02-01 中国移动通信集团广东有限公司 Event center supporting cross-system service linkage and event processing method of event center
US20160232042A1 (en) * 2015-02-09 2016-08-11 Daniel Ritter Categorizing and modeling integration adapters
CN110162391A (en) * 2019-05-27 2019-08-23 浪潮云信息技术有限公司 A kind of asynchronous frame and its implementation
US10454795B1 (en) * 2017-03-22 2019-10-22 Amazon Technologies, Inc. Intermediate batch service for serverless computing environment metrics
CN110750269A (en) * 2019-10-25 2020-02-04 浪潮云信息技术有限公司 Software implementation method based on step driving
CN110769018A (en) * 2018-07-27 2020-02-07 北京国双科技有限公司 Message pushing method and device
CN110968586A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Distributed transaction processing method and device
CN111158877A (en) * 2019-12-28 2020-05-15 山东爱德邦智能科技有限公司 Event management method and device for big data platform and computer readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006116497A2 (en) * 2005-04-25 2006-11-02 Invensys Systems, Inc. Recording and tracing non-trending production data and events in an industrial process control environment
CN102340495A (en) * 2010-07-26 2012-02-01 中国移动通信集团广东有限公司 Event center supporting cross-system service linkage and event processing method of event center
US20160232042A1 (en) * 2015-02-09 2016-08-11 Daniel Ritter Categorizing and modeling integration adapters
US10454795B1 (en) * 2017-03-22 2019-10-22 Amazon Technologies, Inc. Intermediate batch service for serverless computing environment metrics
CN110769018A (en) * 2018-07-27 2020-02-07 北京国双科技有限公司 Message pushing method and device
CN110968586A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Distributed transaction processing method and device
CN110162391A (en) * 2019-05-27 2019-08-23 浪潮云信息技术有限公司 A kind of asynchronous frame and its implementation
CN110750269A (en) * 2019-10-25 2020-02-04 浪潮云信息技术有限公司 Software implementation method based on step driving
CN111158877A (en) * 2019-12-28 2020-05-15 山东爱德邦智能科技有限公司 Event management method and device for big data platform and computer readable storage medium

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
BERGNER F ET AL.: "Design and Realization of an Efficient Large-Area Event-Driven E-Skin", SENSORS. 2020, vol. 20, no. 07, pages 1 - 33 *
R. SCHULTE ET AL.: "The growing role of events in enterprise applications", TECHNICAL REPORT,GARTNER RESEARCH REPORT AV-20-3900, pages 1 - 5 *
乔秀全;章洋;吴步丹;程渤;赵帅;马华东;陈俊亮;: "事件驱动、面向服务的物联网服务提供方法", 中国科学:信息科学, no. 10, pages 1219 - 1243 *
刘水平: "面向服务集成的规范化消息路由器的研究与实现", 中国优秀硕士学位论文全文数据库 (信息科技辑), no. 05, pages 139 - 86 *
朱律玮等: "消息中间件", 应用技术 *

Also Published As

Publication number Publication date
CN112486478B (en) 2023-08-11

Similar Documents

Publication Publication Date Title
CN109002362B (en) Service method, device and system and electronic equipment
CN106354481B (en) Method and equipment for uniformly mapping HTTP (hyper text transport protocol) request
CN100483352C (en) IDE calling device and calling method therefor
CN107729139B (en) Method and device for concurrently acquiring resources
US8332866B2 (en) Methods, systems, and apparatus for object invocation across protection domain boundaries
US10038762B2 (en) Request and response decoupling via pluggable transports in a service oriented pipeline architecture for a request response message exchange pattern
CN110401592B (en) Method and equipment for data transfer in message channel
US8984530B2 (en) Queued message dispatch
CN110944018A (en) Rpc communication method, device and medium based on annotation and dynamic proxy
CN110764930B (en) Request or response processing method and device based on message mode
US8081647B2 (en) Method and apparatus for buffering requests to web services using annotations
CN112486478B (en) Event processing method and device based on field driving
CN114513483A (en) Message notification method and device based on service system
CN110958278B (en) API gateway-based data processing method and system and API gateway
CN112363946B (en) Message forwarding method and device based on service system
CN114860473A (en) Message processing method, processor and storage medium
CN106997304B (en) Input and output event processing method and device
CN112769928B (en) Information interaction method and device based on service scene
CN112738181B (en) Method, device and server for cluster external IP access
CN111611092B (en) Notification processing method, device and equipment
CN113094189B (en) Method and equipment for processing messages in multi-channel message queue
CN112596882A (en) Method, device and system for scheduling delayed tasks
CN111639936B (en) Transaction information acquisition method and device, electronic equipment and readable storage medium
CN115237722A (en) Asynchronous message monitoring method and device, storage medium and electronic equipment
US20240061729A1 (en) Multitenancy cross-tenant collaboration driven by event proxy

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai

Applicant after: Shanghai wanwansheng Environmental Protection Technology Group Co.,Ltd.

Address before: Room 1101-1103, No. 433, Songhu Road, Yangpu District, Shanghai

Applicant before: SHANGHAI YUEYI NETWORK INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant