State circulation method, electronic equipment, readable storage medium and program product

By decoupling business messages and state machine events, project state flows based on the mapping relationship between business messages and state machine events, solving the problems of poor flexibility and maintenance difficulties caused by hard coding, and achieving efficient and flexible project state management.

CN120234064APending Publication Date: 2025-07-01KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510259426.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

In the prior art, hard-coded finite state machines have poor flexibility in project state management, inconvenient maintenance, high testing cost and low testing efficiency.

Method used

By obtaining the business messages and current status in the project, determining the business nodes, and determining the state machine events based on the preset mapping relationship between the business nodes and state machine events, the project state flows. This method decouples business messages from state machine events, reduces the coupling degree of the method, and improves flexibility and maintainability.

Benefits of technology

It realizes flexibility and maintainability of project status flow, reduces testing costs and improves testing efficiency, and avoids maintenance difficulties caused by hard coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234064A_ABST
    Figure CN120234064A_ABST
Patent Text Reader

Abstract

The invention provides a state circulation method, electronic equipment, a readable storage medium and a program product. The state circulation method disclosed by the invention comprises the following steps: acquiring a service message in a project and a current state of the project; determining a service node through the service message; determining a state machine event corresponding to the service node based on a mapping relationship between a preset service node and a preset state machine event; and performing project state circulation according to the state machine event and the current state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical fields of computers, electronic information, etc. In particular, the present disclosure relates to a state transition method, an electronic device, a readable storage medium, and a program product. Background Art

[0002] The project status may be different at different times. Tracking and managing the project status helps to clearly understand the progress of the project.

[0003] In the related art, based on the finite state machine of the Spring framework, the project status at different times is automatically tracked and managed in a hard-coded manner.

[0004] However, since hard-coded data can usually only be modified by editing the source code and recompiling the executable file, the flexibility is poor and it is not conducive to maintenance. Summary of the Invention

[0005] The present disclosure provides a state transition method, an electronic device, a readable storage medium, and a program product.

[0006] According to one aspect of the present disclosure, a state transition method is provided, including: Obtaining a business message in a project and the current state of the project; Determining a business node through the business message; Based on the mapping relationship between the preset business node and the preset state machine event, determining the state machine event corresponding to the business node; and Performing project state transition according to the state machine event and the current state.

[0007] According to the state transition method of at least one embodiment of the present disclosure, the business message includes a business action; Determining a business node through the business message includes: When the business action is a first target action, taking the business action as the business node.

[0008] According to the state transition method of at least one embodiment of the present disclosure, the business message includes a business action and the action execution situation corresponding to the business action; Determining a business node through the business message includes: When the business action is a second target action, determining the action execution progress based on the action execution situation; and Concatenating the business action and the action execution progress to obtain the business node.

[0009] A state transition method according to at least one embodiment of the present disclosure performs project state transition based on the state machine event and the current state, including: Determining whether the state machine event is a transition trigger event corresponding to the current state; and When the state machine event is a transition trigger event corresponding to the current state, transitioning the current state of the project to the next state.

[0010] According to the state transition method of at least one embodiment of the present disclosure, after determining whether the state machine event is a transition trigger event corresponding to the current state, it further includes: When the state machine event is not a transition trigger event corresponding to the current state, not transitioning the current state of the project.

[0011] According to the state transition method of at least one embodiment of the present disclosure, after transitioning the current state of the project to the next state, it further includes: Storing and / or broadcasting a message about the state transition of the state machine.

[0012] According to the state transition method of at least one embodiment of the present disclosure, after determining the business node through the service message, it further includes: Storing and / or broadcasting a message about the business node.

[0013] According to another aspect of the present disclosure, there is provided an electronic device, including: a memory that stores execution instructions; and a processor that executes the execution instructions stored in the memory, such that the processor executes the state transition method of any one of the embodiments of the present disclosure.

