Service processing method and device

By using business containers and service bus mechanisms, the problem of high component coupling in traditional software architecture is solved, achieving loose coupling between components, improving system response speed and processing efficiency, and enhancing maintainability and scalability.

CN120803764APending Publication Date: 2025-10-17KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510702416.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Traditional software architectures have high component coupling, require complex dependency management, and are prone to memory leaks or callback confusion.

Method used

The system employs a business container and service bus mechanism. Events are received by the business container and distributed to the corresponding business modules. The business modules then distribute the events to various business components. The business components communicate with each other through the service bus. The business modules aggregate the execution results and send them to the business container to generate response results.

Benefits of technology

It improves the system's response speed and processing efficiency, reduces the risk of memory leaks and callback confusion, and enhances the system's maintainability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120803764A_ABST
    Figure CN120803764A_ABST
Patent Text Reader

Abstract

The invention provides a business processing method and device, and the method comprises the steps: receiving an event corresponding to a business through a business container, and transmitting the event to a corresponding business module; the event is distributed to each business component through the business module, so that each business component respectively executes business logic corresponding to the event, and messages are sent to other associated business components through the business component via the service bus to realize communication between the business components; the execution results of all the service components are aggregated through the service module and sent to the service container, the response results to the events are generated through the service container according to the execution results of all the service components, and the problems that in a traditional architecture, the component coupling degree is high, dependence management is complex, and memory leakage and call-back disorder exist are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of software communication technology, and in particular to a business processing method and device. BACKGROUND

[0002] In the field of software development, especially in mobile application development, architecture design is crucial for the maintainability, scalability and performance of the application. Traditional software architecture takes MVC architecture as an example. The MVC architecture generally divides the application into three core components: Model: can contain data and business logic of multiple modules. For example, an application has user management, product catalog, order processing and other modules, each module has its own model.

[0003] View: composed of multiple components, which can belong to different modules. For example, a page contains user information components, product list components and shopping cart components, each component is part of the view.

[0004] Controller: responsible for coordinating the interaction between the model and the view, including components within the module. The controller can handle user input from components within a specific module and update the view of that module.

[0005] In the MVC architecture, components or modules are highly coupled and not easily split or modularized. In complex business scenarios, different components or modules need to communicate frequently, for example, a component on a page needs to real-time acquire or respond to the state or data changes of other components. In the prior art, component communication can be achieved by manually creating observer patterns, proxy patterns, notification centers, etc. However, these methods sometimes require complex dependency management and are prone to memory leaks or callback chaos. SUMMARY

[0006] The present application provides a business processing method and device to solve the defects of high component coupling, complex dependency management and easy memory leaks or callback chaos in the prior art.

[0007] The present application provides a business processing method for a business processing system, the business processing system comprising a business container and a plurality of business modules, each business module comprising a plurality of business components, the business components communicating through a service bus; the method comprising: receiving an event corresponding to the business through the business container, and sending the event to the corresponding business module; The event is distributed to each business component through the business module, so that each business component respectively executes the business logic corresponding to the event, and the business component sends a message to other associated business components through the service bus, thereby realizing the communication between the business components; The execution results of each business component are aggregated by the business module and sent to the business container, and the business container generates a response result to the event according to the execution results of each business component.

[0008] According to the business processing method provided by the application, the business processing system further comprises a control center, and the control center comprises a plurality of global message distributors; and the plurality of global message distributors are respectively one-to-one corresponding to the plurality of business modules. The event corresponding to the business is received by the business container, and the event is sent to the corresponding business module, specifically comprising: The event corresponding to the business is received by the business container, and the event is sent to the corresponding business module, specifically comprising: According to the determined business module corresponding to the event, the event is sent to the corresponding business module through the global message distributor corresponding to the business module.

[0009] According to the business processing method provided by the application, the business module further comprises a framework event manager; and the framework event manager is respectively in communication connection with the business components of the business module. The event is distributed to each business component through the business module, specifically comprising: The event is received by the framework event manager, and the event is distributed to each business component of the business module through the framework event manager.

