Generation method and device of approval process, electronic equipment and storage medium

By acquiring the data relationship graph of the enterprise's business approval process, the algorithm automatically determines the approval path and generates the target approval process, which solves the problems of high design cost and poor adaptability in the existing technology, and realizes low-threshold and efficient approval process generation.

CN120911932APending Publication Date: 2025-11-07CHINA MOBILE QUANTONG SYST INTEGRATION CO LTD +3
View PDF 0 Cites -1 Cited by

Patent Information

Application Number
CN202510879425.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing approval process generation technologies suffer from high design costs, poor adaptability, and high technical barriers for designers.

Method used

By acquiring the approval data relationship graph related to the enterprise's business approval process, the starting and ending nodes are determined using the Dijkstra algorithm or deep learning algorithm. The single-source shortest path is automatically found in the graph to generate the target approval process.

Benefits of technology

It lowers the technical threshold for users and business personnel, improves the efficiency and adaptability of approval process generation, and can automatically create target approval processes according to different business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120911932A_ABST
    Figure CN120911932A_ABST
Patent Text Reader

Abstract

The invention discloses an approval process generation method and device, electronic equipment and a storage medium, which are used for solving the problems of relatively high cost and relatively poor adaptability of approval process design and certain technical threshold for designers in related approval process generation technologies. The method comprises the following steps: acquiring an approval data relation graph related to a business approval process of an enterprise; in response to a trigger operation of a first user, determining an initial node corresponding to the target person and an end node corresponding to the trigger operation in the approval data relation graph; wherein the trigger operation is used for initiating an approval process required by the target person; determining a target approval path through a first preset algorithm based on the approval data relation graph, the starting node and the terminal node, and generating a target approval process based on the target approval path; wherein the first preset algorithm is used for finding a single-source shortest path in the approval data relation graph.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computers, and particularly relates to a generation method and device of an approval process, an electronic device, and a storage medium. BACKGROUND

[0002] The generation of an approval process is an important link in the current enterprise informatization construction. Related generation technologies of an approval process include the generation of an approval process based on a template, the generation of an approval process based on a workflow engine, and the generation of an approval process based on a low-code / no-code platform.

[0003] A related scheme for generating an approval process based on a workflow engine includes defining each node in the process according to business requirements, designing the sequence of business process flow transfer through creation and dragging, or a list, and the like; setting the transfer approval conditions and business rules between business nodes, and the data information to be reported; managing the created approval business process template, including instantiation and deployment; then, publishing the business process, and using it in OA office and other business systems for users. The generation process of an approval process based on a template is similar to the scheme based on a workflow engine. The generation of an approval process based on a low-code / no-code platform is essentially customized development using a convenient development tool.

[0004] However, in the related generation technologies of an approval process, a large amount of time and effort is required to design forms and build an approval process, and it often needs to be repeatedly modified to meet the needs of different departments, which is time-consuming. Secondly, although the workflow engine provides an intuitive graphical interface and a template library for related personnel to design an approval process, there is still a certain technical threshold for non-technical personnel, and therefore, a certain amount of time and effort is required to familiarize and master the use of these tools. In addition, the related generation technologies of an approval process usually provide some general approval nodes and conditions, but may not be suitable for all business scenarios. When an enterprise needs to adjust an approval process, it may need to redesign a template or perform a large amount of customized development, that is, the adaptability of the related generation technologies of an approval process is poor.

[0005] That is, the related generation technologies of an approval process have the problems of high cost of designing an approval process, poor adaptability, and a certain technical threshold for designers. SUMMARY

[0006] The embodiments of the present application provide a generation method and device of an approval process, an electronic device, and a storage medium, which can solve the problems of the related generation technologies of an approval process, such as high cost of designing an approval process, poor adaptability, and a certain technical threshold for designers.

[0007] In a first aspect, embodiments of the present application provide a method for generating an approval process, the method comprising: obtaining an approval data relationship graph related to a business approval process of an enterprise; wherein the approval data relationship graph represents personnel, resource and rule information related to the approval process; in response to a triggering operation of a first user, determining, in the approval data relationship graph, a starting node corresponding to a target personnel and an ending node corresponding to the triggering operation; wherein the triggering operation is used to initiate an approval process required by the target personnel; based on the approval data relationship graph, the starting node and the ending node, determining a target approval path by a first preset algorithm, and generating a target approval process based on the target approval path; wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is a starting point of the target approval path; and the ending node is a terminal point of the target approval path.

[0008] In a second aspect, embodiments of the present application provide a device for generating an approval process, the device comprising: an obtaining module configured to obtain an approval data relationship graph related to a business approval process of an enterprise; wherein the approval data relationship graph represents personnel, resource and rule information related to the approval process; a determining module configured to, in response to a triggering operation of a first user, determine, in the approval data relationship graph, a starting node corresponding to a target personnel and an ending node corresponding to the triggering operation; wherein the triggering operation is used to initiate an approval process required by the target personnel; and a generating module configured to, based on the approval data relationship graph, the starting node and the ending node, determine a target approval path by a first preset algorithm, and generate a target approval process based on the target approval path; wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is a starting point of the target approval path; and the ending node is a terminal point of the target approval path.

[0009] In a third aspect, embodiments of the present application provide an electronic device, the electronic device comprising: a processor; and a memory arranged to store computer executable instructions configured to be executed by the processor, the executable instructions comprising instructions for performing the method for generating an approval process according to the first aspect.

[0010] In a fourth aspect, embodiments of the present application provide a storage medium for storing computer executable instructions, the computer executable instructions causing a computer to perform the method for generating an approval process according to the first aspect.

