Business system based on component, business processing method, equipment and storage medium

By adopting component-based design in the business system, clarifying the responsibilities of each component and interacting through interfaces, the problems of serious code scattered, repetitive and coupling in the hierarchical architecture are solved, and the efficient, stable and easy-to-scaling of the business system is achieved.

CN119806858APending Publication Date: 2025-04-11CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411720235.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The hierarchical architecture in the prior art has problems such as scattered code distribution, repetition of code, poor universality, serious coupling and difficulty in scaling in business system design.

Method used

Using component-based business system design, by defining the first component, the second component and the third component, the responsibilities of each component are clarified, and loose coupling is achieved through interface interaction. Specifically, the first component is responsible for the business processing logic, the second component is responsible for the input and output of the business services, and the third component is used to start the business services. Each component implements logical processing and result output through interface calls and mapping relationship tables.

Benefits of technology

Through this design, code duplication is avoided, loose coupling is achieved, and the universality and scalability of the system is enhanced, making the business system more efficient and stable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806858A_ABST
    Figure CN119806858A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a component-based business system, a business processing method, equipment and a storage medium, the business system comprises a first component, a second component and a third component; the third component is connected with the second component and is used for sending notification information for starting the business service to the second component; the second component is connected with the first component, and is used for inputting service content to the first component after receiving the notification information, calling a target interface exposed by the first component, and outputting a processing result according to a processing logic realized by the target interface based on the service content and the service content; and the second component is connected with the third component and is used for returning the processing result to the third component. According to the method, responsibilities of all parts of the business system are strictly standardized, the problems of scattered code distribution and repeated codes can be avoided, meanwhile, through an interface-based component interaction mode, each component can be easily changed or replaced, loose coupling is achieved, and the system is high in universality and easy to expand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a component-based business system, a business processing method, a device, and a storage medium. Background Art

[0002] With the rapid advancement of science and technology, the business complexity and data volume in various fields are growing explosively. In this case, the efficient and stable operation of business systems is crucial to business processing in various fields.

[0003] In response to the above problems, related technologies usually use a layered architecture to design business systems. However, the layered architecture has the following shortcomings: the code is scattered throughout the system and can be easily damaged; many common functions need to be repeatedly built in different services, resulting in various wastes of costs; the architecture mainly relies on specific scenarios and cannot be universally applied to other scenarios; the modules in the system have poor independence, affect each other, and are severely coupled; the dependencies between the modules in the system are confusing, and there is often a situation where the business logic layer depends on the infrastructure layer, making it difficult to update and expand the system.

[0004] Therefore, the layered architecture of related technologies has problems such as scattered code distribution, code duplication, poor universality, severe coupling and difficulty in expansion. Summary of the invention

[0005] In view of this, the present disclosure provides a component-based business system, a business processing method, a device, and a storage medium to solve the problems of scattered code distribution, code duplication, poor universality, severe coupling, and difficulty in expansion in the layered architecture of related technologies.

[0006] In a first aspect, the present disclosure provides a component-based business system, the business system comprising: a first component, a second component and a third component, wherein the first component is used to implement business processing logic, the second component is used to implement input and output of business services, and the third component is used to start business services;

[0007] The third component is connected to the second component and is used to send notification information of starting the business service to the second component;

[0008] The second component is connected to the first component, and is used to input service content to the first component after receiving the notification information, and call the target interface exposed by the first component, and output the processing result according to the processing logic implemented by the target interface based on the service content and the service content;

[0009] The second component is connected to the third component and is used to return the processing result to the third component.

[0010] In the disclosed embodiment, a component-based business system is developed, and the business system includes: a first component, a second component and a third component, wherein the first component is used to implement business processing logic, the second component is used to implement the input and output of business services, and the third component is used to start business services; the third component is connected to the second component, and is used to send notification information of starting business services to the second component; the second component is connected to the first component, and is used to input service content to the first component after receiving the notification information, and call the target interface exposed by the first component, and output the processing result according to the processing logic and service content implemented based on the target interface; the second component is connected to the third component, and is used to return the processing result to the third component. Since the disclosed embodiment strictly regulates the responsibilities of each part of the business system, the code with the same responsibility can be in the same component instead of being scattered everywhere, avoiding code duplication, and at the same time, through the interface-based component interaction method, each component can be easily changed or replaced, realizing loose coupling, making the system universal and easy to expand.

