Event processing method and apparatus, computer device, storage medium and product

By using a business collaboration middleware table and collaboration center in a cloud-native architecture, the subscriber business domain receives and forwards event messages, and the target business application consumes event messages, thus solving the problem of code coupling between applications in a cloud-native architecture and improving processing efficiency and system maintainability.

CN116346614BActive Publication Date: 2026-04-14KINGDEE SOFTWARE(CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KINGDEE SOFTWARE(CHINA) CO LTD
Filing Date
2023-03-21
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In cloud-native architectures, when applications that publish business events call application interfaces that subscribe to business events via RPC, it leads to code coupling between different applications and consumes a lot of system maintenance resources.

Method used

Through the business collaboration middleware table and business collaboration center, the subscriber business domain receives and forwards event messages, and the target business application consumes event messages, thereby decoupling the publisher and the target business application and reducing the consumption of system maintenance resources.

Benefits of technology

It improves the efficiency of event message processing, reduces the consumption of system maintenance resources, and enhances the maintainability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116346614B_ABST
    Figure CN116346614B_ABST
Patent Text Reader

Abstract

The application relates to an event processing method and device, computer equipment, a storage medium and a product. The method comprises the following steps: receiving an event message published by a publisher business application in a publisher business field for a business event; acquiring a business cooperation intermediate table in a subscriber business field; the business cooperation intermediate table is used for registering a business event by a business application in the subscriber business field; determining a target business application which has registered the business event in the subscriber business field from the business cooperation intermediate table; and forwarding the event message to the target business application, so that the target business application consumes the event message. The method can reduce the resource consumption of system maintenance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to an event method, apparatus, computer device, storage medium, and product. Background Technology

[0002] With the development of computer technology, cloud-native architecture has emerged. Cloud-native architecture is a software architecture that runs in a cloud environment. Applications under cloud-native architecture are characterized by microservices, high cohesion, and low coupling, allowing different applications to be isolated from each other in different deployment units. Different applications in a cloud-native system can be used to achieve different business goals, and there is often business collaboration between them. To improve the scalability and maintainability of the system and make it run more stably in various business scenarios, it is necessary to reduce the coupling between different applications. Typically, when there is business collaboration between different applications, the application publishing business events (the calling application) calls the interface of the application subscribing to business events (the providing application) via RPC (Remote Procedure Call) to achieve business collaboration between different applications.

[0003] However, applications that publish business events call the interface methods of applications that subscribe to business events via RPC. Typically, the code that calls the provider application's interface is written directly in the caller application's code, causing code coupling between different applications. If the provider application's interface changes, the caller application needs to make corresponding code modifications, resulting in high system maintenance resource consumption. Summary of the Invention

[0004] Therefore, it is necessary to provide an event handling method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can reduce the consumption of system maintenance resources in response to the above-mentioned technical problems.

[0005] Firstly, this application provides an event handling method. Applied to the subscriber business domain, the method includes:

[0006] Receive event messages published by the publisher's business applications within the publisher's business domain for business events;

[0007] Obtain the business collaboration intermediate table within the subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events.

[0008] The target business applications that have registered the business events within the subscriber's business domain are determined from the business collaboration intermediate table.

[0009] The event message is forwarded to the target business application so that the target business application can consume the event message.

[0010] In one embodiment, the method further includes:

[0011] Send an event subscription request to the business collaboration center; the event subscription request is used to establish a subscription relationship between the business events in the business domain of the subscriber and the business domain of the publisher in the business collaboration center; the business collaboration center is used to handle business collaboration between the business domain of the subscriber and the business domain of the publisher.

[0012] When the business collaboration center receives an event message published by a publisher's business application within the publisher's business domain for a business event, it obtains the event message of the business event based on the subscription relationship.

[0013] In one embodiment, the method further includes:

[0014] In response to the event registration operation for the target business application and the business event, a binding relationship between the target business application and the business event is established in the business collaboration intermediate table, so that the target business application registers the business event;

[0015] In response to the registration and deregistration operation between the target business application and the business event, the binding relationship between the target business application and the business event is canceled in the business collaboration intermediate table.

[0016] In one embodiment, the method further includes:

[0017] Identify the subscriber business events that have registered the business events in the target business application, and the consumption functions corresponding to the subscriber business events;

[0018] The step of forwarding the event message to the target service application so that the target service application can consume the event message includes:

[0019] The event message is forwarded to the subscriber business event in the target business application so that the subscriber business event in the target business application consumes the event message according to the corresponding consumption function.

[0020] In one embodiment, the method further includes:

[0021] From the business collaboration intermediate table, obtain the consumption result of the subscription business event on the event message;

[0022] When the consumption result indicates that the subscriber's business event has failed to consume the event message, the event message is forwarded to the target business application again so that the subscriber's business event can re-consume the event message.

[0023] In one embodiment, the event message is published based on the target identity, and before forwarding the event message to the target business application, the method further includes:

[0024] Based on the target identity, perform permission verification on the target business application and obtain the verification result;

[0025] When the verification result indicates that the permission verification is successful, the step of forwarding the event message to the target business application is executed.

[0026] Secondly, this application also provides an event processing apparatus. The apparatus includes a basic application within the subscriber's business domain and a business application within the subscriber's business domain, wherein the basic application is used for:

[0027] Receive event messages published by publisher business applications within the publisher's business domain for business events; obtain a business collaboration intermediate table within the subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events; determine the target business application within the subscriber's business domain that has registered the business event from the business collaboration intermediate table; forward the event message to the target business application so that the target business application can consume the event message.

[0028] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0029] Receive event messages published by the publisher's business applications within the publisher's business domain for business events;