[0011] In a fifth aspect, an embodiment of the present application provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, and the processor is configured to run programs or instructions to implement the generation method of the approval process according to the first aspect.

[0012] In a sixth aspect, an embodiment of the present application provides a computer program product, which comprises a computer program configured to implement the generation method of the approval process according to the first aspect when executed by a processor.

[0013] In the embodiment of the present application, an approval data relationship graph related to a business approval process of an enterprise is acquired, wherein the approval data relationship graph represents personnel, resources and events related to the approval process; in response to a triggering operation of a user, a starting node corresponding to a target personnel and an ending node corresponding to the triggering operation are determined in the approval data relationship graph, wherein the triggering operation is used to initiate an approval process required by the target personnel; based on the approval data relationship graph, the starting node and the ending node, a target approval path is determined by a first preset algorithm, and a target approval process is generated based on the target approval path, wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is the starting point of the target approval path; and the ending node is the ending point of the target approval path. Compared with related generation technologies of the approval process, the present application only needs the triggering operation of the user to assist in determining the starting node and the ending node in the approval data relationship graph, and can automatically determine the target approval path in the approval data relationship graph based on the algorithm for finding the single-source shortest path in the approval data relationship graph, and then automatically generate the target approval process based on the target approval path, thereby reducing the technical threshold for the user and the design cost of the business personnel, improving the efficiency of creating the target approval process, and automatically creating the corresponding target approval process according to different business scenario requirements, thereby being good in adaptability. The related generation technologies of the approval process have the problems of high cost of designing the approval process, poor adaptability, and certain technical threshold for the designer. BRIEF DESCRIPTION OF DRAWINGS

[0014] Figure 1 is a flowchart of the generation method of the approval process provided by an embodiment of the present application; Figure 2 is a schematic diagram of an approval data relationship graph provided by an embodiment of the present application; Figure 3 is a schematic diagram of another approval data relationship graph provided by an embodiment of the present application; Figure 4 is a flowchart of another generation method of the approval process provided by an embodiment of the present application; Figure 5 is a structural schematic diagram of an approval process generation device provided by an embodiment of the present application; Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0015] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0016] The terms “first”, “second”, and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by “first”, “second”, etc. are generally a category and do not limit the number of objects, for example, the first object can be one or more. In addition, “and / or” in the specification and claims indicates at least one of the connected objects, and the character “ / ” generally indicates that the front and rear associated objects are in an “or” relationship.

[0017] The approval process generation method, device, electronic device and storage medium provided by the embodiments of the present application will be described in detail below in combination with the drawings, through specific embodiments and their application scenarios.

[0018] Figure 1 An approval process generation method provided by an embodiment of the present application is shown, which can be executed by an electronic device, which can include a server and / or a terminal device, for example, a vehicle-mounted terminal or a mobile phone terminal, etc. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps: S102: Obtain an approval data relationship graph related to the business approval process of an enterprise.

[0019] The approval data relationship graph represents personnel, resource and rule information related to the approval process.

[0020] Specifically, the approval data relationship graph is a graph structure used to describe and organize neural network model operations, which is composed of nodes and edges. The nodes represent operations, such as addition, multiplication, activation function, etc.; the edges (hereinafter also referred to as wires) represent data flow, i.e., data input and output.

[0021] Exemplarily, the approval data relationship graph can be as shown in the following table. Figure 2 As shown in the table, the personnel are Sun Er, Zhang San, Li Si, Wang Wu and Zhao Liu therein; the resources are department seal, department printer and data resources, the data resources are data resources managed by XX system; the rule information related to the approval process is the relationship information between the personnel and the personnel, the personnel and the resource, and the resource and the resource, such as seal management, printer management, system management, management of the department or the personnel; the management of the department or the personnel is that Zhao Liu manages Li Si and others therein.

[0022] S104: In response to the triggering operation of the first user, determining a starting node corresponding to the target personnel and an ending node corresponding to the triggering operation in the approval data relationship graph.

[0023] The triggering operation is used to initiate the approval process required by the target personnel.

[0024] In actual application, an option corresponding to a node in the approval data relationship graph can be provided to the user for selection, and after the first user performs a first selection operation on the option according to the resource or event (such as a leave event) that the target personnel wants to apply for approval, the electronic device of the present application determines the starting node corresponding to the target personnel and the ending node corresponding to the triggering operation in response to receiving the first selection operation. The user can also be provided with the approval data relationship graph for selecting a node, and after the first user performs a second selection operation on the approval data relationship graph according to the resource or event that the target personnel wants to apply for approval, the electronic device of the present application determines the starting node corresponding to the target personnel and the ending node corresponding to the triggering operation in response to receiving the second selection operation; wherein the first selection operation or the second selection operation is the triggering operation; the first user can be a personnel (i.e. the target personnel) in the enterprise who needs to apply for approval, or a designer of the approval process; the first selection operation and the second selection operation can be clicking, long pressing, sliding, etc., which are not limited in detail.

[0025] Of course, the first user can also be set as the target person, and accordingly, the target person can only select the option related to the end node in the option or select the end node in the approval data relationship graph. The electronic device of the present application can determine the target person by detecting the user who triggers the operation, and then determine the node corresponding to the target person in the approval data relationship graph, i.e. the starting node. In the above example, if Sun Er in the enterprise wants to apply for a department seal, Sun Er is the target person. Sun Er can select the option related to the department seal in the above option or select the department seal node in the approval data relationship graph. Then, the electronic device of the present application responds to the trigger operation of Sun Er received. Since Sun Er initiates the approval process, the node corresponding to Sun Er in the approval data relationship graph is determined as the starting node. Moreover, according to the trigger operation, it is determined that the department seal node is the end node.