[0011] In an optional implementation, the first component includes: a first subcomponent and a second subcomponent, wherein the first subcomponent is used to integrate the logic implementation of each entity in the business service, and the second subcomponent is used to organize the parameters required for the business service to run the complete business logic in the application phase;

[0012] The second subcomponent is connected to the first subcomponent and is used to call the entity method according to the parameters to implement the business logic process.

[0013] In the disclosed embodiment, the business processing logic can be implemented through the first component, wherein the logic implementation of each entity in the business service can be integrated through the first subcomponent, and the parameters required for the business service to run the complete business logic in the application phase can be organized through the second subcomponent. The method of the entity of the first subcomponent is called through the parameters of the second subcomponent to implement the business logic process.

[0014] In an optional implementation, the second subcomponent includes: a system use case, wherein the system use case is used to represent a complete process of a business operation initiated by a user, and the system use case is written based on an internal domain specific language and an external domain specific language, the internal domain specific language is used to simplify input validation, and the external domain specific language is used to manage distributed transactions;

[0015] The system use case is connected to the first subcomponent and is used to call the method interface of the entity in the first subcomponent to implement the business logic process.

[0016] In the disclosed embodiment, the complete process of the business operation initiated by the user can be represented by the system use case, and the system use case can be written by the internal domain specific language and the external domain specific language, wherein the internal domain specific language can simplify input validation, and the external domain specific language can manage distributed transactions, thereby simplifying the way of operating distributed transactions and improving programming efficiency. The business logic process can be realized by calling the method interface of the entity in the first subcomponent through the system use case.

[0017] In an optional implementation, the first subcomponent includes: a domain model and a domain service, wherein the domain model is used to implement core logic involving a single entity, and the domain service is used to implement complex logic involving multiple entities;

[0018] The second subcomponent is connected to the domain service and is used to call the processing logic methods of multiple entities in the domain service according to the system use case;

[0019] The domain service is connected to the domain model and is used to call the processing logic methods of a single entity in the domain model based on the processing logic methods of multiple entities.

[0020] In the disclosed embodiment, the core logic involving a single entity can be implemented through the domain model, and the complex logic involving multiple entities can be implemented through the domain service. The processing logic methods of multiple entities in the domain service can be called through the system use case of the second subcomponent, and the processing logic method based on multiple entities in the domain service can call the processing logic method of a single entity in the domain model.

[0021] In an optional implementation, the first subcomponent further includes: a first preset interface, wherein the first preset interface is used to call resource information.

[0022] In the disclosed embodiment, resource information can be called through the first preset interface to achieve model persistence and improve programming efficiency.

[0023] In an optional implementation, the second subcomponent also includes: a preset component and a second preset interface, wherein the preset component is used to implement a conversion mechanism of the system between different applications, and the second preset interface is used to implement a logical flow for business services under a preset scenario.

[0024] In the disclosed embodiment, the system can realize the conversion mechanism between different applications through the preset components, ensuring that the design of the new application is not restricted by the legacy application and the business logic and data integrity are not damaged. The second preset interface can realize the logical process of the business service in the preset scenario.

[0025] In a second aspect, the present disclosure provides a business processing method, which is applied to a component-based business system, and includes:

[0026] Upon receiving a notification message for starting a business service, obtaining the input service content;

[0027] Read the mapping relationship table according to the service content to obtain the target interface for implementing the processing logic, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table;

[0028] According to the service content and target interface, the output processing result is obtained.

[0029] In the disclosed embodiment, when receiving the notification information of starting the business service, the input service content is obtained; the mapping relationship table is read according to the service content to obtain the target interface for implementing the processing logic, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table; and the output processing result is obtained according to the service content and the target interface. Since the disclosed embodiment strictly regulates the responsibilities of each part of the business system, the code with the same responsibility can be in the same component instead of being scattered everywhere, avoiding code duplication. At the same time, through the interface-based component interaction method, each component can be easily changed or replaced to achieve loose coupling, making the system universal and easy to expand.