[0014] According to still another aspect of the present disclosure, there is provided a readable storage medium in which execution instructions are stored, and when the execution instructions are executed by a processor, they are used to implement the state transition method of any one of the embodiments of the present disclosure.

[0015] According to yet another aspect of the present disclosure, there is provided a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the state transition method of any one of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, are used to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are included in this specification and form a part of this specification.

[0017] Figure 1It is a schematic flowchart of the state transition method according to an embodiment of the present disclosure.

[0018] Figure 2 It is a schematic diagram of the process of determining a service node according to an embodiment of the present disclosure.

[0019] Figure 3 It is a schematic diagram of the process of project state transition according to an embodiment of the present disclosure.

[0020] Figure 4 It is a schematic flowchart of the state transition method according to another embodiment of the present disclosure.

[0021] Figure 5 It is a schematic block diagram of the structure of the state transition system according to an embodiment of the present disclosure.

[0022] Figure 6 It is a schematic block diagram of the structure of the state transition device according to an embodiment of the present disclosure.

[0023] Figure 7 It is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Embodiments

[0024] The present disclosure will be further described in detail below with reference to the accompanying drawings and examples. It can be understood that the specific examples described herein are only for explaining the relevant content and do not limit the present disclosure. In addition, it should be noted that for the convenience of description, only parts related to the present disclosure are shown in the drawings.

[0025] It should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The technical solutions of the present disclosure will be described in detail below with reference to the drawings and in combination with the embodiments.

[0026] In the decoration business, a complete decoration project is generated when converting leads into customers, which is used to undertake and manage the status of the entire decoration process from lead follow-up to project completion at the construction site. It is characterized by a long cycle, complex process, and flexibility. Therefore, status tracking and management are crucial. For the solution of automatically tracking and managing the project status in different periods by hard-coding, since hard-coded data can usually only be modified by editing the source code and recompiling the executable file, if you want to add a project status to be managed, for example, add the "Payment in Progress" project status between the "Pending Payment" project status and the "Pre-construction Preparation" project status, then you need to modify the original logic method for managing the "Pending Payment" project status and the original logic method for managing the "Pre-construction Preparation" project status, and add a new logic method for managing the "Payment in Progress" project status. The steps are cumbersome and the flexibility is poor. At the same time, due to the hard-coded method, the implementation of project status transitions is distributed in multiple different classes and methods. It is difficult to quickly locate the code snippets where the relevant content is located when relevant content needs to be modified, and the coupling degree between multiple classes and methods is relatively high. Therefore, the maintainability is poor. In addition, since the state machine events in the hard-coded solution are closely combined with business messages, when unit testing the state machine, a large number of business scenarios and dependent objects need to be simulated, making the writing of test cases complicated. When using real business scenarios for testing, each business scenario requires testers to click a large number of buttons and / or fill in a large number of information. Therefore, the testing cost is high and the testing efficiency is low.

[0027] For this reason, the present disclosure proposes a state transition method.

[0028] The state transition method of the present disclosure can be used for an electronic device to transition the status of a project. In the present disclosure, the electronic device includes but is not limited to mobile phones, tablet computers, laptop computers, personal computers, wearable devices, teller machines, etc.

[0029] For the convenience of description and to make the technical solutions of the specific embodiments of the present disclosure easier to understand, before describing the state transition method implemented in the present disclosure, the technical terms involved in the specific embodiments of the present disclosure are explained as follows: Lead conversion refers to the process of converting potential customers (i.e., leads) into actual customers. It involves a series of steps, including identifying and cultivating leads until a deal is finally reached.

[0030] A state machine is a mathematical model used to describe the transitions between different states of a system or object and its behavior. It can be composed of a state register and combinational logic circuits, and can perform state transitions under preset states according to control signals, so as to coordinate relevant signal actions and execute specific operations.

[0031] A state machine event is an event that triggers the state machine to switch from one state to another.

[0032] State transition refers to the process in which an object switches from one state to another.

[0033] A message queue is a container that stores messages during the message transmission process.

