Business process processing method and system and server
By using annotation parameters in the Spring system to determine business process extension points and generate routing execution strategies, the problem of chaotic business process processing logic in existing technologies is solved. This enables automatic routing of business processes and differentiated calls between business processes, simplifying operations and reducing labor costs.
Patent Information
- Application Number
- CN202511142999.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, business process processing frameworks have a high entry barrier, resulting in chaotic business process processing logic, difficulty in achieving differentiated calls between business processes, and are not user-friendly for newcomers, requiring a large amount of manpower.
By using annotation parameters to determine business process extension points in the Spring system, generating routing execution strategies, and registering and executing business data in the Spring system using annotation parameters, automatic routing functionality is achieved, supporting the reuse of business process-related code and differentiated calls between business processes.
It enables automatic routing for differentiated logic adjustments within the same business process, simplifying operations, reducing labor costs, and improving the logical clarity and maintainability of the business process.
Smart Images

Figure CN120994243A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of business process backend development, and in particular to a business process processing method, system and server. Background Technology
[0002] During development, a single business process typically involves multiple business scenarios, requiring different handling methods to solve the same business problem depending on the scenario. Existing technologies use relevant processing frameworks to separate business processes from services, thereby achieving efficient business process processing. However, for some business processes with lower complexity that do not require visualization but still need to manage differentiated strategies to achieve isolation between business platform businesses, the commonly used processing frameworks have high learning curves and require significant manpower to master. This leads to the continued use of conventional business process processing models in existing scenarios, resulting in chaotic business process processing logic. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a business process processing method, system and server. When different business products in the same business process are adjusted for different logic, the method can complete the automatic routing function by simply annotating the parameters, without the need for additional settings. It can achieve the reuse of business process related code while also achieving isolated and differentiated calls between businesses. The method has clear logic and is simple to process, thus solving the above-mentioned problems existing in the prior art.
[0004] In a first aspect, embodiments of the present invention provide a business process processing method, the method comprising: Difference acquisition steps: Determine the business process based on the deployed Spring system, and determine the business process extension points by utilizing the business scenarios in the business process; Annotation setting steps: Determine the annotation parameters corresponding to the business process based on the attribute data of the business process extension point, and declare the annotation parameters to the Spring system; among them, the annotation parameters should at least include: directory parameters, extended parameters, and code parameters; Annotation execution steps: Use annotation parameters to determine the routing execution strategy of the business process in the Spring system, and rewrite the business data corresponding to the business process extension point into the Spring system according to the routing execution strategy; Business processing steps: Obtain the business call instruction corresponding to the business process, use the routing execution strategy to determine the business data corresponding to the business call instruction, and control the Spring system to execute the business process based on the business data.
[0005] Optionally, the difference acquisition steps include: Based on the business entity corresponding to the business scenario, obtain the corresponding business process in the Spring system and determine the business strategy corresponding to the business process; Use business strategies to identify the business scenarios included in the business processes, and obtain differentiated data between business scenarios based on the business strategies; Identify business process extension points corresponding to business processes using differentiated data.
[0006] Optionally, the annotation setup steps include: Obtain the attribute data corresponding to the business process extension point, and use the corresponding directory data in the attribute data to determine the directory parameters. The extension parameters are determined using the corresponding extension type data and extension package path data in the attribute data, and the code parameters are determined using the corresponding code listing data in the attribute data. The annotation parameters are determined based on the directory parameters, extended parameters, and code parameters, and then declared in the Spring system.
[0007] Optionally, annotation parameters are determined based on directory parameters, extended parameters, and code parameters, including: The startup annotation strategy corresponding to the Spring system is generated based on the directory parameters, and the first annotation parameter is determined according to the startup annotation strategy; Generate the corresponding tagging strategy for the Spring system based on the extended parameters, and determine the second annotation parameter according to the tagging strategy; Generate the corresponding extension tagging strategy for the Spring system based on the code parameters, and determine the third annotation parameters based on the extension tagging strategy; Annotation parameters are constructed using the first annotation parameter, the second annotation parameter, and the third annotation parameter.
[0008] Optionally, the annotation execution steps include: The type parameters corresponding to the annotation parameters determine the routing execution strategy of the business process in the Spring system; Based on the routing execution strategy, obtain the target registration interface in the Spring system corresponding to the directory parameters, extended parameters, and code parameters in the annotation parameters, and use the target registration interface to control the registration of annotation parameters to the Spring system; Retrieve business data corresponding to the business process extension point in the Spring system according to the type parameter, and control the rewriting of business data to the Spring system based on annotation parameters.
[0009] Optionally, the type parameters corresponding to the annotation parameters can be used to determine the routing execution strategy of the business process in the Spring system, including: The directory parameters included in the annotation parameters are determined based on the type parameters. The annotation startup strategy corresponding to the business process is determined using the directory parameters. The first routing strategy is determined based on the annotation startup strategy. The extended parameters contained in the annotation parameters are determined based on the type parameters. The extended parameters are used to determine the abstract process strategy corresponding to the business process. The second routing strategy is determined based on the abstract process strategy. The code parameters contained in the annotation parameters are determined based on the type parameters, the difference marking strategy corresponding to the business process is determined using the code parameters, and the third routing strategy is determined based on the difference marking strategy. The routing execution strategy for the business process in the Spring system is determined based on the first routing strategy, the second routing strategy, and the third routing strategy.
[0010] Optionally, based on the routing execution strategy, the target registration interface in the Spring system corresponding to the directory parameters, extended parameters, and code parameters in the annotation parameters is obtained, and the target registration interface is used to control the registration of annotation parameters to the Spring system, including: Based on the routing execution strategy, obtain the first target registration interface corresponding to the directory parameter, the second target registration interface corresponding to the extended parameter, and the third target registration interface corresponding to the code parameter in the annotation parameters; The directory parameters contained in the annotation parameters are determined based on the type parameters, and the directory parameters are registered to the Spring system using the first target registration interface. Based on the type parameter, the extended parameters contained in the annotation parameters are determined, and the registration interface of the second target is used to control the registration of the extended parameters to the Spring system; The code parameters contained in the annotation parameters are determined based on the type parameters, and the code parameters are registered to the Spring system using a third-target registration interface.
[0011] Optionally, the business processing steps include: Real-time monitoring of user call requests corresponding to business processes, and generation and acquisition of business call instructions corresponding to business processes based on user call requests; The routing execution strategy is used to obtain the business process extension point corresponding to the business call instruction, and the business data corresponding to the business process extension point is determined based on the Spring system. Obtain the code data corresponding to the business process based on the business data, and use the code data to control the Spring system to execute the business process.
[0012] Secondly, the present invention provides a business process processing system, the system comprising: The difference acquisition module is used to: determine business processes based on the deployed Spring system, and determine business process extension points using business scenarios in the business processes; The annotation setting module is used to: determine the annotation parameters corresponding to the business process based on the attribute data of the business process extension point, and declare the annotation parameters to the Spring system; wherein, the annotation parameters include at least: directory parameters, extended parameters, and code parameters; The annotation execution module is used to: determine the routing execution strategy of the business process in the Spring system using annotation parameters, and rewrite the business data corresponding to the business process extension point into the Spring system according to the routing execution strategy; The business processing module is used to: obtain the business call instructions corresponding to the business process, determine the business data corresponding to the business call instructions using the routing execution strategy, and control the Spring system to execute the business process based on the business data.
[0013] Thirdly, embodiments of the present invention also provide a server, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the business process processing method provided in the first aspect.
[0014] Fourthly, embodiments of the present invention also provide a storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the steps of the business process processing method provided in the first aspect.
[0015] This invention provides a business process processing method, system, and server. In addressing the differentiation issues of business processes, the method first determines the business process based on a deployed Spring system and identifies business process extension points using business scenarios within the process. Then, it determines the annotation parameters corresponding to the business process based on the attribute data of the extension points and declares these parameters in the Spring system. The annotation parameters include at least directory parameters, extension parameters, and code parameters. Subsequently, it uses the annotation parameters to determine the routing execution strategy for the business process in the Spring system and rewrites the business data corresponding to the extension points into the Spring system according to the routing execution strategy. Finally, it obtains the business call instruction corresponding to the business process, uses the routing execution strategy to determine the business data corresponding to the call instruction, and controls the Spring system to execute the business process based on the business data. This method enables automatic routing by simply annotating different business products within the same business process, without requiring additional settings. It achieves code reuse related to the business process while also ensuring isolated and differentiated calls between business processes. The method is logically clear and simple to process, thus solving the aforementioned problems in the prior art.
[0016] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 A flowchart of a business process processing method provided in an embodiment of the present invention; Figure 2 This is a flowchart of the difference acquisition step S101 in a business process processing method provided by an embodiment of the present invention; Figure 3 This is a flowchart of the annotation setting step S102 in a business process processing method provided by an embodiment of the present invention; Figure 4 A flowchart illustrating the process of determining annotation parameters based on directory parameters, extended parameters, and code parameters, provided in an embodiment of the present invention. Figure 5 This is a flowchart of the annotation execution step S103 in a business process processing method provided by an embodiment of the present invention; Figure 6 A flowchart of step S501 in a business process processing method provided in an embodiment of the present invention; Figure 7 A flowchart of step S502 in a business process processing method provided in an embodiment of the present invention; Figure 8 A flowchart of business processing step S104 in a business process processing method provided in an embodiment of the present invention; Figure 9 This invention provides a signaling diagram of a business process in a business process processing method. Figure 10 This is a schematic diagram of the structure of a business process processing system provided in an embodiment of the present invention; Figure 11This is a schematic diagram of the structure of a server provided in an embodiment of the present invention.
[0020] icon: 1010 - Difference Acquisition Module; 1020 - Annotation Setting Module; 1030 - Annotation Execution Module; 1040 - Business Processing Module; 101 - Processor; 102 - Memory; 103 - Bus; 104 - Communication interface. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] During development, the same business process typically involves multiple business scenarios, requiring different approaches to address the same business problem depending on the scenario. Regarding the issue of domain-specific differences, existing technologies employ specific design patterns (factory pattern, strategy pattern, etc.) or SPI (Service Provider Interface) to solve this problem. However, to achieve business isolation, most existing technologies use the SPI approach. This method utilizes plugin package registration to effectively isolate the platform from the business logic. For example, Alibaba's TMF framework can separate the platform and the business logic while simultaneously isolating the business logic from each other.
[0023] The frameworks described above offer numerous advantages and provide a comprehensive solution for isolating business processes while addressing differentiation issues. However, for business processes with lower complexity that don't require visualization but still necessitate managing differentiation strategies to achieve isolation between business platforms, these frameworks present the following problems: There are a lot of terms and concepts (horizontal business, vertical business, business capabilities, etc.) and model concepts (domain, domain capabilities, domain capability extension points, etc.), which are very unfriendly to newcomers. Because there are so many concepts and features, there is a lot of source code. Newcomers need to spend a lot of time reading the source code to understand it. Otherwise, they may not be able to solve problems such as how to register multiple extension points or how to call extension points. Sometimes, they may even find that the code does not execute as expected.
[0024] Therefore, when choosing technologies, people often shy away from the aforementioned frameworks. Perhaps due to time constraints, they end up opting for simpler design patterns or even if / else statements to execute different business logic in their daily code development. Over time, this leads to an ever-increasing number of if / else statements, making the code increasingly difficult to maintain. Furthermore, the lack of business logic isolation means that changes made to the logic of one product often affect other products, resulting in chaotic processing logic.
[0025] Based on this, the present invention provides a business process processing method, system, and server. When different business products in the same business process are adjusted for different logic, the method can complete the automatic routing function by simply performing annotation operations through annotation parameters without additional settings. This enables the reuse of business process-related code while achieving isolated and differentiated calls between businesses. The method has clear logic and is simple to process, thus solving the above-mentioned problems existing in the prior art.
[0026] To facilitate understanding of this embodiment, a business process processing method disclosed in this embodiment of the invention will first be described in detail, such as... Figure 1 As shown, the method includes: Difference acquisition step S101: Determine the business process based on the deployed Spring system, and determine the business process extension point using the business scenarios in the business process.
[0027] The core of this step is to identify the scalable locations of business processes within the existing Spring system, providing a foundation for subsequent customized development. First, the business process is determined based on the Spring system. Specifically, in a deployed Spring system, the business process is typically completed by multiple Spring Beans (such as Service layer components) collaborating through Dependency Injection (DI). By analyzing the call chain of Beans in the Spring container, configuration files (such as applicationContext.xml), or annotations (such as @Service and @Component), the complete business process chain can be identified.
[0028] In determining extension points through business scenarios, the business scenario is the specific manifestation of the business process under different conditions. Different scenarios may have different requirements for a certain step in the process. These steps that require differentiated handling are called "business process extension points".
[0029] Annotation setting step S102: Determine the annotation parameters corresponding to the business process based on the attribute data of the business process extension point, and declare the annotation parameters to the Spring system; wherein, the annotation parameters include at least: directory parameters, extension parameters, and code parameters.
[0030] This step standardizes the attributes of extension points through annotations, enabling the Spring system to recognize and manage these extension points. Specifically, the attribute data of an extension point includes its position in the process, supported extension types, associated business rules, etc. Based on these attributes, annotation parameters are abstracted to describe the core information of the extension point. Specifically, the above method is applied to Standard Operating Procedures (SOPs).
[0031] The core annotation parameters are explained in detail below: Directory parameters: Corresponding SOP package directory; Extended parameters: These correspond to the Sop extension type and extension package path, or the Sop's corresponding code and name; Code parameters: The corresponding bizCode (commercial code) supported by the extension.
[0032] When declaring annotations to the Spring system, you can define a custom annotation to mark extension points (such as @EnableSop, @Sop, @SopExtension), define the above parameters as attributes of the annotation, specify its scope through @Target, and then add the annotation to the interface / class corresponding to the extension point so that Spring can identify the extension point through the annotation scanning mechanism.
[0033] Annotation execution step S103: Use annotation parameters to determine the routing execution strategy of the business process in the Spring system, and rewrite the business data corresponding to the business process extension point into the Spring system according to the routing execution strategy.
[0034] This step is crucial for connecting the definition of extension points with actual business execution. It dynamically generates execution strategies through annotation parameters and ensures data consistency.
[0035] The routing execution strategy determines which extension point implementation should be invoked in a specific business scenario. The Spring system generates routing rules by parsing the "extension parameters" in annotation parameters and combining them with the business context. Common routing strategy implementations include: aspect interception based on Spring AOP (intercepting routing logic at the extension point) and dynamically retrieving matching beans from the ApplicationContext. The business data at the extension point needs to be synchronized to the Spring system context or the properties of the relevant beans to ensure that subsequent processes can use the extended data.
[0036] Business processing step S104: Obtain the business call instruction corresponding to the business process, use the routing execution strategy to determine the business data corresponding to the business call instruction, and control the Spring system to execute the business process based on the business data.
[0037] This step is the actual execution phase of the business process, which drives the Spring system to complete the final processing by integrating routing strategies and business data.
[0038] Business invocation instructions typically originate from external requests, triggering the entry point method in the Spring system. These instructions contain core business parameters. During execution, when an instruction is triggered, the Spring system, based on the parameters in the instruction and the routing execution strategy determined in S103, finds the corresponding extension point implementation and obtains the business data processed by that implementation.
[0039] When controlling the execution of business processes in a Spring system, based on the matched business data and extended implementations, the Spring system executes each stage of the process sequentially through the Bean call chain managed by the IOC container. During this process, the logic of the extended points is embedded into the original process, ultimately completing the entire business process.
[0040] Optionally, the difference acquisition step S101, such as Figure 2 As shown, it includes: Step S201: Obtain the corresponding business process in the Spring system based on the business entity corresponding to the business scenario, and determine the business strategy corresponding to the business process.
[0041] Business entities (such as Order and User) typically correspond to the domain model in a Spring system, and their behaviors are implemented by Service layer components. By analyzing the dependency relationships of entity classes and combining them with Spring's component scanning mechanism, the complete business process chain can be deduced in reverse. Specifically, this is done using Spring's BeanFactory.getBeansOfType(Class...) method. <t>The `type` method retrieves all beans related to the business entity, and then a business process diagram is constructed by analyzing the call chain of these beans.
[0042] Business strategies are the execution rules of a business process under different conditions. In the Spring system, strategies are usually represented by multiple beans that implement the same interface. By scanning beans with specific annotations or analyzing configuration files, the set of strategies corresponding to the business process can be identified.
[0043] Step S202: Use business strategies to determine the business scenarios included in the business process, and obtain differentiated data between business scenarios based on the business strategies.
[0044] During the extraction of business scenarios, since each business strategy usually corresponds to one or more business scenarios, the business process can be broken down into specific scenarios by analyzing the usage conditions or annotation parameters of the strategy class.
[0045] In the process of capturing and analyzing differentiated data, the differences between scenarios are manifested in the differences in input parameters, processing logic, or output results. The differentiated data features can be extracted by comparing the request parameters and the method logic of the strategy implementation class under different scenarios.
[0046] Step S203: Determine the business process extension point corresponding to the business process through differentiated data.
[0047] In specific scenarios, process steps that meet the following conditions can be defined as extension points: the same step has different implementations in different scenarios; it can be extended through external configuration or interfaces without modifying the original code; and the function of this step is relatively independent.
[0048] Extension points can be obtained based on interface extension points, identifying the SPI (Service Provider Interface) interface in the Spring system, with different implementation classes corresponding to different scenarios; they can also be obtained based on AOP extension points, embedding extension points at key nodes in the process and marking them with custom annotations; or they can be obtained based on configuration extension points, dynamically switching processes by modifying configuration files.
[0049] Optionally, annotation setting step S102, such as Figure 3 As shown, it includes: Step S301: Obtain the attribute data corresponding to the business process extension point, and use the corresponding directory data in the attribute data to determine the directory parameters.
[0050] Business processes and business process differentiation strategies are called business process extension points. The relevant containers for extension points can directly use the Spring Bean container. In addition, for ease of use, the configuration of business routing rules does not use configuration files or load from other configuration sources. Instead, the business processes and strategies are directly annotated during code development. Finally, the configuration is extracted at runtime during the Spring Bean loading process.
[0051] In specific scenarios, the attribute data of extension points are usually stored in metadata files, database tables, Java annotations, etc. After obtaining the attribute data corresponding to the business process extension point, the relevant directory parameters are determined by using the directory data corresponding to the attribute data.
[0052] Step S302: Determine the extension parameters using the corresponding extension type data and extension package path data in the attribute data, and determine the code parameters using the corresponding code listing data in the attribute data.
[0053] The core elements of extension parameters involve the extension type and the extension package path. Specifically, it defines the extension method, with common types including: plugin (plugin-based extension); decorator (decorator pattern); interceptor (interceptor); and listener (event listener). The extension package path specifies the package path where the extension implementation class is located, used for Spring component scanning. The Spring system will automatically discover classes with specific annotations (such as @Extension) in this path.
[0054] Code parameters are used to constrain the implementation specifications of extension points, and include: Interface definition (interface_class): The interface that the extension point must implement; Default implementation: The default logic when no special extensions are needed; Dependencies: Other beans required to extend the implementation.
[0055] Step S303: Determine the annotation parameters based on the directory parameters, extended parameters, and code parameters, and declare the annotation parameters in the Spring system.
[0056] Specifically, a meta-annotation (such as @BusinessExtPoint) can be created, containing three types of parameters: directory, extension, and code. The annotation is dynamically generated and injected into the Spring system through Java reflection and ASM (bytecode manipulation library).
[0057] Optionally, annotation parameters can be determined based on directory parameters, extended parameters, and code parameters, such as... Figure 4 As shown, it includes: Step S401: Generate the startup annotation strategy corresponding to the Spring system based on the directory parameters, and determine the first annotation parameter according to the startup annotation strategy; Step S402: Generate the tagging strategy corresponding to the Spring system based on the extended parameters, and determine the second annotation parameters according to the tagging strategy; Step S403: Generate the corresponding extension tag strategy for the Spring system based on the code parameters, and determine the third annotation parameters according to the extension tag strategy; Step S404: Construct annotation parameters using the first annotation parameter, the second annotation parameter, and the third annotation parameter.
[0058] Specifically, the first annotation parameter can be EnableSop, which is used to enable the annotation, and is implemented through the following code: @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) @Import(SopRegistrar.class) public @interface EnableSop { / ** * @return sop package directory / String[] sopPackages() default "com.tmyc"; } The second annotation parameter can be Sop, which is used to perform the marking, specifically implemented through the following code: @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface Sop { / ** * SOP code / String code(); / ** * sop name / String name() default ""; / ** * SOP extension type / Class<? extends ISopExtension> extensionType(); / ** * * path to the SOP extension package / String[] extensionPackages() default {}; } The third annotation parameter is SopExtension, used for Sop extension tags, which is implemented through the following code: @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface SopExtension { / ** * extension code / String code(); / ** * extension name / String name() default ""; / ** * Expanded list of supported bizCodes / String[] supportedBizCode() default {}; } Users only need three annotations to automatically route the system's re-differentiation strategy: enable the component with @Enable, mark the abstract process (algorithm / domain method, etc.) in the system with @Sop, and mark the differentiated extension points of the process with @SopExtension. No additional configuration is required, making it simple enough.
[0059] Optionally, the annotation execution step S103, such as Figure 5 As shown, it includes: Step S501: Determine the routing execution strategy of the business process in the Spring system using the type parameters corresponding to the annotation parameters.
[0060] The type parameter mapping strategy can select the corresponding route implementation based on the extensionType (such as plugin, decorator) in the annotation parameters, for example: Plugin-based routing: Loads extended implementation classes via the SPI mechanism; The decorator chain consists of assembling decorator beans in priority order.
[0061] Interceptor AOP intercepts routes: MethodInterceptor executes extended logic before and after method calls.
[0062] Step S502: Based on the routing execution strategy, obtain the target registration interface in the Spring system corresponding to the directory parameters, extended parameters, and code parameters in the annotation parameters, and use the target registration interface to control the registration of the annotation parameters to the Spring system.
[0063] The target registration interface can be located using directory parameters (such as order.payment) and extended parameters (such as processor). This can be achieved through the following methods: BeanDefinitionRegistry: Registers new bean definitions (suitable for dynamically generated extended implementations); ApplicationContextInitializer: Registers extension points when the application starts; ImportBeanDefinitionRegistrar: Imports extended configurations via the @Import annotation.
[0064] Step S503: Obtain the business data corresponding to the business process extension point in the Spring system according to the type parameter, and control the rewriting of the business data to the Spring system based on the annotation parameter.
[0065] In real-world scenarios, the data required for extension points (such as HTTP request parameters and database query results) can be extracted from the business context and converted into a format recognizable by the Spring system. Data injection can be implemented in the following ways: ThreadLocal: Stores data in the current thread context using RequestContextHolder; Bean property injection: Injecting data into the extended implementation class using @Autowired; Event mechanism: Publish a DataReplicatedEvent to notify the relevant components that the data has been updated; Optionally, step S501, which uses the type parameters corresponding to the annotation parameters to determine the routing execution strategy of the business process in the Spring system, such as... Figure 6 As shown, it includes: Step S601: Determine the directory parameters contained in the annotation parameters based on the type parameters, use the directory parameters to determine the annotation startup strategy corresponding to the business process, and determine the first routing strategy according to the annotation startup strategy. Step S602: Determine the extended parameters contained in the annotation parameters based on the type parameters, use the extended parameters to determine the abstract process strategy corresponding to the business process, and determine the second routing strategy based on the abstract process strategy. Step S603: Determine the code parameters contained in the annotation parameters based on the type parameters, determine the difference marking strategy corresponding to the business process using the code parameters, and determine the third routing strategy based on the difference marking strategy. Step S604: Determine the routing execution strategy of the business process in the Spring system based on the first routing strategy, the second routing strategy, and the third routing strategy.
[0066] The routing execution strategy is based on the three routing strategies mentioned above to associate directory parameters, extended parameters, and code parameters. This allows users to complete automatic routing using only these three annotations. It is started with @EnableSop and marked with @Sop to mark abstract processes, algorithms, domain methods, etc. It can also mark the differentiated extension points of the process with SopExtension, without requiring any additional configuration.
[0067] Optionally, step S502 involves obtaining the target registration interface in the Spring system corresponding to the directory parameters, extended parameters, and code parameters in the annotation parameters based on the routing execution strategy, and using the target registration interface to control the registration of the annotation parameters to the Spring system. Figure 7 As shown, it includes: Step S701: Based on the routing execution strategy, obtain the first target registration interface corresponding to the directory parameter, the second target registration interface corresponding to the extended parameter, and the third target registration interface corresponding to the code parameter in the annotation parameters; Step S702: Determine the directory parameters contained in the annotation parameters based on the type parameters, and use the first target registration interface to control the registration of the directory parameters to the Spring system; Step S703: Determine the extended parameters contained in the annotation parameters based on the type parameters, and use the second target registration interface to control the registration of the extended parameters to the Spring system; Step S704: Determine the code parameters contained in the annotation parameters based on the type parameters, and use the third target registration interface to control the registration of the code parameters to the Spring system.
[0068] The above steps mainly involve the registration process, which is achieved by extending functions in Spring such as ImportBeanDefinitionRegistrar, ClassPathBeanDefinitionScanner, and AnnotationBeanNameGenerator. For example, by parsing the @EnableSop annotation, the component is started to register ImportBeanDefinitionRegistrar.
[0069] When registering a Sop component, the Sop package path restriction value configured by @EnableSop can be scanned to register Beans annotated with @Sop. Sop component registration can use registerBeanDefinition, followed by parsing the @Sop annotation and registering SopExtensions after configuring the Sop. SopExtension component registration can use registerBeanDefinition, parsing the @SopExtension annotation, configuring the SopExtension business routes, and finally completing the registration process.
[0070] Optionally, business processing step S104, such as Figure 8 As shown, it includes: Step S801: Monitor user call requests corresponding to the business process in real time, and generate and obtain business call instructions corresponding to the business process based on user call requests; Step S802: Use the routing execution strategy to obtain the business process extension point corresponding to the business call instruction, and determine the business data corresponding to the business process extension point based on the Spring system; Step S803: Obtain the code data corresponding to the business process based on the business data, and use the code data to control the Spring system to execute the business process.
[0071] Specifically, the system monitors user requests corresponding to business processes in real time, retrieves the SOP (Service Open Procedure) call instructions based on these requests, routes extension points using a routing strategy, parses the route BeanCode based on the automatically registered configuration, and obtains the relevant extension code. Then, it retrieves the corresponding extension point implementation from the Spring container based on the extension code, thus creating an extension point instance. Finally, it uses the SOP to control the Spring system to execute the corresponding business process. For details, please refer to [link / reference needed]. Figure 9 The signaling diagram for the business process handling method shown will not be described in detail again.
[0072] As can be seen from the business process processing method in the above embodiments, when different business products in the same business process are adjusted for different logic, the method can complete the automatic routing function by simply performing annotation operations through annotation parameters without additional settings. This enables the reuse of business process-related code while achieving isolated and differentiated calls between businesses. The method has clear logic and is simple to process, thus solving the above-mentioned problems existing in the prior art.
[0073] Corresponding to the above-described embodiments of the business process processing method, this invention also provides a business process processing system, such as... Figure 10 As shown, the system includes: The difference acquisition module 1010 is used to: determine the business process based on the deployed Spring system, and determine the business process extension point by utilizing the business scenarios in the business process; The annotation setting module 1020 is used to: determine the annotation parameters corresponding to the business process based on the attribute data of the business process extension point, and declare the annotation parameters to the Spring system; wherein, the annotation parameters include at least: directory parameters, extension parameters, and code parameters; Annotation execution module 1030 is used to: determine the routing execution strategy of the business process in the Spring system using annotation parameters, and rewrite the business data corresponding to the business process extension point into the Spring system according to the routing execution strategy; The business processing module 1040 is used to: obtain the business call instructions corresponding to the business process, determine the business data corresponding to the business call instructions using the routing execution strategy, and control the Spring system to execute the business process based on the business data.
[0074] As can be seen from the above business process processing system, when the system can make differentiated logical adjustments for different business products in the same business process, it can complete the automatic routing function simply by performing annotation operations through annotation parameters. No additional settings are required. This enables the reuse of business process-related code while achieving isolated and differentiated calls between businesses. The system has clear logic and is simple to process, thus solving the above-mentioned problems existing in the prior art.
[0075] The business process processing system provided in this embodiment of the invention has the same implementation principle and technical effects as the aforementioned business process processing method embodiment. For the sake of brevity, any parts not mentioned in the system embodiment can be referred to the corresponding content in the aforementioned business process processing method embodiment.
[0076] This embodiment also provides a server, the structural diagram of which is shown below. Figure 11 As shown, the device includes a processor 101 and a memory 102; wherein, the memory 102 is used to store one or more computer instructions, which are executed by the processor to implement the steps of the above-mentioned business process processing method.
[0077] Figure 11 The server shown also includes a bus 103 and a communication interface 104. The processor 101, the communication interface 104, and the memory 102 are connected via the bus 103.
[0078] The memory 102 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage device. The bus 103 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 11 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0079] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and to send encapsulated IPv4 packets or IPv4 packets to the user terminal through the network interface.
[0080] Processor 101 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 101 or by instructions in software form. The processor 101 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 102. The processor 101 reads the information in memory 102 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0081] This invention also provides a storage medium storing a computer program, which, when run by a processor, executes the steps of the business process processing method described in the foregoing embodiments.
[0082] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, devices, and methods can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0083] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0084] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0085] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0086] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.< / t>
Claims
1. A business process processing method, characterized in that, The method includes: Difference acquisition steps: Determine the business process based on the deployed Spring system, and determine the business process extension points using the business scenarios in the business process; Annotation setting steps: Determine the annotation parameters corresponding to the business process based on the attribute data of the business process extension point, and declare the annotation parameters in the Spring system; wherein, the annotation parameters include at least: directory parameters, extension parameters, and code parameters; Annotation execution steps: Use the annotation parameters to determine the routing execution strategy of the business process in the Spring system, and rewrite the business data corresponding to the business process extension point to the Spring system according to the routing execution strategy; Business processing steps: Obtain the business call instruction corresponding to the business process, determine the business data corresponding to the business call instruction using the routing execution strategy, and control the Spring system to execute the business process based on the business data.
2. The business process processing method according to claim 1, characterized in that, The difference acquisition steps include: Based on the business entity corresponding to the business scenario, obtain the corresponding business process in the Spring system, and determine the business strategy corresponding to the business process; The business strategy is used to determine the business scenarios included in the business process, and the differentiated data between the business scenarios is obtained based on the business strategy. The business process extension point corresponding to the business process is determined by the differentiated data.
3. The business process processing method according to claim 1, characterized in that, The annotation setting steps include: Obtain the attribute data corresponding to the business process extension point, and use the corresponding directory data in the attribute data to determine the directory parameters; The extension parameters are determined using the corresponding extension type data and extension package path data in the attribute data, and the code parameters are determined using the corresponding code listing data in the attribute data; The annotation parameters are determined based on the directory parameters, the extended parameters, and the code parameters, and the annotation parameters are declared in the Spring system.
4. The business process processing method according to claim 3, characterized in that, The annotation parameters are determined based on the directory parameters, the extended parameters, and the code parameters, including: The startup annotation strategy corresponding to the Spring system is generated based on the directory parameters, and the first annotation parameter is determined according to the startup annotation strategy; The Spring system's corresponding tagging strategy is generated based on the extended parameters, and the second annotation parameters are determined according to the tagging strategy. Based on the code parameters, the Spring system's corresponding extension tag strategy is generated, and the third annotation parameters are determined according to the extension tag strategy. The annotation parameters are constructed using the first annotation parameter, the second annotation parameter, and the third annotation parameter.
5. The business process processing method according to claim 1, characterized in that, The annotation execution steps include: The routing execution strategy of the business process in the Spring system is determined by using the type parameter corresponding to the annotation parameter; Based on the routing execution strategy, obtain the target registration interface in the Spring system corresponding to the directory parameter, the extended parameter, and the code parameter in the annotation parameters, and use the target registration interface to control the registration of the annotation parameters to the Spring system; According to the type parameter, obtain the business data corresponding to the business process extension point in the Spring system, and control the replication of the business data to the Spring system based on the annotation parameter.
6. The business process processing method according to claim 5, characterized in that, The routing execution strategy of the business process in the Spring system is determined using the type parameters corresponding to the annotation parameters, including: Based on the type parameter, the directory parameter included in the annotation parameter is determined, the annotation startup strategy corresponding to the business process is determined using the directory parameter, and the first routing strategy is determined according to the annotation startup strategy. Based on the type parameter, the extended parameters included in the annotation parameters are determined, the extended parameters are used to determine the abstract process strategy corresponding to the business process, and the second routing strategy is determined according to the abstract process strategy. Based on the type parameter, the code parameter contained in the annotation parameter is determined, the code parameter is used to determine the difference marking strategy corresponding to the business process, and the third routing strategy is determined according to the difference marking strategy. The routing execution strategy of the business process in the Spring system is determined based on the first routing strategy, the second routing strategy, and the third routing strategy.
7. The business process processing method according to claim 5, characterized in that, Based on the routing execution strategy, the target registration interface corresponding to the directory parameter, extended parameter, and code parameter in the annotation parameters in the Spring system is obtained, and the annotation parameters are registered to the Spring system using the target registration interface, including: Based on the routing execution strategy, obtain the first target registration interface corresponding to the directory parameter in the annotation parameters, the second target registration interface corresponding to the extended parameter, and the third target registration interface corresponding to the code parameter; Based on the type parameter, the directory parameter included in the annotation parameter is determined, and the directory parameter is registered to the Spring system using the first target registration interface; Based on the type parameter, the extended parameters contained in the annotation parameters are determined, and the extended parameters are registered to the Spring system using the second target registration interface; Based on the type parameter, the code parameter contained in the annotation parameter is determined, and the code parameter is registered to the Spring system using the third target registration interface.
8. The business process processing method according to claim 1, characterized in that, The business processing steps include: Real-time monitoring of user call requests corresponding to the business process, and generation and acquisition of the business call instruction corresponding to the business process based on the user call requests; The routing execution strategy is used to obtain the business process extension point corresponding to the business call instruction, and the business data corresponding to the business process extension point is determined based on the Spring system; Obtain the code data corresponding to the business process based on the business data, and use the code data to control the Spring system to execute the business process.
9. A business process processing system, characterized in that, The system includes: The difference acquisition module is used to: determine the business process based on the deployed Spring system, and determine the business process extension point using the business scenarios in the business process; The annotation setting module is used to: determine the annotation parameters corresponding to the business process based on the attribute data of the business process extension point, and declare the annotation parameters to the Spring system; wherein, the annotation parameters include at least: directory parameters, extension parameters, and code parameters; The annotation execution module is used to: determine the routing execution strategy of the business process in the Spring system using the annotation parameters, and rewrite the business data corresponding to the business process extension point to the Spring system according to the routing execution strategy; The business processing module is used to: obtain the business call instruction corresponding to the business process, determine the business data corresponding to the business call instruction using the routing execution strategy, and control the Spring system to execute the business process according to the business data.
10. A server, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the steps of the business process processing method according to any one of claims 1 to 8.