[0030] In a third aspect, the present disclosure provides a device for business processing, the device comprising:

[0031] The acquisition module is used to acquire the input service content when receiving the notification information of starting the business service;

[0032] The first obtaining module is used to read the mapping relationship table according to the service content to obtain the target interface for implementing the processing logic, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table;

[0033] The second obtaining module is used to obtain the output processing result according to the service content and the target interface.

[0034] In a fourth aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the business processing method of the second aspect above by executing the computer instructions.

[0035] In a fifth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the business processing method of the second aspect described above.

[0036] In a sixth aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the business processing method of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0038] Figure 1 is a schematic diagram of a framework of a component-based business system according to an embodiment of the present disclosure;

[0039] Figure 2 is a flowchart of a system use case according to an embodiment of the present disclosure;

[0040] Figure 3 is a flowchart of a domain specific language according to an embodiment of the present disclosure;

[0041] Figure 4 is a flowchart of a method for business processing according to an embodiment of the present disclosure;

[0042] Figure 5 is a flowchart of a method for business processing according to another embodiment of the present disclosure;

[0043] Figure 6 is a structural block diagram of a device for business processing according to an embodiment of the present disclosure;

[0044] Figure 7 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0046] With the rapid advancement of science and technology, the business complexity and data volume in various fields are growing explosively. In this case, the efficient and stable operation of business systems is crucial to business processing in various fields.

[0047] In response to the above problems, related technologies usually use a layered architecture to design business systems. However, the layered architecture has the following shortcomings: the code is scattered throughout the system and can be easily damaged; many common functions need to be repeatedly built in different services, resulting in various wastes of costs; the architecture mainly relies on specific scenarios and cannot be universally applied to other scenarios; the modules in the system have poor independence, affect each other, and are severely coupled; the dependencies between the modules in the system are confusing, and there is often a situation where the business logic layer depends on the infrastructure layer, making it difficult to update and expand the system.

[0048] In order to solve the above problems, according to an embodiment of the present disclosure, a component-based business system embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0049] In this embodiment, a component-based business system is provided, such as Figure 1 As shown, Figure 1 is a schematic diagram of a framework of a component-based business system according to an embodiment of the present disclosure, the framework can be applied to a server, including: a first component, a second component and a third component, wherein the first component is used to implement business processing logic, the second component is used to implement input and output of business services, and the third component is used to start business services;

[0050] The third component is connected to the second component and is used to send notification information of starting the business service to the second component;

[0051] The second component is connected to the first component, and is used to input service content to the first component after receiving the notification information, and call the target interface exposed by the first component, and output the processing result according to the processing logic implemented by the target interface based on the service content and the service content;

[0052] The second component is connected to the third component and is used to return the processing result to the third component.

[0053] Alternatively, if Figure 1 As shown, in the embodiment of the present disclosure, the business system includes a first component (corresponding to label 1), a second component (corresponding to label 2) and a third component (corresponding to label 3). The first component is a business processing component, which is used to implement business processing logic; the second component is an external component, also known as an input and output component or adapter, which is used to implement the input and output of business services; the third component is a service startup item component, which is used to start business services.

[0054] Specifically, the server first sends a notification message to start the business service to the external component through the service startup item component, and then, after receiving the notification message, the external component inputs the service content to the business processing component, and calls the target interface exposed by the business processing component, outputs the processing result according to the processing logic and service content implemented based on the target interface, and finally returns the processing result to the service startup item component through the external component.

[0055] It should be noted that the external components may include Representational State Transfer (REST) ​​components, User Interface (UI) components, message processing components, and other components for input and output.

[0056] In the disclosed embodiment, a component-based business system is developed, and the business system includes: a first component, a second component and a third component, wherein the first component is used to implement business processing logic, the second component is used to implement the input and output of business services, and the third component is used to start business services; the third component is connected to the second component, and is used to send notification information of starting business services to the second component; the second component is connected to the first component, and is used to input service content to the first component after receiving the notification information, and call the target interface exposed by the first component, and output the processing result according to the processing logic and service content implemented based on the target interface; the second component is connected to the third component, and is used to return the processing result to the third component. Since the disclosed embodiment strictly regulates the responsibilities of each part of the business system, the code with the same responsibility can be in the same component instead of being scattered everywhere, avoiding code duplication, and at the same time, through the interface-based component interaction method, each component can be easily changed or replaced, realizing loose coupling, making the system universal and easy to expand.