[0034] A message topic is a container that stores messages in a message queue.

[0035] The EL expression (Expression Language) is a method to simplify expressions.

[0036] Figure 1 The overall flowchart of the state transition method M100 according to an embodiment of the present disclosure is shown. As Figure 1 shown, the method includes steps S110 to S140. Among them, the method can be executed by an electronic device such as a mobile phone or a computer.

[0037] Specifically, Figure 1 the method shown includes: S110. Obtain the business messages in the project and the current state of the project. Among them, the business messages include business actions; The project can be a full-decoration project, a partial-decoration project, a group-decoration project or other projects. The business messages in the project can be obtained by subscribing to the messages of a specific topic in the message queue. The current state of the project can be obtained through the state machine corresponding to the project.

[0038] Since the business messages are different in different periods, obtaining the business messages is beneficial to subsequently determining the business nodes through the business messages, thereby providing support for state transition.

[0039] S120. Determine the business nodes through the business messages; The business messages may include business actions, and the business actions may include one or more of initiating a quotation, submitting a quotation, generating a formal quotation, withdrawing a quotation, signing a contract, making a payment, and settlement. In the case where the business action in the business message is an action related to the state machine event, the business node is determined through the business action; in the case where the business action in the business message is not an action related to the state machine event, there is no need to determine the business node. Whether the business action is an action related to the state machine event can be pre-identified according to actual needs. For example, generating a formal quotation, withdrawing a quotation, signing a contract, making a payment, and settlement can be used as actions related to the state machine event. Then, in the case where any one of the business actions of generating a formal quotation, withdrawing a quotation, signing a contract, making a payment, and settlement occurs, the business node can be accurately determined. Since the state transition is related to the business node, determining the business node can provide support for the subsequent state transition.

[0040] S130. Determine the state machine event corresponding to the service node based on the mapping relationship between the preset service node and the preset state machine event; The mapping relationship between the preset service node and the preset state machine event can be pre-configured according to actual requirements. In this mapping relationship, the preset service node and the preset state machine event can be in a many-to-one relationship or a one-to-one relationship. For example, in the mapping relationship between the preset service node and the preset state machine event, the first preset service node corresponds to the first preset state machine event. That is, when the service node is the first preset service node, the state machine event can be determined as the first preset state machine event; the second preset service node corresponds to the second preset state machine event. That is, when the service node is the second preset service node, the state machine event can be determined as the second preset state machine event; the first preset service node, the second preset service node, and the third preset service node correspond to the third preset state event. That is, when the service node is the third preset service node and both the first preset service node and the second preset service node have been triggered, the state machine event can be determined as the third preset state machine event. Specifically, it can be implemented by executing the pre-configured EL expression. If a certain service node is not in the mapping relationship, the corresponding state machine event will not be determined.

[0041] In an example, when the service node is 20% payment, determine whether both the signing and formal quotation service nodes have been triggered. If so, determine the state machine event as the start of work and formal signing event; otherwise, do nothing or prompt for manual intervention.

[0042] S140. Perform project status transition according to the state machine event and the current state.

[0043] The project status transition can be implemented through a state machine (such as a spring finite state machine). The state machine event can trigger the state machine to transition from one state to another. Therefore, the project status can be accurately transitioned according to the state machine event and the current state.

[0044] The state transition method of the present disclosure embodiment does not directly map business messages and state machine events together in a hard - coded manner as in the related art. Instead, by adding a step to determine business nodes, the business messages and state machine events are decoupled. At the same time, the state machine events corresponding to the business nodes are determined through a mapping relationship, and the project state is transitioned according to the state machine events and the current state of the project. Since the mapping relationship can be implemented separately through configuration without being written together with the overall method code, the coupling degree of the method is reduced, and the mapping relationship is clearer and more intuitive, enabling flexible modification and change, with high maintainability and flexibility. In addition, since the business nodes are determined by business messages and the business nodes are the basis for subsequent state transition steps, when performing testing and regression work, there is no need to pay attention to specific business details, and it is not necessary to write complex test cases as in the related art, nor to click a large number of buttons and / or fill in a large amount of information for each business scenario. Instead, testing can be directly carried out by simulating the running conditions under each business node, with lower testing costs and higher testing efficiency.