[0026] S106: Based on the approval data relationship graph, the starting node and the end node, a target approval path is determined through a first preset algorithm, and a target approval process is generated based on the target approval path.

[0027] The first preset algorithm is used to find a single-source shortest path in the approval data relationship graph. The starting node is the starting point of the target approval path. The end node is the end point of the target approval path.

[0028] Specifically, the first preset algorithm can be Dijkstra algorithm. Dijkstra algorithm is a greedy algorithm for solving the single-source shortest path problem of weighted directed graph. It starts from a node (source point) and gradually expands to nodes farther away from the source point until it reaches the above end node or all nodes are visited. In the expansion process, the node with the shortest distance from the source point is selected each time, and the distance of other nodes is updated through this node. The optimal solution of the shortest path can be obtained through the algorithm.

[0029] Specifically, after the target approval path is determined, the target approval path can be configured to the application system process service, so as to generate the target approval process.

[0030] The method for generating an approval process provided by the embodiment of the application comprises the following steps: obtaining an approval data relationship graph related to a business approval process of an enterprise; wherein the approval data relationship graph represents personnel, resources and events related to the approval process; in response to a triggering operation of a user, determining a starting node corresponding to a target personnel and a terminal node corresponding to the triggering operation in the approval data relationship graph; wherein the triggering operation is used to initiate an approval process required by the target personnel; based on the approval data relationship graph, the starting node and the terminal node, determining a target approval path by using a first preset algorithm, and generating a target approval process based on the target approval path; wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is the starting point of the target approval path; and the terminal node is the terminal point of the target approval path. Compared with related generation technologies of an approval process, the application only needs to assist in determining the starting node and the terminal node in the approval data relationship graph through the triggering operation of the user, can automatically determine the target approval path in the approval data relationship graph based on the algorithm for finding the single-source shortest path in the approval data relationship graph, and automatically generates the target approval process based on the target approval path, thereby reducing the technical threshold for the user and the design cost of the business personnel, improving the efficiency of creating the target approval process, and having good adaptability. The application solves the problems of the related generation technologies of the approval process, such as high cost of designing the approval process, poor adaptability, and certain technical threshold for the designer.

[0031] Considering that the first preset algorithm, such as the Dijkstra algorithm, has a time complexity of O(V^2) or O((V+E)*logV) and a space complexity of O(V), wherein V is the number of vertices (or nodes) in the approval data relationship graph, and E represents the number of edges in the approval data relationship graph. That is, in a large-scale approval data relationship graph, the process of determining the target approval path has high time complexity and space complexity, which may cause the first preset algorithm to run for too long and occupy too much memory. Therefore, the process of determining the target approval path by using the first preset algorithm can be optimized through the following embodiments.

[0032] In an implementation manner, the following step A1 can also be performed to determine the feature set of each first node in the approval data relationship graph: Step A1: obtaining the feature set of each first node in the approval data relationship graph.

[0033] The feature set is determined by a preset deep learning algorithm and comprises a first probability of the first node reaching the terminal node corresponding to the historical approval path. The first node is any node in the approval data relationship graph.

[0034] Different historical approval paths correspond to different end nodes.

[0035] The approval data relationship graph can be regarded as a calculation graph or a neural network. In the approval data relationship graph, the personnel are the initiators of the approval process and are the starting nodes, located at the high layer of the neural network, and the resources and events are the low layer of the neural network, corresponding to the end nodes. In the historical process of finding the single-source shortest path (i.e., determining the target approval path) from the starting node to the end node, the features of each first node in the approval data relationship graph can be collected and recorded by using a deep learning algorithm, so as to obtain the final feature set of the first node. The records include, for example, a plurality of paths passing through the first node, the probability of successfully reaching the end node for each path, and the resource and rule information connected by each path.

[0036] It should be noted that the feature set of each first node is determined based on information determined in the historical process of determining the target approval path. The information determined in the historical process at least includes information about the path passing through the first node and not being the target approval path, so that the first probability of the first node reaching the end node corresponding to the historical approval path can be obtained. That is, the feature set of each first node is not simply determined based on the historical approval path.

[0037] Based on the approval data relationship graph, the starting node and the end node, the target approval path (i.e., S104) is determined by using a first preset algorithm, which can be specifically performed as follows: Step A2, based on the approval data relationship graph, the starting node, the end node, the preset probability value and the feature set of each first node in the approval data relationship graph, the target approval path is determined by using a first preset algorithm.

[0038] The feature set is used to determine the second probability of the first node in the approval data relationship graph reaching the end node corresponding to the target approval path; and the preset probability value is used to determine the first node to be skipped in the approval data relationship graph. The first node to be skipped has a second probability less than the preset probability value.

[0039] In addition, the preset probability value can be updated according to the received information representing whether the target approval path successfully reaches the end node.

[0040] In this embodiment, the feature set of the first node in the approval data relationship graph is determined by analyzing the process of determining the target approval path in history by using a deep learning algorithm, so that the first node to be skipped in the approval data relationship graph can be determined when the current target approval path is determined, and the number of nodes that need to be accessed in the approval data relationship graph can be reduced, thereby saving the computing resources.

[0041] In an implementation manner, the following step B1 can also be performed to obtain the target weight of each first node in the approval data relationship graph for the terminal node: Step B1, receiving feedback information of the historical approval process by the second user, and determining the target weight of each first node in the approval data relationship graph for the terminal node based on the feedback information.

[0042] Wherein, the second user can be the same user as the first user or can not be the same user.