[0057] In some optional implementations, the first component includes: a first subcomponent and a second subcomponent, wherein the first subcomponent is used to integrate the logic implementation of each entity in the business service, and the second subcomponent is used to organize the parameters required for the business service to run the complete business logic in the application phase;

[0058] The second subcomponent is connected to the first subcomponent and is used to call the entity method according to the parameters to implement the business logic process.

[0059] Alternatively, if Figure 1 As shown, in the embodiment of the present disclosure, the first component includes a first subcomponent (corresponding to reference numeral 101) and a second subcomponent (corresponding to reference numeral 102). The first subcomponent is a domain model component, which is used to integrate the logical implementation of each entity in the business service; the second subcomponent is an application service component, which is used to organize the parameters required by the business service to run the complete business logic in the application stage.

[0060] Specifically, the server calls the entity method of the business processing component according to the parameters of the domain model component to implement the business logic process.

[0061] It should be noted that the domain model component is a component used to describe the implementation of business use cases. It is an abstraction of the business roles and business entities that perform business through connection and collaboration. This component analyzes the problem domain itself, discovers important business domain concepts, and ultimately establishes the relationship between business domain concepts. The application service component is a component used to coordinate business logic. This component is responsible for receiving external requests and coordinating the domain model component to perform business processing.

[0062] The framework provides basic design constraints and technical support for domain model components. All domain-related types, including entities, domain services, repositories, and aggregations, need to be designed and implemented according to the specifications provided by the framework, that is, all custom types must inherit these base classes to run properly. Taking entities as an example, an abstract class named EntityBase is provided in the domain model component. All user-defined entities in the application service component must inherit from this base class to use the capabilities provided by the framework (such as model self-validation, object comparison, etc.). For example, the addRule() method is defined by inheriting EntityBase to implement model self-validation rules.

[0063] In the disclosed embodiment, the business processing logic can be implemented through the first component, wherein the logic implementation of each entity in the business service can be integrated through the first subcomponent, and the parameters required for the business service to run the complete business logic in the application phase can be organized through the second subcomponent. The method of the entity of the first subcomponent is called through the parameters of the second subcomponent to implement the business logic process.

[0064] In some optional implementations, the second subcomponent includes: a system use case, wherein the system use case is used to represent the complete process of a business operation initiated by a user, and the system use case is written based on an internal domain specific language and an external domain specific language, the internal domain specific language is used to simplify input validation, and the external domain specific language is used to manage distributed transactions;

[0065] The system use case is connected to the first subcomponent and is used to call the method interface of the entity in the first subcomponent to implement the business logic process.

[0066] Alternatively, if Figure 1 As shown, in the embodiment of the present disclosure, the second subcomponent includes a system use case (corresponding to label 102 - 1 ), and the system use case is used to represent the complete process of the business operation initiated by the user.

[0067] Specifically, the server calls the method interface of the entity in the domain model component through the system use case to implement the business logic process.

[0068] It should be noted that when implementing traditional system use cases, exception handling, input validation, logging, business warnings, output formatting (such as data desensitization) and other processes must be considered. In response to the above requirements, this embodiment provides support in the form of abstract classes and annotations. For example, when alerting for exceptions in user registration services, if an error of the MailException type occurs when sending an email, the system will automatically send an alert message to the business monitoring system according to the configuration in the annotation @Warning to notify the operation and maintenance personnel to intervene and handle it in a timely manner.

[0069] like Figure 2 As shown, Figure 2 It is a flow chart of the system use case according to the embodiment of the present disclosure. All system use cases will go through a series of nodes when they are executed. The server uses the reflection mechanism provided by aspect-oriented programming (AOP) and Java language. First, after the client initiates the service, the system use case object will perform a series of pre-filter processing before working, and then after the system use case method is executed, it will also pass through a group of post-filters, and finally return the processing result (return value) to the client.

