CN113986203B - Trigger automatic verification method and system, electronic equipment and storage medium - Google Patents

Trigger automatic verification method and system, electronic equipment and storage medium Download PDF

Info

Publication number
CN113986203B
CN113986203B CN202111242432.XA CN202111242432A CN113986203B CN 113986203 B CN113986203 B CN 113986203B CN 202111242432 A CN202111242432 A CN 202111242432A CN 113986203 B CN113986203 B CN 113986203B
Authority
CN
China
Prior art keywords
trigger
action
node
state
verified
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.)
Active
Application number
CN202111242432.XA
Other languages
Chinese (zh)
Other versions
CN113986203A (en
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.)
Chongqing Yunfeng Technology Co ltd
Original Assignee
Chongqing Yuncheng Internet Technology 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 Chongqing Yuncheng Internet Technology Co Ltd filed Critical Chongqing Yuncheng Internet Technology Co Ltd
Priority to CN202111242432.XA priority Critical patent/CN113986203B/en
Publication of CN113986203A publication Critical patent/CN113986203A/en
Application granted granted Critical
Publication of CN113986203B publication Critical patent/CN113986203B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management
    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a trigger automatic verification method system, electronic equipment and a storage medium, which comprise the following contents: acquiring a triggering action and an executing action of a newly configured trigger, and recording the triggering action and the executing action as a triggering action to be verified and an executing action to be verified respectively; acquiring all associated triggers in a platform database according to the trigger action to be verified and the execution action to be verified, and constructing a virtual trigger flow network diagram; finding a trigger action source on the trigger flow mesh graph, and recording as a first trigger action; recursively traversing all triggers on the trigger flow mesh graph by taking the first trigger action as a starting node, and judging whether a downstream node is repeated with an upstream node which has already been traversed; if yes, the loop is a dead loop, and the trigger check is not passed; otherwise, the trigger passes the verification; the invention can effectively prevent endless loop, ensures low code and low cost development, has platform universality and has great value significance for platform service parties.

Description