[0030] Obtain the business collaboration intermediate table within the subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events.

[0031] The target business applications that have registered the business events within the subscriber's business domain are determined from the business collaboration intermediate table.

[0032] The event message is forwarded to the target business application so that the target business application can consume the event message.

[0033] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0034] Receive event messages published by the publisher's business applications within the publisher's business domain for business events;

[0035] Obtain the business collaboration intermediate table within the subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events.

[0036] The target business applications that have registered the business events within the subscriber's business domain are determined from the business collaboration intermediate table.

[0037] The event message is forwarded to the target business application so that the target business application can consume the event message.

[0038] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0039] Receive event messages published by the publisher's business applications within the publisher's business domain for business events;

[0040] Obtain the business collaboration intermediate table within the subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events.

[0041] The target business applications that have registered the business events within the subscriber's business domain are determined from the business collaboration intermediate table.

[0042] The event message is forwarded to the target business application so that the target business application can consume the event message.

[0043] The aforementioned event handling method, apparatus, computer equipment, storage medium, and product first have the subscriber business domain receive event messages for business events. This means the business domain acts as the subscriber, reducing the number of subscribers compared to a direct subscription by the business application to the publisher business application, thus improving event message processing efficiency. Furthermore, the subscriber business domain determines the target business application for the registered business events within its business domain from a business collaboration intermediary table, forwards the event messages to the target business application, and consumes the event messages. This completes the business collaboration between the publisher business application and the target business application within the subscriber business domain. Since the target business application receives event messages from the subscriber business domain, the publisher business application and the target business application are independent of each other, meaning they are decoupled, improving system maintainability and reducing system maintenance resource consumption. Attached Figure Description

[0044] Figure 1 This is a diagram illustrating the application environment of an event handling method in one embodiment.

[0045] Figure 2This is a flowchart illustrating an event handling method in one embodiment;

[0046] Figure 3 This is a schematic diagram of the overall architecture of an event handling method in one embodiment;

[0047] Figure 4 This is a schematic diagram illustrating business collaboration between business domains in one embodiment;

[0048] Figure 5 This is a schematic diagram of a business event processing framework within the subscriber's business domain in one embodiment.

[0049] Figure 6 This is a schematic diagram of the framework for adding or deregistering entries in the business collaboration intermediate table in one embodiment.

[0050] Figure 7 This is a structural block diagram of an event handling device in one embodiment;

[0051] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0053] The event handling method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, the publisher business application 102 and the basic application 104 can communicate with the business collaboration center, and the basic application 104 can communicate with the target business application 106. For event messages published by the publisher business application 102 within the subscriber's business domain, the basic application 104 determines the target business application 106 that has registered business events within the subscriber's business domain from the business collaboration intermediate table, and forwards the event messages to the target business application 106 so that the target business application 106 can consume the event messages. The publisher business application 102, the basic application 104, and the target business application 106 can run on different servers or on the same server. The servers can be independent servers or a server cluster consisting of multiple servers.