[0070] The framework contains predefined system use cases. Programmers can use predefined system use cases or extend them to implement custom system use cases. For example, the domain model component provides an abstract class named ApplicationServiceBase. System use cases can use the capabilities provided by the framework by inheriting from this base class. Among them, ApplicationServiceBase predefines a set of global filters, which programmers can extend in system use cases. The extension can be based on all system use cases (global filters) or specific system use case types or methods (local filters). In the predefined post-filter, @Desensitization is used to declare the processing method for information desensitization; the phase parameter is used to indicate the processing stage; the value of the phase parameter is post, indicating that the processing stage is after the execution of the system use case; the fields parameter is used to indicate which field in the return value needs to be desensitized, and the process parameter is used to specify the desensitization processor to be used.

[0071] It should be explained that the system use case is written based on the domain specific language (DSL). The domain specific language includes internal domain specific language and external domain specific language. The internal domain specific language is used to simplify input validation, and the external domain specific language is used to manage distributed transactions.

[0072] like Figure 3 As shown, Figure 3 is a flowchart of a domain specific language according to an embodiment of the present disclosure:

[0073] In the first step, the programmer writes the DSL in a text editor or an integrated development environment (IDE) and saves the edited DSL as a file with the extension *.tm;

[0074] In the second step, the server uses the grammar editor generator (JavaCC is used in this embodiment) to perform grammar analysis and verification on the input DSL. This process involves two important operations: lexical analysis and grammatical analysis. This embodiment encapsulates this, so the programmer only needs to care about the specific DSL and does not need to consider the details of the analysis;

[0075] In the third step, the server uses the generated abstract syntax tree to build the corresponding semantic model, where the semantic model refers to the transaction manager, domain commands, and domain events.

[0076] In the fourth step, the server assembles the semantic model, and the assembled semantic model can work normally.

[0077] In addition, the framework will automatically run a self-check program to verify whether the constructed results are correct. The verification here uses the comparative verification method: prepare a set of test data, assemble the semantic model using programming, let the two semantic models read the test data respectively and compare the results after running. For the processing of verification results, the framework provides two configuration methods for users to choose: throw an exception when an error occurs or provide an error message when the service starts.

[0078] More specifically, external domain-specific languages ​​are used to manage distributed transactions (Saga), using a custom language instead of Java. For example, when configuring a Saga transaction of "10 points added to the account after an order is generated (orders and accounts belong to two different services)", the server will publish an orderCreated event after the order is generated, which is subscribed to by the Saga transaction manager. According to the declaration of the event_triggers code block, the state of the business process will be changed to ORDER_CREATED, and the increase points interface of the account service will be called to process the points. Among them, the etries attribute declares the number of retries, and the command indicates the type of command to be used; when the increase of points fails, an early warning notification is sent by calling the interface of the message service to inform the operation staff to intervene in time to solve the current transaction failure.

[0079] In the disclosed embodiment, the complete process of the business operation initiated by the user can be represented by the system use case, and the system use case can be written by the internal domain specific language and the external domain specific language, wherein the internal domain specific language can simplify input validation, and the external domain specific language can manage distributed transactions, thereby simplifying the way of operating distributed transactions and improving programming efficiency. The business logic process can be realized by calling the method interface of the entity in the first subcomponent through the system use case.

[0080] In some optional implementations, the first subcomponent includes: a domain model and a domain service, wherein the domain model is used to implement core logic involving a single entity, and the domain service is used to implement complex logic involving multiple entities;

[0081] The second subcomponent is connected to the domain service and is used to call the processing logic methods of multiple entities in the domain service according to the system use case;

[0082] The domain service is connected to the domain model and is used to call the processing logic methods of a single entity in the domain model based on the processing logic methods of multiple entities.

[0083] Alternatively, if Figure 1 As shown, in the embodiment of the present disclosure, the first subcomponent includes a domain model (corresponding to label 101-1) and a domain service (corresponding to label 101-2). The domain model is used to implement the core logic involving a single entity, and the domain service is used to implement the complex logic involving multiple entities.