[0045] Regarding step S120, as a possible implementation manner, the business message includes a business action. Correspondingly, step S120 may specifically be: when the business action is a first target action, taking the business action as a business node.

[0046] The first target action can be preset according to actual needs. The first target action can be a business action that does not require fine - grained management of the action execution progress, such as quotation, signing, etc. It can be understood that the execution progress of the quotation action is usually unquoted or quoted, and there is no other execution progress between unquoted and quoted; the execution progress of the signing action is usually unsigned or signed, and there is no other execution progress between unsigned and signed.

[0047] For the state transition method of the above - mentioned embodiment, for business actions belonging to the first target action, directly taking the business action as a business node simplifies the processing logic, improves the processing efficiency, enables the electronic device to respond quickly after determining the business action, avoids additional calculation or judgment steps, and speeds up the progress of the state transition method.

[0048] Regarding step S120, as another possible implementation manner, the business message includes a business action and the action execution situation corresponding to the business action. Correspondingly, step S120 may include steps S121 and S122 as Figure 2 shown.

[0049] S121. When the business action is a second target action, based on the action execution situation, determine the action execution progress.

[0050] The second target action can be preset according to actual requirements. The first target action and the second target action are different target actions. The second target action can be a business action that requires refined management of the action execution progress, such as payment, construction, etc. It can be understood that the execution progress of the payment action, in addition to unpaid and full payment, can also include paying a deposit, paying the balance, paying a certain percentage (such as paying 20%), etc.; the execution progress of the construction action, in addition to not started and completed construction, can also include a certain percentage of construction, such as 80% construction.

[0051] As a possible implementation manner, the action execution progress can be directly obtained from the action execution situation. For example, the action execution situation includes the action execution progress, and then after obtaining the business message, the action execution progress can be quickly learned from the business message.

[0052] As another possible implementation manner, the action execution progress can be calculated from the action execution situation. For example, the action execution situation includes details such as the amount already paid or the area already constructed, and then the payment percentage or construction percentage can be calculated in combination with the total amount payable or the total area to be constructed, thereby providing data support for determining the business node.

[0053] S122. Concatenate the business action and the action execution progress together to obtain the business node.

[0054] The business action and the action execution progress can be concatenated together in the order of the business action first and the action execution progress second to obtain the business node.

[0055] In an example, the business message is to pay 100 yuan, that is, the business action is payment, the action execution situation is 100, the electronic device can determine the total amount payable as 500 through the order ID, and then calculate the action execution progress as 20%, and concatenate the business action and the action execution progress together to obtain the business node, which is payment 20%.

[0056] It should be noted that the specific values mentioned above are only for detailed illustration of the implementation of the present disclosure as examples, and should not be construed as a limitation of the present disclosure. In other examples or implementation manners or embodiments, other values can be selected according to the present disclosure, and no specific limitation is made here.

[0057] In the state transition method of the above implementation manner, adding the action execution progress to the business node enables the business node to intuitively represent the progress of the business action, facilitates more refined management of the business process, provides a more detailed control means for complex business processes, and improves the accuracy of state transition in different situations.

[0058] Regarding step S140, in some implementation manners of the present disclosure, it may include as Figure 3Steps S141 and S142 shown above.

[0059] S141. Determine whether the state machine event is the transition trigger event corresponding to the current state.

[0060] The transition trigger events for each state can be pre-configured. Then, after determining the state machine event, by comparing the state machine event with the transition trigger event corresponding to the current state, it can be quickly determined whether the current state needs to transition.

[0061] S142. When the state machine event is the transition trigger event corresponding to the current state, transition the current state of the project to the next state.