[0054] In one embodiment, such as Figure 2 As shown, an event handling method is provided. This embodiment applies this method to... Figure 1 Taking basic application 104 as an example, this method includes the following steps:

[0055] Step 202: Receive event messages published by the publisher's business applications within the publisher's business domain for business events.

[0056] In this context, a business domain refers to the specific business scope within a computer system that handles a particular business problem. A business domain can be a collection of applications and / or data within a computer system that address a specific business problem. For example, a business domain could be a financial platform that handles financial issues, which might include general ledger applications, accounts receivable management applications, accounts payable management applications, financial analysis applications, or other business applications. Similarly, a business domain could be a supply chain platform that handles supply chain management issues, which might include procurement management applications, sales management applications, inventory management applications, channel management applications, or other business applications.

[0057] The publisher's business domain is the business domain in which the business application that publishes event messages for business events resides. The subscriber's business domain is the business domain in which the application that subscribes to business events resides. A business application is a computer program in a computer system that implements specific business requirements within a business domain. The publisher's business application is the business application that publishes event messages for business events. The subscriber's business domain includes basic applications, which are applications within the subscriber's business domain that implement basic functions. Different business applications within the subscriber's business domain can use the computer resources provided by the basic applications. Basic applications can also be referred to as basic services.

[0058] A business event is an event that can be triggered in a business application. An event message is a message used in a computer system to identify a business event that has occurred.

[0059] In one embodiment, when a publisher's business application within the publisher's business domain publishes an event message in the business collaboration center for a business event, the basic application within the subscriber's business domain can receive the event message from the business collaboration center.

[0060] In one embodiment, when there are event messages for a business event in the business collaboration center, the basic application within the subscriber's business domain can obtain the event messages for that business event from the business collaboration center.

[0061] In one embodiment, the basic application within the subscriber's business domain can periodically send a message retrieval request to the business collaboration center to obtain event messages of business events. When the business collaboration center receives the message retrieval request and queries for event messages of existing business events according to the message retrieval request, the basic application within the subscriber's business domain retrieves the queried event messages from the business collaboration center.

[0062] Step 204: Obtain the business collaboration intermediate table within the subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events.

[0063] Among them, the business collaboration intermediate table is a registry used to register business events within the subscriber's business domain.

[0064] In one embodiment, the basic application within the subscriber's business domain can obtain the complete business collaboration intermediate table within the subscriber's business domain from the basic application's data storage area.

[0065] In one embodiment, the data in the business collaboration intermediate table can be divided into multiple pages, each page storing a preset number of data. In this embodiment, the basic application within the subscriber's business domain can sequentially obtain the preset number of pages in the business collaboration intermediate table within the subscriber's business domain, and after each page is obtained, step 206 is executed on the obtained page.

[0066] Step 206: Determine the target business application of the registered business events within the subscriber's business domain from the business collaboration intermediate table.

[0067] Among them, the target business application is the business application that has registered business events within the subscriber's business domain.

[0068] In one embodiment, the business collaboration intermediate table can record the correspondence between business applications within the subscriber's business domain and registered events. In this embodiment, the basic application within the subscriber's business domain can query business events from the events recorded in the business collaboration intermediate table. When a business event is found, the target business application corresponding to the business event is obtained.

[0069] In one embodiment, the basic application within the subscriber's business domain can traverse the business applications recorded in the business collaboration intermediate table, traverse the registered events corresponding to the traversed business applications, and when a business event is encountered, determine that the traversed business application is the target business application.

[0070] Step 208: Forward the event message to the target business application so that the target business application can consume the event message.

[0071] Consumption refers to the action of the target business application processing event messages through the corresponding consumption function.

[0072] In one embodiment, the basic application within the subscriber's business domain can obtain the target interface recorded when the target business application registers a business event from the business collaboration intermediate table, and forward the event message to the target business application through the obtained target interface.

[0073] In one embodiment, the basic application within the subscriber's business domain can perform license verification on the target business application, obtain the verification result, and when the verification result indicates that the license verification has passed, forward an event message to the target business application.