[0043] Specifically, the weight corresponding to the historical approval path can be taken as the weight of the first node corresponding to the historical approval path. Correspondingly, according to the feedback information, the weight corresponding to the historical approval path corresponding to the historical approval path is adjusted, that is, according to the feedback information, the weight of the first node corresponding to the historical approval path is adjusted. Exemplarily, initial weights can be set for all first nodes, if the feedback information represents that the historical approval process is correct, the weight of the historical approval path is increased, and correspondingly, the initial weight of the first node corresponding to the historical approval path is increased to obtain the target weight; if the feedback information represents that the historical approval process is incorrect, the weight of the historical approval path is reduced, and correspondingly, the initial weight of the first node corresponding to the historical approval path is reduced to obtain the target weight.

[0044] Specifically, if a certain first node has no historical approval path corresponding to the terminal node, the initial weight can be taken as the target weight of the first node, and the initial weight can be set to a low value, or even 0. Continue with the above example, if a certain first node has a historical approval path corresponding to the terminal node, the more target historical approval paths (i.e. historical approval paths corresponding to the terminal node) corresponding to the feedback information representing the correct historical approval process, the higher the target weight, and the more likely to be selected in subsequent determination of the target approval path. On the contrary, the more target historical approval paths corresponding to the feedback information representing the incorrect historical approval process, the lower the target weight, and the more likely to be skipped in subsequent determination of the target approval path.

[0045] Based on the approval data relationship graph, the starting node and the terminal node, the target approval path (i.e. S104) is determined by the first preset algorithm, which can be specifically performed as follows: Step B2, based on the approval data relationship graph, the starting node, the terminal node, and the target weight of each first node for the terminal node, the target approval path is determined by the first preset algorithm and the preset search algorithm.

[0046] Wherein, the search algorithm is used to determine the first node to be skipped in the approval data relationship graph based on the target weight.

[0047] Specifically, the search algorithm can be an Alpha-beta pruning algorithm. The Alpha-beta pruning algorithm is used to reduce the number of nodes of a search tree of a Minimax algorithm. The Alpha-beta pruning algorithm can evaluate the effect of a path based on the target weight. When the effect of a subsequent path after selecting a first node is worse than the effect of a subsequent path using another first node, the first node is skipped, i.e., the first node to be skipped in the approval data relationship graph is determined.

[0048] In addition, the feature set of step A1 can further include that, in the embodiment, the target weight of each first node with respect to the end node.

[0049] In the embodiment, by adjusting the target weight of each first node with respect to the end node in the approval data relationship graph according to the feedback information, and on this basis, by using the search algorithm to determine the first node to be skipped in the approval data relationship graph, the number of nodes that need to be accessed in the approval data relationship graph can be reduced, thereby saving computing resources.

[0050] In an implementation manner, based on the approval data relationship graph, the start node and the end node, the target approval path (i.e., S104) is determined by using a first preset algorithm, which can be specifically implemented as steps C1 to C4 as follows: Step C1, the start node is added to a preset visited set, and each first node in the approval data relationship graph is traversed to determine a first node connected to the start node, and the first node connected to the start node is added to a preset priority queue.

[0051] Specifically, the distance of all first nodes is initialized to be infinite, and the distance of the start node to itself is 0, so the start node can be directly added to the preset visited set.

[0052] The following steps C2 to C4 are repeatedly executed until the end node is added to the priority queue to obtain the target approval path: Step C2, the target node is taken out of the priority queue, and each first node in the approval data relationship graph is traversed to determine a second node.

[0053] The second node is a first node not in the visited set and connected to the target node; and the target node is a first node in the current priority queue.

[0054] Step C3, the second node is added to the priority queue, and the shortest distance of the second node to the start node and the path corresponding to the shortest distance are determined.

[0055] For example, the node a, the node b and the node c are connected with each other, the distance between the node a and the node b is 3, the distance between the node a and the node c is 6, and the distance between the node b and the node c is 2. If the node a is an initial node, the distance corresponding to the path of the node a-node b-node c is 5, and the distance corresponding to the path of the node a-node c is 6, then the shortest distance between the node c and the initial node is 5, and the corresponding path is the node a-node b-node c.

[0056] In step C4, the second node is added to the visited set, and it is determined whether the end node exists in the priority queue.

[0057] In addition, the first weight of each first node in the approval data relationship graph can also be set.