[0062] When the state machine event is the transition trigger event corresponding to the current state, it indicates that the current state needs to transition. Therefore, the current state of the project is transitioned to the next state.

[0063] The sequence of state transitions can be pre-configured. Then, based on this sequence, the next state of the current state can be accurately determined.

[0064] In one example, the next state of the to-be-signed state is the official signing state for project start. The transition trigger event for the to-be-signed state is the official signing event for project start. Then, if the current state is the to-be-signed state and the state machine event is the official signing event for project start, the current state of the project can be transitioned to the official signing state for project start.

[0065] The state transition method of the above embodiment avoids illegal or unreasonable state transitions by determining whether the state machine event is the transition trigger event corresponding to the current state and performing state transitions when the state machine event meets the expectation, thus improving the security and stability of state transitions.

[0066] In some embodiments of the present disclosure, after step S141, it may further include: when the state machine event is not the transition trigger event corresponding to the current state, do not transition the current state of the project.

[0067] When the state machine event is not the transition trigger event corresponding to the current state, it indicates that the current state does not need to transition. Therefore, the current state of the project is not transitioned, that is, the current state of the project remains unchanged.

[0068] The state transition method of the above embodiment does not perform state transitions when the state machine event meets the expectation, thereby preventing invalid state transitions, maintaining the stability of state transitions, and avoiding potential problems caused by incorrect state transitions.

[0069] In some embodiments of the present disclosure, after step S142, it may further include: storing and / or message broadcasting the state transition situation of the state machine.

[0070] The state transition situation includes but is not limited to the state of the item before transition and the state of the item after transition.

[0071] In one example, after transitioning the current state of an item to the next state, multiple of the order ID of the item, the state of the item before transition, the state of the item after transition, the business node record ID, the operator ID, the operator name, the creation time, and the modification time are stored as an item status log in the database.

[0072] In one example, after transitioning the current state of an item to the next state, multiple of the order ID of the item, the customer commission code, the state of the item before transition, the state of the item after transition, the decoration type, the national standard code, the operator ID, the creation time, and the modification time are broadcast as an item status change message.

[0073] The state transition method of the above embodiments stores the state transition situation of the state machine, making the state changes of the state machine traceable, facilitating subsequent auditing, problem troubleshooting, and performance optimization. By message broadcasting the state transition situation of the state machine, information transmission and information sharing are achieved, which is beneficial for other objects to timely understand the state transition situation, increasing the transparency and collaboration efficiency of the system.

[0074] In some embodiments of the present disclosure, after step S120, it may further include: storing and / or message broadcasting the business node.

[0075] In one example, after determining the business node, multiple of the order ID of the item, the business node ID, the key data of the business node, the business message ID, the creation time, and the modification time are stored as a business node record in the database.

[0076] In one example, after determining the business node, multiple of the order ID of the item, the business node ID, the description of the business node, the state of the business node, the key data of the business node, the business message ID, and the date are broadcast as a business node change message.

[0077] The state transition method of the above embodiments stores the business node, making the detailed information of the business node traceable, facilitating subsequent data analysis, problem troubleshooting, and tracing the details of state transitions. By message broadcasting the business node, information transmission and information sharing are achieved, which is beneficial for other objects to timely understand the business dynamics, increasing the transparency and collaboration efficiency of the system.

[0078] Please combineFigure 4 , in one example, the state transition method may include the following steps S201 to S213. For the content related to steps S201 to S213, reference may be made to the description of the above embodiments. For the sake of brevity, it will not be repeated here.

[0079] In step S201, obtain the business messages in the project and the current state of the project.

[0080] In step S202, determine whether the business action in the business message is the first target action. If so, proceed to step S203; otherwise, proceed to step S204.

[0081] In step S203, when the business action is the first target action, use the business action as a business node.

[0082] In step S204, when the business action is the second target action, determine the action execution progress based on the action execution situation.

[0083] In step S205, concatenate the business action and the action execution progress to obtain a business node.