[0074] In the above event handling method, the subscriber business domain first receives the event message of the business event, that is, the business domain acts as the subscriber. Compared with the method where the business application directly receives the event message from the publisher business application as the subscriber, the number of subscribers is reduced, thereby improving the efficiency of event message processing. Furthermore, the subscriber business domain determines the target business application of the registered business event within the subscriber business domain from the business collaboration intermediate table, and forwards the event message to the target business application. The target business application consumes the event message to complete the business collaboration between the publisher business application and the target business application within the subscriber business domain. Since the target business application receives the event message from the subscriber business domain, the publisher business application and the target business application are independent of each other, that is, the publisher business application and the target business application are decoupled, which improves the maintainability of the system and reduces the consumption of system maintenance resources.

[0075] In one embodiment, the event handling method further includes a step of receiving event messages from a business collaboration center. This step includes: sending an event subscription request to the business collaboration center; the event subscription request is used to establish a subscription relationship between the subscriber's business domain and the publisher's business domain for business events within the business collaboration center; the business collaboration center is used to handle business collaboration between the subscriber's business domain and the publisher's business domain; when the business collaboration center receives an event message published by the publisher's business application for a business event within the publisher's business domain, it retrieves the event message of the business event based on the subscription relationship.

[0076] The Business Collaboration Center is a platform outside the business domain used for handling collaboration on business events between business domains. An event subscription request is a request sent by the subscribing business domain to the Business Collaboration Center to subscribe to business events within the publishing business domain. A subscription relationship is the credential used by the subscribing business domain to obtain event messages published by the publishing business domain.

[0077] In this embodiment, the publisher's business domain and the subscriber's business domain do not directly transmit event messages. Instead, a business collaboration center acts as an intermediary between the publisher's business domain and the subscriber's business domain. The business collaboration center receives event messages from the publisher's business domain, and the subscriber's business domain obtains event messages from the business collaboration center. This makes the publisher's business domain and the subscriber's business domain independent of each other, and the business applications in the publisher's business domain and the business applications in the subscriber's business domain are decoupled, improving the maintainability of the system.

[0078] In one embodiment, a basic application within the subscriber's business domain can send an event subscription request to the business collaboration center. After the business collaboration center responds to the event subscription request, the application receives a notification from the business collaboration center that the subscription relationship between the subscriber's business domain and the publisher's business domain has been successfully established.

[0079] In one embodiment, a basic application within the subscriber's business domain may periodically send a message retrieval request to the business collaboration center, carrying the subscription relationship between the application and the business events within the publisher's business domain, in order to receive an event message of the business events returned by the business collaboration center in response to the message retrieval request.

[0080] In one embodiment, after receiving an event message published by a publisher's business application within the publisher's business domain for a business event, the business collaboration center can periodically determine the subscriber business domains that have subscribed to the business event and forward the event message to the basic applications within the determined subscriber business domains.

[0081] In one embodiment, the business collaboration center may include a message center and an event log module. In this embodiment, when a publisher's business application within the publisher's business domain publishes an event message for a business event in the message center of the business collaboration center, the message center of the business collaboration center can receive and store the event message for the business event, and the event log module records the received event message for the business event. The message center is a message queue within the business collaboration center that receives and forwards event messages.

[0082] In one embodiment, the message center of the business collaboration center can determine the subscriber business domains that have subscribed to business events, and forward event messages to the basic applications within the determined subscriber business domains. When forwarding the event message to the basic application is successful, a record indicating successful forwarding of the event message is recorded in the event log module. When forwarding the event message to the basic application fails, the event message is re-forwarded to the basic application until successful, and the processing status of each forwarding event message is recorded in the event log module. The processing status refers to whether the forwarding of the event message was successful or failed.

[0083] In one embodiment, the above event handling method further includes a step of registering a business event for a target business application. This step includes: in response to an event registration operation for the target business application and the business event, establishing a binding relationship between the target business application and the business event in a business collaboration intermediate table to enable the target business application to register the business event; and in response to a registration cancellation operation for the target business application and the business event, canceling the binding relationship between the target business application and the business event in the business collaboration intermediate table.

[0084] The target business application can be a standardized business application provided by an application provider, or a customized application created by the application provider for the enterprise. The event registration operation is the operation that registers the target business application with business events. This operation can be either selecting a target business application to register for a specific business event, or selecting specific business events to register for a target business application. The registration deregistration operation is the operation that removes the target business application from the list of business applications with registered business events, or deleting a business event from the list of events registered by the target business application.