Trigger automatic verification method and system, electronic equipment and storage medium
Technical Field
The invention relates to the technical development field of industrial internet platforms, in particular to an automatic trigger verification method and system, electronic equipment and a storage medium.
Background
With the development of an industrial internet management platform, more and more enterprises realize cloud service of a production line, and comprehensive unified management of enterprise factories including production management, material management, storage management, equipment management and the like can be realized through the cloud service. Since the industrial internet management platform serves various industries, and the specific business of each industry is different, if a code is developed separately for each business of each enterprise, it is obviously impractical for a platform service party serving thousands of enterprises or even thousands of enterprises. For this reason, most platform servers are currently dedicated to implement business management through low code or zero code, so as to reduce the development cost of the platform. For example, CN113094037A discloses a form and workflow interaction method, which can automatically acquire data collected by a form from a form engine by using a workflow engine according to an actual situation without requiring a developer to write codes to acquire the data, so that the interaction between the form and the workflow can be realized by zero codes; for another example, CN108399176A discloses a rule-based data processing method, in which a rule engine is disclosed, and the rule engine is commonly called a "trigger", and generally consists of a trigger rule and a target execution action, that is, when the actual condition meets a preset trigger condition, the system automatically executes a fixed action.
Through the combined configuration of the form engine, the workflow engine and the rule engine, even sales personnel who are not software engineers can rapidly configure a management system meeting the business requirements of an enterprise on a platform according to the actual requirements of the enterprise, the deployment time of cloud services on the enterprise is greatly shortened, and the use cost of the enterprise and the development cost of a platform service party are reduced; however, due to the fact that the configuration is too flexible, a configured flow may be wrong or a trigger cannot be used, wherein the most common situation is that a closed-loop trigger is formed among a plurality of triggers after the trigger configuration, for example: the form A triggers the data change of the form B, the form B triggers the data change of the form C, and the form C returns to trigger the data change of the form A, namely, A, B, C dead cycles occur among the three forms, so that the trigger cannot be used.
In response to this problem, those skilled in the art have sought to develop a verification method that automatically verifies trigger logic of a trigger.
Disclosure of Invention
In view of the above technical problems, the present invention provides an automatic calibration method for a trigger, which can accurately determine whether the configuration of the trigger is reasonable, prevent the configured trigger from generating a dead cycle, improve the correctness of the platform configuration trigger, and indirectly improve the user experience.
In one aspect, an embodiment of the present application provides an automatic calibration method for a trigger, including the following steps:
s100: configuring a trigger, wherein the trigger comprises a trigger action to be verified and an execution action to be verified;
s200: acquiring all associated triggers in a platform database according to the trigger action to be verified and the execution action to be verified, and constructing a virtual trigger flow network diagram;
the triggering flow mesh graph comprises nodes and a single connecting line between the nodes, the single connecting line and the nodes connected with the two ends of the single connecting line form a new trigger, and the nodes represent triggering actions or execution actions; the single connecting line represents the direction from the touch action to the execution action;
s300: finding a trigger action source on the trigger flow mesh graph, and recording as a first trigger action;
s400: recursively traversing all triggers on the trigger flow mesh graph by taking the first trigger action as a starting node, and judging whether a downstream node is repeated with an upstream node which has already been traversed; if yes, the loop is a dead loop, and the trigger check is not passed; otherwise, the trigger check passes.
In one aspect, an embodiment of the present application provides a system for automatically verifying a trigger, including:
the data acquisition module is used for acquiring all the associated triggers in the platform database according to the trigger actions to be verified and the execution actions to be verified of the newly configured triggers;
the building module is used for integrating and fusing all the single associated triggers to build a virtual trigger flow mesh chart;
the searching module is used for searching a triggering action source of the triggering flow reticular chart;
the verification module is used for recursively traversing all triggers on the trigger flow mesh graph by taking a trigger action source as a starting node, and judging whether a downstream node is taken as a node for triggering action and executing action at the same time; if yes, the loop is a dead loop, and the trigger check is not passed; otherwise, the trigger check passes.
Optionally, the triggering action in step S100 is to trigger a form or a triggering process; correspondingly, the execution action is to execute a form or execute a flow.
Optionally, the specific steps of constructing the virtual trigger flow mesh graph in step S200 are as follows:
s201: acquiring all triggers related to the trigger actions in the database according to the trigger actions and the execution actions to form a trigger set;
s202: screening out triggering actions and executing actions used by all triggers in the trigger set, and performing action duplication removal to obtain an action node set;
s203: and (5) drawing the trigger action to be verified and the execution action to be verified in the step (S100) into a trigger flow mesh graph by taking the first node as a center node, drawing all triggers in the trigger set onto the trigger flow mesh graph, and connecting the nodes through a single connecting line to form a virtual trigger flow mesh graph.
Optionally, the step S202 includes the following steps: all action elements in the action node set are processed, and the degree of each action element is reset to zero;
the in degree represents the number of single connecting lines pointing to the action element;
in step S203, the entry value of each action element is updated and recorded while the nodes are connected by a single connection;
the first trigger action in step S300 is an action element with an in-degree value of 0.
Optionally, if no action element with an in-degree value of 0 is used as the first trigger action, the trigger check is directly returned to fail, and the subsequent steps are not executed.
Optionally, the specific steps of step S400 are as follows:
s401: identifying each downstream node by color to perform a traversal process;
in particular, different colors are used for representing the process state of node traversal,
the first state represents the initial state of the node before verification, and the state is represented by a first color;
the second state represents a state that the node is verified as a trigger action of a certain trigger, and the state is represented by a second color;
the first state is changed to the second state in a single direction, and the corresponding first color is switched to the second color in a single direction;
s402: in the process of recursively traversing all triggers on the trigger flow mesh graph, if the color of the downstream node is found to be the second color when the execution action of the previous trigger starts traversing the next downstream node, it indicates that the downstream node is repeated with the traversed upstream node, and the trigger check fails.
Optionally, the process state of node traversal in S401 further includes a third state, where the third state indicates that there is no downstream node of the node or a state where the downstream node is ended in traversal; the status is represented by a third color;
the first state, the second state and the third state are sequentially changed in a one-way mode, and the corresponding first color, the second color and the third color are switched in a one-way mode.
In one aspect, an embodiment of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method when executing the computer program.
In one aspect, an embodiment of the present application provides a computer-readable storage medium having stored thereon computer program instructions, which, when executed by a processor, implement the steps of the above-described method.
After the configuration of the trigger is completed, automatically acquiring triggers related to the configured trigger in the system to form a trigger aggregate, integrating and de-duplicating the triggering action and the executing action of the trigger to obtain an action aggregate, then taking the triggering action and the executing action of the configured trigger as starting nodes, taking all triggers in the trigger aggregate as the basis, sequentially establishing triggering relations between the triggers and the starting nodes according to triggering logic to form a virtual triggering flow mesh graph of the whole system, then recursively traversing the nodes on the triggering flow mesh graph according to the triggering flow mesh graph, and judging whether a downstream node is duplicated with an upstream node which is traversed, if so, the configured trigger triggers dead cycle, the check is not passed, otherwise, the configured trigger passes; by the trigger verification in the process, the condition that the configured trigger has dead circulation in the running process can be avoided, the condition that the trigger is crashed due to the dead circulation is effectively prevented, the trigger deployment correctness of sales and implementation personnel is ensured, and the customer experience is indirectly improved; in addition, the condition of triggering the dead loop is prevented, so that the problems of dirty data and data coverage caused by loop triggering are avoided, and the effect of improving the accuracy of system data is achieved. Therefore, the invention can ensure the correct operation of platform services under the conditions of ensuring low code, low-cost development and platform universality, and has great value significance for platform service parties.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart illustrating a method for automatic verification of a trigger in one embodiment;
fig. 2 is a schematic flowchart illustrating a detailed process of constructing a virtual trigger flow mesh diagram in step S200 in fig. 1;
FIG. 3 is a schematic diagram illustrating a specific process of determining whether there is a dead loop in step S400 in FIG. 1;
FIG. 4 is a schematic diagram illustrating the flow of a full-flow logic determination in one embodiment;
FIG. 5 is a first flowchart illustrating a method for determining whether a loop is present according to one embodiment;
FIG. 6 is a flow diagram of a second embodiment for determining whether a dead cycle exists;
FIG. 7 is a third flowchart illustrating the determination of the presence of a dead loop according to one embodiment;
fig. 8 is a schematic structural diagram of an automatic trigger verification system according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the application.
Detailed Description
To further illustrate the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide the method operation steps as shown in the following embodiments or figures, more or less operation steps may be included in the method based on the conventional or non-inventive labor. In steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application.
In a specific practical process, the trigger required to be used by an enterprise client cannot be configured at one time, but is gradually configured and improved in the using process. Of course, at present, only one configuration trigger can be configured, and only one trigger action and execution action exist in one trigger, so that one trigger cannot realize continuous triggering. However, the trigger action and execution action of the configured trigger may be repeated with the trigger action and execution action already existing in the system, so that it is highly likely that the configured new trigger and the existing trigger form a cyclic trigger. In order to avoid the situation, the invention provides an automatic trigger checking method, which comprises the steps of forming an action node set through pulling an existing associated trigger in a system and the trigger set, constructing a virtual full-system trigger flow mesh graph by utilizing the action node set, and then carrying out recursive traversal checking, so that the correctness of a checking result can be ensured, the whole calculation logic is simple, and the running speed of data checking is improved; the method and the device realize quick and accurate verification, prevent the trigger from being triggered circularly, and improve the deployment efficiency of the platform service and the user experience.
After introducing the design concept of the embodiment of the present application, some simple descriptions are made below for application scenarios to which the technical solution of the embodiment of the present application can be applied, and it should be noted that the application scenarios described below are only used for explaining the embodiment of the present application and are not limited to specific use scenarios of the present invention. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
Referring to fig. 1 to 9, an automatic trigger verification method includes the following steps:
s100: acquiring a triggering action and an executing action of a newly configured trigger, and recording the triggering action and the executing action as a triggering action to be verified and an executing action to be verified respectively; specifically, the triggering action in step S100 is to trigger a form or a triggering process; correspondingly, the execution action is to execute a form or execute a flow.
In the actual application process, the form is triggered to be executed correspondingly, and the flow is triggered to be executed correspondingly. In this embodiment, the trigger form is used to execute the example application corresponding to the form.
As shown in fig. 4, in the specific implementation, for example, the newly created trigger is an "add" action of "stock entry" to trigger an "add" action of "stock change list" and is denoted as an a trigger.
S200: acquiring all associated triggers in a platform system database according to the trigger action to be verified and the execution action to be verified, and constructing a virtual trigger flow network diagram;
the trigger flow mesh graph comprises nodes and single connecting lines between the nodes, the single connecting lines and the nodes connected with the two ends of the single connecting lines form a new trigger, and the nodes represent trigger actions or execution actions; the single line represents the direction from which the touch action is to be performed.
In one embodiment, the step of constructing the virtual trigger flow mesh graph includes:
s201: acquiring all triggers related to the trigger actions to be verified in a database according to the trigger actions to be verified and the execution actions to be verified to form a trigger set;
as shown in fig. 4, in a specific implementation, for example, the "warehousing entry" and the "inventory change detail table" are used to search for the trigger using the "warehousing entry" and the "inventory change detail table" in the system, and after the search, the other triggers using the "warehousing entry" are not used, and there are 3 associated triggers using the "inventory change detail table", which are respectively the B trigger, the C trigger, and the D trigger. The a flip-flop forms a flip-flop set with the aforementioned B, C, D three flip-flops. The specific triggers have the following triggering and executing relations:
trigger A- "new" of "warehouse entry" triggers "new" of inventory change list ";
b trigger- "inventory change list" newly-increased "trigger" material list "to execute" update ";
c trigger- "inventory change detail table" update "trigger" inventory detail ledger "execute" update ";
the "update" of the D trigger- "inventory details ledger" triggers the "execution" of the "inventory change details table.
S202: screening out triggering actions and executing actions used by all triggers in the trigger set, and performing action duplication removal to obtain an action node set;
as shown in fig. 4, according to the example of the foregoing steps, when this step is implemented, an action node set composed of forms is obtained first, and a form set is obtained by removing duplicate forms. The list set after the duplication removal contains four lists which are respectively a 'warehousing list', 'inventory change detail list', 'material list' and 'inventory detail ledger'.
S203: drawing the trigger action to be verified and the execution action to be verified in the step S100 into a trigger flow mesh graph by taking the first node as a first node, and then drawing the form in the form set around the first node in a node mode by taking the first node as a center; and finally, connecting the nodes through a single connecting line according to the triggering relation in the trigger set to form a virtual triggering flow mesh graph.
In an embodiment, the trigger flow mesh graph can also be drawn in such a way, that is, after the first node is taken as the center, the forms in the form set are drawn around the first node in a node manner; and finally, connecting the nodes through a single connecting line according to the triggering relation in the trigger set to form a virtual triggering flow mesh graph.
As shown in fig. 4, according to the example of the foregoing steps, when the step is implemented, the node of the trigger a is drawn in the graph, and then all the forms in the form set are drawn around the "inventory change details" or the "warehousing entry"; finally, three triggers B, C, D are sequentially drawn in the figure by referring to the processes of steps 1, 2, 3 and 4 in fig. 4 in combination with the trigger relations in the trigger set. In this embodiment, a D trigger is added in step 2, a C trigger is added in step 3, and a B trigger is added in step 4, and the process of adding triggers in the actual process is not limited, and finally, a complete trigger flow mesh diagram is constructed and formed, as shown in fig. 5.
S300: finding a trigger action source on the trigger flow mesh chart, and recording as a first trigger action;
specifically, step S202 includes the following steps: setting an in degree for each action element in the action node set, and zeroing the in degree of each action element;
as shown in fig. 4, in the present embodiment, the entry degree is denoted by P, and according to the example of the foregoing steps, when the present step is implemented specifically, P =0 of "warehousing entry", "inventory change list", "material list", and "inventory detail ledger" in step S202;
in-degree-represents the number of singleton connections that point to the action node.
In step S203, the entry value of each action element is updated and recorded while the nodes are connected by a single connection;
as shown in fig. 4, according to the example of the foregoing steps, when this step is implemented, P =2 of the "inventory detail ledger" is finally obtained, because there are two single connecting lines pointing back; p =0 for "put in note" because no single item connection points back; the P of the corresponding "inventory detail ledger" and "Material" is equal to 1, since there is only one single connection pointing back.
The first trigger action in step S300 is an action element with an in-degree value of 0.
By adopting the input value mode, the first trigger action with the input value of 0 can be found immediately when the trigger flow is complete, so that the recursive traversal verification step can be performed immediately, and the verification efficiency of the trigger can be effectively improved.
If no action element with the value of the degree of entry being 0 serves as a first trigger action, the trigger is directly returned to fail to be checked, and the subsequent steps are not executed. Because the trigger flow mesh graph is very complex and huge when no action element with the income value of 0 is found on the trigger flow mesh graph, and the trigger verification is very time-consuming at this moment, the invention directly ends the verification when no action element with the income value of 0 is detected as an element so as to further ensure the verification efficiency of the trigger.
By ensuring the verification efficiency of the trigger, the experience of the trigger configured by a user is improved, and the experience of the user is not reduced due to the addition of a dead cycle verification rule.
As shown in fig. 4, according to the example of the foregoing steps, since P =0 of the "warehousing entry" is implemented in this step, the first trigger action is the "addition" action of the warehousing entry. If no action element with the value of the degree of entry being 0 serves as a first trigger action, the trigger is directly returned to fail to be checked, and the subsequent steps are not executed.
S400: recursively traversing all triggers on the trigger flow mesh graph by taking the first trigger action as a starting node, and judging whether the downstream node is repeated with the traversed upstream node or not; if yes, the loop is an endless loop, and the trigger check is not passed; otherwise, the trigger check passes.
As shown in fig. 5, the "warehousing entry" is taken as the first trigger action, and is regarded as the first-level node, traversal is started, the "new addition" of the "warehousing entry" is triggered to execute the "new addition" of the "inventory change details", and the trigger verification of the first-level node is finished; then, starting traversal by taking the inventory change details as a second-level node, wherein due to the fact that the second-level node is verified, a plurality of branch triggers exist and all branch triggers need to be verified, and a specific verification process example is as follows:
verification of the first branch: triggering and executing the 'updating' of the 'materials' through 'adding' of 'inventory change details';
and verification of the second branch: the "update" of the "inventory details ledger" is triggered to be executed by the "update" of the "inventory change details".
The two branches are verified without a sequence, other embodiments can be carried out simultaneously or one by one, and the second-level node verification is finished.
And continuously traversing the third-level node, and if the triggering operation is not carried out after the material form, the triggering verification of the branch of the material form is completely ended. And a triggering action is carried out under the branch of the inventory detail ledger form, and the triggering verification of the third-level node is continuously carried out, wherein the triggering process of the third-level node is the updating of the inventory detail ledger, and the updating of the inventory change detail table is triggered and executed. At the moment, the downstream node of the trigger is repeated with the traversed upper node, so that the platform system prompts that the triggering verification has dead circulation, and the verification fails. In one embodiment, step S400 further includes the steps of:
s401: identifying the process of traversing each downstream node through colors, and determining the corresponding relation between the colors and the states of the downstream nodes;
in particular, different colors are used for representing the process state of node traversal,
the first state represents the initial state of the node before verification, and the state is represented by a first color;
the second state represents a state in which the node has been verified as a trigger action of a certain trigger (i.e., the node has been the upstream node), and the state is represented by a second color;
the first state is changed to the second state in a one-way mode, and the corresponding first color is switched to the second color in a one-way mode;
as shown in fig. 5 to 7, according to the example of the foregoing steps, the first color is white and the second color is gray when the step is implemented. Thus, FIG. 5 shows that the trigger flow mesh does not initiate data checking, so all nodes are white.
S402: and recursively traversing the downstream nodes by using the corresponding relation of the colors and the states of the downstream nodes, and judging whether the endless loop condition exists.
Specifically, in the process of recursively traversing all triggers on the trigger flow mesh graph, if the execution action of the previous trigger starts traversing the next downstream node, it is found that the color of the downstream node is already the second color, that is, the node state does not correspond to the preset state, and the node color also does not correspond to the preset color, it is indicated that the downstream node is repeated with the traversed upstream node, and the trigger check does not pass.
As shown in fig. 6, according to the example of the foregoing steps, when this step is implemented, the "warehousing entry" is verified for the first-level node, that is, the "new addition" of the "warehousing entry" is triggered, and the "new addition" of the "inventory change details" is triggered to be executed, which indicates that the "warehousing entry" node is verified as the upstream node, so that the color of the "warehousing entry point" node changes from white to gray, and at this time, the "inventory change details" node is not verified, and the color remains white. According to the principle, the process is repeated in analogy, and after the 'updating' of the 'inventory change detail' is triggered to be executed, the 'updating' of the 'inventory change detail ledger' is changed from white to grey; when the third-level node check is performed later, that is, "update" of "inventory details ledger" is triggered to perform "update" of "inventory change details table", if it is found that the node of "inventory change details table" is gray instead of white, it indicates that the downstream node is repeated with the traversed upstream node, and the trigger check is failed, as shown in fig. 7.
In a specific embodiment, the process state of node traversal in step S401 further includes a third state, where the third state indicates that there is no downstream node of the node or that the downstream node is ended in traversal; the status is represented by a third color;
the first state, the second state and the third state are sequentially changed in a one-way mode, and the corresponding first color, the corresponding second color and the corresponding third color are sequentially switched in a one-way mode.
As shown in fig. 5 to 7, when this step is implemented according to the example of the foregoing steps, fig. 5 shows that the recursive traversal of the node is not started temporarily.
As shown in fig. 6, the "warehousing entry" node starts recursive traversal, that is, the "warehousing entry" node has already triggered "new addition" of the "inventory change list" through the formulas "trigger action = new addition, trigger form = warehousing entry, target form = inventory details, execute action = new addition". At this time, the color of the "warehousing entry" node is changed from white to gray.
As shown in fig. 7, the "warehousing entry" node starts recursive traversal, that is, the "warehousing entry" node has already passed through the formulas "trigger action = new addition, trigger form = warehousing entry, target form = stock details, execute action = new addition", and trigger "new addition" of the "stock change details table". At this time, the color of the "warehousing entry" node is changed from white to gray.
Then, after the execution action of 'adding' of the 'stock change list' is executed, the node of the 'stock change list' also starts recursive traversal; it changes from white to gray.
Traversing the first branch of the inventory change detail table, wherein the traversing trigger formula is that triggering action = newly adding, triggering form = inventory change detail, target form = material, executing action = updating, and triggering the updating of the material. After the update of the material is completed, the node of the material starts to recursively traverse the lower node of the node, the material changes from white to gray, no downstream node exists under the material table, the traversal of the material table is completed, the node changes from gray to black, and the black represents the third color.
In an embodiment, in order to further ensure the trigger verification efficiency, the trigger level of the upper continuous trigger of the trigger flow mesh graph of the present invention is less than or equal to 3, and when the number of trigger levels is greater than 3, the trigger verification is stopped.
As shown in fig. 5 to 7, the trigger hierarchy of the specific example is just equal to 3, in other examples, more levels of trigger verification may be performed, and the specific number of trigger hierarchies is not limited by this embodiment. Based on the same inventive concept as the event linkage processing method, the embodiment of the present application further provides a system 10 for automatically verifying a trigger, including:
the data acquisition module 11 is used for acquiring the triggering action and the executing action of the newly configured trigger, recording the triggering action as a triggering action to be verified, and recording the executing action as an executing action to be verified;
acquiring all associated triggers in a platform system database according to the trigger action to be verified and the execution action to be verified;
a building module 12, configured to integrate and merge all the single associated triggers to build a virtual trigger flow mesh graph;
the method is specifically used for: constructing an associated trigger set, listing triggering actions and executing actions of all associated triggers, removing repeated actions in the triggering actions or the executing actions, and constructing an action node set; then taking out the trigger action to be verified and the execution action to be verified in the action node set, drawing the trigger action and the execution action to be verified into a trigger flow mesh graph as a first node, and then drawing the form in the form set around the first node in a node mode by taking the first node as a center; and finally, connecting the nodes through a single connecting line according to the triggering relation in the trigger set to form a virtual triggering flow mesh graph.
In an embodiment, the building module 12 further includes a counting unit 121, where the counting unit clears the entry values of the action node elements in the action node set when building the action node set, and counts the entry values when building the trigger flow mesh graph. So as to find the action node element with the access value of 0 and improve the verification efficiency.
The searching module 13 is configured to search a trigger action source of the trigger flow mesh, that is, search the first trigger action.
In an embodiment, the search module directly searches for an action node with an entry value of 0, and can quickly find the first trigger action, and further find the trigger verification entry.
The checking module 14 is configured to recursively traverse all triggers on the trigger flow mesh graph by using a trigger action source as a start node, and determine whether a downstream node is repeated with an upstream node that has already been traversed; if yes, the loop is a dead loop, and the trigger check is not passed; otherwise, the trigger check passes.
In one embodiment, the checking module 14 further comprises a color recognition module 141, which is used for representing the process status of node traversal by using different colors; different colors are used for representing different states of the node, a first state of the node represents an initial state of the node before verification, and the state is represented by the first color; the second state of a node represents a state in which the node has been verified as a trigger action of a certain trigger.
The first state is changed to the second state in a one-way mode, and the corresponding first color is switched to the second color in a one-way mode; the node state is recorded through the color, and the node state can be more intuitively identified.
In an embodiment, a terminal display module 15 may be further provided, where the terminal display module is configured to pop up an error-reporting trigger flow mesh chart as shown in fig. 7 when the verification fails, and the user may find the dead loop through color, so as to facilitate the user to reset a new trigger, and indirectly improve the efficiency of configuring the trigger by the user or the salesperson.
Based on the same inventive concept as the event linkage processing method, the embodiment of the present application further provides an electronic device 20, which may be specifically a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), a server, and the like. As shown in fig. 8, the electronic device further includes a memory 21, a processor 22, and a computer program stored in the memory and executable on the processor, and the processor implements the aforementioned trigger automatic verification method when executing the computer program.
The Processor 22 may be a general-purpose Processor, such as a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in a processor.
Memory 21, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charged Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory is 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, but is not limited to such. The memory 21 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function for storing program instructions and/or data.
Based on the same inventive concept as the above-mentioned event linkage processing method, the present application also provides a computer-readable storage medium, on which computer program instructions are stored, the computer program includes program instructions, when executed by a computer, the program instructions cause the computer to execute the trigger automatic verification method according to the foregoing embodiment, and the computer may also be a part of the above-mentioned trigger automatic verification system.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer-readable storage medium, and when executed, the processes of the embodiments of the methods described above can be included. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
It will be apparent to those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally they may be implemented in program code executable by a computing device, such that they may be stored on a computer storage medium (ROM/RAM, magnetic disks, optical disks) and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The foregoing is a more detailed description of the present invention that is presented in conjunction with specific embodiments, and the practice of the invention is not to be considered limited to those descriptions. For those skilled in the art to which the invention pertains, several simple deductions or substitutions can be made without departing from the spirit of the invention, and all shall be considered as belonging to the protection scope of the invention.