[0058] For example, taking Wang Wu as the target personnel, the first weight being 1, each edge being 1, and Wang Wu intending to apply for a department seal as an example, the first weight of the department seal is 2, as shown in Figure 3As shown, the node corresponding to Wang Wu is taken as a starting node, and the node corresponding to Wang Wu is added to the visited set; then, the node corresponding to Wang Wu is taken out from the priority queue, and the first node in the approval data relationship graph is traversed to determine the node connected with the node corresponding to Wang Wu, i.e. the node corresponding to Sun Er and the node corresponding to Zhang San. Since the first weight is set for each first node in the approval data relationship graph in this example, the execution step in the first loop is different from that without setting the first weight, and the following steps are executed: first, the level check of the first weight is performed, i.e. the first weights of the starting node and the end node are compared; if the first weight of the starting node is less than the first weight of the end node, the first node with a higher first weight among the first nodes connected with the starting node is determined, and the first node with the higher first weight is added to the priority queue. Since the first weight of the node corresponding to Wang Wu is 1, which is less than the first weight 2 of the department seal node, the nearest high-level node needs to be found to obtain authorization, and the first node with the higher first weight among the first nodes connected with the starting node is the node corresponding to Sun Er, so the node corresponding to Sun Er is added to the priority queue. Then, steps C2 to C4 are executed according to the above steps.The first node in the current priority queue is the node corresponding to Sun Er, and the node corresponding to Sun Er is taken out of the priority queue. The first node in the approval data relationship graph is traversed to determine a second node, which is the node corresponding to Li Si and Zhao Liu at this time. The node corresponding to Li Si and Zhao Liu is added to the priority queue, and the shortest distance from the node corresponding to Li Si to the starting node and the path corresponding to the shortest distance are determined, as well as the shortest distance from the node corresponding to Zhao Liu to the starting node and the path corresponding to the shortest distance. The shortest distance is 2, and the node corresponding to Li Si and Zhao Liu is added to the priority queue and the visited set. Then, the first node in the priority queue is the node corresponding to Li Si and Zhao Liu, that is, the node corresponding to Li Si and Zhao Liu is the target node, and the node corresponding to Li Si and Zhao Liu is taken out of the priority queue. The first node in the approval data relationship graph is traversed to determine a second node, which is the node corresponding to Zhang San at this time. The node corresponding to Zhang San is added to the priority queue, and the shortest distance from the node corresponding to Zhang San to the starting node and the path corresponding to the shortest distance are determined. The node corresponding to Zhang San is added to the visited set, and at the same time, it is determined whether the end node exists in the priority queue. If the end node does not exist, then the node corresponding to Zhang San in the current priority queue is taken out of the priority queue, and the first node in the approval data relationship graph is traversed to determine a second node, which is the node corresponding to the department seal at this time. The node corresponding to the department seal is added to the priority queue, and the shortest distance from the node corresponding to the department seal to the starting node and the path corresponding to the shortest distance are determined, which is the target approval path. If it is determined that the end node exists in the priority queue, the loop is stopped, and the shortest path from the node corresponding to Wang Wu to the node corresponding to the department seal is obtained, which is the target approval path: the node corresponding to Wang Wu->the node corresponding to Sun Er->the node corresponding to Li Si->the node corresponding to Zhang San->the node corresponding to the department seal.

[0059] The distance between nodes (such as the second node), such as the distance between the node corresponding to Wang Wu and the node corresponding to Zhang San in the above example. Alternatively, it can be determined based on the second weight of the connection between the node corresponding to Wang Wu and the node corresponding to Zhang San. It can also be a preset fixed value, such as 1 for each edge (i.e. connection). Each connection in the approval data relationship graph is the preset fixed value, so that the target approval process corresponding to the shortest distance requires the least number of approval personnel.

[0060] In an implementation manner, the approval data relationship graph (i.e. 102) related to the business approval process of the enterprise is obtained, which can be specifically implemented as steps D1 to D2: Step D1, obtaining information related to the business approval process of the enterprise.

[0061] The related information includes first information related to the personnel, second information related to the resource, and third information related to the rule information.

[0062] The first information can include, but is not limited to, one or more of the following: personnel name, number, personnel department, personnel responsibility authority, and personnel management resource.

[0063] The second information can include, but is not limited to, enterprise material and management authorization information data resources.

[0064] Exemplarily, the first information can be as shown in the following table:

[0065] The second information can be as shown in the following table:

[0066] The third information can be as shown in the following table:

[0067] It should be noted that the above examples are only for easy understanding and do not constitute specific limitations on the first information, the second information and the third information.

[0068] Step D2, constructing an approval data relationship graph based on the related information.

[0069] In this embodiment, the approval data relationship graph can be constructed based on the related information of the business approval process of the enterprise, and only the related information needs to be maintained subsequently, thereby reducing the maintenance cost.

[0070] In one implementation mode, constructing the approval data relationship graph based on the related information (i.e., step D2) can be specifically implemented as the following steps d1 to d2: Step d1, generating a first node and a first weight of the first node in the approval data relationship graph according to the first information and the second information.

[0071] The first weight is determined based on first permission level information and second permission level information; the first permission level information is the permission level information corresponding to the personnel in the first information; and the second permission level information is the permission level information corresponding to the resource in the second information.

[0072] Specifically, the permission level information corresponding to the resource can be related to the permission level of the department to which the resource belongs.

[0073] Specifically, the approval data relationship graph is predefined to include node information of the first node. The node information includes a node unique identity (ID), a node name, and permission level information. The first node in the approval data relationship graph can be stored in a key-value storage structure HashMap based on a hash table.

[0074] Step d2, generating a connection between nodes and a second weight of the connection according to the third information to obtain the approval data relationship graph.

[0075] The second weight is based on third permission level information corresponding to the rule information in the third information.

[0076] Specifically, the approval data relationship graph is predefined to include connection information. The connection information includes an ID of a start node of the connection and an ID of an end node of the connection. The connection information in the approval data relationship graph can be stored in a dynamic array ArrayList.

[0077] After the nodes and the connections in the approval data relationship graph are defined, the first information can be processed recursively from the highest-level department of the enterprise, the first information, the second information, and the third information are initialized according to the department information and the position, the first nodes of the approval relationship graph are generated, and the first nodes are added to the initial approval relationship graph to form a basic graph structure including personnel, resource, and rule information.

[0078] Figure 4 is a flowchart of another method for generating an approval process provided by an embodiment of the present application. As shown in Figure 4 , the method includes: Step 402, obtaining related information of a business approval process of an enterprise.

[0079] The related information includes first information related to personnel, second information related to resources, and third information related to rule information.

[0080] Step 404, constructing an approval data relationship graph based on the related information.

[0081] Step 406, in response to a triggering operation of a first user, determining a start node corresponding to a target person and an end node corresponding to the triggering operation in the approval data relationship graph.

