CN116450175A - State updating method, device and storage medium - Google Patents

State updating method, device and storage medium Download PDF

Info

Publication number
CN116450175A
CN116450175A CN202310317796.2A CN202310317796A CN116450175A CN 116450175 A CN116450175 A CN 116450175A CN 202310317796 A CN202310317796 A CN 202310317796A CN 116450175 A CN116450175 A CN 116450175A
Authority
CN
China
Prior art keywords
rule
target
state
node
updating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310317796.2A
Other languages
Chinese (zh)
Inventor
陈海锋
谢继刚
申培艺
张宇
黄代军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
Unicom Cloud Data Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd, Unicom Digital Technology Co Ltd, Unicom Cloud Data Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310317796.2A priority Critical patent/CN116450175A/en
Publication of CN116450175A publication Critical patent/CN116450175A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a state updating method, a state updating device and a storage medium, relates to the technical field of computers, and is used for solving the technical problem of low efficiency in a general technology. The method comprises the following steps: determining a target rule subset corresponding to the target node from a preset rule set in response to a state update instruction triggered to the target node in the workflow; the preset rule set comprises a plurality of rule subsets which are in one-to-one correspondence with the plurality of nodes; the rule subset includes at least one state update rule associated with the node; the target node is any one of a plurality of nodes; the node state of the target node is updated based on the state update rules in the target rule subset.

Description