Claims (7)

1. An automatic trigger verification method is characterized by comprising the following steps:
s100: acquiring a triggering action and an executing action of a newly configured trigger, and recording the triggering action and the executing action as a triggering action to be verified and an executing action to be verified respectively;
s200: acquiring all associated triggers in a platform database according to the trigger action to be verified and the execution action to be verified, and constructing a virtual trigger flow network diagram;
the triggering flow mesh graph comprises nodes and a single connecting line between the nodes, the single connecting line and the nodes connected with the two ends of the single connecting line form a trigger, and the nodes represent triggering actions or execution actions; the single connecting line represents the direction from the touch action to the execution action;
the specific steps of constructing the virtual trigger flow mesh diagram in step S200 are as follows:
s201: acquiring all triggers related to the triggering action to be verified in a database according to the triggering action to be verified and the executing action to be verified to form a trigger set;
s202: screening out triggering actions and executing actions used by all triggers in the trigger set, and performing action duplication removal to obtain an action node set;
s203: drawing the trigger action to be verified and the execution action to be verified in the step S100 into a trigger flow mesh graph by taking the first node as a center node, drawing all triggers in a trigger set onto the trigger flow mesh graph, and connecting the nodes through a single connecting line to form a virtual trigger flow mesh graph;
the step S202 is followed by the steps of: setting an in-degree for each action element in the action node set, and zeroing the in-degree of each action element;
the in degree represents the number of single connecting lines pointing to the action element;
in step S203, the entry value of each action element is updated and recorded while the nodes are connected by a single connection;
the first trigger action in step S300 is an action element with an in-degree value of 0;
s300: finding a trigger action source on the trigger flow mesh graph, and recording as a first trigger action;
s400: recursively traversing all triggers on the trigger flow mesh graph by taking the first trigger action as a starting node, and judging whether a downstream node is repeated with an upstream node which has already been traversed; if yes, the loop is a dead loop, and the trigger check is not passed; otherwise, the trigger passes the verification;
the specific steps of step S400 are as follows:
s401: identifying the process of traversing each downstream node through colors, and determining the corresponding relation between the colors and the states of the downstream nodes;
in particular, different colors are used for representing the process state of node traversal,
the first state represents the initial state of the node before verification, and the state is represented by a first color;
the second state represents a state that the node is verified as a trigger action of a certain trigger, and the state is represented by a second color;
the first state is changed to the second state in a single direction, and the corresponding first color is switched to the second color in a single direction;
s402: recursively traversing the downstream nodes by using the corresponding relation of the colors and the states of the downstream nodes, and judging whether the endless loop condition exists;
specifically, in the process of recursively traversing all triggers on the trigger flow mesh, if the execution action of the previous trigger starts traversing the next downstream node, and the color of the downstream node is found to be the second color, it indicates that a closed loop is generated, and the trigger check fails.
2. The trigger automatic verification method of claim 1, wherein: the triggering action in the step S100 is a triggering form or a triggering process; correspondingly, the execution action is to execute a form or execute a flow.
3. The trigger automatic verification method of claim 1, wherein: if no action element with the entry value of 0 serves as the first trigger action, the trigger check is directly returned to fail, and the subsequent steps are not executed.
4. The trigger automatic verification method of claim 1, wherein: the process state of node traversal of S401 further includes a third state, where the third state indicates that there is no downstream node of the node or a state where the downstream node traversal is finished; the status is represented by a third color;
the first state, the second state and the third state are sequentially changed in a one-way mode, and the corresponding first color, the corresponding second color and the corresponding third color are sequentially switched in a one-way mode.
5. A system for automatic verification of triggers, comprising:
the data acquisition module is used for acquiring all associated triggers in the platform database according to the trigger action to be verified and the execution action to be verified, which are configured with one trigger;
the building module is used for integrating and fusing all the single associated triggers to build a virtual trigger flow mesh chart;
specifically, the specific process of constructing the virtual trigger flow mesh graph is as follows:
acquiring all triggers related to the trigger actions to be verified in a database according to the trigger actions to be verified and the execution actions to be verified to form a trigger set;
screening out triggering actions and executing actions used by all triggers in the trigger set, and performing action duplication removal to obtain an action node set;
drawing a trigger action to be verified and an execution action to be verified into a trigger flow network graph by taking a first node as a center node, drawing all triggers in a trigger set onto the trigger flow network graph, and connecting the nodes through a single connecting line to form a virtual trigger flow network graph;
the searching module is used for searching a triggering action source of the triggering flow mesh chart;
specifically, an income is set for each action element in the action node set, and the income of each action element is returned to zero;
the in degree represents the number of single connecting lines pointing to the action element;
updating and recording the in-degree value of each action element while connecting the nodes through a single connecting line;
the action element with the in-degree value of 0 is taken as a trigger action source;
the verification module is used for recursively traversing all triggers on the trigger flow mesh graph by taking a trigger action source as a starting node, and judging whether a downstream node is repeated with an upstream node which is traversed; if yes, the loop is a dead loop, and the trigger check is not passed; otherwise, the trigger passes the verification;
specifically, the corresponding relation between the color of each downstream node and the state is determined through the process of traversing each downstream node by color identification;
specifically, different colors are used for representing the process state of node traversal;
the first state represents the initial state of the node before verification, and the state is represented by a first color;
the second state represents a state that the node is verified as a trigger action of a certain trigger, and the state is represented by a second color;
the first state is changed to the second state in a single direction, and the corresponding first color is switched to the second color in a single direction;
recursively traversing the downstream nodes by using the corresponding relation of the colors and the states of the downstream nodes, and judging whether the endless loop condition exists;
in the process of recursively traversing all triggers on the trigger flow mesh graph, if the color of the downstream node is found to be the second color when the execution action of the previous trigger starts traversing the next downstream node, the closed loop is generated, and the trigger check is failed.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 4 are implemented when the computer program is executed by the processor.
7. A computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the method of any one of claims 1 to 4.
CN202111242432.XA 2021-10-25 2021-10-25 Trigger automatic verification method and system, electronic equipment and storage medium Active CN113986203B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111242432.XA CN113986203B (en) 2021-10-25 2021-10-25 Trigger automatic verification method and system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111242432.XA CN113986203B (en) 2021-10-25 2021-10-25 Trigger automatic verification method and system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113986203A CN113986203A (en) 2022-01-28
CN113986203B true CN113986203B (en) 2022-05-17