[0085] In this embodiment, by establishing a binding relationship between the target business application and the business event, the target business application can register the business event in the business collaboration intermediate table. This creates conditions for the subscriber's business domain to forward the event message, improving the system's efficiency in processing event messages. When it is necessary to unregister the target business application with the business event, the binding relationship between the target business application and the business event can be removed in the business collaboration intermediate table. Without modifying the code of the publisher's business application, the target business application will no longer receive the event message. The business collaboration intermediate table allows for convenient registration and unregistration of business applications and business events within the subscriber's business domain, decoupling the code between the publisher's business application and the target business application, thus reducing the system's maintenance resource consumption.

[0086] In one embodiment, the basic application within the subscriber's business domain can respond to the event registration operation for business events within the target business application and the publisher's business application, determine the registration information of the target business application, and establish a binding relationship between the registration information of the target business application and the business events in the business collaboration intermediate table.

[0087] The registration information refers to the information used by the target business application to register business events in the business collaboration intermediary table. Registration information may include the target interface identifier or target interface parameters. The target interface is the interface used by the target business application to receive event messages from the underlying application. The target interface can be an RPC interface implementing RPC calls or an HTTP interface based on the HTTP (Hypertext Transfer Protocol) protocol. The target interface identifier is the identifying information that distinguishes the target interface from other interfaces, such as the interface name, interface number, and interface ID. The target interface parameters are the parameters required to implement the functionality provided by the target interface.

[0088] In one embodiment, a basic application within the subscriber's business domain can respond to a registration modification operation for a business event within the target business application and the publisher's business application, obtain new registration information input by the registration modification operation, and update the business collaboration intermediate table based on the obtained new registration information. Here, the registration modification operation is the operation of modifying the registration information of the target business application's registered business event.

[0089] In one embodiment, the basic application within the subscriber's business domain can respond to an event registration operation for a business event within the target business application and the publisher's business application, identify the subscriber business event registered in the target business application, and establish a binding relationship between the subscriber business event and the business event in the target business application; the basic application can respond to a registration unregistration operation for the subscriber business event and the business event in the target business application, and cancel the binding relationship between the subscriber business event and the business event in the target business application in the business collaboration intermediate table.

[0090] In one embodiment, the above event handling method further includes: determining the subscriber business events that have registered business events in the target business application, and the consumption function corresponding to the subscriber business events; step 208 includes: forwarding event messages to the subscriber business events in the target business application, so that the subscriber business events in the target business application consume event messages according to the corresponding consumption function.

[0091] Here, subscriber business events are business events in the target business application, and these subscriber business events have been registered with the publisher business application. A consumer function is a computer program segment used by the subscriber business events to consume event messages from the publisher business applications.

[0092] In this embodiment, by determining the subscriber business events in the target business application, that is, determining the specific business events in the target business application that consume event messages, and then through the corresponding consumption function, the event messages of the business events in the publisher business application are consumed, thereby realizing business collaboration between the publisher business application and the target business application.

[0093] In one embodiment, the registration information of business events in the target business application's registration and publishing business application may further include the subscriber's business event identifier and the consumption function name. In this embodiment, after the basic application within the subscriber's business domain determines the target business application with registered business events from the business collaboration intermediate table, the basic application within the subscriber's business domain can determine the subscriber's business event identifier for the registered business events in the target business application, and the consumption function name corresponding to the subscriber's business event identifier, from the business collaboration intermediate table. It then forwards the event message to the subscriber's business event corresponding to the subscriber's business event identifier, so that the subscriber's business event consumes the event message according to the consumption function indicated by the corresponding consumption function name. Basic Application

[0094] In one embodiment, the above event handling method further includes the following steps: obtaining the consumption result of the subscriber's business event on the event message from the business collaboration intermediate table; when the consumption result indicates that the subscriber's business event failed to consume the event message, re-forwarding the event message to the target business application so that the subscriber's business event can consume the event message again.

[0095] In this embodiment, when the subscriber's business event fails to consume the event message, the subscriber's business domain re-forwards the event message to the target business application, so that the subscriber's business event can re-consume the event message of the business event in the publisher's business application, thus ensuring the completion of business collaboration between the publisher's business application and the target business application.

[0096] In one embodiment, when a subscriber's business event consumes an event message, the subscriber's business application within the subscriber's business domain records the consumption result of the event message in the business collaboration intermediate table.