[0082] The triggering operation is used to initiate an approval process required by the target person.

[0083] Step 408, obtaining a feature set of each first node in the approval data relationship graph.

[0084] The feature set is determined by a preset deep learning algorithm, and includes a first probability of a first node reaching a terminal node corresponding to the historical approval path.

[0085] At step 410, based on the approval data relationship graph, the starting node and the terminal node, the terminal node, the preset probability value, and the feature set of each first node in the approval data relationship graph, a target approval path is determined by a first preset algorithm, and a target approval process is generated based on the target approval path.

[0086] The first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is the starting point of the target approval path; the terminal node is the terminal point of the target approval path; the feature set is used to determine a second probability of a first node in the approval data relationship graph reaching a terminal node corresponding to the target approval path; and the preset probability value is used to determine a first node to be skipped in the approval data relationship graph, and the second probability corresponding to the first node to be skipped is less than the preset probability value.

[0087] The specific processes of the above steps 402 to 410 have been described in detail in the above embodiments, and will not be repeated here.

[0088] In this embodiment, an approval data relationship graph related to a business approval process of an enterprise is obtained; the approval data relationship graph represents personnel, resources, and events related to the approval process; in response to a triggering operation of a user, a starting node corresponding to a target personnel and a terminal node corresponding to the triggering operation are determined in the approval data relationship graph; the triggering operation is used to initiate an approval process required by the target personnel; based on the approval data relationship graph, the starting node and the terminal node, a target approval path is determined by a first preset algorithm, and a target approval process is generated based on the target approval path; the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is the starting point of the target approval path; and the terminal node is the terminal point of the target approval path. Compared with related approval process generation technologies, this application only needs the triggering operation of the user to assist in determining the starting node and the terminal node in the approval data relationship graph, and can automatically determine the target approval path in the approval data relationship graph based on an algorithm for finding a single-source shortest path in the approval data relationship graph, and then automatically generate a target approval process based on the target approval path, thereby reducing the technical threshold for the user and the design cost of the business personnel, improving the efficiency of creating the target approval process, and adapting well to different business scenario requirements. The related approval process generation technologies have the problems of high cost of designing the approval process, poor adaptability, and certain technical threshold for the designer.

[0089] Corresponding to the generation method of the approval process provided in the above embodiment, based on the same technical concept, the embodiment of the present application further provides an approval process generation device, Figure 5 is a structural schematic diagram of the approval process generation device according to the embodiment of the present application, and the approval process generation device is used for executing Figures 1 to 4 The described approval process generation method, as shown in Figure 5 The approval process generation device includes an acquisition module 510, a determination module 520 and a generation module 530.

[0090] The acquisition module 510 is used for acquiring an approval data relationship graph related to the business approval process of the enterprise; wherein the approval data relationship graph represents personnel, resource and rule information related to the approval process; The determination module 520 is used for determining a starting node corresponding to a target personnel and a terminal node corresponding to a trigger operation in the approval data relationship graph in response to a trigger operation of a first user; wherein the trigger operation is used to initiate the approval process required by the target personnel; The generation module 530 is used for determining a target approval path based on the approval data relationship graph, the starting node and the terminal node through a first preset algorithm, and generating a target approval process based on the target approval path; wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is the starting point of the target approval path; and the terminal node is the terminal point of the target approval path.

[0091] In an implementation manner, the approval process generation device further includes an acquisition feature set module. The acquisition feature set module is used for: acquiring a feature set of each first node in the approval data relationship graph; wherein the feature set is determined through a preset deep learning algorithm, and includes a first probability of the first node reaching a terminal node corresponding to a historical approval path; The generation module 530 is specifically used for: determining the target approval path based on the approval data relationship graph, the starting node, the terminal node, a preset probability value and the feature set of each first node in the approval data relationship graph through the first preset algorithm; wherein the feature set is used to determine a second probability of the first node in the approval data relationship graph reaching a terminal node corresponding to the target approval path; and the preset probability value is used to determine a first node to be skipped in the approval data relationship graph, and the first node to be skipped has a second probability less than the preset probability value.

[0092] In an implementation manner, the approval process generation device further includes a receiving module. The receiving module is used for: receive feedback information of the second user on the historical approval process, and determine target weights of each first node in the approval data relationship graph with respect to the terminal node based on the feedback information; The generation module 530 is specifically configured to: determine the target approval path based on the approval data relationship graph, the starting node, the terminal node, and the target weights of each first node with respect to the terminal node, by using a first preset algorithm and a preset search algorithm, wherein the search algorithm is configured to determine a first node to be skipped in the approval data relationship graph based on the target weights.

[0093] In an implementation manner, the generation module 530 is specifically configured to: add the starting node to a preset visited set, and traverse the first nodes in the approval data relationship graph to determine a first node in communication with the starting node, and add the first node in communication with the starting node to a preset priority queue; perform the following steps in a loop until the terminal node is added to the priority queue to obtain the target approval path: remove a target node from the priority queue, and traverse the first nodes in the approval data relationship graph to determine a second node, wherein the second node is a first node not in the visited set and in communication with the target node, and the target node is a first node in the current priority queue; add the second node to the priority queue, and determine a shortest distance from the second node to the starting node and a path corresponding to the shortest distance; add the second node to the visited set, and determine whether the terminal node exists in the priority queue.

[0094] In an implementation manner, the acquisition module 510 includes: An acquisition unit is configured to acquire related information of a business approval process of an enterprise, wherein the related information includes first information related to personnel, second information related to resources, and third information related to rule information; A construction unit is configured to construct an approval data relationship graph based on the related information.

