Method, system and equipment for realizing positive and negative service scheduling in state machine link and storage medium
By defining registry annotations in the state machine link and using AOP sectional programming, the forward and reverse induced radiating relationship between state machine services and extended services is realized, and the problems of insufficient complexity and scalability of business iteration delivery in the existing technology are solved, and flexible configuration and high scalability are achieved.
Patent Information
- Application Number
- CN202411991738.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
Smart Images

Figure CN119781870A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of state machine flow scheduling in the telecommunication industry, and in particular to a method, system, device and storage medium for implementing positive and negative service scheduling in a state machine link. Background Art
[0002] Currently, operators' orders are generated by multiple business systems. These businesses are generally consistent in the flow links and states of the order state machine. Due to the existence of personalized business branches in the same links of different businesses, traditional program coding can no longer meet the rapid and high-quality iterative delivery of business needs. This is mainly manifested in the following points: uncertainty in the development of business needs and the volatility of business development; traditional embedded coding leads to increasingly complex and unstable program structures; the business test scope is large, and there are coverage loopholes in business logic; the application release process is complex and the program rollback is not fast when encountering problems. Summary of the invention
[0003] In view of the shortcomings existing in the above problems, the present invention provides a method, system, device and storage medium for implementing positive and negative service scheduling in a state machine link.
[0004] To achieve the above object, the present invention provides a method for implementing positive and negative service scheduling in a state machine link, comprising:
[0005] Define registry @interface annotation;
[0006] The main services of each link of the state machine introduce the registry @interface annotation;
[0007] Through AOP aspect programming, the pointcut access to the @interface annotation is realized and connected to the public service scheduling framework;
[0008] Establishing a service component registry to realize the forward and reverse mapping relationship between the state machine main service and the extended service;
[0009] Service scheduling is performed based on the forward and reverse induced relationship.
[0010] Preferably, the definition of the registry @interface annotation includes state machine flow dispatching subject service and runtime check, annotation to method, inheritance and state machine flow annotation.
[0011] Preferably, the access points include the access point @before and the access point @afte.
[0012] Preferably, the service schedule is stored in a log table.
[0013] The present invention also provides a state machine link to realize a positive and negative service scheduling system, including:
[0014] Define a module to define the registry @interface annotation;
[0015] The import module is used to introduce the registry @interface annotation into the main service of each link of the state machine;
[0016] The access module is used to implement the point-cut access to the @interface annotation through AOP aspect programming and access to the public service scheduling framework;
[0017] Establishing a module for establishing a service component registry to realize the forward and reverse mapping relationship between the state machine main service and the extended service;
[0018] A scheduling module is used to perform service scheduling based on the forward and reverse induced relationship.
[0019] The present invention also provides a device, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the above method.
[0020] The present invention also provides a storage medium storing a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device executes the above method.
[0021] Compared with the prior art, the present invention has the following beneficial effects:
[0022] The dynamic service components of the present invention are registered to the relationship record table of each link of the state machine, which can realize flexible configuration of different scenarios of various types of business, high scalability, and can adapt to flexible and changeable business demand expansion. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flow chart of the method for implementing positive and negative service scheduling in the state machine link of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] Reference Figure 1 The present invention provides a method for implementing positive and negative service scheduling in a state machine link, including:
[0026] Define registry @interface annotation;
[0027] The main services of each link of the state machine are introduced into the registry @interface annotation;
[0028] Through AOP aspect programming, the point-cut access to the @interface annotation is realized and connected to the public service scheduling framework;
[0029] Establish a service component registry to realize the forward and reverse mapping relationship between the state machine main service and the extended service;
[0030] Service scheduling is performed based on forward and reverse induced relationships.
[0031] In this embodiment, the definition of the registry @interface annotation includes state machine flow scheduling subject service and runtime check, annotation to method, inheritance and state machine flow annotation. Pointcut access includes pointcut @before and pointcut @afte. Service scheduling will be stored in the log table.
[0032] In this example, the runtime annotation is defined:
[0033]
[0034] Main method reference definition annotation:
[0035]
[0036] Annotation - AOP aspect instance class, set the pointcut, and obtain relevant information about the pointcut:
[0037]
[0038] State machine flow-extended service component adaptation & scheduling:
[0039]
[0040] Binding relationship table of main service and extended service:
[0041]
[0042] Extended service dispatch log table:
[0043]
[0044] Extended service component library-register:
[0045]
[0046] The present invention also provides a state machine link to realize a positive and negative service scheduling system, including:
[0047] Define a module to define the registry @interface annotation;
[0048] The import module is used to import the main service of each link of the state machine into the registry @interface annotation;
[0049] The access module is used to implement the point-cut access of the @interface annotation through AOP aspect programming and access to the public service scheduling framework;
[0050] Establish a module for establishing a service component registry to realize the forward and reverse mapping relationship between the state machine main service and the extended service;
[0051] The scheduling module is used to schedule services based on the forward and reverse induced relationships.
[0052] The present invention also provides a device, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the above method.
[0053] The present invention also provides a storage medium storing a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device executes the above method.
[0054] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for implementing positive and negative service scheduling in a state machine link, characterized in that: include: Define registry @interface annotation; The main services of each link of the state machine introduce the registry @interface annotation; Through AOP aspect programming, the pointcut access to the @interface annotation is realized and connected to the public service scheduling framework; Establishing a service component registry to realize the forward and reverse mapping relationship between the state machine main service and the extended service; Service scheduling is performed based on the forward and reverse induced relationship.
2. The method for implementing positive and negative service scheduling in the state machine link according to claim 1 is characterized in that: The definition of registry @interface annotation includes state machine flow dispatching main service and runtime check, annotation to method, inheritance and state machine flow annotation.
3. The method for implementing positive and negative service scheduling according to the state machine link of claim 2 is characterized in that: The access points include the access point @before and the access point @afte.
4. The method for implementing positive and negative service scheduling in the state machine link according to claim 3 is characterized in that: The service schedule will be stored in the log table.
5. A state machine link realizes a positive and negative service scheduling system, characterized in that: include: Define a module to define the registry @interface annotation; The import module is used to introduce the registry @interface annotation into the main service of each link of the state machine; The access module is used to implement the point-cut access to the @interface annotation through AOP aspect programming and access to the public service scheduling framework; Establishing a module for establishing a service component registry to realize the forward and reverse mapping relationship between the state machine main service and the extended service; A scheduling module is used to perform service scheduling based on the forward and reverse induced relationship.
6. The state machine link according to claim 5 realizes the positive and negative service scheduling system, characterized in that: The definition of registry @interface annotation includes state machine flow dispatching main service and runtime check, annotation to method, inheritance and state machine flow annotation.
7. The state machine link according to claim 6 realizes the positive and negative service scheduling system, characterized in that: The access points include the access point @before and the access point @afte.
8. The state machine link according to claim 7 realizes the positive and negative service scheduling system, characterized in that: The service schedule will be stored in the log table.
9. A device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the method according to any one of claims 1 to 4.
10. A storage medium, characterized in that: It stores a computer program executable by an electronic device. When the program runs on the electronic device, the electronic device executes the method according to any one of claims 1 to 4.