[0084] Specifically, the server calls the processing logic method of a single entity in the domain model based on the processing logic method of multiple entities through the application service component, and calls the processing logic method of a single entity in the domain model based on the processing logic method of multiple entities through the domain service.

[0085] In the disclosed embodiment, the core logic involving a single entity can be implemented through the domain model, and the complex logic involving multiple entities can be implemented through the domain service. The processing logic methods of multiple entities in the domain service can be called through the system use case of the second subcomponent, and the processing logic method based on multiple entities in the domain service can call the processing logic method of a single entity in the domain model.

[0086] In some optional implementations, the first subcomponent further includes: a first preset interface, wherein the first preset interface is used to call resource information.

[0087] Alternatively, if Figure 1 As shown, in the embodiment of the present disclosure, in addition to the domain model and domain service mentioned in the above embodiment, the first subcomponent also includes a first preset interface (corresponding to label 101-3). The first preset interface is a resource library interface for calling resource information.

[0088] Specifically, the repository interface is a persistence component. In this embodiment, the object used for persistence is defined as Repository, which is business-related and uses the domain model as the operation object. An abstract class named RepositoryBase is provided in the domain model component, and all custom implementations need to inherit from this base class. The unit of work (UnitOfWork) object defined in the base class encapsulates the transactions of the relational database. The programmer does not need to consider the implementation of specific transactions, and the framework can automatically complete the processing. All kinds of objects that the custom Repository depends on are provided by the framework. On this basis, the programmer can also add more capabilities by extending RepositoryBase.

[0089] In the disclosed embodiment, resource information can be called through the first preset interface to achieve model persistence and improve programming efficiency.

[0090] In some optional implementations, the second subcomponent also includes: a preset component and a second preset interface, wherein the preset component is used to implement a conversion mechanism of the system between different applications, and the second preset interface is used to implement a logical flow for business services under a preset scenario.

[0091] Alternatively, if Figure 1 As shown, in the embodiment of the present disclosure, in addition to the system use case mentioned in the above embodiment, the second subcomponent also includes a preset component (corresponding to label 102-2) and a second preset interface (corresponding to label 102-3). The preset component is an anti-corrosion component, which is used to implement the conversion mechanism between different applications of the system; the second preset interface is a basic capability interface, which is used to implement the logical process of the business service under the preset scenario.

[0092] Specifically, the basic capability interfaces include remote procedure calls, domain event / command publishing and response, email / SMS sending, business warnings, and message monitoring interfaces.

[0093] In the disclosed embodiment, the system can realize the conversion mechanism between different applications through the preset components, ensuring that the design of the new application is not restricted by the legacy application and the business logic and data integrity are not damaged. The second preset interface can realize the logical process of the business service in the preset scenario.

[0094] In this embodiment, a method for business processing is also provided. Figure 4 As shown, Figure 4 : is a flow chart of a method for business processing according to an embodiment of the present disclosure, and the flow can be applied to a server, including the following steps:

[0095] Step S401: upon receiving notification information for starting a business service, obtaining input service content.

[0096] Alternatively, if Figure 5 As shown, in the embodiment of the present disclosure, the server performs framework initialization after the service is started, and scans external components to obtain input service content.

[0097] Step S402, reading a mapping relationship table according to the service content to obtain a target interface for implementing the processing logic, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table.

[0098] Alternatively, if Figure 5 As shown, in the embodiment of the present disclosure, the server establishes a mapping relationship table according to the relationship between the definition and implementation in the service content, and loads the mapping relationship table into the mapping cache, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table. Then, the server reads the mapping relationship table in the mapping cache, and calls the corresponding interface according to the service content to obtain the target interface that implements the processing logic.

[0099] Step S403, obtaining an output processing result according to the service content and the target interface.

[0100] Alternatively, if Figure 5 As shown, in the embodiment of the present disclosure, the server performs external implementation or default implementation according to the service content and the target interface to obtain the output processing result.