[0095] In an implementation manner, the construction unit is specifically configured to: generate a first node of the approval data relationship graph and a first weight of the first node according to the first information and the second information, wherein the first weight is determined based on first permission level information and second permission level information, the first permission level information is permission level information corresponding to the personnel in the first information, and the second permission level information is permission level information corresponding to the resources in the second information; According to the third information, a connection between nodes is generated, and a second weight of the connection is generated to obtain an approval data relationship graph; wherein the second weight is based on third permission level information corresponding to rule information in the third information.

[0096] The approval process generation device provided in the embodiments of the present application obtains an approval data relationship graph related to a business approval process of an enterprise; wherein the approval data relationship graph represents personnel, resources and events related to the approval process; in response to a trigger operation of a user, a starting node corresponding to a target personnel and an end node corresponding to the trigger operation are determined in the approval data relationship graph; wherein the trigger operation is used to initiate an approval process required by the target personnel; based on the approval data relationship graph, the starting node and the end node, a target approval path is determined through a first preset algorithm, and a target approval process is generated based on the target approval path; wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is a starting point of the target approval path; and the end node is a terminal point of the target approval path. Compared with related approval process generation technologies, the present application only needs to assist in determining the starting node and the end node in the approval data relationship graph through the trigger operation of the user, can automatically determine the target approval path in the approval data relationship graph based on an algorithm for finding a single-source shortest path in the approval data relationship graph, and automatically generates the target approval process based on the target approval path, thereby reducing the technical threshold for the user and the design cost of the business personnel, improving the efficiency of creating the target approval process, and automatically creating the corresponding target approval process according to different business scenario requirements, thereby being good in adaptability. The related approval process generation technologies have the problems of high cost of designing the approval process, poor adaptability, and certain technical threshold for the designer.

[0097] Those skilled in the art should understand that the above approval process generation device can be used to implement the approval process generation method described above, and the details thereof are similar to those described in the method part above, and thus will not be described here again to avoid repetition.

[0098] Based on the same technical concept, the embodiments of the present application also provide an electronic device for executing the above approval process generation method, Figure 6A structural schematic diagram of an electronic device for implementing various embodiments of the present application. The electronic device can have relatively large differences due to different configurations or performances, and can include a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 complete mutual communication through the communications bus 640. The processor 610 can invoke a computer program stored on the memory 630 and executable on the processor 610 to perform the following steps: Obtain an approval data relationship graph related to a business approval process of an enterprise; wherein the approval data relationship graph represents personnel, resource, and rule information related to the approval process; In response to a triggering operation of a first user, determine a starting node corresponding to a target person and an end node corresponding to the triggering operation in the approval data relationship graph; wherein the triggering operation is used to initiate an approval process required by the target person; Based on the approval data relationship graph, the starting node, and the end node, determine a target approval path through a first preset algorithm, and generate a target approval process based on the target approval path; wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is the starting point of the target approval path; and the end node is the end point of the target approval path.

[0099] The technical solution of one or more embodiments of the present specification comprises: obtaining an approval data relationship graph related to a business approval process of an enterprise; wherein the approval data relationship graph represents personnel, resources and events related to the approval process; in response to a triggering operation of a user, determining a starting node corresponding to a target personnel and an end node corresponding to the triggering operation in the approval data relationship graph; wherein the triggering operation is used to initiate an approval process required by the target personnel; based on the approval data relationship graph, the starting node and the end node, determining a target approval path by a first preset algorithm, and generating a target approval process based on the target approval path; wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is the starting point of the target approval path; and the end node is the end point of the target approval path. Compared with the related approval process generation technology, the present application only needs the triggering operation of the user to assist in determining the starting node and the end node in the approval data relationship graph, and can automatically determine the target approval path in the approval data relationship graph based on the algorithm for finding the single-source shortest path in the approval data relationship graph, and then automatically generate the target approval process based on the target approval path, thereby reducing the technical threshold of the user and the design cost of the business personnel, improving the efficiency of creating the target approval process, and having good adaptability. The related approval process generation technology has the problems of high cost of designing the approval process, poor adaptability, and certain technical threshold for the designer.

[0100] The specific execution steps can refer to the steps of the above-mentioned approval process generation method embodiments, and the same technical effects can be achieved. To avoid repetition, they will not be described here.

[0101] It should be noted that the electronic device in the embodiments of the present application includes: a server, a terminal or other devices other than a terminal.

[0102] The above electronic device structure does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than the illustration, or combine certain components, or different component arrangements. For example, the input unit can include a graphics processing unit (GPU) and a microphone, and the display unit can be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes at least one of a touch panel and other input devices. The touch panel is also called a touch screen. Other input devices can include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, on-off buttons, etc.), trackballs, mice, joysticks, and the like, which will not be described here.

[0103] The memory can be used to store software programs and various data. The memory can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory can include a volatile memory or a non-volatile memory, or the memory can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM).

[0104] The processor can include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor.

[0105] The embodiment of the present application further provides a storage medium, and the storage medium stores computer executable instructions. The computer executable instructions are executed by a processor to implement the above-mentioned generation method of the approval process, or each process of the above-mentioned generation method of the clothes of the digital person, and the same technical effects can be achieved. To avoid repetition, details are not described herein.

[0106] The processor is a processor in the electronic device in the above embodiments. The storage medium includes a computer readable storage medium, such as a computer readable only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

[0107] The chip provided in the embodiments of the present application also includes a processor and a communication interface. The communication interface is coupled with the processor. The processor is configured to execute programs or instructions, implement each process of the above-mentioned generation method of the approval process, and achieve the same technical effects. To avoid repetition, details are not described herein.