[0097] In one embodiment, when the consumption result of the subscriber's business event on the event message exists in the business collaboration intermediate table, the basic application within the subscriber's business domain can obtain the consumption result of the subscriber's business event on the event message from the business collaboration intermediate table; when the consumption result indicates that the subscriber's business event failed to consume the event message, the event message is forwarded to the target business application again.

[0098] In one embodiment, after a basic application within a subscriber's business domain forwards an event message to a target business application, the basic application can periodically query the consumption results of the subscriber's business events on the event message in the target business application from the business collaboration intermediate table. When a consumption result indicating that the subscriber's business events failed to consume the event message is found, the event message is re-forwarded to the target business application.

[0099] In one embodiment, the event message is published based on the target identity. Before the step of forwarding the event message from the basic application to the target business application in step 208, the above event processing method further includes: performing a permission verification on the target business application based on the target identity and obtaining the verification result; when the verification result indicates that the permission verification is passed, the basic application performs the step of forwarding the event message to the target business application.

[0100] The target identity is the computer identity that triggers the business event within the computer system. The target identity can be represented as an account, such as an account used to log into the publisher's business application. The target identity can be a tenant account renting the application, or a user account under a tenant account. Permission verification is the process of verifying whether the target identity has the necessary permissions to use the target business application.

[0101] In this embodiment, before the subscriber's business domain forwards the event message to the target business application, permission verification is performed on the target business application based on the target identity. This ensures the security of the target business application and avoids unrestricted use of the target business application's resources, thereby improving resource utilization.

[0102] In one embodiment, after the basic application in the subscriber's business domain determines the target business application from the business collaboration intermediate table, the basic application can obtain the target identity carried in the event message of the business event and perform permission verification on the target business application based on the obtained target identity.

[0103] In one embodiment, in a specific application scenario, the overall architecture diagram of the above event handling method is as follows: Figure 3 As shown, the business collaboration center may include an event center, an event log module, and a message center (MQ, MessageQueue). The event handling method specifically includes the following steps:

[0104] Business events of the publisher's business applications within the publisher's business domain can be registered as event publishers in the event center of the business collaboration center, where the event center records the basic information of the business events. Basic applications within the subscriber's business domain can be registered as event subscribers in the event center of the business collaboration center, and the subscriber's business domain can subscribe to business events in the message center of the business collaboration center.

[0105] Within the subscriber's business domain, basic applications can respond to event registration operations for target business events within the target business application and business events within the publisher's business application. This process determines the target business application's registration information and establishes a binding relationship between the target business application's registration information and business events in the business collaboration intermediary table. The registration information may include the identifier of the subscriber's business domain to which the target business application belongs, the target business application identifier, the target business application's RPC interface identifier, RPC interface parameters, the event identifier of the target business event within the target business application, and the name of the consumption function for the target business event.

[0106] like Figure 4 As shown in the business collaboration diagram between business domains, when a business event occurs in the business application of the publisher within the publisher's business domain, the business event within the publisher's business application can publish an event message in the business collaboration center, and the event message is stored by the message center; the message center can determine the subscriber business domains that have subscribed to the business event, and forward the business event message to the basic application within the determined subscriber business domain via RPC.

[0107] After receiving the event message of the business event within the subscriber's business domain, the basic application can obtain the target identity of the event message that triggered the business event, determine the target business application that has registered the business event, perform permission verification on the target business application according to the target identity, and when the permission verification is successful, the basic application will perform the step of forwarding the event message to the target business application.

[0108] like Figure 5 As shown in the schematic diagram of the business event processing framework within the subscriber's business domain, the specific steps for the basic application within the subscriber's business domain to forward event messages to the target business application include: the basic application can query the RPC interface identifier, RPC interface parameters, event identifier of the target business event within the target business application, and consumption function name of the target business event from the business collaboration intermediate table. Based on the obtained RPC interface identifier and RPC interface parameters, the basic application calls the RPC interface of the target business application, enabling the target business application to pass the consumption function name and event message to the target business event indicated by the event identifier. This allows the target business event to consume the event message according to the consumption function indicated by the consumption function name, thereby completing the business collaboration between the publisher's business application within the publisher's business domain and the target business application within the subscriber's business domain.