[0010] According to the business processing method provided by the application, the control center further comprises a module registration center; and before the event corresponding to the business is received by the business container, the method further comprises: when the business module is started, the business components of each business module are registered to the module registration center, so as to determine the event corresponding to the business component.

[0011] According to the business processing method provided by the application, the event comprises at least one of the following: a page destruction event, a page retreat to the background event of a mobile phone, and an increase data item event. The business component comprises at least one of the following: an input box input information, a pop-up input box, an increase page element, a data verification, a calculation and a state update. The communication between the business components comprises at least one of the following: a request data, a notification state change and a coordination operation.

[0012] The processing method of the service provided by the application, in the case that a plurality of service components are located in a plurality of service modules, aggregates the execution results of each service component by the service module and sends to the service container, specifically comprising: aggregating the execution results of the corresponding service components by each service module, and sending the aggregated execution results to the service container by each service module.

[0013] The processing method of the service provided by the application, the service processing system comprises a module registration factory; before receiving the event corresponding to the service by the service container, the method further comprises: initializing the module registration factory in the service container, and registering each service module into the module registration factory; the service module comprises at least one of: a new house service module, a second-hand house service module and a rental house service module.

[0014] The application further provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the processing method of the service according to any one of the above when executing the program.

[0015] The application further provides a non-transitory computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the processing method of the service according to any one of the above.

[0016] The application further provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the processing method of the service according to any one of the above.

[0017] The processing method and device of the service provided by the application receive events by the service container, distribute them to the corresponding service modules, and then distribute them to each service component by the service module, so that each service component can process events in parallel, improving the response speed and processing efficiency of the system. The service components communicate with each other through the service bus, realizing loose coupling between components, reducing the risk of memory leakage and callback confusion. In addition, the service module is responsible for aggregating the execution results of each service component and sending them to the service container, and the service container generates the response result to the event, which not only improves the accuracy of data processing, but also enhances the maintainability and scalability of the system. The processing method of the service provided by the application effectively solves the problems of high coupling degree of components, complex dependency management, memory leakage and callback confusion in the traditional architecture. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.

[0019] Figure 1 is a schematic diagram of a service processing system provided by an embodiment of the present application.

[0020] Figure 2 is a flowchart of a service processing method provided by an embodiment of the present application.

[0021] Figure 3 is a structural schematic diagram of a service processing apparatus provided by an embodiment of the present application.

[0022] Figure 4 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to make the objects, technical solutions and advantages of the present application clearer, the following will combine the drawings in the present application to clearly and completely describe the technical solutions in the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present application.

[0024] First, the service processing system involved in the present embodiment is schematically explained. Referring to Figure 1 , the service processing system includes a control center and a module registration factory. The control center includes a global message distributor and a module registration center, and the module registration factory includes a plurality of service modules, such as service module A and service module B. Each service module includes a framework event manager and a plurality of components. The service components of each service module are registered to the module registration center to determine the events corresponding to the service components. During the registration process, the service components need to provide sufficient information so that the global message distributor can identify and route the events. This includes the identifier of the service component, the type of event it listens to, etc.

[0025] 1) Control center Composition: includes a global message distributor and a module registration center; Function: as the core coordinator of the system, the control center is responsible for receiving events, distributing events to corresponding service modules, and realizing inter-module communication through the global message distributor.

[0026] 2) Global message distributor Composition: Multiple message distributors, each corresponding to a business module; Function: Receive events from the control center and distribute them to the corresponding business module. It ensures that events are quickly and accurately delivered to the modules that need to handle them.

[0027] 3) Module Registration Center Composition: Service Bus; Function: Manages the registration information of business modules, allowing the control center to identify and call the correct module. It is also responsible for service requests and responses between components.