[0108] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc.

[0109] The embodiments of the present application also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, each process of the above-mentioned generation method of the approval process is implemented, and the same technical effects can be achieved. To avoid repetition, details are not described herein.

[0110] It should be noted that in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to the order of performing the functions shown or discussed, and can also include multitasking and parallel processing according to the functions involved, and can also add, omit or combine various steps. In addition, the features described with reference to some examples can be combined in other examples.

[0111] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned example methods can be realized by means of software and a necessary general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part that contributes to the prior art. The computer software product is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods of the various embodiments of the present application.

[0112] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-described specific embodiments, and the above-described specific embodiments are merely illustrative rather than limiting. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.

Claims

1. A method for generating an approval process, characterized by, The method comprises: obtaining an approval data relationship graph related to a business approval process of an enterprise; wherein the approval data relationship graph represents personnel, resource and rule information related to the approval process; in response to a triggering operation of a first user, determining a starting node corresponding to a target personnel and an end node corresponding to the triggering operation in the approval data relationship graph; wherein the triggering operation is used to initiate an approval process required by the target personnel; based on the approval data relationship graph, the starting node and the end node, determining a target approval path by a first preset algorithm, and generating a target approval process based on the target approval path; wherein the first preset algorithm is used to find a single-source shortest path in the approval data relationship graph; the starting node is the starting point of the target approval path; and the end node is the end point of the target approval path.

2. The method of claim 1, wherein, The method further comprises: obtaining a feature set of each first node in the approval data relationship graph; wherein the feature set is determined by a preset deep learning algorithm and includes a first probability of the first node reaching a historical approval path corresponding to the end node; the first preset algorithm, based on the approval data relationship graph, the starting node, the end node, a preset probability value and the feature set of each first node in the approval data relationship graph, to determine the target approval path; wherein the feature set is used to determine a second probability of the first node in the approval data relationship graph reaching the end node corresponding to the target approval path; and the preset probability value is used to determine the first node to be skipped in the approval data relationship graph, and the second probability corresponding to the first node to be skipped is less than the preset probability value. The method further comprises:

3. The method of claim 1, wherein, receiving feedback information of a second user on a historical approval process, and determining a target weight of each first node in the approval data relationship graph with respect to the end node based on the feedback information; the first preset algorithm, based on the approval data relationship graph, the starting node, the end node and the target weight of each first node with respect to the end node, to determine the target approval path; wherein the search algorithm is used to determine the first node to be skipped in the approval data relationship graph based on the target weight. the first preset algorithm, based on the approval data relationship graph, the starting node, the end node and the target weight of each first node with respect to the end node, to determine the target approval path; wherein the search algorithm is used to determine the first node to be skipped in the approval data relationship graph based on the target weight. ​ 4. The method of claim 1, wherein, ​ add the starting node into a preset visited set, and traverse a first node in the approval data relationship graph, determine the first node in communication with the starting node, and add the first node in communication with the starting node into a preset priority queue; cyclically perform the following steps until the end node is added into the priority queue, and obtain the target approval path: take a target node out of the priority queue, and traverse the first node in the approval data relationship graph, and determine a second node; wherein the second node is the first node not in the visited set and in communication with the target node; the target node is the first node in the priority queue at present; add the second node into the priority queue, and determine a shortest distance from the second node to the starting node and a path corresponding to the shortest distance; add the second node into the visited set, and determine whether the end node exists in the priority queue.

5. The method of claim 1, wherein, The approval data relationship graph related to the business approval process of the enterprise is obtained, including: obtaining related information of the business approval process of the enterprise; wherein the related information includes first information related to the personnel, second information related to the resource, and third information related to the rule information; constructing the approval data relationship graph based on the related information.

6. The method of claim 5, wherein, The approval data relationship graph is constructed based on the related information, including: generating a first node of the approval data relationship graph and a first weight of the first node according to the first information and the second information; wherein the first weight is determined based on first permission level information and second permission level information; the first permission level information is the permission level information corresponding to the personnel in the first information; the second permission level information is the permission level information corresponding to the resource in the second information; generating a connection between the nodes and a second weight of the connection according to the third information, to obtain the approval data relationship graph; wherein the second weight is based on third permission level information corresponding to the rule information in the third information.

7. An apparatus for generating an approval flow, the apparatus comprising: The device includes: an acquisition module configured to acquire an approval data relationship graph related to a business approval process of an enterprise; wherein the approval data relationship graph represents personnel, resources, and rule information related to an approval process; a determination module configured to, in response to a triggering operation of a first user, determine, in the approval data relationship graph, a starting node corresponding to a target personnel and an end node corresponding to the triggering operation; wherein the triggering operation is used to initiate an approval process required by the target personnel; The generating module is configured to determine a target approval path based on the approval data relationship graph, the start node and the end node by using a first preset algorithm, and generate a target approval process based on the target approval path. The first preset algorithm is configured to find a single-source shortest path in the approval data relationship graph. The start node is the start point of the target approval path. The end node is the end point of the target approval path.

8. An electronic device, comprising: The method comprises: a processor; and a memory arranged to store computer executable instructions configured to be executed by the processor, the executable instructions comprising a method for generating an approval process as claimed in any one of claims 1-6.

9. A storage medium, characterized by The storage medium is configured to store computer executable instructions, which enable a computer to execute a method for generating an approval process as claimed in any one of claims 1-6.

10. A computer program product, characterised in that, The computer program is configured to be executed by a processor to implement a method for generating an approval process as claimed in any one of claims 1-6.