[0109] like Figure 6The diagram illustrates the framework for adding or deregistering business applications in the business collaboration intermediary table. When a new business application needs to register a business event, the basic application can respond to the event registration operation for the new business application and the business event by establishing a binding relationship between the new business application and the business event in the business collaboration intermediary table, enabling the new business application to register the business event. When it is necessary to unsubscribe from a business application within the same business domain (such as...), the basic application can also deregister the business application. Figure 6 In application C) regarding the registration of business events, the basic application can unbind the business application from the business event in the business collaboration intermediate table. The new business application can be a secondary business application (a customized enterprise application).

[0110] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0111] Based on the same inventive concept, this application also provides an event processing apparatus for implementing the event processing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more event processing apparatus embodiments provided below can be found in the limitations of the event processing method described above, and will not be repeated here.

[0112] In one embodiment, such as Figure 7 As shown, an event processing apparatus 700 is provided, including: a basic application 710 within a subscriber's business domain and a business application 720 within a subscriber's business domain, wherein the business application 720 within a subscriber's business domain includes a target business application 721 within the subscriber's business domain, and the basic application 710 within the subscriber's business domain is used for:

[0113] Receive event messages published by the publisher's business applications within the publisher's business domain for business events; obtain the business collaboration intermediate table within the subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events; determine the target business application 721 within the subscriber's business domain that has registered business events from the business collaboration intermediate table; forward the event message to the target business application 721 so that the target business application 721 can consume the event message.

[0114] In one embodiment, the base application 710 is further configured to send an event subscription request to the business collaboration center; the event subscription request is used to establish a subscription relationship between the business events in the subscriber's business domain and the publisher's business domain; the business collaboration center is used to handle business collaboration between the subscriber's business domain and the publisher's business domain; when the business collaboration center receives an event message published by the publisher's business application for a business event in the publisher's business domain, it obtains the event message of the business event based on the subscription relationship.

[0115] In one embodiment, the base application 710 is further configured to, in response to an event registration operation for the target business application 721 and the business event, establish a binding relationship between the target business application 721 and the business event in the business collaboration intermediate table, so that the target business application 721 registers the business event; and in response to a registration cancellation operation for the target business application 721 and the business event, cancel the binding relationship between the target business application 721 and the business event in the business collaboration intermediate table.

[0116] In one embodiment, the base application 710 is further configured to determine the subscriber business events of the registered business events in the target business application 721 and the consumption functions corresponding to the subscriber business events; and forward event messages to the subscriber business events in the target business application 721 so that the subscriber business events in the target business application 721 consume event messages according to the corresponding consumption functions.

[0117] In one embodiment, the base application 710 is further configured to obtain the consumption result of the subscriber's business event on the event message from the business collaboration intermediate table; when the consumption result indicates that the subscriber's business event failed to consume the event message, the base application re-forwards the event message to the target business application 721 so that the subscriber's business event can consume the event message again.

[0118] In one embodiment, the basic application 710 is further configured to perform permission verification on the target business application 721 based on the target identity and obtain the verification result; when the verification result indicates that the permission verification is successful, the step of forwarding an event message to the target business application 721 is executed.

[0119] Each module in the aforementioned event processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0120] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data required for executing the aforementioned event handling method. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an event handling method.

[0121] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0122] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: receiving an event message published by a publisher business application within a publisher's business domain for a business event; obtaining a business collaboration intermediate table within a subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events; determining a target business application within the subscriber's business domain that has registered business events from the business collaboration intermediate table; and forwarding the event message to the target business application so that the target business application can consume the event message.

[0123] In one embodiment, when the processor executes the computer program, it further implements the following steps: sending an event subscription request to the business collaboration center; the event subscription request is used to establish a subscription relationship between the subscriber's business domain and the publisher's business domain for business events; the business collaboration center is used to handle business collaboration between the subscriber's business domain and the publisher's business domain; when the business collaboration center receives an event message published by the publisher's business application for a business event within the publisher's business domain, it obtains the event message of the business event based on the subscription relationship.

[0124] In one embodiment, when the processor executes the computer program, it further performs the following steps: in response to an event registration operation for a target business application and a business event, establishing a binding relationship between the target business application and the business event in a business collaboration intermediate table, so that the target business application registers the business event; in response to a registration deregistration operation for the target business application and the business event, canceling the binding relationship between the target business application and the business event in the business collaboration intermediate table.