[0028] 4) Module Registration Factory Composition: A collection of business modules, such as new house business module, second-hand house business module, and rental house business module; Function: Initialize in the business container and register each business module into the factory. This way, the system can easily manage and access different business modules.

[0029] 5) Business Module (Module A, Module B, etc.) Composition: Business logic, framework event manager, business components (such as product manager, price calculator, inventory checker, etc.); Function: Handle specific business logic. Business modules distribute events to their internal business components through the framework event manager and communicate with other modules' components through the service bus.

[0030] 6) Framework Event Manager Composition: Communicates with business components of the business module; Function: Receives events and distributes them to each business component within the business module, ensuring that components can execute corresponding business logic.

[0031] 7) Business Component Composition: Specific business processing units, such as product manager, price calculator, inventory checker, etc.; Function: Execute specific business logic, such as data verification, calculation, state update, etc. Business components communicate with other components through the service bus to synchronize data and state.

[0032] 8) Service Bus (ServiceBus) Composition: Communication intermediary between components; Function: Allows business components to communicate through protocols in a loosely coupled manner without knowing the existence of other components. ServiceBus is responsible for routing messages or requests to the correct components.

[0033] The embodiment of the application discloses a service processing method for a service processing system. Referring to Figure 2 , the method comprises: 201, receiving the event corresponding to the service through the service container, and sending the event to the corresponding service module.

[0034] A user performs an operation through a user interface (UI), such as clicking a button or submitting a form, triggering a service event, for example, a "user order request". The user interface layer (View) captures the user operation and encapsulates it as an event object. This object contains all the information related to the user operation, such as user ID, product ID, purchase quantity, etc.

[0035] The service container receives the event object from the user interface layer and encapsulates it to facilitate transmission and processing in the system. The encapsulation includes adding metadata such as timestamp, event type, source module, etc.

[0036] The service container identifies the type of event object and determines which service module the event belongs to. This is usually achieved through the type identifier or content in the event object.

[0037] The service container sends the event object to the corresponding service module according to the predefined routing rules. The routing rules are based on event type, business domain or other business logic requirements.

[0038] The service container looks for a service module matching the event type in its registered module list. This step involves a module registration center, which maintains a mapping relationship between event types and modules.

[0039] Once the target service module is determined, the service container sends the event object to the module through the global message dispatcher. The global message dispatcher ensures that the event can be quickly and accurately delivered to the correct module. Specifically, step 201 comprises: receiving the event corresponding to the service through the service container, and determining the service module corresponding to the event; according to the determined service module corresponding to the event, sending the event to the corresponding service module through the global message dispatcher corresponding to the service module.

[0040] In some cases, the sending and processing of events are asynchronous to improve the performance and response speed of the system.

[0041] In addition, after receiving the event, the service module can also send an acknowledgement signal to the service container indicating that the event has been received and is ready for processing. This helps the service container to track the event status and perform error handling.

[0042] 202. The event is distributed to each business component through the business module, so that each business component executes the business logic corresponding to the event, and the business component sends a message to other associated business components through the service bus, to realize the communication between the business components.

[0043] Wherein, the event includes at least one of: page destruction event, page retreat to the background event of mobile phone, increase data item event; the business component includes at least one of: input box input information, pop-up input box, increase page element, data verification, calculation and state update; the communication between the business components includes at least one of: request data, notify state change and coordinate operation.

[0044] The business module receives events from the business container through the global message distributor. Then, the business module identifies the type of the received event, determines which business components are needed to handle this event. The business module can preprocess the event data to adapt to the needs of component processing.

[0045] The framework event manager in the business module is responsible for distributing events to each business component of the business module. Each business component registers to listen to the event types that they are interested in. When the framework event manager distributes events, it checks which components have registered for the event type.

[0046] Each business component that receives an event executes its corresponding business logic. For example, if the event is "user order request", the commodity manager component checks the inventory, and the price calculator component calculates the total price.

[0047] In the process of executing business logic, the business component may find that it needs to communicate with other components to obtain data or services.