Family

ID=79741112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111242432.XA Active CN113986203B (en) 2021-10-25 2021-10-25 Trigger automatic verification method and system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113986203B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468508A (en) * 2014-09-04 2016-04-06 阿里巴巴集团控股有限公司 Code testing method and apparatus
CN105989440A (en) * 2015-02-12 2016-10-05 杨波 Process customization processing method and workflow engine thereof
CN113393553A (en) * 2021-06-18 2021-09-14 中国工商银行股份有限公司 Method and device for generating flow chart and electronic equipment
CN113434265A (en) * 2020-03-23 2021-09-24 阿里巴巴集团控股有限公司 Workflow scheduling method, server and medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101566213B1 (en) * 2011-05-11 2015-11-05 엘지전자 주식회사 Method and apparatus for mtc in a wireless communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105468508A (en) * 2014-09-04 2016-04-06 阿里巴巴集团控股有限公司 Code testing method and apparatus
CN105989440A (en) * 2015-02-12 2016-10-05 杨波 Process customization processing method and workflow engine thereof
CN113434265A (en) * 2020-03-23 2021-09-24 阿里巴巴集团控股有限公司 Workflow scheduling method, server and medium
CN113393553A (en) * 2021-06-18 2021-09-14 中国工商银行股份有限公司 Method and device for generating flow chart and electronic equipment