[0084] In step S206, store the business node.

[0085] In step S207, broadcast a message about the business node.

[0086] In step S208, based on the mapping relationship between the preset business node and the preset state machine event, determine the state machine event corresponding to the business node. It should be noted that in Figure 4 the example, step S206 is executed first, then step S207, and then step S208. In other embodiments, steps S206, S207, and S208 may also be executed simultaneously, or step S207 may be executed first, then S206, and then step S208, or steps S206, S207, and S208 may be executed in other orders, which is not limited here.

[0087] In step S209, determine whether the state machine event is the transition trigger event corresponding to the current state. If so, proceed to step S210; otherwise, proceed to step S213.

[0088] In step S210, when the state machine event is the transition trigger event corresponding to the current state, transition the current state of the project to the next state.

[0089] In step S211, store the state transition situation of the state machine.

[0090] In step S212, a message broadcast is performed on the state transition of the state machine. It should be noted that, in the example of Figure 4 , step S211 is executed first and then step S212. In other embodiments, step S211 and step S212 may also be executed simultaneously, or step S212 may be executed first and then step S211, which is not limited herein.

[0091] In step S213, when the state machine event is not the transition trigger event corresponding to the current state, the current state of the project is not transitioned.

[0092] Please refer to Figure 5 . In one example, the state transition system adopts a hierarchical architecture system, which from bottom to top is successively the business layer, the business node layer, the state machine event layer, the state machine engine layer, and the main axis state layer. The business layer can generate business messages. The business node layer is used to implement the above steps S201 to S207. The state machine event layer is used to implement the above step S208. The state machine engine layer is used to implement the above steps S210 to S213. The main axis state layer is used to display the current state of the project.

[0093] Based on any of the above embodiments, the present disclosure also provides a state transition device.

[0094] Figure 6 is a structural schematic diagram of a state transition device according to an embodiment of the present disclosure.

[0095] As shown in Figure 6 , the state transition device includes: An acquisition module 110, configured to acquire business messages in the project and the current state of the project; A first determination module 120, configured to determine a business node through business messages; A second determination module 130, configured to determine a state machine event corresponding to the business node based on the mapping relationship between a preset business node and a preset state machine event; A transition module 140, configured to perform project state transition according to the state machine event and the current state.

[0096] The above state transition device may be in the form of computer software, and each module of the above state transition device may be implemented by computer software modules.

[0097] As a possible embodiment, the business message includes a business action; correspondingly, the first determination module 120 is configured to: when the business action is a first target action, use the business action as the business node.

[0098] As another possible implementation, the service message includes a service action and the execution status corresponding to the service action; correspondingly, the first determination module 120 is configured to: when the service action is the second target action, determine the action execution progress based on the execution status; and splice the service action and the action execution progress together to obtain a service node.

[0099] In some embodiments of the present disclosure, the transition module 140 is configured to: determine whether the state machine event is a transition trigger event corresponding to the current state; and when the state machine event is a transition trigger event corresponding to the current state, transition the current state of the project to the next state.

[0100] In some embodiments of the present disclosure, the transition module 140 is further configured to: when the state machine event is not a transition trigger event corresponding to the current state, not transition the current state of the project.

[0101] In some embodiments of the present disclosure, the state transition device further includes: a first storage module for storing the state transition situation of the state machine; and a first broadcast module for broadcasting messages about the state transition situation of the state machine.

[0102] In some embodiments of the present disclosure, the state transition device further includes: a second storage module for storing service nodes; and a second broadcast module for broadcasting messages about service nodes.

[0103] The implementation processes of the functions and roles of each module in the above device are specifically described in the implementation processes of the corresponding steps in the above method, and will not be elaborated here.

[0104] The execution subject of the state transition method in the specific embodiments of the present disclosure can be an electronic device such as a mobile phone or a computer.

[0105] Therefore, based on any one of the above embodiments, the present disclosure further provides an electronic device, which can execute the state transition method of any one of the above embodiments described in the present disclosure.