[0048] The business component that needs communication sends a message to other components through the service bus. The message contains a request for data, a notification of state change, or a request for coordination operation. The service bus routes the message to the correct business component according to the type and target of the message. After receiving the message, the target business component executes the corresponding processing logic.

[0049] If the business component sends a request message, it needs to process the response from other components. This involves updating the internal state or continuing to execute the business logic.

[0050] Through step 202, the business module can coordinate its internal components to handle events, and the components can effectively communicate through the service bus. This design improves the flexibility and maintainability of the system, making it easier to add new functions or modify existing functions. At the same time, it also ensures that each part of the system can work efficiently to meet complex business needs.

[0051] 203、The business module aggregates the execution results of each business component and sends them to the business container. The business container generates a response result for the event based on the execution results of each business component.

[0052] After distributing the event to each business component, the business module begins collecting the execution results after the components process the event. These results include data updates, calculation results, state changes, etc.

[0053] The business module verifies the collected execution results to ensure they meet the expected format and data integrity. This step helps ensure data accuracy and reliability.

[0054] The business module integrates the verified results to form a unified response to the original event. This involves data merging, formatting, or further logical processing.

[0055] During the integration process, the business module detects whether any exceptions or errors occur. If so, it needs to record these exceptions and decide how to handle them according to business rules. For exceptions that cannot be handled, the business module needs to generate an error response and send it to the business container.

[0056] The business module sends the integrated execution results or error response to the business container. This step involves data transmission through a service bus or other communication mechanism.

[0057] The business container receives the execution results from the business module. It needs to further process the results, such as logging, performance monitoring, etc.

[0058] The business container generates the final response to the original event based on the execution results sent by the business module. This includes updating the user interface, notifying the user, triggering other business processes, etc. The business container distributes the final response to the components or modules that need it, such as the user interface layer, external systems, or other business modules. If the final response involves updating the user interface, the user will receive feedback, such as a message indicating the operation was successful, updated data display, etc.

[0059] The business container records logs of the entire event processing process, including event reception, component execution, result aggregation, and final response generation. The business container monitors the performance of the entire processing process to ensure the system operates within acceptable performance ranges.

[0060] The service processing method provided by the embodiment of the application receives an event through a service container, distributes the event to a corresponding service module, and then distributes the event to each service component by the service module, so that each service component can process the event in parallel, thereby improving the response speed and processing efficiency of the system. The service components communicate with each other through a service bus, realizing loose coupling between the components, reducing the risk of memory leakage and callback confusion. In addition, the service module is responsible for aggregating the execution results of each service component and sending the execution results to the service container, and the service container generates a response result to the event, which not only improves the accuracy of data processing, but also enhances the maintainability and scalability of the system. The service processing method provided by the application effectively solves the problems of high component coupling, complex dependency management, memory leakage and callback confusion in the traditional architecture.

[0061] Further, before the event corresponding to the service is received by the service container, the method further comprises: when the service module is started, registering the service components of each service module to the module registration center, for determining the event corresponding to the service component.

[0062] During the registration process, the component needs to provide sufficient information so that the global message distributor can identify and route the event. This includes the identifier of the component, the type of event it listens to, etc.

[0063] When the application is started or the service module is activated, the service module starts the initialization process.

[0064] The service module identifies all service components inside it during the startup process. These components are predefined or dynamically created when the module is initialized. The service module prepares registration information for each service component, which includes the identifier of the component, the type of event it can handle, the required resources or services, etc. The service module registers the service components in the system through the service bus or direct access to the module registration center.

[0065] The service module sends the registration information of the service components to the module registration center. The registration center records this information so that it can identify and notify the correct service component when an event occurs.

[0066] During the registration process, the module registration center maps the service components to the types of events they can handle. In this way, when a specific event occurs, the system knows which components should be notified. The module registration center sends confirmation information to the service module after successfully registering the service components. This ensures that the service components are ready to receive and process events.

[0067] After registration, the business components set up listeners to events they are interested in. This way, when these events occur, the business components can receive notifications and respond. If errors occur during registration, the business module needs to handle these errors. This involves retrying registration, logging error messages, or notifying system administrators. Once all business components have successfully registered, the business module and the entire system are ready to handle upcoming events.

[0068] Additionally, before receiving the events corresponding to the business through the business container, the method further comprises: initializing a module registration factory in the business container, and registering each of the business modules into the module registration factory; the business modules comprise at least one of: a new house business module, a second-hand house business module, and a rental house business module.

[0069] At application startup, the business container is initialized as a core component, ready to receive and distribute events. In the business container, a module registration factory is initialized. This factory is responsible for managing the registration and lifecycle of business modules.

[0070] In the module registration factory, each business module is registered into the system. This involves providing the module's configuration information, dependencies, and other initialization parameters. The module registration factory records the registration information of each business module, including the module's identifier, provided services, dependent components, etc. The module registration factory resolves the dependencies between business modules, ensuring that modules can correctly call other modules when they need their services.

[0071] Once registration is complete, the business modules are ready to start. This includes loading necessary resources, initializing internal states, etc. The business container starts each business module based on the registration information. After the modules are started, they can begin receiving and processing events. After the modules are started, the business container configures the communication mechanism between modules, ensuring that they can effectively communicate through the service bus.

[0072] Further, in the case where multiple business components are located in multiple business modules, the execution results of the business components are aggregated by the business modules and sent to the business container, specifically including: the execution results of the corresponding business components are aggregated by each business module, and the aggregated execution results are sent to the business container by each business module.

[0073] Suppose there is a second-hand house trading platform, and a user has completed a second-hand house purchase transaction. This transaction processing involves multiple business modules, including a "user management module", a "property information module", a "transaction processing module", and a "notification module".

[0074] The user confirms the purchase of the second-hand house on the interface, triggering a "transaction confirmation" event. The business container receives the "transaction confirmation" event and distributes it to the relevant business modules.

[0075] Among them, the user management module: verifies user identity and purchase eligibility; the property information module: checks the availability of the property and confirms the property information; the transaction processing module: handles transaction details such as payment, contract generation, etc.; the notification module: prepares transaction confirmation notifications, including email and SMS notifications.

[0076] After each module completes its business logic, the execution results are aggregated. For example: the user management module returns the status of the user's purchase eligibility; the property information module returns the current status and information of the property; the transaction processing module returns the detailed records and status of the transaction; the notification module returns the status of the notification sending. The aggregated execution results of each business module are sent to the business container. These results include transaction success, user information, property information, transaction details, and notification sending status.

[0077] The business container receives all the aggregated results of the modules and generates the final response to the "transaction confirmation" event. This includes updating the user interface to display the transaction status, recording the transaction log, and triggering subsequent business processes such as property transfer procedures.

[0078] The business container distributes the final response to the necessary components, such as the user interface component, to inform the user of the results of the transaction processing. The user interface displays transaction confirmation information, including transaction status, property information, and subsequent steps.

[0079] The business container records the entire transaction processing process, including event reception, component execution, result aggregation, and final response generation. The business container monitors the performance of the entire processing process to ensure that the system operates within an acceptable performance range.

[0080] The above example demonstrates how multiple business modules work together to handle the transaction confirmation event in a second-hand house transaction platform, and aggregate the execution results of each module to generate a final response to the user. This design ensures the integrity and consistency of transaction processing, while providing comprehensive monitoring and management of the transaction processing process.

[0081] In order to further understand the technical solutions of the embodiments, in combination with Figure 1 Taking a new house business as an example, the processing method flow of the business of the embodiment is schematically explained.

[0082] In the new house business, the user needs to browse new house information, make an appointment to see the house, submit a purchase intention, sign a purchase contract, and a series of operations. These operations require different modules of the system to work together to complete the entire business process.