State updating method, device and storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to a state updating method, a state updating device and a storage medium.
Background
With the continuous expansion of services (such as express service and file approval service), the more complex the workflow related to the services is. The state control logic of each node in the workflow is typically built into the application program of the workflow service, and the state control logic of each node will also change continuously.
In general technology, when modifying the state control logic of a certain node in a workflow, it is generally required to add executable code corresponding to modified content to an application program of the workflow service and complete online after shutdown and update. In this way, when the logic updating requirement with higher frequency is faced, the shutdown updating is required continuously, the state control logic of the node is difficult to flexibly modify, and the efficiency is low.
Disclosure of Invention
The application provides a state updating method, a state updating device and a storage medium, which are used for solving the technical problem of low efficiency when a general technology updates the state control logic of a node.
In order to achieve the above purpose, the present application adopts the following technical scheme:
in a first aspect, a method for updating a state is provided, including: determining a target rule subset corresponding to the target node from a preset rule set in response to a state update instruction triggered to the target node in the workflow; the preset rule set comprises a plurality of rule subsets which are in one-to-one correspondence with the plurality of nodes; the rule subset includes at least one state update rule associated with the node; the target node is any one of a plurality of nodes; the node state of the target node is updated based on the state update rules in the target rule subset.
Optionally, the method for updating state further includes: receiving a configuration update request for updating the target rule subset in the execution process of an application program to which the workflow belongs; the configuration update request includes rules to be configured associated with the target node; and updating the association relation between the target node and the rule to be configured in a target rule subset included in the preset rule set.
Optionally, the method for updating the node state of the target node based on the state update rule in the target rule subset specifically includes: determining rule types of all state updating rules in the target rule subset; the rule type comprises any one of a condition rule, a check rule, a pre-update processing rule and a post-update processing rule; determining the execution sequence of each state update rule in the target rule subset based on the rule type of each state update rule in the target rule subset; and sequentially executing the instances of the state updating rules in the target rule subset according to the execution sequence of the state updating rules in the target rule subset so as to update the node state of the target node.
Optionally, the execution order of the condition rules is located before the execution order of the check rules; the execution sequence of the verification rule is positioned before the execution sequence of the processing rule before updating; the execution order of the pre-update processing rules is before the execution order of the post-update processing rules.
Optionally, the method for determining the target rule subset corresponding to the target node from the preset rule set specifically includes: and determining a rule subset corresponding to the target node in the preset rule set as a target rule subset.
Optionally, the method for updating state further includes: receiving a state update request for updating the node state of the target node; the status update request includes a status update instruction; and analyzing the state update request to obtain a state update instruction.
Optionally, the target rule subset further comprises at least one event-triggered rule associated with the target node. The state updating method further comprises the following steps: receiving current event information; the current event information comprises description information of an event occurring at the current moment; when the event occurring at the current moment is matched with the event triggering rule in the target rule subset, triggering a state updating instruction for the target node.
In a second aspect, a status updating device is provided, including: a determining unit and an updating unit;
the determining unit is used for responding to a state updating instruction triggered by a target node in the workflow and determining a target rule subset corresponding to the target node from a preset rule set; the preset rule set comprises a plurality of rule subsets which are in one-to-one correspondence with the plurality of nodes; the rule subset includes at least one state update rule associated with the node; the target node is any one of a plurality of nodes;
And the updating unit is used for updating the node state of the target node based on the state updating rule in the target rule subset.
Optionally, the state updating device further includes: a receiving unit;
the receiving unit is used for receiving a configuration update request for updating the target rule subset in the execution process of the application program to which the workflow belongs; the configuration update request includes rules to be configured associated with the target node;
and the updating unit is also used for updating the association relation between the target node and the rule to be configured in the target rule subset included in the preset rule set.
Optionally, the updating unit is specifically configured to:
determining rule types of all state updating rules in the target rule subset; the rule type comprises any one of a condition rule, a check rule, a pre-update processing rule and a post-update processing rule;
determining the execution sequence of each state update rule in the target rule subset based on the rule type of each state update rule in the target rule subset;
and sequentially executing the instances of the state updating rules in the target rule subset according to the execution sequence of the state updating rules in the target rule subset so as to update the node state of the target node.
Optionally, the execution order of the condition rules is located before the execution order of the check rules; the execution sequence of the verification rule is positioned before the execution sequence of the processing rule before updating; the execution order of the pre-update processing rules is before the execution order of the post-update processing rules.
Optionally, the determining unit is specifically configured to:
and determining a rule subset corresponding to the target node in the preset rule set as a target rule subset.
Optionally, the receiving unit is further configured to receive a state update request for updating a node state of the target node; the status update request includes a status update instruction;
the determining unit is further configured to parse the status update request to obtain a status update instruction.
Optionally, the target rule subset further comprises at least one event-triggered rule associated with the target node;
the receiving unit is also used for receiving the current event information; the current event information comprises description information of an event occurring at the current moment;
and the determining unit is also used for triggering a state updating instruction for the target node when the event occurring at the current moment is matched with the event triggering rule in the target rule subset.
In a third aspect, a status updating apparatus is provided, comprising a memory and a processor; the memory is used for storing computer execution instructions, and the processor is connected with the memory through a bus; when the state updating device is running, the processor executes computer-executable instructions stored in the memory to cause the state updating device to perform the state updating method as in the first aspect.
The status updating means may be a network device or may be a part of a device in a network device, such as a system-on-chip in a network device. The system-on-a-chip is adapted to support the network device to implement the functions involved in the first aspect and any one of its possible implementations, e.g. to receive, determine, and offload data and/or information involved in the above-mentioned state updating method. The chip system includes a chip, and may also include other discrete devices or circuit structures.
In a fourth aspect, there is provided a computer readable storage medium comprising computer executable instructions which, when run on a computer, cause the computer to perform the state updating method as in the first aspect.
It should be noted that the above-mentioned computer instructions may be stored in whole or in part on the first computer readable storage medium. The first computer readable storage medium may be packaged together with the processor of the state updating device or may be packaged separately from the processor of the state updating device, which is not limited in this application.
In this application, the names of the above-mentioned status updating means do not constitute limitations on the devices or function modules themselves, which may appear under other names in an actual implementation. Insofar as the function of each device or function module is similar to the present application, it is within the scope of the claims of the present application and the equivalents thereof.
These and other aspects of the present application will be more readily apparent from the following description.
The technical scheme provided by the application at least brings the following beneficial effects:
based on any one of the above aspects, in the present application, since the preset rule set includes a plurality of rule subsets corresponding to a plurality of nodes one by one, and the rule subsets include at least one status update rule associated with the nodes. Therefore, in response to a state update instruction triggered to the target node, a target rule subset corresponding to the target node is obtained from the preset rule set, and the node state of the target node is updated further based on the state update rule in the target rule subset. Based on the above, the present application may implement updating the state control logic of any node by updating the state update rule of any node in the preset rule set.
Compared with the scheme of modifying the workflow service application program in the general technology, the method and the device can update the state control logic of the node by updating the preset rule set which is not contained in the workflow service application program, and can flexibly modify the state control logic of the node, so that the problem of low efficiency caused by shutdown update is avoided. Therefore, the technical problem of low efficiency existing in the general technology can be solved.
Drawings
Fig. 1 is a schematic structural diagram of a status updating system according to an embodiment of the present application;
fig. 2 is a schematic hardware structure of a server according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for updating status according to an embodiment of the present disclosure;
fig. 4 is a second flowchart of a status updating method according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a method for updating a state according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a method for updating a state according to an embodiment of the present application;
fig. 7 is a flowchart fifth of a status updating method according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a rule management flow provided in an embodiment of the present application;
FIG. 9 is a schematic diagram of a status update procedure according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a status updating device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the terms "first", "second", and the like are used to distinguish the same item or similar items having substantially the same function and effect, and those skilled in the art will understand that the terms "first", "second", and the like are not limited in number and execution order.
Furthermore, the terms "comprising" and "having" in the embodiments and claims of the present application and in the drawings are not exclusive. For example, a process, method, system, article, or apparatus that comprises a list of steps or modules is not limited to only those steps or modules but may include other steps or modules not listed.
For ease of understanding the present application, relevant elements referred to in the present application will now be described.
With the continuous expansion of services (such as express service and file approval service), the more complex the workflow related to the services is. The state control logic of each node in the workflow is typically built into the application program of the workflow service, and the state control logic of each node will also change continuously.
In general technology, when modifying the state control logic of a certain node in a workflow, it is generally required to add executable code corresponding to modified content to an application program of the workflow service and complete online after shutdown and update. In this way, when the logic updating requirement with higher frequency is faced, the shutdown updating is required continuously, the state control logic of the node is difficult to flexibly modify, and the efficiency is low.
In view of the foregoing, an embodiment of the present application provides a state updating method, where a preset rule set includes a plurality of rule subsets corresponding to a plurality of nodes one by one, and the rule subset includes at least one state updating rule associated with a node. Therefore, in response to a state update instruction triggered to the target node, a target rule subset corresponding to the target node is obtained from the preset rule set, and the node state of the target node is updated further based on the state update rule in the target rule subset. Based on the above, the present application may implement updating the state control logic of any node by updating the state update rule of any node in the preset rule set.
Compared with the scheme of modifying the workflow service application program in the general technology, the method and the device can update the state control logic of the node by updating the preset rule set which is not contained in the workflow service application program, and can flexibly modify the state control logic of the node, so that the problem of low efficiency caused by shutdown update is avoided. Therefore, the technical problem of low efficiency existing in the general technology can be solved.
The state updating method is suitable for a state updating system. Fig. 1 shows one configuration of the status updating system 100. As shown in fig. 1, the status updating system 100 includes: a server 101 and a terminal 102. A communication connection may be provided between the server 101 and the terminal 102.
In practical applications, the server 101 may be in communication connection with a plurality of terminals 102.
For ease of understanding, the present application will be described with reference to a communication connection between a terminal 102 and a server 101.
Alternatively, the server 101 and the terminal 102 in fig. 1 may be two devices that are separately provided, and may also be different functional modules inside the same device. The embodiments of the present disclosure are not limited in this regard.
It will be readily appreciated that when the server 101 and the terminal 102 are different functional modules integrated within the same device, the manner of communication between the server 101 and the terminal 102 is communication between modules within the device. In this case, the communication flow therebetween is the same as "in the case where the server 101 and the terminal 102 are provided independently of each other".
For ease of understanding, the present application will mainly be described by taking the example that the server 101 and the terminal 102 are provided independently of each other.
The server 101 in fig. 1 may be configured with a service end for a workflow service supporting a specific service for providing various data or services for a workflow service client. The specific service can be a software development service, a file approval service, an express delivery service and the like. Further, the server 101 may be configured with resource files of workflow service applications, preset rule sets, and the like.
Alternatively, the server 101 may be a single server, or may be a server cluster composed of a plurality of servers. In some implementations, the server cluster may also be a distributed cluster. The embodiments of the present application do not impose any limitation on this.
The terminal 102 in fig. 1 may be configured with a client of a workflow service for satisfying the requirements of a user for approval and review of a specific service, etc. For example, the terminal 102 may be configured with functional modules such as a display module, an input module, and a communication module. The input module can be a computer external input device of a mouse and a keyboard so as to support a user to execute various operations. Such as status update operations and configuration update operations, etc. The display module can be a liquid crystal display screen and other devices for displaying relevant interfaces of the workflow service. For example, a node status confirmation interface, a node information editing interface, and the like. The communication module may be a device such as a transceiver for communicating with the server 101.
In one possible approach, the workflow service may be a Web-based (Web) browser implemented service. In this case, the terminal 102 may also be configured with a WEB client.
Alternatively, the terminal 102 in fig. 1 may be a device that provides voice and/or data connectivity to a user, a handheld device with wireless connectivity, or other processing device connected to a wireless modem. The wireless terminal may communicate with one or more core networks via a radio access network (radio access network, RAN). The wireless terminal may be a mobile terminal, such as a computer with a mobile terminal, or a portable, pocket, hand-held, computer-built-in mobile device that exchanges voice and/or data with a radio access network, e.g., a cell phone, tablet, notebook, netbook, personal digital assistant (personal digital assistant, PDA). The embodiments of the present application do not impose any limitation on this.
Fig. 2 is a schematic diagram of a hardware structure of a server 101 according to an embodiment of the present application. The server 101 comprises a processor 21, a memory 22, a communication interface 23, a bus 24. The processor 21, the memory 22 and the communication interface 23 may be connected by a bus 24.
The processor 21 is a control center of the server 101, and may be one processor or a collective term of a plurality of processing elements. For example, the processor 21 may be a CPU, or may be another general-purpose processor. Wherein the general purpose processor may be a microprocessor or any conventional processor or the like.
As one example, processor 21 may include one or more CPUs, such as CPU0 and CPU1 shown in fig. 2.
Memory 22 may be, but is not limited to, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (random access memory, RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), magnetic disk storage or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
In a possible implementation, the memory 22 may exist separately from the processor 21, and the memory 22 may be connected to the processor 21 by a bus 24 for storing instructions or program code. The processor 21, when calling and executing instructions or program code stored in the memory 22, is capable of implementing the state updating method provided in the embodiments described below.
In another possible implementation, the memory 22 may also be integrated with the processor 21.
A communication interface 23 for connecting the server 101 with other devices via a communication network, which may be an ethernet, a radio access network, a wireless local area network (wireless local area networks, WLAN), etc. The communication interface 23 may include a receiving unit for receiving data, and a transmitting unit for transmitting data.
Bus 24 may be an industry standard architecture (industry standard architecture, ISA) bus, an external device interconnect (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 2, but not only one bus or one type of bus.
It should be noted that the structure shown in fig. 2 does not constitute a limitation of the server 101, and that the server 101 may include more or less components than those shown in fig. 2, or may combine some components, or may be arranged in different components.
Fig. 3 is a schematic flow chart of a status updating method according to an embodiment of the present application. The state update method is applied to the server 101 in the state update system 100 shown in fig. 1. The state updating method comprises the following steps: S301-S302.
S301, the server responds to a state update instruction triggered by a target node in the workflow, and a target rule subset corresponding to the target node is determined from a preset rule set.
It should be noted that the server may be configured with a storage module. The storage module may be configured to store a set of preset rules. The server may provide data services to the application to which the workflow belongs based on a set of preset rules. For example, the server may provide state update rules associated with each node in the workflow, etc., to an application to which the workflow belongs.
The preset rule set may include a plurality of rule subsets corresponding to a plurality of nodes one by one. The rule subset may include at least one state update rule associated with a node. The target node may be any one of a plurality of nodes.
Alternatively, the state update rule may be a specific instance that allows the code executor to execute directly to achieve a particular task. For example, the update rule may be used to determine whether the current node information of the target node meets one or more requirements, or the like, may be used to determine whether the current node information of the target node meets a character format specification, a character number specification, or the like, and may be used to perform format conversion, storage, or the like on the current node information of the target node. Wherein the current node information of the target node may be edited by a user of the target node.
In one possible approach, a workflow may include multiple nodes including a start node, an intermediate node, and an end node. The workflow may automatically transfer documents, information or tasks in a preset order between a plurality of nodes (also known as user accounts, etc.) via a computer, thereby achieving a specific business objective. The specific business objectives may be document approval objectives, item delivery objectives, and the like.
In one possible approach, a state update instruction may be used to indicate that the node state of the target node is to be updated from the current state to the target state. The current state may be inactive, approved, etc. The target status may be approval failed, approved, etc.
Further, the status update instruction may be parsed by the server from the received status update request, or may be triggered by the server itself when the server monitors the target event. Wherein the status update request may be sent by the terminal in response to a status update operation performed by the user. The target event may be used to trigger a node state update procedure for the target node.
In a possible manner, when a state update instruction for indicating that the node state of the target node in the workflow is updated is triggered, the server may determine a rule subset corresponding to the target node in the preset rule set as the target rule subset, so as to update the node state of the target node.
S302, the server updates the node state of the target node based on the state update rule in the target rule subset.
In a possible manner, after determining the target rule subset, the server may determine an execution order of the state update rules according to a type of each state update rule in the target rule subset. The server may then execute the respective state update rules in the order in which they were executed to update the node state of the target node. Specifically, the process can be understood with reference to S501-S503, and will not be described in detail herein.
In a possible manner, after updating the node state of the target node, the server may send the updated node state of the target node to the terminal corresponding to the target node. Correspondingly, the terminal corresponding to the target node can receive the updated node state of the target node sent by the server. Based on the above, the terminal can display the updated node state of the target node through the configured display module, so that the user can know the updated node state conveniently.
In a possible manner, as shown in fig. 4, the method for updating a state provided in the embodiment of the present application further includes: S401-S402.
S401, the server receives a configuration update request for updating the target rule subset in the execution process of the application program to which the workflow belongs.
Wherein the configuration update request may include a rule to be configured associated with the target node.
Further, the rule to be configured may be an existing state update rule in the target rule subset, and the runtime parameters are different from the existing state update rule. In this case, the server may replace an existing state update rule in the target rule subset with the rule to be configured to update the runtime parameters of the existing state update rule.
Alternatively, the rule to be configured may be an existing state update rule in the target rule subset, and the configuration update request is for requesting deletion of the existing state update rule. In this case, the server may delete the association between the target node in the target rule subset and the rule to be configured.
Alternatively, the rule to be configured may be an unoccupied state update rule in the target rule subset. In this case, the server may establish an association relationship between the target node and the rule to be configured in the target rule subset, so as to configure the rule to be configured for the target node.
In a possible manner, the code program for implementing the specific task in the rule to be configured may be a code segment embedded in the rule to be configured, or may be a code file path embedded in the rule to be configured.
In a possible manner, the user may edit the rule to be configured through the input module configured by the terminal, and perform a configuration update operation (e.g., click an update button) after the editing is completed. In response to the configuration update operation, the terminal may send a configuration update request to the server to update the target rule subset corresponding to the target node. The configuration update request may carry a node identifier of the target node and a rule to be configured.
Because the preset rule set and the application program to which the workflow belongs are separated, the application program to which the workflow belongs can be normally executed without stopping. In this case, the server may receive a configuration update request for updating the target rule subset during execution of the application to which the workflow belongs. Based on the method, the rule instance can be dynamically configured for each node, so that the business logic of the node state update flow is enhanced in real time, and the flexibility of workflow service and related businesses is improved.
Furthermore, on the basis of separation of the preset rule set and the application program to which the workflow belongs, the method and the device can configure the same state updating rule on different nodes so as to achieve the purpose of multiplexing the state updating rule, thereby improving the reusability of codes.
S402, the server updates the association relation between the target node and the rule to be configured in a target rule subset included in the preset rule set.
In a possible manner, the server may replace an existing state update rule in the target rule subset with a rule to be configured, or delete an association relationship between the target node in the target rule subset and the rule to be configured, or establish an association relationship between the target node and the rule to be configured in the target rule subset, so as to configure the rule to be configured for the target node, thereby providing a related data service when the target node needs to perform state update.
In one embodiment, in conjunction with fig. 3, in S302 above, that is, when the server updates the node status of the target node based on the status update rule in the target rule subset, as shown in fig. 5, an alternative implementation manner is provided in an embodiment of the present application, including: S501-S503.
S501, the server determines rule types of all state update rules in the target rule subset.
The rule type comprises any one of a condition rule, a check rule, a pre-update processing rule and a post-update processing rule.
The condition rules may be used to define one or more conditions that the current node information of the node needs to satisfy when the node transitions from the current state to the target state. The condition rules may be executed when a state update flow of the node is initiated. If the current node information of the node does not meet any one of the conditions defined by the condition rule, the server can terminate the whole state updating flow in advance.
The check rule can be used for performing parameter entering check on the current node information of the node so as to detect whether input data accords with the data format requirement when the node is converted from the current state to the target state. The execution time of the check rule may be after the execution time of the condition rule. I.e. the execution order of the conditional rules precedes the checking rules. If the current node information of the node does not pass the parameter entering verification of the verification rule, the server can terminate the whole state updating flow in advance.
The pre-update processing rules may be used to execute one or more processing logic that precedes the node state transition to transition the node state of the node from the current state to the target state. For example, processing logic such as format conversion and storage of current node information for a node. Upon determining that the node state of the node transitions from the current state to the target state, the server may execute the pre-update processing rule. The execution time of the update pre-processing rule may be after the execution time of the check rule. I.e. the execution order of the check rules precedes the update of the pre-processing rules.
The post-update processing rules may be used to execute one or more processing logic located after the node state transition. For example, the processing logic may be a log record of the node state transition process of the node, or may be an information alert (e.g., a mail alert, a short message alert, etc.) about the node state transition of the node to the target state. After the node state of the node transitions from the current state to the target state, the server may execute the post-update processing rule. The execution time of the post-update processing rule may be after the execution time of the pre-update processing rule. I.e. the order of execution of the pre-update processing rules precedes the post-update processing rules.
In the general technology, the update rules before and after the node state transition are not uniformly and normalized, and the execution logic of various update rules is distributed in a scattered manner, so that the problems of overhigh maintenance cost, poor code structure and the like of an application program are easily caused, and the development efficiency is influenced.
In the method, rule types of the updating rules are defined uniformly, rules with similar service characteristics are summarized together, and normalization and systematic management of each rule instance are achieved. For example, the processing logic such as the log record after the state update and the state of the update father node can be summarized as the type of the processing rule after the update, and then the processing logic is instantiated to a preset rule set for management. That is, each state update rule included in the preset rule set is a specific rule instance developed by the worker according to the rule type defined in a unified manner. For example, a worker may add the same rule type identification to status update rules attributed to the same type.
Based on this, the server may determine rule types of the respective state update rules in the target rule subset after determining the target rule subset, so as to further determine an execution order of the respective state update rules.
S502, the server determines the execution sequence of each state update rule in the target rule subset based on the rule type of each state update rule in the target rule subset.
In a possible manner, after determining the rule type of each state update rule in the target rule subset, the server may determine the execution order of each state update rule in the target rule subset according to the execution logic of the execution order of the condition rule before the check rule, the execution order of the check rule before the update pre-processing rule, and the execution order of the update pre-processing rule before the update post-processing rule.
In a possible manner, for the state update rules belonging to the same rule type, the server may process in parallel, or may process according to an execution sequence preset by a worker.
S503, the server sequentially executes the instances of the state updating rules in the target rule subset according to the execution sequence of the state updating rules in the target rule subset so as to update the node state of the target node.
In a possible manner, after determining the execution sequence of each state update rule in the target rule subset, the server may sequentially execute the instances of each state update rule in the target rule subset according to the execution sequence of each state update rule in the target rule subset, so as to update the node state of the target node.
Optionally, when the current node information of the target node meets the limitation of the condition rule and passes the parameter verification of the verification rule, the updated node state of the target node may be the target state. When the current node information of the target node does not meet the limit of the condition rule and/or the check rule fails to enter the parameter check, the updated node state of the target node can be approved to be failed.
In this way, in the node state updating process, the server can query all the configured state updating rules from the preset rule set in real time, and based on the rule types of the state updating rules, apply the state updating rules to execute in the node state updating process so as to dynamically enhance the business logic before and after the node state updating.
In one embodiment, in S301, that is, when the server determines, from the preset rule set, a target rule subset corresponding to the target node, an alternative implementation manner is provided in an embodiment of the present application, where the alternative implementation manner includes: s601.
S601, the server determines a rule subset corresponding to the target node in the preset rule set as a target rule subset.
In an embodiment, before S301, that is, before the server determines, from the preset rule set, the target rule subset corresponding to the target node in response to the state update instruction triggered to the target node in the workflow, as shown in fig. 6, the state update method provided in the embodiment of the present application further includes: S701-S702.
S701, the server receives a state update request for updating the node state of the target node.
Wherein the status update request includes a status update instruction.
In one possible approach, the user may perform a status update operation (e.g., clicking a confirm button) on the target node through an input module configured by the terminal. In response to the status update operation, the terminal may send a status update request carrying a status update instruction to the server to update the node status of the target node. Accordingly, the server may receive a state update request for updating the node state of the target node.
S702, the server analyzes the state update request to obtain a state update instruction.
In an embodiment, before S301, that is, before the server determines, from the preset rule set, the target rule subset corresponding to the target node in response to the state update instruction triggered to the target node in the workflow, as shown in fig. 7, the state update method provided in the embodiment of the present application further includes: S801-S802.
S801, the server receives current event information.
The current event information comprises description information of an event occurring at the current moment. Such as the time of occurrence of the event and the file path involved, etc.
In one possible manner, the user may perform a specific operation (e.g., a file save operation, a delivery confirmation operation, etc.) at a client of the workflow service through the input module configured by the terminal when the specific service (e.g., a file edit service, an item delivery service, etc.) is completed. In response to the specific operation, the terminal may execute corresponding service logic (e.g., file storage logic, delivery information confirmation logic, etc.) and record as current event information. The terminal may then send the current event information to the server. Accordingly, the server may receive current event information from the terminal.
In one possible approach, the terminal may add the node identification of the target node to the current event information when the particular operation is an operation associated with the target node.
S802, when the event occurring at the current moment is matched with the event triggering rule in the target rule subset, the server triggers a state updating instruction for the target node.
It should be noted that the target rule subset may further include at least one event-triggered rule associated with the target node. The event triggering rule is used for automatically triggering a node state updating flow about the target node when a specific event occurs. An event trigger rule may be considered a trigger entry for a status update.
In one possible manner, after receiving the current event information, the server may parse the current event information to determine an event occurring at the current time. If the current event information further includes a node identifier of the target node, the server may determine the target rule subset, and further determine whether an event occurring at the current time matches an event trigger rule in the target rule subset. If the event occurring at the current time matches the event trigger rule in the target rule subset, the server may trigger a status update instruction for the target node. If the event occurring at the current time does not match the event trigger rule in the target rule subset, the server may not trigger a status update instruction for the target node.
If the current event information does not include the node identifier of the target node, the server can match the event occurring at the current moment with event triggering rules included in each rule subset in the preset rule set. Then, if the server determines that the event occurring at the current time matches the event trigger rule in the target rule subset, a state update instruction for the target node may be triggered. If the server determines that the event occurring at the current moment is not matched with the event triggering rule in the target rule subset, the state updating instruction for the target node may not be triggered.
In one embodiment, as shown in fig. 8, a schematic diagram of a rule management flow provided in an embodiment of the present application is shown. The developer can uniformly define the rule types of the rules applied in the node state updating process and abstract the business characteristics of each rule type to determine the classification specifications and the business characteristics corresponding to the rule types. Then, the developer may develop the state update rule according to the classification specification corresponding to each rule type, and store the state update rule in the database. Then, the developer can configure the state update rule for each node in the workflow, set the runtime parameters of each state update rule, and further save the configured association relationship into the preset rule set. Based on this, the server may apply the node-associated state update rules to different execution opportunities in the state update process.
In one embodiment, as shown in fig. 9, a schematic diagram of a status update procedure according to an embodiment of the present application is provided. The start of the process may be a passive trigger state update process, i.e. when the server determines an event occurring at the current time, it may query a preset rule set to determine whether there is an event trigger rule matching the event occurring at the current time. If there is an event trigger rule matching the event occurring at the current time, the server may trigger a state update instruction to start updating the node state of the target node. If no event triggering rule matched with the event occurring at the current moment exists, the state updating flow is terminated in advance.
Or, the start of the process may be active triggering of the state update process, that is, the server parses the received state update request to obtain a state update instruction, so as to start updating the node state of the target node.
The server may then query all state update rules associated with the target node from a set of preset rules stored in the database and group the queried state update rules by rule type.
The server may then determine if a conditional rule exists. If no condition rule exists, the server may continue to determine if a check rule exists. If a condition rule exists, the server may execute the condition rule to determine whether the current node information of the target node satisfies one or more requirements. If the current node information of the target node meets all the necessary conditions defined by the condition rule, the server can determine whether a check rule exists. If the current node information of the target node does not meet any one of the necessary conditions defined by the condition rule, the server may terminate the state update flow in advance.
Then, if the server determines that the check rule does not exist, it may be continued to determine whether or not the pre-update processing rule exists. If the server determines that the check rule exists, the server may execute the check rule to perform the parameter entering check on the current node information of the target node. If the current node information of the target node passes the check of the entry, the server can continuously determine whether the pre-update processing rule exists. If the current node information of the target node fails the entry verification, the server may terminate the state update flow in advance.
Then, if the server determines that the pre-update processing rule does not exist, the node state of the target node may be updated and recorded in the database. If the server determines that the pre-update processing rule exists, the server may execute the pre-update processing rule to transition the node state of the node from the current state to the target state.
The server may then determine whether an updated post-processing rule exists. If the server determines that the post-update processing rule does not exist, the state update flow ends. If the server determines that there is an update post-processing rule, the server may execute the update post-processing rule to record a log of a node state transition process or the like with respect to the node. The state update flow ends up here.
In the embodiment of the present application, since the preset rule set includes a plurality of rule subsets corresponding to a plurality of nodes one by one, and the rule subsets include at least one status update rule associated with the nodes. Therefore, the server may obtain a target rule subset corresponding to the target node from the preset rule set in response to the state update instruction triggered to the target node, and update the node state of the target node further based on the state update rule in the target rule subset. Based on the above, the present application may implement updating the state control logic of any node by updating the state update rule of any node in the preset rule set.
Compared with the scheme of modifying the workflow service application program in the general technology, the method and the device can update the state control logic of the node by updating the preset rule set which is not contained in the workflow service application program, and can flexibly modify the state control logic of the node, so that the problem of low efficiency caused by shutdown update is avoided. Therefore, the technical problem of low efficiency existing in the general technology can be solved.
The foregoing description of the solution provided in the embodiments of the present application has been mainly presented in terms of a method. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application may divide the functional modules of the server according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. Optionally, the division of the modules in the embodiments of the present application is schematic, which is merely a logic function division, and other division manners may be actually implemented.
Fig. 10 is a schematic structural diagram of a status updating device according to an embodiment of the present application. The status updating means may be adapted to perform the status updating method as shown in fig. 3-7. The status updating device comprises: a determination unit 901 and an update unit 902;
a determining unit 901, configured to determine a target rule subset corresponding to a target node from a preset rule set in response to a state update instruction triggered on the target node in the workflow; the preset rule set comprises a plurality of rule subsets which are in one-to-one correspondence with the plurality of nodes; the rule subset includes at least one state update rule associated with the node; the target node is any one of a plurality of nodes; for example, in connection with fig. 3, the determination unit 901 may be used to perform S301.
An updating unit 902, configured to update the node status of the target node based on the status update rules in the target rule subset. For example, in connection with fig. 3, the updating unit 902 may be used to perform S302.
Optionally, the state updating device further includes: a receiving unit 903;
a receiving unit 903, configured to receive a configuration update request for updating the target rule subset during an execution process of an application to which the workflow belongs; the configuration update request includes rules to be configured associated with the target node; for example, in connection with fig. 4, the receiving unit 903 may be used to perform S401.
The updating unit 902 is further configured to update an association relationship between the target node and the rule to be configured in a target rule subset included in the preset rule set. For example, in connection with fig. 4, the updating unit 902 may be used to perform S402.
Optionally, the updating unit 902 is specifically configured to:
determining rule types of all state updating rules in the target rule subset; the rule type comprises any one of a condition rule, a check rule, a pre-update processing rule and a post-update processing rule; for example, in connection with fig. 5, the updating unit 902 may be used to perform S501.
Determining the execution sequence of each state update rule in the target rule subset based on the rule type of each state update rule in the target rule subset; for example, in connection with fig. 5, the updating unit 902 may be used to perform S502.
And sequentially executing the instances of the state updating rules in the target rule subset according to the execution sequence of the state updating rules in the target rule subset so as to update the node state of the target node. For example, in connection with fig. 5, the updating unit 902 may be used to perform S503.
Optionally, the execution order of the condition rules is located before the execution order of the check rules; the execution sequence of the verification rule is positioned before the execution sequence of the processing rule before updating; the execution order of the pre-update processing rules is before the execution order of the post-update processing rules.
Alternatively, the determining unit 901 is specifically configured to:
and determining a rule subset corresponding to the target node in the preset rule set as a target rule subset. For example, the determination unit 901 may be used to perform S601.
Optionally, the receiving unit 903 is further configured to receive a state update request for updating a node state of the target node; the status update request includes a status update instruction; for example, in connection with fig. 6, the receiving unit 903 may be used to perform S701.
The determining unit 901 is further configured to parse the status update request to obtain a status update instruction. For example, in connection with fig. 6, the determination unit 901 may be used to perform S702.
Optionally, the target rule subset further comprises at least one event-triggered rule associated with the target node;
a receiving unit 903, configured to receive current event information; the current event information comprises description information of an event occurring at the current moment; for example, in connection with fig. 7, the receiving unit 903 may be used to perform S801.
The determining unit 901 is further configured to trigger a status update instruction for the target node when an event occurring at the current time matches an event trigger rule in the target rule subset. For example, in connection with fig. 7, the determination unit 901 may be used to perform S802.
Those of skill in the art will appreciate that in one or more of the examples described above, the functions described herein may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer-readable storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and the modules or units may be divided into only one type of logic function, and there may be other manners of dividing the modules or units when actually implemented. For example, multiple units or components may be combined or may be integrated into another device, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form. The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions easily conceivable by those skilled in the art within the technical scope of the present application should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (16)

1. A method for updating a state, comprising:
determining a target rule subset corresponding to a target node from a preset rule set in response to a state update instruction triggered to the target node in the workflow; the preset rule set comprises a plurality of rule subsets which are in one-to-one correspondence with a plurality of nodes; the rule subset includes at least one status update rule associated with the node; the target node is any one node of the plurality of nodes;
updating the node state of the target node based on the state update rules in the target rule subset.
2. The status updating method according to claim 1, further comprising:
receiving a configuration update request for updating the target rule subset in the execution process of the application program to which the workflow belongs; the configuration update request includes a rule to be configured associated with the target node;
And updating the association relation between the target node and the rule to be configured in the target rule subset included in the preset rule set.
3. The state updating method according to claim 1 or 2, wherein the updating the node state of the target node based on the state updating rule in the target rule subset comprises:
determining rule types of all state update rules in the target rule subset; the rule type comprises any one of a condition rule, a check rule, a pre-update processing rule and a post-update processing rule;
determining the execution sequence of each state update rule in the target rule subset based on the rule type of each state update rule in the target rule subset;
and sequentially executing the instances of the state updating rules in the target rule subset according to the execution sequence of the state updating rules in the target rule subset so as to update the node state of the target node.
4. A state updating method according to claim 3, wherein the execution order of the condition rules is before the execution order of the check rules; the execution sequence of the check rule is positioned before the execution sequence of the pre-update processing rule; the execution sequence of the pre-update processing rule is located before the execution sequence of the post-update processing rule.
5. The status updating method according to claim 1 or 2, wherein the determining a target rule subset corresponding to the target node from a preset rule set includes:
and determining a rule subset corresponding to the target node in the preset rule set as the target rule subset.
6. The method according to claim 1 or 2, wherein before determining a target rule subset corresponding to a target node from a preset rule set in response to a status update instruction triggered to the target node in a workflow, the method further comprises:
receiving a state update request for updating the node state of the target node; the status update request includes the status update instruction;
and analyzing the state update request to obtain the state update instruction.
7. The status updating method according to claim 1 or 2, wherein the target rule subset further comprises at least one event-triggered rule associated with the target node; the method for determining the target rule subset corresponding to the target node in the workflow according to the state update instruction triggered to the target node in the workflow further comprises the following steps:
Receiving current event information; the current event information comprises description information of an event occurring at the current moment;
and triggering a state updating instruction for the target node when the event occurring at the current moment is matched with the event triggering rule in the target rule subset.
8. A status updating apparatus, comprising: a determining unit and an updating unit;
the determining unit is used for determining a target rule subset corresponding to the target node from a preset rule set in response to a state update instruction triggered to the target node in the workflow; the preset rule set comprises a plurality of rule subsets which are in one-to-one correspondence with a plurality of nodes; the rule subset includes at least one status update rule associated with the node; the target node is any one node of the plurality of nodes;
the updating unit is configured to update a node state of the target node based on a state update rule in the target rule subset.
9. The status updating apparatus according to claim 8, further comprising: a receiving unit;
the receiving unit is used for receiving a configuration update request for updating the target rule subset in the execution process of the application program to which the workflow belongs; the configuration update request includes a rule to be configured associated with the target node;
The updating unit is further configured to update, in the target rule subset included in the preset rule set, an association relationship between the target node and the rule to be configured.
10. The status updating device according to claim 8 or 9, wherein the updating unit is specifically configured to:
determining rule types of all state update rules in the target rule subset; the rule type comprises any one of a condition rule, a check rule, a pre-update processing rule and a post-update processing rule;
determining the execution sequence of each state update rule in the target rule subset based on the rule type of each state update rule in the target rule subset;
and sequentially executing the instances of the state updating rules in the target rule subset according to the execution sequence of the state updating rules in the target rule subset so as to update the node state of the target node.
11. The state updating apparatus according to claim 10, wherein an execution order of the condition rule is located before an execution order of the check rule; the execution sequence of the check rule is positioned before the execution sequence of the pre-update processing rule; the execution sequence of the pre-update processing rule is located before the execution sequence of the post-update processing rule.
12. The status updating device according to claim 8 or 9, wherein the determining unit is specifically configured to:
and determining a rule subset corresponding to the target node in the preset rule set as the target rule subset.
13. The status updating device according to claim 8 or 9, wherein,
the receiving unit is further configured to receive a state update request for updating a node state of the target node; the status update request includes the status update instruction;
the determining unit is further configured to parse the status update request to obtain the status update instruction.
14. The status updating apparatus according to claim 8 or 9, wherein the target rule subset further comprises at least one event-triggered rule associated with the target node;
the receiving unit is also used for receiving the current event information; the current event information comprises description information of an event occurring at the current moment;
the determining unit is further configured to trigger a state update instruction for the target node when the event occurring at the current time matches an event trigger rule in the target rule subset.
15. A state updating device, comprising a memory and a processor; the memory is used for storing computer execution instructions, and the processor is connected with the memory through a bus; when the state updating device is running, the processor executes the computer-executable instructions stored in the memory to cause the state updating device to perform the state updating method of any of claims 1-7.
16. A computer readable storage medium comprising computer executable instructions which, when run on a computer, cause the computer to perform the state updating method of any of claims 1-7.
CN202310317796.2A 2023-03-27 2023-03-27 State updating method, device and storage medium Pending CN116450175A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310317796.2A CN116450175A (en) 2023-03-27 2023-03-27 State updating method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310317796.2A CN116450175A (en) 2023-03-27 2023-03-27 State updating method, device and storage medium

Publications (1)

Publication Number Publication Date
CN116450175A true CN116450175A (en) 2023-07-18

Family

ID=87131367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310317796.2A Pending CN116450175A (en) 2023-03-27 2023-03-27 State updating method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116450175A (en)

Similar Documents

Publication Publication Date Title
US20240064058A1 (en) Implementation of compliance settings by a mobile device for compliance with a configuration scenario
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
US8407306B1 (en) Systems and methods for managing message delivery based on message priority
US20150347305A1 (en) Method and apparatus for outputting log information
CN112162965B (en) Log data processing method, device, computer equipment and storage medium
CN109617646A (en) Message forwarding method, device, computer equipment and computer readable storage medium
CN111800462A (en) Micro-service instance processing method and device, computer equipment and storage medium
CN110764913B (en) Data calculation method based on rule calling, client and readable storage medium
CN112805980A (en) Techniques for query-free device configuration determination for mobile device management
CN105847446B (en) Method, device and system for acquiring network data
CN114157679A (en) Cloud-native-based distributed application monitoring method, device, equipment and medium
CN110737425B (en) Method and device for establishing application program of charging platform system
JP7161560B2 (en) Artificial intelligence development platform management method, device, medium
CN114185734A (en) Cluster monitoring method and device and electronic equipment
CN108733536B (en) Monitoring management system and method
CN112380411B (en) Sensitive word processing method, device, electronic equipment, system and storage medium
US7778660B2 (en) Mobile communications terminal, information transmitting system and information receiving method
CN116450175A (en) State updating method, device and storage medium
CN114564249A (en) Recommendation scheduling engine, recommendation scheduling method, and computer-readable storage medium
CN113282850B (en) Resource tag management method, device, electronic equipment, system and storage medium
CN110928572A (en) Interface calling and service system separation method, system and computer equipment
CN109977659A (en) Weblogic automatically creates method, system, device and the storage medium of local user
CN117112368B (en) Abnormality processing method, abnormality processing device, electronic equipment and storage medium
CN107632840B (en) Task execution method and system of application program
EP4075731A1 (en) Data management method and apparatus, and device, computer-readable storage medium, and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination