A service processing method and device, electronic equipment and computer readable medium
By parsing asynchronous event messages using the interceptor pattern and event-driven architecture, identifying target services, and retrieving data from the configuration center, the problem of low business processing efficiency in existing technologies is solved, achieving efficient and accurate business linkage service processing.
Patent Information
- Application Number
- CN202410838685.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-06-26
AI Technical Summary
Adding functionality to business modules or transactions using existing technologies requires modifying existing code, causing interfaces to be blocked for extended periods while waiting for results, resulting in low business processing efficiency and accuracy.
It adopts the interceptor pattern and event-driven architecture. By obtaining the event transmission channel node identifier and the interceptor interface identifier, it parses asynchronous event messages to determine the identifiers of related systems, related transactions and related services, obtains service configuration data from the configuration center, and executes business linkage service processing.
It improves the efficiency and accuracy of business processing, reduces intrusion into existing code, supports online dynamic refreshing and hot-swapping, and enhances the reusability of business linkage services.
Smart Images

Figure CN118764527B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a business processing method, apparatus, electronic device, and computer-readable medium. Background Technology
[0002] Currently, when adding new functions to business modules or transactions in a project, it is necessary to modify the existing code, which involves a lot of intrusion into the business code. Furthermore, when processing the business, the interface is blocked for a long time while waiting for the result, resulting in low efficiency and low accuracy in business processing. Summary of the Invention
[0003] In view of this, embodiments of this application provide a business processing method, apparatus, electronic device, and computer-readable medium, which can solve the problem that when processing business, the interface is blocked for a long time while waiting for the result, resulting in low business processing efficiency and low accuracy.
[0004] To achieve the above objectives, according to one aspect of the embodiments of this application, a business processing method is provided, comprising: responding to a business processing request, obtaining a corresponding event transmission channel node identifier and an interceptor interface identifier; obtaining a corresponding asynchronous event message based on the event transmission channel node identifier and the interceptor interface identifier; obtaining a message processing method corresponding to the interceptor interface identifier, and then parsing the asynchronous event message according to the message processing method to determine an associated system identifier, an associated transaction identifier, and an associated service identifier; determining a target service based on the associated system identifier, the associated transaction identifier, and the associated service identifier; obtaining service configuration data corresponding to the target service from a configuration center, and performing business linkage service processing based on the service configuration data.
[0005] Optionally, obtaining the corresponding asynchronous event message includes: obtaining the asynchronous event message transmitted via the transmission channel corresponding to the transmission channel node identifier from the interface corresponding to the interceptor interface identifier.
[0006] Optionally, the method further includes: generating a summary value of the changed configuration in response to a configuration change in the configuration center; and sending the summary value to the target subscriber client so that the target subscriber client updates the corresponding locally cached data layer based on the summary value.
[0007] Optionally, before retrieving the service configuration data corresponding to the target service from the configuration center, the method further includes: in response to a configuration change operation on the configuration center, displaying a pop-up window to prompt access verification information; obtaining feedback information from the user based on the access verification information, querying the registered user database based on the feedback information, and in response to the query result being non-empty, determining that the access verification has passed, and executing the process of retrieving the service configuration data corresponding to the target service from the configuration center; and in response to the query result being empty, displaying a message indicating no access permission.
[0008] Optionally, the method also includes: monitoring the status of the configuration center in real time, and issuing an alarm message in response to an abnormal status.
[0009] Optionally, determining the target service includes: identifying the associated transaction corresponding to the associated transaction identifier in the associated system corresponding to the associated system identifier; and determining the associated service corresponding to the associated service identifier under the associated transaction as the target service.
[0010] In addition, this application also provides a business processing apparatus, including: a first acquisition unit configured to acquire a corresponding event transmission channel node identifier and an interceptor interface identifier in response to a business processing request; a second acquisition unit configured to acquire a corresponding asynchronous event message based on the event transmission channel node identifier and the interceptor interface identifier; a parsing unit configured to acquire a message processing method corresponding to the interceptor interface identifier, and then parse the asynchronous event message according to the message processing method to determine an associated system identifier, an associated transaction identifier, and an associated service identifier; a target service determination unit configured to determine a target service based on the associated system identifier, the associated transaction identifier, and the associated service identifier; and an execution unit configured to acquire service configuration data corresponding to the target service from a configuration center, and execute business linkage service processing based on the service configuration data.
[0011] Optionally, the second acquisition unit is further configured to: acquire asynchronous event messages transmitted via the transmission channel corresponding to the transmission channel node identifier from the interface corresponding to the interceptor interface identifier.
[0012] Optionally, the apparatus further includes an update unit configured to: generate a summary value of the changed configuration in response to a configuration change in the configuration center; and send the summary value to the target subscriber client so that the target subscriber client updates the corresponding locally cached data layer based on the summary value.
[0013] Optionally, the device further includes an access verification unit, configured to: in response to a configuration change operation on the configuration center, display a pop-up window prompting access verification information; obtain feedback information from the user based on the access verification information, query the registered user database based on the feedback information, and in response to the query result being non-empty, determine that the access verification has passed and execute the process of obtaining the service configuration data corresponding to the target service from the configuration center; and in response to the query result being empty, display an access permission message.
[0014] Optionally, the device also includes an alarm unit configured to: monitor the status of the configuration center in real time, and issue an alarm message in response to an abnormal status.
[0015] Optionally, the target service determination unit is further configured to: determine the associated transaction corresponding to the associated transaction identifier in the associated system corresponding to the associated system identifier; and determine the associated service corresponding to the associated service identifier under the associated transaction as the target service.
[0016] In addition, this application also provides a business processing electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by one or more processors, enable the one or more processors to implement the business processing method described above.
[0017] In addition, this application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the business processing method described above.
[0018] To achieve the above objectives, according to another aspect of the embodiments of this application, a computer program product is provided.
[0019] A computer program product according to an embodiment of this application includes a computer program that, when executed by a processor, implements the business processing method provided in the embodiment of this application.
[0020] One embodiment of the above invention has the following advantages or beneficial effects: In response to a business processing request, this application obtains the corresponding event transmission channel node identifier and interceptor interface identifier; based on the event transmission channel node identifier and interceptor interface identifier, it obtains the corresponding asynchronous event message; it obtains the message processing method corresponding to the interceptor interface identifier, and then parses the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier; based on the associated system identifier, associated transaction identifier, and associated service identifier, it determines the target service; it obtains the service configuration data corresponding to the target service from the configuration center, and performs business linkage service processing based on the service configuration data. Business processing is performed based on the interceptor pattern and event-driven architecture, improving business processing efficiency.
[0021] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0022] The accompanying drawings are provided to better understand this application and do not constitute an undue limitation thereof. Wherein:
[0023] Figure 1 This is a schematic diagram of the main flow of a business processing method according to an embodiment of this application;
[0024] Figure 2 This is a schematic diagram of the main flow of a business processing method according to an embodiment of this application;
[0025] Figure 3 This is a schematic diagram illustrating a business processing method according to an embodiment of this application;
[0026] Figure 4This is a schematic diagram of the configuration center architecture of a business processing method according to an embodiment of this application;
[0027] Figure 5 This is a schematic diagram of the main units of a service processing apparatus according to an embodiment of this application;
[0028] Figure 6 This is an exemplary system architecture diagram to which embodiments of this application can be applied;
[0029] Figure 7 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers in the embodiments of this application. Detailed Implementation
[0030] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solutions of this application comply with relevant national laws and regulations. It should also be noted that certain software, components, models, and other existing industry solutions may be mentioned in the embodiments of this application. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions. The collection, analysis, use, transmission, and storage of user personal information involved in the technical solutions of this application all comply with relevant laws and regulations, are used for legal and reasonable purposes, are not shared, disclosed, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities. Necessary measures should be taken to prevent unauthorized access to user personal information data, ensure that personnel authorized to access such data comply with relevant laws and regulations, and safeguard user personal information security. Once this user personal information data is no longer needed, risks should be minimized by restricting or even prohibiting data collection and / or deleting the data.
[0031] When used, including in certain relevant applications, data is deidentified to protect user privacy, for example by removing specific identifiers, controlling the amount or specificity of stored data, controlling how data is stored, and / or other methods.
[0032] Figure 1 This is a schematic diagram of the main flow of a business processing method according to an embodiment of this application, as shown below. Figure 1As shown, the business processing method mainly includes the following steps S101 to S105.
[0033] Step S101: In response to the business processing request, obtain the corresponding event transmission channel node identifier and interceptor interface identifier.
[0034] In this embodiment, the execution entity of the business processing method (e.g., a server) can receive business processing requests via wired or wireless connections. Upon receiving a business processing request, the execution entity can obtain the event transmission channel node identifier and interceptor interface identifier carried in the request. The event transmission channel node identifier (i.e., the event transmission channel node ID) can be used to uniquely identify a specific event originating end / event processing engine / event application end. The interceptor interface identifier can be used to determine the interface for obtaining intercepted asynchronous event messages.
[0035] Step S102: Obtain the corresponding asynchronous event message based on the event transmission channel node identifier and the interceptor interface identifier.
[0036] An interceptor can intercept service requests sent by one or more event transmission channels. The corresponding interceptor interface is identified by the interceptor interface identifier, and the service requests sent from the event transmission channels corresponding to the event transmission channel node identifiers are obtained from the interceptor interface and assembled into asynchronous event messages.
[0037] Step S103: Obtain the message processing method corresponding to the interceptor interface identifier, and then parse the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier.
[0038] The interceptor interface contains methods for processing messages. The executing entity can determine the corresponding interceptor interface based on the interceptor interface identifier, and then obtain the corresponding message processing method from the determined interceptor interface. Based on the obtained message processing method, the asynchronous event message is parsed from the system dimension, transaction dimension, and service dimension to obtain the associated system identifier, associated transaction identifier, and associated service identifier.
[0039] Step S104: Determine the target service based on the associated system identifier, associated transaction identifier, and associated service identifier.
[0040] Transactions are associated with systems, and services are associated with transactions. Specifically, identifying the target service includes: identifying the associated transaction in the associated system corresponding to the associated transaction identifier; and identifying the associated service under the associated transaction corresponding to the associated service identifier as the target service.
[0041] The system finds the associated transaction corresponding to the associated transaction identifier among the transactions involved in the associated system corresponding to the associated system identifier, and then finds the associated service corresponding to the associated service identifier from the various associated services bound to the associated transaction and uses it as the target service.
[0042] Step S105: Obtain the service configuration data corresponding to the target service from the configuration center, and perform business linkage service processing based on the service configuration data.
[0043] The service configuration data may contain the reachability of the target service, i.e. the way to connect to the target service. The executing entity can connect to the target service according to the reachability of the target service in the service configuration data. For example, the target service may be distributed in different systems and under different transactions. By calling and executing the target services in different systems and under different transactions, the business linkage service processing of different systems and different transactions can be realized.
[0044] Specifically, the method further includes: generating a summary value of the changed configuration in response to a configuration change in the configuration center; and sending the summary value to the target subscriber client so that the target subscriber client updates the corresponding locally cached data layer based on the summary value.
[0045] For example, when the configuration changes, the server generates a summary value of the configuration and pushes it to each subscriber client. Based on the summary value of the configuration, the client judges the change of the configuration summary value in its local cache in near real time. If it is inconsistent with the server, it automatically pulls the configuration and updates the local cache, realizing dynamic configuration refresh.
[0046] Specifically, before retrieving the service configuration data corresponding to the target service from the configuration center, the method further includes: in response to a configuration change operation on the configuration center, displaying a pop-up window prompting access verification information; obtaining feedback information from the user based on the access verification information, querying the registered user database based on the feedback information, and in response to the query result being non-empty, confirming that the access verification is successful, and executing the process of retrieving the service configuration data corresponding to the target service from the configuration center; and in response to the query result being empty, displaying a message indicating no access permission.
[0047] In this embodiment, the feedback information may include a user identifier, such as a user account and password. If the query result is not empty, it indicates that there is information matching the feedback information in the registered user database, and this matching information may be a user identifier, thus confirming that the access verification has passed. If the query result is empty, it indicates that there is no information matching the feedback information in the registered user database, thus the access verification has failed, and an access denied message is displayed to refuse the user's access and ensure the security of the configuration data.
[0048] Configuration publishing and subscription support role-based access control to ensure the security of configuration data.
[0049] This embodiment responds to business processing requests by obtaining the corresponding event transmission channel node identifier and interceptor interface identifier; based on the event transmission channel node identifier and interceptor interface identifier, it obtains the corresponding asynchronous event message; it obtains the message processing method corresponding to the interceptor interface identifier, and then parses the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier; based on the associated system identifier, associated transaction identifier, and associated service identifier, it determines the target service; and it obtains the service configuration data corresponding to the target service from the configuration center to execute business linkage service processing based on the service configuration data. Business processing is performed based on the interceptor pattern and event-driven architecture, improving business processing efficiency.
[0050] Figure 2 This is a schematic diagram of the main flow of a business processing method according to an embodiment of this application, such as... Figure 2 As shown, the business processing method mainly includes the following steps S201 to S205.
[0051] Step S201: In response to the business processing request, obtain the corresponding event transmission channel node identifier and interceptor interface identifier.
[0052] The event transmission channel node identifier (i.e., the event transmission channel node ID) can be used to uniquely identify a specific event originating end / event processing engine / event application end. The interceptor interface identifier can be used to identify the interface for intercepting asynchronous event message retrieval.
[0053] Step S202: Obtain the asynchronous event message transmitted via the transmission channel corresponding to the transmission channel node identifier from the interface corresponding to the interceptor interface identifier.
[0054] Using the interceptor pattern to send asynchronous messages, specifically, the executing entity can obtain service requests sent from the event transmission channels corresponding to the event transmission channel node identifiers from the interceptor interface, and assemble them into asynchronous event messages to send to the downstream system.
[0055] Step S203: Obtain the message processing method corresponding to the interceptor interface identifier, and then parse the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier.
[0056] The interceptor interface contains methods for processing messages. The executing entity can determine the target message processing method based on the asynchronous event message and first check if the target message processing method exists in the interceptor interface corresponding to the interceptor interface identifier. If it exists, the target message processing method is obtained to parse the asynchronous event message and obtain the associated system identifier, associated transaction identifier, and associated service identifier, ensuring the accuracy of asynchronous event message parsing. If the target message processing method does not exist in the interceptor interface corresponding to the interceptor interface identifier, a message indicating that parsing is not possible is displayed, prompting the user to find another method to parse the asynchronous event message. Alternatively, if the target message processing method does not exist in the interceptor interface corresponding to the interceptor interface identifier, the executing entity can call a general message processing method to parse the asynchronous event message and obtain the associated system identifier, associated transaction identifier, and associated service identifier. This ensures the success rate of business processing.
[0057] Step S204: Determine the target service based on the associated system identifier, associated transaction identifier, and associated service identifier.
[0058] The executing entity can find the associated transaction corresponding to the associated transaction identifier in the transactions involved in the associated system corresponding to the associated system identifier, and then find the associated service corresponding to the associated service identifier from the various associated services bound to the associated transaction and use it as the target service.
[0059] Step S205: Obtain the service configuration data corresponding to the target service from the configuration center, and perform business linkage service processing based on the service configuration data.
[0060] Specifically, the business processing method also includes: real-time monitoring of the configuration center's status, and issuing alarm messages when the status is abnormal. This ensures timely response when the configuration center's status is abnormal, improving business processing efficiency and accuracy.
[0061] Figure 3 This is a schematic diagram illustrating a business processing method according to an embodiment of this application. Figure 3 As shown, the main system receives various service requests, calls the interceptor to intercept each service request, and sends EDA messages to the target downstream system (e.g., downstream system A, downstream system B, or downstream system C) so that the target downstream system processes the corresponding business based on the EDA messages. The business contact configuration center (the server of the business contact configuration center can be the execution entity in this embodiment) connects the main system and the downstream system. The main system specifies the business EDA business linkage specifications, and the downstream system receives the EDA and processes the business linkage according to the specifications. The business contact configuration center can be dynamically refreshed online, realizing the main system | interceptor | transaction request | EDA | downstream system | business linkage rules service.
[0062] System-level interceptors for transaction requests: The interceptor pattern is a commonly used design pattern that allows you to add new functionality to objects without modifying existing code. In asynchronous message notification schemes, we can use the interceptor pattern to implement message processing and dispatching.
[0063] The following is an implementation of an asynchronous message notification business processing method based on the interceptor pattern.
[0064] Define a message interface with methods for sending messages; create a message handler interface with methods for processing messages; create an interceptor interface with methods for processing messages; and create a message handler factory to create message handler instances.
[0065] Implement a concrete interceptor: Implement a concrete message handler: Use the interceptor pattern to send asynchronous messages.
[0066] A cross-system-level business linkage configuration center is designed for the main system to register and publish relevant EDA and business linkage rules, and to allow downstream systems to subscribe to EDA and execute business linkage services. The configuration center supports online dynamic updates and enables hot-swapping at the system, transaction, and service levels. The configuration center implements the following functions: Configuration Management: Publishes APIs supporting CRUD operations on configurations. Version Control: Records historical configuration versions for easy rollback and upgrades. Dynamic Updates: When configuration changes, the server generates a summary value and pushes it to each subscriber client. The client uses this summary value to check changes in its local cached configuration summary value in near real-time. If the summary value differs from the server's, the client automatically retrieves the configuration and updates its local cache, achieving dynamic configuration updates. Access Control: Configuration publishing and subscription support role-based access control to ensure the security of configuration data. Monitoring and Alerting: Monitors the status of the configuration center in real-time and issues timely alerts for anomalies.
[0067] The main system defines the EDA business linkage specifications: The main system registers and publishes relevant EDA and business linkage rules and services in the configuration center according to the following rules: Main System | Interceptor | Transaction Request | EDA | Downstream System | Business Linkage Rule Service. Define Message Channel: Operation Type: Description: Add, Modify, Delete; Required. Platform: Description: Empty. Logical Subsystem: Description: Chinese name of the logical subsystem, Required. Component Name: Required. Security Node Number: Description: Security node number corresponding to the event transmission channel node, Required. Event Transmission Channel Node ID: Description: Uniquely identifies the event occurrence end / event processing engine / event application end, Required. Multiple Legal Entity Identifier: Description: Identifies the multiple legal entity identifiers for subscribing to / publishing events; each multiple legal entity identifier occupies one record, Required. Register EDA Message: Operation Type: Description: Add, Modify, Delete; Required. Event Code: Description: Unique event code, Required. Event Name: Description: Event name, Required, generally a noun / verb. Event Mode: 1. Data item length must be 2 characters; 2. Data item must consist of letters and numbers; 3. Data item content cannot be empty; 4. Data item options are: M1 / M2, where "M1" represents publish-subscribe mode and "M2" represents "one-to-one mode", with the default value being M1. Event Version: Description: Event version number, length 2, required. Publish Event Associated Service: Description: The online or transaction service ID associated with the event, required, fill in multiple if applicable. Publish Event Transmission Channel Node ID: Description: The node number corresponding to the publisher, required. Multiple Legal Entity Identifier: Description: The multiple legal entity identifier corresponding to the event publisher, required. Event Description: Description: Detailed description of the event, event content, required. Publish EDA Message Specification: Event Code: MQXXXXXXX; Multiple Legal Entity Identifier; Event Description; Event Message: Field Item Name, Chinese Name, Data Item Number, Input Length, Field Attribute, Required, Flags, Supplementary Explanation.
[0068] Downstream systems receive EDA and process business linkage according to specifications: Downstream systems subscribe to relevant EDA and business linkage rules in the configuration center according to the following rules, and execute business linkage services. Main System | Interceptor | Transaction Request | EDA | Downstream System | Business Linkage Rule Service. Subscribe to EDA Event Messages: Operation Type: Description: Add, Modify, Delete; Required. Subscribe to Event Transmission Channel Node ID: Description: Subscriber's own, Required. Multiple Legal Entity Identifier: Description: Multiple legal entity identifiers corresponding to the event subscriber, Required. Event Code: Description: Subscribed event code, Required; event code of the source published event. Event Name: Description: Subscribed event name, Required; event name of the source published event. Subscribe to Event Associated Services: Description: Online or transaction service ID associated with event subscription and subsequent processing, Required, fill in multiple if applicable. Subscribe to Event Topic: Description: Subscribed event topic, optional. Execute Business Linkage: After the downstream system subscribes to and receives the EDA, it obtains the corresponding service from the configuration center and executes the business linkage service processing.
[0069] Establish a cross-system-level business linkage configuration center. This center allows the main system to register and publish relevant EDA (Electronic Data Acquisition) rules and business linkage rules, and enables downstream systems to subscribe to EDA and execute business linkage services. The configuration center supports online dynamic updates and enables hot-swapping at the system, transaction, and service levels. System-level and transaction-level EDA message notification specifications are defined. The service execution capability for business linkage is implemented, enhancing the service reusability of linked businesses. It is non-intrusive to business processes. Utilizing the interceptor pattern, it can be implemented in large-scale applications without redundant development. The application adapter pattern allows for parameterized configuration, adapting to multiple business function modules and possessing scalability. Asynchronous messaging ensures it is seamlessly integrated into existing business processes. (The last sentence is a repetition of the previous one and can be omitted.)
[0070] The Interceptor pattern is a commonly used software engineering design pattern that allows projects to add new functionality to business modules or transactions without modifying existing code. It's used to perform pre-processing / post-processing on applications before or after handling requests or responses. The Interceptor pattern has three important elements: a scheduler, interceptors, and business logic. The scheduler is responsible for scheduling interceptors, and interceptors are responsible for intercepting business code and performing operations before and after the business code. Interceptors do not directly call business code to avoid coupling. After processing its own logic, the interceptor notifies the scheduler, which is responsible for subsequent operations—whether to continue intercepting or call the business logic. Asynchronous messaging is a message passing method characterized by the fact that clients do not need to wait indefinitely for messages from the server. Events are used here to trigger messages from the server, and message passing will succeed even if the client is closed. This means that asynchronous message passing is a unidirectional communication method, and the communication flow is one-way. The asynchronous processing mechanism sends messages to a queue, where message receivers process them asynchronously. This differs from synchronous processing mechanisms, which continuously acquire and process messages in a loop, waiting for event handling functions to process them synchronously. Asynchronous operations can also effectively solve problems such as long-term blocking of interfaces while waiting for results. For example, suppose the business logic of an interface only takes 50ms to execute, but the message notification takes 500ms. If the calls are made sequentially, the interface may be blocked for a long time while waiting for results. Asynchronous operations can effectively decouple these problems. In some complex cases, multithreading can be used to implement asynchronous messages, and the message sending logic can be executed in a separate asynchronous thread. This application's embodiment combines the interceptor pattern, adapter pattern, EDA messages, and asynchronous processing mechanisms to achieve non-intrusive linkage of business processes. A cross-system-level business linkage configuration center is established, supporting online refresh, seamless system expansion, and hot-swapping at the system, transaction, and service levels. By combining the interceptor pattern, adapter pattern, and (event-driven architecture) EDA messages, a unified interceptor is added to the application's functional processing logic. The adapter pattern is used to adapt to different business modules, which can be parameterized, supports hot-swapping, and triggers business processing to send EDA messages.
[0071] Figure 4 This is a schematic diagram of the configuration center architecture for a business processing method according to an embodiment of this application. Figure 4 As shown, the configuration center adopts a client-server architecture. The client obtains configuration from the server, and the server is responsible for storing and providing configuration data. The configuration center also adopts a layered architecture, separating the data layer and application services to facilitate maintenance and expansion.
[0072] Figure 5This is a schematic diagram of the main units of a service processing apparatus according to an embodiment of this application. Figure 5 As shown, the service processing device 500 includes a first acquisition unit 501, a second acquisition unit 502, a parsing unit 503, a target service determination unit 504, and an execution unit 505.
[0073] The first acquisition unit 501 is configured to acquire the corresponding event transmission channel node identifier and interceptor interface identifier in response to a business processing request.
[0074] The second acquisition unit 502 is configured to acquire the corresponding asynchronous event message based on the event transmission channel node identifier and the interceptor interface identifier.
[0075] The parsing unit 503 is configured to obtain the message processing method corresponding to the interceptor interface identifier, and then parse the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier.
[0076] The target service determination unit 504 is configured to determine the target service based on the associated system identifier, the associated transaction identifier, and the associated service identifier.
[0077] Execution unit 505 is configured to obtain service configuration data corresponding to the target service from the configuration center, and to perform business linkage service processing based on the service configuration data.
[0078] In some embodiments, the second acquisition unit 502 is further configured to: acquire asynchronous event messages transmitted via the transmission channel corresponding to the transmission channel node identifier from the interface corresponding to the interceptor interface identifier.
[0079] In some embodiments, the business processing apparatus further includes Figure 5 The update unit, not shown, is configured to: generate a summary value of the changed configuration in response to a configuration change in the configuration center; and send the summary value to the target subscriber client so that the target subscriber client updates the corresponding locally cached data layer based on the summary value.
[0080] In some embodiments, the business processing apparatus further includes Figure 5 The access verification unit, not shown, is configured to: in response to a configuration change operation in the configuration center, display a pop-up window prompting access verification information; obtain feedback information from the user based on the access verification information, query the registered user database based on the feedback information, and in response to the query result being non-empty, determine that the access verification has passed and execute the process of obtaining the service configuration data corresponding to the target service from the configuration center; in response to the query result being empty, display an access permission message.
[0081] In some embodiments, the business processing apparatus further includes Figure 5The alarm unit, not shown, is configured to: monitor the status of the configuration center in real time, and issue an alarm message in response to an abnormal status.
[0082] In some embodiments, the target service determination unit 504 is further configured to: determine the associated transaction corresponding to the associated transaction identifier in the associated system corresponding to the associated system identifier; and determine the associated service corresponding to the associated service identifier under the associated transaction as the target service.
[0083] It should be noted that the business processing method and business processing device in this application are related in terms of specific implementation content, so repeated content will not be described again.
[0084] Figure 6 An exemplary system architecture 600 is shown that can be applied to the business processing method or business processing apparatus of the embodiments of this application.
[0085] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 serves as the medium for providing communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0086] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0087] Terminal devices 601, 602, and 603 can be various electronic devices with business processing screens and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0088] Server 605 can be a server providing various services, such as a backend management server supporting business processing requests submitted by users using terminal devices 601, 602, and 603 (this is just an example). The backend management server can respond to business processing requests by obtaining the corresponding event transmission channel node identifier and interceptor interface identifier; obtaining the corresponding asynchronous event message based on the event transmission channel node identifier and interceptor interface identifier; obtaining the message processing method corresponding to the interceptor interface identifier, and then parsing the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier; determining the target service based on the associated system identifier, associated transaction identifier, and associated service identifier; and obtaining the service configuration data corresponding to the target service from the configuration center to execute business linkage service processing based on the service configuration data. Business processing is performed based on the interceptor pattern and event-driven architecture, improving business processing efficiency.
[0089] It should be noted that the business processing method provided in this application embodiment is generally executed by server 605, and correspondingly, the business processing device is generally set in server 605.
[0090] It should be understood that Figure 6 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0091] The following is for reference. Figure 7 It shows a schematic diagram of the structure of a computer system 700 suitable for implementing a terminal device according to the embodiments of this application. Figure 7 The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0092] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the computer system 700. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0093] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0094] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by central processing unit (CPU) 701, it performs the functions defined above in the system of this application.
[0095] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. Computer-readable storage media can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0097] The units described in the embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including a first acquisition unit, a second acquisition unit, a parsing unit, a target service determination unit, and an execution unit. The names of these units do not necessarily limit the specific unit itself.
[0098] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the device responds to a business processing request by: obtaining the corresponding event transmission channel node identifier and interceptor interface identifier; obtaining the corresponding asynchronous event message based on the event transmission channel node identifier and interceptor interface identifier; obtaining the message processing method corresponding to the interceptor interface identifier; and then parsing the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier; determining the target service based on the associated system identifier, associated transaction identifier, and associated service identifier; and obtaining the service configuration data corresponding to the target service from the configuration center to perform business linkage service processing based on the service configuration data.
[0099] The computer program product of this application includes a computer program that, when executed by a processor, implements the business processing method in the embodiments of this application.
[0100] According to the technical solution of the embodiments of this application, business processing is performed based on the interceptor pattern and event-driven architecture, thereby improving business processing efficiency.
[0101] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A business processing method, characterized in that, include: In response to a business processing request, obtain the corresponding event transmission channel node identifier and interceptor interface identifier; Based on the event transmission channel node identifier and the interceptor interface identifier, the corresponding asynchronous event message is obtained; wherein, the service requests sent from the event transmission channel corresponding to each event transmission channel node identifier are obtained from the interceptor interface and assembled into an asynchronous event message; Obtain the message processing method corresponding to the interceptor interface identifier, and then parse the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier; The target service is determined based on the associated system identifier, the associated transaction identifier, and the associated service identifier; Obtain the service configuration data corresponding to the target service from the configuration center, and perform business linkage service processing based on the service configuration data.
2. The method according to claim 1, characterized in that, The step of obtaining the corresponding asynchronous event message includes: Obtain asynchronous event messages transmitted via the transmission channel corresponding to the transmission channel node identifier from the interface corresponding to the interceptor interface identifier.
3. The method according to claim 1, characterized in that, The method further includes: In response to a configuration change in the configuration center, a summary value of the changed configuration is generated; The digest value is sent to the target subscriber client so that the target subscriber client updates the corresponding locally cached data layer based on the digest value.
4. The method according to claim 1, characterized in that, Before obtaining the service configuration data corresponding to the target service from the configuration center, the method further includes: In response to a configuration change operation on the configuration center, a pop-up window prompts access verification information; Obtain feedback information from the user based on the access verification information, query the registered user database based on the feedback information, and if the query result is not empty, determine that the access verification is successful and execute the process of obtaining the service configuration data corresponding to the target service from the configuration center; if the query result is empty, prompt the user with no access permission information.
5. The method according to claim 1, characterized in that, The method further includes: The status of the configuration center is monitored in real time, and an alarm message is issued in response to an abnormal status.
6. The method according to claim 1, characterized in that, The determination of the target service includes: Determine the associated transaction corresponding to the associated transaction identifier within the associated system corresponding to the associated system identifier; The associated service corresponding to the associated service identifier under the associated transaction is identified as the target service.
7. A business processing device, characterized in that, include: The first acquisition unit is configured to acquire the corresponding event transmission channel node identifier and interceptor interface identifier in response to a business processing request. The second acquisition unit is configured to acquire the corresponding asynchronous event message based on the event transmission channel node identifier and the interceptor interface identifier; wherein, it acquires service requests sent from the event transmission channel corresponding to each event transmission channel node identifier from the interceptor interface and assembles them into asynchronous event messages; The parsing unit is configured to obtain the message processing method corresponding to the interceptor interface identifier, and then parse the asynchronous event message according to the message processing method to determine the associated system identifier, associated transaction identifier, and associated service identifier; The target service determination unit is configured to determine the target service based on the associated system identifier, the associated transaction identifier, and the associated service identifier; The execution unit is configured to obtain service configuration data corresponding to the target service from the configuration center, and to perform business linkage service processing based on the service configuration data.
8. The apparatus according to claim 7, characterized in that, The second acquisition unit is further configured to: Obtain asynchronous event messages transmitted via the transmission channel corresponding to the transmission channel node identifier from the interface corresponding to the interceptor interface identifier.
9. The apparatus according to claim 7, characterized in that, The device further includes an update unit configured to: In response to a configuration change in the configuration center, a summary value of the changed configuration is generated; The digest value is sent to the target subscriber client so that the target subscriber client updates the corresponding locally cached data layer based on the digest value.
10. The apparatus according to claim 7, characterized in that, The device further includes an access verification unit, configured to: In response to a configuration change operation on the configuration center, a pop-up window prompts access verification information; Obtain feedback information from the user based on the access verification information, query the registered user database based on the feedback information, and if the query result is not empty, determine that the access verification is passed and execute the process of obtaining the service configuration data corresponding to the target service from the configuration center. If the query result is empty, an access permission message will be displayed.
11. The apparatus according to claim 7, characterized in that, The device also includes an alarm unit configured to: The status of the configuration center is monitored in real time, and an alarm message is issued in response to an abnormal status.
12. The apparatus according to claim 7, characterized in that, The target service determination unit is further configured to: Determine the associated transaction corresponding to the associated transaction identifier within the associated system corresponding to the associated system identifier; The associated service corresponding to the associated service identifier under the associated transaction is identified as the target service.
13. A business processing electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.
14. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.
Citation Information
Patent Citations
SYSTEM AND DEVICE FOR GUARANTEED EXACT ONE-TIME PROCESSING OF AN EVENT IN A DIVIDED EVENT-POWERED ENVIRONMENT
BE1024939B1
End-user application customization using rules
CN101410824A