[0083] The user selects a new house project on the user interface of the new house service module and clicks the "make an appointment to see a house" button, triggering a "make an appointment to see a house request" event.

[0084] The service container receives the "make an appointment to see a house request" event and identifies that the new house service module is needed to handle this event.

[0085] The service container sends the "make an appointment to see a house request" event to the new house service module through the global message dispatcher.

[0086] The framework event manager within the new house service module receives the event and distributes it to relevant business components, such as the "new house information manager" and the "appointment manager".

[0087] New house information manager: Check the availability and details of the new house.

[0088] Appointment manager: Handle the user's appointment request, check the user's appointment eligibility, and arrange the viewing time.

[0089] If necessary, the business component sends a message to other components, such as the "user notification component", through the ServiceBus to send an appointment confirmation notification.

[0090] The new house service module aggregates the execution results of all business components, including new house information, appointment status and notification sending status. The new house service module sends the aggregated execution results back to the service container.

[0091] The service container generates a final response to the "make an appointment to see a house request" event based on the aggregated results, which may include updating the user interface to display the appointment status, recording the appointment log, and triggering subsequent business processes such as preparing the housing contract.

[0092] The service container distributes the final response to the user interface component to inform the user of the results of the appointment to see a house. The user interface displays the confirmation information of the appointment to see a house, including the appointment time, location and new house information.

[0093] The service container records the log of the entire appointment to see a house processing process, including event reception, component execution, result aggregation and final response generation. The service container monitors the performance of the entire processing process to ensure that the system runs within an acceptable performance range.

[0094] The following describes the business processing device provided by the embodiment of the application. The business processing device described below can be referred to in conjunction with the business processing method described above.

[0095] The embodiment of the application provides a business processing device, referring to Figure 3 , comprising: The event sending module 301 is configured to receive the event corresponding to the service through the service container, and send the event to the corresponding service module. The component execution module 302 is configured to distribute the event to each service component through the service module, so that each service component executes the service logic corresponding to the event, and the service component sends a message to other associated service components through the service bus, thereby realizing the communication between the service components. The result generation module 303 is configured to aggregate the execution results of each service component through the service module and send the execution results to the service container, and generate a response result to the event according to the execution results of each service component through the service container.

[0096] Optionally, the event sending module 301 is specifically configured to receive the event corresponding to the service through the service container, and determine the service module corresponding to the event; and send the event to the corresponding service module through the global message distributor corresponding to the service module according to the determined service module corresponding to the event.

[0097] Optionally, the component execution module 302 is specifically configured to receive the event through the framework event manager, and distribute the event to each service component of the service module through the framework event manager.

[0098] Optionally, the result generation module 303 is specifically configured to, in a case where a plurality of service components are located in a plurality of service modules, respectively aggregate the execution results of the corresponding service components through each service module, and send the aggregated execution results to the service container through each service module.

[0099] Figure 4 An example of an entity structure diagram of an electronic device is shown in FIG. 1. Figure 4As shown, the electronic device can include a processor 410, a communications interface 420, a memory 430, and a communications bus 440, wherein the processor 410, the communications interface 420, and the memory 430 complete communications with each other through the communications bus 440. The processor 410 can invoke a logic instruction in the memory 430 to execute a processing method of a service, the method including: receiving an event corresponding to the service through the service container, and sending the event to a corresponding service module; distributing the event to each service component through the service module, so that each service component respectively executes service logic corresponding to the event, and sends a message to other associated service components through the service component via the service bus, to realize communication between the service components; aggregating execution results of each service component through the service module and sending to the service container, and generating a response result to the event according to the execution results of each service component through the service container.