[0106] Figure 7 It is a structural schematic diagram of an electronic device 1000 according to an embodiment of the present disclosure.

[0107] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus 1100 connects various circuits including one or more processors 1200, a memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.

[0108] The bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, only one connecting line is used in this figure, but it does not mean that there is only one bus or one type of bus.

[0109] The present disclosure also provides a readable storage medium. A computer program is stored in the readable storage medium and is used to implement the above method when executed by a processor. The "readable storage medium" can be any device that can contain, store, communicate, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples of the readable storage medium include the following: an electrical connection part (electronic device) having one or more wirings, a portable computer disk cartridge (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0110] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, the processes or functions of the present disclosure are executed in whole or in part.

[0111] The computer program or instructions can be stored in a readable storage medium, or transmitted from one readable storage medium to another. For example, the computer program or instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The readable storage medium can be any available medium that can be accessed, or a data storage device such as a server or data center integrating one or more available mediums. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it can also be an optical medium, such as a digital video disc; or it can be a semiconductor medium, such as a solid-state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or can include both volatile and non-volatile types of storage media.

[0112] Those skilled in the art should understand that the embodiments of the present disclosure can be provided as a method, a system, or a computer program product. Therefore, the present disclosure can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0113] The present disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the present disclosure. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0114] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0115] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.

[0116] In the description of this specification, the descriptions referring to terms such as "one embodiment / way", "some embodiments / ways", "example", "specific example", or "some examples", etc., mean that the specific features, structures, or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of the present disclosure. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment / way or example. Moreover, the specific features, structures, or characteristics described can be combined in a suitable manner in any one or more embodiments / ways or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments / ways or examples described in this specification and the features of different embodiments / ways or examples.

[0117] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically and clearly defined.

[0118] Those skilled in the art should understand that the above embodiments are only for clearly explaining the present disclosure and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or variations can be made based on the above disclosure, and these changes or variations are still within the scope of the present disclosure.

Claims

1. A state transfer method, characterized in that: include: Obtain business news in a project and the current status of said project; Determine the service node through the service message; Determine the state machine event corresponding to the service node based on the mapping relationship between the preset service node and the preset state machine event; as well as The project status is transferred according to the state machine event and the current status.

2. The state transfer method according to claim 1, characterized in that: The business message includes a business action; Determining the service node through the service message includes: When the service action is the first target action, the service action is used as the service node.

3. The state transfer method according to claim 1, characterized in that: The service message includes a service action and an execution status of an action corresponding to the service action; Determining the service node through the service message includes: In the case where the business action is a second target action, determining the action execution progress based on the action execution status; as well as The business action and the action execution progress are spliced ​​together to obtain the business node.

4. The state transfer method according to claim 1, characterized in that: The project state flow is performed according to the state machine event and the current state, including: Determining whether the state machine event is a flow triggering event corresponding to the current state; and When the state machine event is a flow triggering event corresponding to the current state, the current state of the project is flowed to the next state.

5. The state transfer method according to claim 4, characterized in that: After determining whether the state machine event is a flow triggering event corresponding to the current state, the method further includes: When the state machine event is not a flow triggering event corresponding to the current state, the current state of the project is not circulated.

6. The state transfer method according to claim 4, characterized in that: After transferring the current state of the project to the next state, the method further includes: The state flow of the state machine is stored and / or a message is broadcast.

7. The state transfer method according to any one of claims 1 to 6, characterized in that: After determining the service node through the service message, the method further includes: The service node is stored and / or the message is broadcasted.

8. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the state flow method according to any one of claims 1 to 7.

9. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the state flow method according to any one of claims 1 to 7 when executed by a processor.

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

Citation Information

Cited By

  • Power operation and maintenance project business state generation method and system, and storage medium

    CN121766965A

  • Power operation and maintenance project business state generation method and system, and storage medium

    CN121766965B