[0101] In the disclosed embodiment, when receiving the notification information of starting the business service, the input service content is obtained; the mapping relationship table is read according to the service content to obtain the target interface for implementing the processing logic, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table; and the output processing result is obtained according to the service content and the target interface. Since the disclosed embodiment strictly regulates the responsibilities of each part of the business system, the code with the same responsibility can be in the same component instead of being scattered everywhere, avoiding code duplication. At the same time, through the interface-based component interaction method, each component can be easily changed or replaced to achieve loose coupling, making the system universal and easy to expand.

[0102] In this embodiment, a device for business processing is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0103] This embodiment provides a device for service processing, such as Figure 6 As shown, including:

[0104] The acquisition module 601 is used to acquire the input service content when receiving the notification information of starting the business service;

[0105] The first obtaining module 602 is used to read the mapping relationship table according to the service content to obtain the target interface for implementing the processing logic, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table;

[0106] The second obtaining module 603 is used to obtain the output processing result according to the service content and the target interface.

[0107] In the disclosed embodiment, when receiving the notification information of starting the business service, the input service content is obtained; the mapping relationship table is read according to the service content to obtain the target interface for implementing the processing logic, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table; and the output processing result is obtained according to the service content and the target interface. Since the disclosed embodiment strictly regulates the responsibilities of each part of the business system, the code with the same responsibility can be in the same component instead of being scattered everywhere, avoiding code duplication. At the same time, through the interface-based component interaction method, each component can be easily changed or replaced to achieve loose coupling, making the system universal and easy to expand.

[0108] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0109] The business processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0110] The present disclosure also provides a computer device having the above Figure 6 The business processing device shown.

[0111] See also Figure 7 , Figure 7 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0112] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0113] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0114] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0115] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0116] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0117] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0118] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0119] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A component-based business system, characterized in that: The business system includes: a first component, a second component and a third component, wherein the first component is used to implement business processing logic, the second component is used to implement input and output of business services, and the third component is used to start business services; The third component is connected to the second component and is used to send notification information of starting a business service to the second component; The second component is connected to the first component, and is used to input service content to the first component after receiving the notification information, and call the target interface exposed by the first component, and output the processing result according to the processing logic implemented by the target interface based on the service content and the service content; The second component is connected to the third component and is used to return the processing result to the third component.

2. The business system according to claim 1, characterized in that: The first component includes: a first subcomponent and a second subcomponent, wherein the first subcomponent is used to integrate the logic implementation of each entity in the business service, and the second subcomponent is used to organize the parameters required for the business service to run the complete business logic in the application stage; The second subcomponent is connected to the first subcomponent and is used to call the method of the entity according to the parameters to implement the business logic process.

3. The business system according to claim 2, characterized in that: The second subcomponent includes: a system use case, wherein the system use case is used to represent the complete process of a business operation initiated by a user, the system use case is written based on an internal domain specific language and an external domain specific language, the internal domain specific language is used to simplify input validation, and the external domain specific language is used to manage distributed transactions; The system use case is connected to the first sub-component and is used to call the method interface of the entity in the first sub-component to implement the business logic process.

4. The business system according to claim 3, characterized in that: The first subcomponent includes: a domain model and a domain service, wherein the domain model is used to implement core logic involving a single entity, and the domain service is used to implement complex logic involving multiple entities; The second subcomponent is connected to the domain service and is used to call the processing logic methods of multiple entities in the domain service according to the system use case; The domain service is connected to the domain model and is used to call the processing logic method of a single entity in the domain model based on the processing logic methods of the multiple entities.

5. The business system according to claim 4, characterized in that: The first subcomponent also includes: a first preset interface, wherein the first preset interface is used to call resource information.

6. The business system according to claim 3, characterized in that: The second subcomponent also includes: a preset component and a second preset interface, wherein the preset component is used to implement a conversion mechanism between different applications of the system, and the second preset interface is used to implement a logical flow for business services under a preset scenario.

7. A business processing method, characterized in that: The business processing method is applied to a component-based business system, and the method includes: Upon receiving a notification message for starting a business service, obtaining the input service content; Reading a mapping relationship table according to the service content to obtain a target interface for implementing the processing logic, wherein the mapping relationship between the business service and the integration interface is stored in the mapping relationship table; According to the service content and the target interface, an output processing result is obtained.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the business processing method described in claim 7 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the business processing method described in claim 7.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the business processing method according to claim 7.