Also Published As

Publication number Publication date
CN113986203A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
US11010359B2 (en) Multi-entity normalization
US11163731B1 (en) Autobuild log anomaly detection methods and systems
EP3072070B1 (en) Callpath finder
Padgham et al. Model-based test oracle generation for automated unit testing of agent systems
US8832658B2 (en) Verification framework for business objects
US20230195728A1 (en) Column lineage and metadata propagation
CN107533504A (en) Anomaly analysis for software distribution
CN107885660A (en) Fund system automatic test management method, device, equipment and storage medium
CN110460460B (en) Service link fault positioning method, device and equipment
CN103562863A (en) Creating a correlation rule defining a relationship between event types
US20120143893A1 (en) Pattern Matching Framework for Log Analysis
US20110145518A1 (en) Systems and methods for using pre-computed parameters to execute processes represented by workflow models
EP2199905A1 (en) Lifecycle management and consistency checking of object models using application platform tools
CN117950763A (en) Flow processing method based on activiti workflow engine
US11106526B1 (en) Architecture-based root cause analysis
CN113986203B (en) Trigger automatic verification method and system, electronic equipment and storage medium
EP4027289B1 (en) Facilitating quick evaluation of trigger conditions for business rules that modify customer-support tickets
CN115757172A (en) Test execution method and device, storage medium and computer equipment
CN106796598A (en) The calculating of management level entity
CN115237422A (en) Code compiling method, device, computer equipment and storage medium
US20220019556A1 (en) Facilitating quick evaluation of trigger conditions for business rules that modify customer support tickets
CN115203260A (en) Abnormal data determination method and device, electronic equipment and storage medium
CN115469844A (en) Code processing method, system, computer cluster, medium, and program product
Kritikos et al. A flexible semantic kpi measurement system
US11561982B2 (en) Intelligent and automatic exception handling

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230608

Address after: Room 1-1-18, Unit 1, Building 4, No. 1580 Zhiyun Avenue, Yudong Street, Banan District, Chongqing, 401320

Patentee after: Chongqing Yunfeng Technology Co.,Ltd.

Address before: 408300 building a, 59 Chaoyang Road, Dianjiang Industrial Park, Chongqing

Patentee before: Chongqing Yuncheng Internet Technology Co.,Ltd.