[0100] In addition, the logic instruction in the memory 430 described above can be implemented in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part of the technical solutions that essentially contribute to the prior art or the part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0101] In another aspect, the present application also provides a computer program product comprising a computer program, which, when executed by a processor, enables a computer to perform the processing method of a service provided by the above-mentioned methods, the method comprising: receiving, by the service container, an event corresponding to the service, and sending the event to a corresponding service module; distributing, by the service module, the event to each service component, so that each service component respectively executes service logic corresponding to the event, and sending, by the service component, a message to other associated service components via the service bus, to realize communication between the service components; aggregating, by the service module, execution results of each service component and sending to the service container, and generating, by the service container, a response result to the event according to the execution results of each service component.

[0102] In another aspect, the present application also provides a computer program product comprising a computer program, which, when executed by a processor, enables a computer to perform the processing method of a service provided by the above-mentioned methods, the method comprising: receiving, by the service container, an event corresponding to the service, and sending the event to a corresponding service module; distributing, by the service module, the event to each service component, so that each service component respectively executes service logic corresponding to the event, and sending, by the service component, a message to other associated service components via the service bus, to realize communication between the service components; aggregating, by the service module, execution results of each service component and sending to the service container, and generating, by the service container, a response result to the event according to the execution results of each service component.

[0103] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0104] Those skilled in the art can clearly understand the technical solutions of the various embodiments from the above description of the embodiments, and the various embodiments can be implemented by means of software with the necessary general hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that makes a contribution, can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in the various embodiments or some parts of the embodiments.

[0105] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for processing a business, characterized in that: Used in a business processing system, the business processing system includes a business container and multiple business modules, each business module includes multiple business components, and the business components communicate with each other through a service bus; The method comprises: Receive the event corresponding to the business through the business container, and send the event to the corresponding business module; Distributing the event to each business component through the business module so that each business component executes the business logic corresponding to the event, and sending messages to other related business components via the service bus to achieve communication between the business components; The execution results of the various business components are aggregated by the business module and sent to the business container, and the business container generates a response result to the event according to the execution results of the various business components.

2. The service processing method according to claim 1, characterized in that: The business processing system further includes: a control center, the control center including a plurality of global message distributors; the plurality of global message distributors respectively correspond to the plurality of business modules one by one; Receiving an event corresponding to the business through the business container and sending the event to the corresponding business module specifically includes: Receiving an event corresponding to the business through the business container, and determining a business module corresponding to the event; According to the determined service module corresponding to the event, the event is sent to the corresponding service module via the global message distributor corresponding to the service module.

3. The service processing method according to claim 2, characterized in that: The business module further includes: a framework event manager; the framework event manager is respectively connected to the business components of the business module for communication; Distributing the event to each business component through the business module specifically includes: The framework event manager receives the event and distributes the event to each business component of the business module.

4. The service processing method according to claim 2, characterized in that: The control center also includes: a module registration center; Before receiving, through the business container, an event corresponding to the business, the method further includes: When the service module is started, the service components of each service module are registered with the module registration center to determine the events corresponding to the service components.

5. The service processing method according to claim 1, characterized in that: The event includes at least one of: a page destruction event, a page exiting to the mobile phone background event, and a data item addition event; The business component includes at least one of: inputting information into an input box, popping up an input box, adding page elements, data validation, calculation, and status update; The communication between the business components includes at least one of: requesting data, notifying state changes, and coordinating operations.

6. The service processing method according to claim 1, characterized in that: In the case where multiple business components are located in multiple business modules, the execution results of each of the business components are aggregated by the business modules and sent to the business container, specifically including: The execution results of the corresponding business components are aggregated through each of the business modules, and the aggregated execution results are sent to the business container through each of the business modules.

7. The service processing method according to claim 1, characterized in that: The business processing system includes a module registration factory; Before receiving, through the business container, an event corresponding to the business, the method further includes: Initialize a module registration factory in the business container, and register each of the business modules into the module registration factory; The business module includes at least one of: a new house business module, a second-hand house business module, and a rental business module.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the service processing method according to any one of claims 1 to 7 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the service processing method according to any one of claims 1 to 7 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the service processing method according to any one of claims 1 to 7 is implemented.