[0125] In one embodiment, when the processor executes the computer program, it further implements the following steps: determining the subscriber business events that have registered business events in the target business application, and the consumption function corresponding to the subscriber business events; forwarding event messages to the target business application so that the target business application can consume event messages, including: forwarding event messages to the subscriber business events in the target business application so that the subscriber business events in the target business application can consume event messages according to the corresponding consumption function.

[0126] In one embodiment, when the processor executes the computer program, it further implements the following steps: obtaining the consumption result of the subscriber's business event on the event message from the business collaboration intermediate table; when the consumption result indicates that the subscriber's business event failed to consume the event message, re-forwarding the event message to the target business application so that the subscriber's business event can consume the event message again.

[0127] In one embodiment, when the processor executes the computer program, it further performs the following steps: performing permission verification on the target business application based on the target identity and obtaining the verification result; when the verification result indicates that the permission verification has passed, performing the step of forwarding an event message to the target business application.

[0128] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0129] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0130] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0131] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0132] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0133] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An event handling method, characterized in that, Applied to the subscriber business domain, the method includes: Send an event subscription request to the business collaboration center; the event subscription request is used to establish a subscription relationship for business events in the business domain of the subscriber and the business domain of the publisher in the business collaboration center; the business collaboration center is used to handle business collaboration between the business domain of the subscriber and the business domain of the publisher. When the business collaboration center receives an event message published by a publisher's business application within the publisher's business domain for a business event, it obtains the event message of the business event based on the subscription relationship; Obtain the business collaboration intermediate table within the subscriber's business domain; the business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events. The target business applications that have registered the business events within the subscriber's business domain are determined from the business collaboration intermediate table. The event message is forwarded to the target business application so that the target business application can consume the event message.

2. The method according to claim 1, characterized in that, The method further includes: In response to the event registration operation for the target business application and the business event, a binding relationship between the target business application and the business event is established in the business collaboration intermediate table, so that the target business application registers the business event; In response to the registration and deregistration operation between the target business application and the business event, the binding relationship between the target business application and the business event is canceled in the business collaboration intermediate table.

3. The method according to claim 1, characterized in that, The method further includes: Identify the subscriber business events that have registered the business events in the target business application, and the consumption functions corresponding to the subscriber business events; The step of forwarding the event message to the target service application so that the target service application can consume the event message includes: The event message is forwarded to the subscriber business event in the target business application so that the subscriber business event in the target business application consumes the event message according to the corresponding consumption function.

4. The method according to claim 3, characterized in that, The method further includes: From the business collaboration intermediate table, obtain the consumption result of the subscription business event on the event message; When the consumption result indicates that the subscriber's business event has failed to consume the event message, the event message is forwarded to the target business application again so that the subscriber's business event can re-consume the event message.

5. The method according to claim 1, characterized in that, The event message is published based on the target identity. Before forwarding the event message to the target business application, the method further includes: Based on the target identity, perform permission verification on the target business application and obtain the verification result; When the verification result indicates that the permission verification is successful, the step of forwarding the event message to the target business application is executed.

6. An event processing device, characterized in that, The device includes a basic application within the subscriber's business domain and business applications within the subscriber's business domain. The basic application is used for: Send an event subscription request to the business collaboration center; the event subscription request is used to establish a subscription relationship between the subscriber's business domain and the publisher's business domain for business events in the business collaboration center; The business collaboration center is used to handle business collaboration between the subscriber's business domain and the publisher's business domain; when the business collaboration center receives an event message published by the publisher's business application in the publisher's business domain for a business event, it obtains the event message of the business event based on the subscription relationship; Obtain the business collaboration intermediate table within the subscriber's business domain; The business collaboration intermediate table is used to enable business applications within the subscriber's business domain to register business events; to determine the target business application within the subscriber's business domain that has registered the business event from the business collaboration intermediate table; and to forward the event message to the target business application so that the target business application can consume the event message.

7. The apparatus according to claim 6, characterized in that, The basic application is also used for: In response to the event registration operation for the target business application and the business event, a binding relationship between the target business application and the business event is established in the business collaboration intermediate table, so that the target business application registers the business event; In response to the registration and deregistration operation between the target business application and the business event, the binding relationship between the target business application and the business event is canceled in the business collaboration intermediate table.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Event subscription method, apparatus and system

    CN104967652A

  • Message event distribution method, distribution platform, system and server

    CN111866191A