CN111179376B - Method and device for generating flow node diagram, storage medium and electronic equipment - Google Patents

Method and device for generating flow node diagram, storage medium and electronic equipment Download PDF

Info

Publication number
CN111179376B
CN111179376B CN201911330382.3A CN201911330382A CN111179376B CN 111179376 B CN111179376 B CN 111179376B CN 201911330382 A CN201911330382 A CN 201911330382A CN 111179376 B CN111179376 B CN 111179376B
Authority
CN
China
Prior art keywords
node
matrix
target
flow
gallery
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
CN201911330382.3A
Other languages
Chinese (zh)
Other versions
CN111179376A (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201911330382.3A priority Critical patent/CN111179376B/en
Publication of CN111179376A publication Critical patent/CN111179376A/en
Application granted granted Critical
Publication of CN111179376B publication Critical patent/CN111179376B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural
    • 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to a method, a device, a storage medium and an electronic device for generating a flow node diagram, so as to reduce the time complexity when generating the flow node diagram in the related art. The method comprises the following steps: generating a corresponding flow node matrix according to flow node information of a target service, wherein the flow node information comprises node types and node states of each flow node of the target service; extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix; and generating a flow node diagram of the target service according to the flow node information and the target matrix.

Description

Method and device for generating flow node diagram, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for generating a flow node diagram, a storage medium, and an electronic device.
Background
In daily work, users often face different business application flows or different business approval flows, and in order to facilitate users to check the flow progress of business application or business approval, flow node diagrams are often used for showing the user. Different icons are adopted in the flow node diagram to represent the states of different flow nodes, so that a user can clearly and intuitively see the progress of the flow.
In the related technology, when a process node diagram of a service is generated, the type and the state of a first process node of the service process are acquired, then an icon corresponding to the type and the state of the node is acquired from a diagram library, and the acquired icon is rendered on the first node position of the process node diagram; then, the type and the state of a second flow node of the business flow are obtained, then an icon corresponding to the node type and the state of the second node is obtained from a gallery, and the obtained icon is rendered on the second node position of the flow node diagram; and (3) reciprocating the process until the last node of the process node diagram is rendered, and generating a process node diagram corresponding to the business process.
Disclosure of Invention
The purpose of the present disclosure is to provide a method, an apparatus, a storage medium and an electronic device for generating a flow node map, so as to reduce the time complexity when generating the flow node map in the related art.
To achieve the above object, according to a first aspect of embodiments of the present disclosure, there is provided a flow node diagram generating method, including:
generating a corresponding flow node matrix according to flow node information of a target service, wherein the flow node information comprises node types and node states of each flow node of the target service;
Extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix;
and generating a flow node diagram of the target service according to the flow node information and the target matrix.
Optionally, the gallery matrix is constructed by:
marking icons in a gallery to obtain type codes of each icon, wherein each type code corresponds to one or more node types in a service system;
for each node type, marking the icon corresponding to the node type according to the type of the node state of the node type to obtain the state code of each icon, wherein the state codes are in one-to-one correspondence with the node states;
and generating the gallery matrix according to the type code and the state code of each icon, wherein the gallery matrix is a two-dimensional matrix.
Optionally, the position of each element of the flow node matrix in the flow node matrix corresponds to the position of each element of the gallery matrix in the gallery matrix;
the generating a corresponding flow node matrix according to the flow node information of the target service includes:
According to the node type and the node state of each flow node of the target service, a target value is given to a target element in the flow node matrix, and a type code and a state code represented by the position of the target element in the matrix are matched with the node type and the node state of the flow node;
the extracting, according to the flow node matrix, a target matrix corresponding to the target service from a gallery matrix includes:
for each target element given a target value, extracting values of elements corresponding to each target element from the gallery matrix, and generating the target matrix.
Optionally, the generating a flow node diagram of the target service according to the flow node information and the target matrix includes:
according to each element in the target matrix, acquiring a target icon with a status code and a type code corresponding to the element from the gallery;
and selecting the corresponding target icon according to the node type and the node state of each process node in the process node information to generate a process node diagram of the target service.
Optionally, the method further comprises:
If a plurality of target services exist, presetting the priority of the target services;
and generating a flow node diagram of each target service in turn according to the priority order of the target services.
According to a second aspect of the embodiments of the present disclosure, there is provided a flow node map generating apparatus, the apparatus including:
the first generation module is used for generating a corresponding flow node matrix according to flow node information of a target service, wherein the flow node information comprises node types and node states of each flow node of the target service;
the acquisition module is used for extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix;
the second generation module is used for generating a flow node diagram of the target service according to the flow node information and the target matrix.
Optionally, the gallery matrix is constructed by:
marking icons in a gallery to obtain type codes of each icon, wherein each type code corresponds to one or more node types in a service system;
for each node type, marking the icon corresponding to the node type according to the type of the node state of the node type to obtain the state code of each icon, wherein the state codes are in one-to-one correspondence with the node states;
And generating the gallery matrix according to the type code and the state code of each icon, wherein the gallery matrix is a two-dimensional matrix.
Optionally, the position of each element of the flow node matrix in the flow node matrix corresponds to the position of each element of the gallery matrix in the gallery matrix;
the first generation module includes:
the assignment submodule is used for assigning a target value to a target element in the flow node matrix according to the node type and the node state of each flow node of the target service, and the type code and the state code represented by the position of the target element in the matrix are matched with the node type and the node state of the flow node;
the acquisition module comprises:
the extraction submodule is used for extracting the value of the element corresponding to each target element from the gallery matrix according to each target element endowed with the target value, and generating the target matrix.
Optionally, the second generating module includes:
the obtaining submodule is used for obtaining a target icon with a state code and a type code corresponding to each element from the gallery according to each element in the target matrix;
The selecting submodule is used for selecting the corresponding target icon according to the node type and the node state of each flow node in the flow node information so as to generate a flow node diagram of the target service.
Optionally, the apparatus further comprises:
the setting module is used for presetting the priority of the target service if a plurality of target services exist;
the execution module is used for sequentially generating a flow node diagram of each target service according to the priority order of the plurality of target services.
According to a third aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the methods of the first aspect described above.
According to a fourth aspect of embodiments of the present disclosure, there is provided an electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of the above first aspects.
Through the technical scheme, at least the following technical effects can be achieved:
generating a corresponding flow node matrix according to flow node information of a target service, wherein the flow node information comprises node types and node states of each flow node of the target service, and therefore the generated flow node matrix comprises icon information corresponding to all the node types and node states of the target service flow; extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix, wherein the target matrix comprises icon information required by all flow nodes of the target service; and generating a flow node diagram of the target service according to the flow node information and the target matrix. Compared with the related art, the related art generates nodes in the flow node diagram one by acquiring icons corresponding to each node for a plurality of times. According to the node information of the whole flow of the target service, the method generates a flow node matrix corresponding to the current progress of the target service; acquiring icon information required by all current flow nodes of the target service from a gallery matrix at one time according to the flow node matrix; further, a flow node diagram is generated in combination with the flow node information of the service. In this way, compared with the related art, the process node diagram can be generated more quickly, and the time complexity in the process node diagram generation in the related art is reduced.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings are included to provide a further understanding of the disclosure, and are incorporated in and constitute a part of this specification, illustrate the disclosure and together with the description serve to explain, but do not limit the disclosure. In the drawings:
fig. 1 is a flowchart illustrating a method of generating a flow node map according to an exemplary embodiment of the present disclosure.
FIG. 2 is a flow chart illustrating one construction of a gallery matrix according to an exemplary embodiment of the disclosure.
Fig. 3 is a flowchart illustrating another method of generating a flow node map according to an exemplary embodiment of the present disclosure.
Fig. 4 is a block diagram of a flow node diagram generating apparatus according to an exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram of an electronic device, according to an exemplary embodiment of the present disclosure.
Detailed Description
Specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating and illustrating the disclosure, are not intended to limit the disclosure.
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
In daily work, users often face different business application flows or different business approval flows, and in order to facilitate users to check the flow progress of business application or business approval, flow node diagrams are often used for showing the user. Different icons are adopted in the flow node diagram to represent the states of different flow nodes, so that a user can clearly and intuitively see the progress of the flow.
In the related technology, when a process node diagram of a service is generated, the type and the state of a first process node of the service process are acquired, then an icon corresponding to the type and the state of the node is acquired from a diagram library, and the acquired icon is rendered on the first node position of the process node diagram; then, the type and the state of a second flow node of the business flow are obtained, then an icon corresponding to the node type and the state of the second node is obtained from a gallery, and the obtained icon is rendered on the second node position of the flow node diagram; and (3) reciprocating the process until the last node of the process node diagram is rendered, and generating a process node diagram corresponding to the business process. The method for generating the nodes in the flow node diagram one by acquiring the icons corresponding to each node for multiple times obviously has higher time complexity, and particularly, the number of flow nodes in the business flow can correspondingly acquire the icon information from the diagram library. In addition, if the business process has multiple sub-nodes with the same node type and the same node state, when generating the sub-nodes, the same icon is repeatedly acquired from the gallery, so that the repeated acquisition mode is low in efficiency and the time complexity of generating the process node diagram is high.
In view of this, embodiments of the present disclosure provide a method, an apparatus, a storage medium, and an electronic device for generating a flow node map, so as to reduce the time complexity in generating the flow node map in the related art.
Fig. 1 is a flowchart illustrating a method of generating a flow node map according to an exemplary embodiment of the present disclosure, as shown in fig. 1, the method including:
s101, generating a corresponding flow node matrix according to flow node information of a target service, wherein the flow node information comprises node types and node states of each flow node of the target service.
The target service refers to a service that a user currently wants to view the progress of the service flow.
Since the node type and the node state of each process node of the target service are included in the process node information. Then all node types and node states for the target business process may be included in the process node matrix.
For example, assume that the target service has four flow nodes in total, wherein the node type of the first node is a start node, and the state is an active state; the node type of the second node is a manual node, and the state is an operation state; the node type of the third node is also a manual node, and the state is an operation state; the node type of the fourth node is an end node, and the state is a termination state.
In one implementation, all node types and node states of the target business process are included in the process node matrix, which may be an element that characterizes a start node of an active state, an element that characterizes a manual node of an active state, and an element that characterizes an end node of a termination state.
In another implementation manner, the flow node matrix includes all node types and node states of the target business flow, and may also include an element representing a start node of an active state, two elements representing manual nodes of an active state, and an element representing an end node of a termination state.
S102, extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix.
And extracting a target matrix corresponding to the target business from the gallery matrix according to the flow node matrix of the target business flow. Specifically, according to node types and node state information of all target business process nodes contained in the process node matrix, corresponding elements representing the node types and the node states are extracted from the gallery matrix to obtain a target matrix corresponding to the target business.
S103, generating a flow node diagram of the target service according to the flow node information and the target matrix.
According to the node type and the node state of each flow node in the flow node information of the target service and according to the picture obtained through the target matrix, a flow node diagram of the target service can be generated.
By adopting the method, a corresponding flow node matrix is generated according to the flow node information of the target service, wherein the flow node information comprises the node type and the node state of each flow node of the target service, and therefore, the generated flow node matrix comprises icon information corresponding to all the node types and the node states of the target service flow; extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix, wherein the target matrix comprises icon information required by all flow nodes of the target service; and generating a flow node diagram of the target service according to the flow node information and the target matrix. Compared with the related art, the related art generates nodes in the flow node diagram one by acquiring icons corresponding to each node for a plurality of times. According to the node information of the whole flow of the target service, the method generates a flow node matrix corresponding to the current progress of the target service; acquiring icon information required by all current flow nodes of the target service from a gallery matrix at one time according to the flow node matrix; further, a flow node diagram is generated in combination with the flow node information of the service. In this way, compared with the related art, the process node diagram can be generated more quickly, and the time complexity in the process node diagram generation in the related art is reduced.
The following describes how the gallery matrix is constructed in embodiments of the present disclosure. FIG. 2 is a flow chart illustrating a construction of a gallery matrix according to an exemplary embodiment of the disclosure, as shown in FIG. 2, in the following manner:
s201, marking icons in a gallery to obtain type codes of each icon, wherein each type code corresponds to one or more node types in a service system;
s202, identifying icons corresponding to each node type according to the type of node state of the node type to obtain state codes of the icons, wherein the state codes correspond to the node states one by one;
s203, generating the gallery matrix according to the type code and the state code of each icon, wherein the gallery matrix is a two-dimensional matrix;
wherein different elements in the gallery matrix correspond to the icons having different types of codes or having different status codes.
It should be understood that one business system includes a plurality of different business items, and different business items may have different business processes, but the types and the state classifications of the business process nodes of the different business items may be the same, so in step S201, the icons in the gallery are identified to obtain a type code of each icon, and each type code corresponds to one or more node types in the business system. For example, as shown in table 1, icon 2, and icon 3 are identified in table 1 such that the type codes of icon 1, icon 2, and icon 3 are all 1; for another example, icons 4, 5, and 6 are identified such that the type codes of icons 4, 5, and 6 are all 3. This way of encoding each icon in the gallery may have a type code for each icon.
It is worth noting that each type of code corresponds to one or more node types. The reason is that different types of nodes can use the same icon under the condition that the node states are the same. Thus, one type code may correspond to one or more node types. By way of example, as shown in table 1, in one possible scenario, both manual and automatic nodes may use icon 1 when generating a flow node graph.
Figure BDA0002329408640000101
TABLE 1
In step S202, for each node type, according to the type of node state of the node type, the icon corresponding to the node type is identified, so as to obtain a state code of each icon, where the state code corresponds to the node state one by one. For example, as shown in table 2, assuming that such a node type is a manual node, the manual node has a node state of which the types include an initial state, an operation state, and an activation state, the icons 1 to 3 corresponding to the manual node are identified such that the status codes of the icon 1, the icon 2, and the icon 3 are 1, 2, and 3, respectively. Wherein, the state codes 1, 2 and 3 are in one-to-one correspondence with the initial state, the running state and the activated state.
Multiple node states of manual type Icon(s) State code
Initial state Icon 1 1
Operating state Icon 2 2
Active state Icon 3 3
TABLE 2
Multiple node states of automatic type Icon(s) State code
Initial state Icon 1 1
Operating state Icon 4 2
Active state Icon 5 3
TABLE 3 Table 3
By adopting the method, each icon can be provided with a group of type codes and state codes with unique identification. According to the examples of tables 1, 2 and 3, for example, the icon 1 may be uniquely characterized by the type code 1 and the state code 1, and the icon 1 may be used for a manual node of an initial state in the flow node diagram or may be used for an automatic node of the initial state. For another example, icon 5 may be uniquely characterized by a type code 3 and a status code of 3, and icon 5 may be used for an active automatic node in a flow node graph.
It should be noted that, in the embodiment of the present disclosure, the sequence between the steps S201 and S202 is not limited.
Since each icon has a set of type codes and status codes that are uniquely identified, a gallery matrix corresponding to the gallery may be generated in step S203 according to the type codes and status codes of each icon, such that different elements in the gallery matrix correspond to icons having different types of codes, or to icons having different status codes. It will be appreciated that the gallery matrix is a two-dimensional matrix in that each element in the generated gallery matrix corresponds to each icon, and each icon corresponds to a type code and a status code.
Illustratively, assume that a gallery matrix corresponding to each icon is generated from the type code and the state code of that gallery as D:
Figure BDA0002329408640000111
in one implementation, if each row in the matrix is made to represent a node status code and each column is made to represent a node type code, then each element in the matrix D may be made to uniquely correspond to a set of status codes and type codes, and thus each element in the matrix D may be made to uniquely correspond to an icon in the gallery.
It will be appreciated that different elements in the gallery matrix D correspond to icons having different types of codes, or to icons having different status codes. For example, element D 11 And element D 13 Although element D 11 And element D 13 Are located in the first row of the gallery matrix D, but element D 11 Located in the first column of the gallery matrix D and element D 13 Located in the third column of the gallery matrix D, and therefore element D 11 And element D 13 Respectively, icons having different types of codes. Again by way of example, element D 13 And element D 33 Are located in the third column of the gallery matrix D, but element D 13 Located in the first row of the gallery matrix D and element D 33 Located in the third row of the gallery matrix D, and therefore element D 13 And element D 33 Respectively corresponding to icons with different status codes.
In another implementation, each column in the matrix may be made to represent a node status code, and each row may be made to represent a node type code, so that each element in the matrix may also be made to uniquely correspond to an icon in the gallery, and different elements in the gallery matrix may be made to correspond to icons with different types of codes, or to icons with different status codes.
It should be noted that in the related art, icons are typically stored in a database in a service system, so as to facilitate unified management of icons. However, as the variety of services in the system increases, the icons in the original icon library may not be suitable for the new service flow node map. Alternatively, the user may want to use icons of different style styles to generate a flow node map when facing different business categories. In this case, it is necessary to update the icons in the icon library, for example, to add new icons to the icon library, to delete some icons in the icon library, or to replace homonymous icons in the icon library, or the like. The same name icon replacement refers to a method of replacing a picture with a new picture in an icon library, wherein the picture has the same name as the new picture.
In the case of updating the icon library, the same icon a is used in the business flow node diagrams of the business a, the business B, and the business C. Assuming that the user needs to update all icons currently used by the flow node diagram of the service a, when all icons currently used by the flow node diagram of the service a are replaced by the same name, the icon a is replaced by a new icon a. Then the original icon a being used is updated to the new icon a in the flow node diagrams of traffic B and traffic C as well. Obviously, this approach does not meet the above-mentioned needs of the user.
Therefore, to solve this kind of problem, an independent icon database can be built corresponding to each business process, so that when the gallery of a certain business process is replaced, the influence on the process node diagram of other businesses can be avoided. However, this approach does not facilitate unified management of icons and also increases the amount of effort to maintain the database. And, as the service category increases, the number of icon databases increases continuously, which is obviously complicated. In another possible scenario, if the icons of the flow node diagrams are stored in a configuration file manner, a separate configuration file is created for each business flow, which also increases the workload of data maintenance. And, as the service types increase, the memory consumption of the system increases.
In view of this, the embodiments of the present disclosure provide a way to not build a separate configuration file or database for each business process, but in one possible implementation, all icons in the system may be stored in one database, and then for each business, a gallery matrix corresponding to each business process is built, and each element in each gallery matrix is an index of a picture in the icon database. In this way, when the icon used by the flow node diagram of a certain business flow is replaced, only the diagram library matrix of the business needs to be changed. For example, elements in the gallery matrix corresponding to the business process are changed to indexes of new icons.
By adopting the mode, the gallery matrixes are respectively constructed for each business process, and elements in each gallery matrix are mapped with the gallery of the system, so that when the currently used icons of some business process node diagrams need to be updated, the icons are easy to replace, and only the elements in the gallery matrixes corresponding to the businesses need to be changed; in this way, the process node diagram of other businesses is not affected when the icon used by one business process node diagram is changed. And the same database storage icon is adopted to facilitate unified management of the gallery. This way avoids the above-described problems in the related art. It is worth to say that, when the system expands new business functions, the method of constructing the gallery matrix for each business process is beneficial to the personalized expansion of the business process node diagram.
The following describes how to generate a corresponding flow node matrix according to the flow node information of the target service.
In one implementation, the position of each element of the flow node matrix in the flow node matrix may be made relative to the position of each element of the gallery matrix in the gallery matrixShould be. That is, the number of rows and columns of the flow node matrix are the same as the number of rows and columns of the gallery matrix, and the elements at the same positions represent the same node type code and node state code. Illustratively, if the gallery matrix is
Figure BDA0002329408640000141
The flow node matrix is->
Figure BDA0002329408640000142
Then element D of the gallery matrix therein 11 Element a in the same position as the flow node matrix 11 And the two elements represent the same node type code and node state code and correspond to the same icon.
In an implementation manner, a corresponding flow node matrix is generated according to flow node information of a target service, and a target value is given to a target element in the flow node matrix according to a node type and a node state of each flow node of the target service, wherein a type code and a state code represented by a position of the target element in the matrix are matched with the node type and the node state of the flow node.
For example, it is assumed that the flow node information of the target service includes a start node of an active state, a manual node of an operating state, and an end node of a terminating state. And assuming that the flow node matrix of the target service is a:
Figure BDA0002329408640000143
assuming that a state code corresponding to a first column of the matrix A represents an activated state, and a type code corresponding to a first row represents a starting node type; the state code corresponding to the second column of the matrix A represents the running state, and the type code corresponding to the second row represents the manual node type; the state code corresponding to the third column of the matrix A represents the termination state, and the type code corresponding to the third row represents the type of the ending node; let the initial value of the flow node matrix as A be: />
Figure BDA0002329408640000144
Wherein an element value of 0 characterizes a node that does not have a type code and a status code corresponding to the element. />
At this time, according to the flow node information of the target service, it can be known that the target service has an active start node, and the state code corresponding to the first row and the first column of the matrix a represents the active state, and the type code represents the start node type, then the element a can be represented by 11 Imparting a target value such that element A 11 The value of (2) is 1. Then, if the flow node information of the target service includes the manual node in the running state, then the element A in the matrix A can be obtained 22 Imparting a target value such that element A 22 The value of (2) is 1. Then, if the flow node information of the target service includes the ending node of the ending state, then the element A in the matrix A can be selected 33 Imparting a target value such that element A 33 The value of (2) is 1. At this time, the flow node matrix corresponding to the target service is generated as a:
Figure BDA0002329408640000151
it should be noted here that in one possible case, different types of nodes, in the case of the same node state, may use the same icon. Illustratively, the same icon is used by the active manual node as the active automatic node. Further, the flow node information of the target service is assumed to include the following nodes: a start node of an active state, a manual node of an operating state, an automatic node of an operating state, and an end node of a termination state. Then when a target value is given to a target element in the stream node matrix according to the information of each stream node of the target service, the element A in the matrix A is given according to the manual node in the running state and the automatic node information in the running state 22 Giving a target value so as to generate a flow node matrix corresponding to the target service as A, wherein the A is still as follows:
Figure BDA0002329408640000152
in an implementation manner, the extracting, according to the flow node matrix, the target matrix corresponding to the target service from the gallery matrix may include the following steps:
For each target element given a target value, extracting values of elements corresponding to each target element from the gallery matrix, and generating the target matrix.
Illustratively, suppose that the flow node matrix A of the target service is
Figure BDA0002329408640000153
And the gallery matrix D is
Figure BDA0002329408640000154
Then for each target element in the flow node matrix that is assigned a target value, the value of the element whose position corresponds to each target element is extracted from the gallery matrix, i.e., D in the gallery matrix D is extracted from the element in the flow node matrix A having a value of 1 11 ,D 22 And D 33 Thereby generating a target matrix of D 11 D 22 D 33 Or generating the target matrix as +.>
Figure BDA0002329408640000161
It should be noted that, for each target element in the flow node matrix that gives a target value, values of elements whose positions correspond to each target element are extracted from the gallery matrix, and a target array (D 11 ,D 22 ,D 33 ) The present disclosure is not limited in this regard.
In this way, according to the elements endowed with the target values in the flow node matrix, the values of the elements corresponding to each target element in position are extracted from the gallery matrix, so that the target matrix required by the flow node diagram of the target service can be obtained. The method for extracting the element values of the corresponding positions does not need to traverse each element in the gallery matrix, so that the method can rapidly extract and obtain the target matrix.
The following describes how to generate a flow node map of the target service according to the flow node information and the target matrix.
In an implementation manner, the generating the flow node diagram of the target service according to the flow node information and the target matrix may include the following steps:
according to each element in the target matrix, acquiring a target icon with a status code and a type code corresponding to the element from the gallery; and selecting the corresponding target icon according to the node type and the node state of each process node in the process node information to generate a process node diagram of the target service.
It is to be understood that the gallery matrix is a two-dimensional matrix, each element represents a set of state codes and type codes correspondingly, so that for each target element given with a target value in the process node matrix, the value of the element corresponding to each target element is extracted from the gallery matrix, and the generated target matrix is also a two-dimensional matrix, and each element of the target matrix represents a set of state codes and type codes correspondingly. Then a target icon having the same state code and type code as each element in the target matrix may be obtained from the gallery based on the set of state codes and type codes correspondingly characterized by that element.
And selecting a corresponding target icon according to the node type and the node state of each flow node in the flow node information of the target service, so as to generate a flow node diagram of the target service.
In this way, according to each target element in the target matrix, the target icons of the status code and the type code corresponding to each target element of the target matrix are acquired from the gallery, so that all target icons required for obtaining the target service are acquired at one time. And selecting a corresponding target icon according to the node type and the node state of each process node in the process node information of the target service to generate a process node diagram of the target service. In this way, compared with the method of generating nodes in the flow node map one by acquiring the icons corresponding to each node for multiple times in the related art, the method only needs to acquire all the required icons once, so that the flow node map of the target service can be generated more quickly, and the time complexity of generating the flow node map in the related art is reduced.
There is a possible case that if a user wants to view the flow progress of a plurality of services at the same time, a flow node diagram of a plurality of services needs to be generated.
In one implementation, if there are multiple target services, the priority of the target services is preset; and generating a flow node diagram of each target service in turn according to the priority order of the target services.
By adopting the method, the priority of the target service can be set according to the requirements of the user, and when the user checks the flow progress of a plurality of services, the flow node diagram of each target service is sequentially generated according to the priority sequence of the service so as to adapt to the requirements of the user.
FIG. 3 is a flowchart of another method of generating a flow node map, as shown in FIG. 3, according to an exemplary embodiment of the present disclosure, including:
s301, according to the node type and the node state of each process node of the target service, giving target values to target elements in a process node matrix;
s302, extracting values of elements corresponding to target elements from a gallery matrix according to each target element given with a target value in a flow node matrix, and generating a target matrix;
s303, according to each element in the target matrix, acquiring a target icon with a state code and a type code corresponding to the element from a gallery;
S304, selecting a corresponding target icon according to the node type and the node state of each process node in the process node information to generate a process node diagram of the target service.
By adopting the method, a corresponding flow node matrix is generated according to the flow node information of the target service, wherein the flow node information comprises the node type and the node state of each flow node of the target service, and therefore, the generated flow node matrix comprises all the node types and the node states of the target service flow; extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix, wherein the target matrix comprises icon information required by all flow nodes of the target service; and generating a flow node diagram of the target service according to the flow node information and the target matrix. Compared with the related art, the related art generates nodes in the flow node diagram one by acquiring icons corresponding to each node for a plurality of times. According to the node information of the whole flow of the target service, the method generates a flow node matrix corresponding to the current progress of the target service; acquiring icon information required by all current flow nodes of the target service from a gallery matrix at one time according to the flow node matrix; further, a flow node diagram is generated in combination with the flow node information of the service. In this way, compared with the related art, the process node diagram can be generated more quickly, and the time complexity in the process node diagram generation in the related art is reduced.
The specific manner in which the operations are performed by the steps in the above-described embodiments has been described in detail in relation to the above-described embodiments of the method, and will not be described in detail herein.
It should be noted here that, since in the present disclosure, the icon has a status code and a type code, in one implementation, the status code and the type code of the icon may be transmitted using a key-value in Json format. In this way, the efficiency of generating the flow node map can be further improved.
Based on the same inventive concept, the embodiment of the present disclosure further provides a flow node diagram generating apparatus, as shown in fig. 4, the apparatus 400 includes:
the first generation module 401 is configured to generate a corresponding flow node matrix according to flow node information of a target service, where the flow node information includes a node type and a node state of each flow node of the target service;
the obtaining module 402 is configured to extract, from a gallery matrix, a target matrix corresponding to the target service according to the flow node matrix;
the second generating module 403 is configured to generate a flow node map of the target service according to the flow node information and the target matrix.
By adopting the device, a corresponding flow node matrix is generated according to the flow node information of the target service, wherein the flow node information comprises the node type and the node state of each flow node of the target service, so that the generated flow node matrix comprises icon information corresponding to all the node types and the node states of the target service flow; extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix, wherein the target matrix comprises icon information required by all flow nodes of the target service; and generating a flow node diagram of the target service according to the flow node information and the target matrix. Compared with the related art, the related art generates nodes in the flow node diagram one by acquiring icons corresponding to each node for a plurality of times. According to the mode, a flow node matrix corresponding to the current progress of the target service is generated according to the node information of the whole flow of the target service; acquiring icon information required by all current flow nodes of the target service from a gallery matrix at one time according to the flow node matrix; further, a flow node diagram is generated in combination with the flow node information of the service. In this way, compared with the related art, the process node diagram can be generated more quickly, and the time complexity in the process node diagram generation in the related art is reduced.
Optionally, the gallery matrix is constructed by:
marking icons in a gallery to obtain type codes of each icon, wherein each type code corresponds to one or more node types in a service system;
for each node type, marking the icon corresponding to the node type according to the type of the node state of the node type to obtain the state code of each icon, wherein the state codes are in one-to-one correspondence with the node states;
and generating the gallery matrix according to the type code and the state code of each icon, wherein the gallery matrix is a two-dimensional matrix, and different elements in the gallery matrix correspond to the icons with different types of codes or different state codes.
Optionally, the position of each element of the flow node matrix in the flow node matrix corresponds to the position of each element of the gallery matrix in the gallery matrix;
the first generating module 401 includes:
the assignment submodule is used for assigning a target value to a target element in the flow node matrix according to the node type and the node state of each flow node of the target service, and the type code and the state code represented by the position of the target element in the matrix are matched with the node type and the node state of the flow node;
The acquiring module 402 includes:
the extraction submodule is used for extracting the value of the element corresponding to each target element from the gallery matrix according to each target element endowed with the target value, and generating the target matrix.
Optionally, the second generating module 403 includes:
the obtaining submodule is used for obtaining a target icon with a state code and a type code corresponding to each element from the gallery according to each element in the target matrix;
the selecting submodule is used for selecting the corresponding target icon according to the node type and the node state of each flow node in the flow node information so as to generate a flow node diagram of the target service.
Optionally, the apparatus 400 further includes:
the setting module is used for presetting the priority of the target service if a plurality of target services exist;
the execution module is used for sequentially generating a flow node diagram of each target service according to the priority order of the plurality of target services.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 5 is a block diagram of an electronic device 700, according to an example embodiment. As shown in fig. 5, the electronic device 700 may include: a processor 701, a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the above-described method for generating a flowchart node diagram. The memory 702 is used to store various types of data to support operation on the electronic device 700, which may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact data, messages sent and received, pictures, audio, video, and so forth. The Memory 702 may be implemented by any type or combination of volatile or non-volatile Memory devices, such as static random access Memory (Static Random Access Memory, SRAM for short), electrically erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), erasable programmable Read-Only Memory (Erasable Programmable Read-Only Memory, EPROM for short), programmable Read-Only Memory (Programmable Read-Only Memory, PROM for short), read-Only Memory (ROM for short), magnetic Memory, flash Memory, magnetic disk, or optical disk. The multimedia component 703 can include a screen and an audio component. Wherein the screen may be, for example, a touch screen, the audio component being for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may be further stored in the memory 702 or transmitted through the communication component 705. The audio assembly further comprises at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, which may be a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, bluetooth, near field communication (Near Field Communication, NFC for short), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or one or a combination of more of them, is not limited herein. The corresponding communication component 705 may thus comprise: wi-Fi module, bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, abbreviated as ASIC), digital signal processors (Digital Signal Processor, abbreviated as DSP), digital signal processing devices (Digital Signal Processing Device, abbreviated as DSPD), programmable logic devices (Programmable Logic Device, abbreviated as PLD), field programmable gate arrays (Field Programmable Gate Array, abbreviated as FPGA), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described flow node diagram generation method.
In another exemplary embodiment, a computer readable storage medium is also provided, comprising program instructions which, when executed by a processor, implement the steps of the above-described flow node map generation method. For example, the computer readable storage medium may be the memory 702 including program instructions described above, which are executable by the processor 701 of the electronic device 700 to perform the flow node diagram generation method described above.
In another exemplary embodiment, a computer program product is also provided, comprising a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-described flow node map generation method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure have been described in detail above with reference to the accompanying drawings, but the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solutions of the present disclosure within the scope of the technical concept of the present disclosure, and all the simple modifications belong to the protection scope of the present disclosure.
In addition, the specific features described in the above embodiments may be combined in any suitable manner without contradiction. The various possible combinations are not described further in this disclosure in order to avoid unnecessary repetition.
Moreover, any combination between the various embodiments of the present disclosure is possible as long as it does not depart from the spirit of the present disclosure, which should also be construed as the disclosure of the present disclosure.

Claims (10)

1. A method for generating a flow node map, the method comprising:
generating a corresponding flow node matrix according to flow node information of a target service, wherein the flow node information comprises node types and node states of each flow node of the target service;
extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix;
Generating a flow node diagram of the target service according to the flow node information and the target matrix;
the generating a process node diagram of the target service according to the process node information and the target matrix includes:
according to each element in the target matrix, acquiring a target icon with a state code and a type code corresponding to the element from a gallery;
and selecting the corresponding target icon according to the node type and the node state of each process node in the process node information to generate a process node diagram of the target service.
2. The method of claim 1, wherein the gallery matrix is constructed by:
identifying icons in the gallery to obtain type codes of each icon, wherein each type code corresponds to one or more node types in a service system;
for each node type, marking the icon corresponding to the node type according to the type of the node state of the node type to obtain the state code of each icon, wherein the state codes are in one-to-one correspondence with the node states;
and generating the gallery matrix according to the type code and the state code of each icon, wherein the gallery matrix is a two-dimensional matrix.
3. The method of claim 2, wherein the position of each element of the flow node matrix in the flow node matrix corresponds to the position of each element of the gallery matrix in the gallery matrix;
the generating a corresponding flow node matrix according to the flow node information of the target service includes:
according to the node type and the node state of each flow node of the target service, a target value is given to a target element in the flow node matrix, and a type code and a state code represented by the position of the target element in the matrix are matched with the node type and the node state of the flow node;
the extracting, according to the flow node matrix, a target matrix corresponding to the target service from a gallery matrix includes:
for each target element given a target value, extracting values of elements corresponding to each target element from the gallery matrix, and generating the target matrix.
4. A method according to any one of claims 1-3, wherein the method further comprises:
if a plurality of target services exist, presetting the priority of the target services;
And generating a flow node diagram of each target service in turn according to the priority order of the target services.
5. A flow node map generating apparatus, the apparatus comprising:
the first generation module is used for generating a corresponding flow node matrix according to flow node information of a target service, wherein the flow node information comprises node types and node states of each flow node of the target service;
the acquisition module is used for extracting a target matrix corresponding to the target service from a gallery matrix according to the flow node matrix;
the second generation module is used for generating a flow node diagram of the target service according to the flow node information and the target matrix;
the second generation module includes:
the obtaining submodule is used for obtaining a target icon with a state code and a type code corresponding to each element from a gallery according to each element in the target matrix;
the selecting submodule is used for selecting the corresponding target icon according to the node type and the node state of each flow node in the flow node information so as to generate a flow node diagram of the target service.
6. The apparatus of claim 5, wherein the gallery matrix is constructed by:
identifying icons in the gallery to obtain type codes of each icon, wherein each type code corresponds to one or more node types in a service system;
for each node type, marking the icon corresponding to the node type according to the type of the node state of the node type to obtain the state code of each icon, wherein the state codes are in one-to-one correspondence with the node states;
and generating the gallery matrix according to the type code and the state code of each icon, wherein the gallery matrix is a two-dimensional matrix.
7. The apparatus of claim 6, wherein a position of each element of the flow node matrix in the flow node matrix corresponds to a position of each element of the gallery matrix in the gallery matrix;
the first generation module includes:
the assignment submodule is used for assigning a target value to a target element in the flow node matrix according to the node type and the node state of each flow node of the target service, and the type code and the state code represented by the position of the target element in the matrix are matched with the node type and the node state of the flow node;
The acquisition module comprises:
the extraction submodule is used for extracting the value of the element corresponding to each target element from the gallery matrix according to each target element endowed with the target value, and generating the target matrix.
8. The apparatus according to any one of claims 5-7, further comprising:
the setting module is used for presetting the priority of the target service if a plurality of target services exist;
the execution module is used for sequentially generating a flow node diagram of each target service according to the priority order of the plurality of target services.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1-4.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any one of claims 1-4.
CN201911330382.3A 2019-12-20 2019-12-20 Method and device for generating flow node diagram, storage medium and electronic equipment Active CN111179376B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911330382.3A CN111179376B (en) 2019-12-20 2019-12-20 Method and device for generating flow node diagram, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911330382.3A CN111179376B (en) 2019-12-20 2019-12-20 Method and device for generating flow node diagram, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111179376A CN111179376A (en) 2020-05-19
CN111179376B true CN111179376B (en) 2023-06-13

Family

ID=70657453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911330382.3A Active CN111179376B (en) 2019-12-20 2019-12-20 Method and device for generating flow node diagram, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111179376B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2811434A1 (en) * 2012-01-31 2014-12-10 IPS Co., Ltd. Mobile terminal management server, and mobile terminal management program
CN108563984A (en) * 2018-03-02 2018-09-21 山东科技大学 A kind of automatic identification and understanding method of procedural model figure
CN109405847A (en) * 2018-10-15 2019-03-01 深圳市路畅科技股份有限公司 Automatic navigator and its vehicle-state cartoon display method, system and storage medium
CN109816212A (en) * 2018-12-29 2019-05-28 东软集团股份有限公司 Creation method, device, storage medium and the electronic equipment of task list
CN109829145A (en) * 2018-12-29 2019-05-31 东软集团股份有限公司 Method for drafting, device, storage medium and the electronic equipment of business form

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2811434A1 (en) * 2012-01-31 2014-12-10 IPS Co., Ltd. Mobile terminal management server, and mobile terminal management program
CN108563984A (en) * 2018-03-02 2018-09-21 山东科技大学 A kind of automatic identification and understanding method of procedural model figure
CN109405847A (en) * 2018-10-15 2019-03-01 深圳市路畅科技股份有限公司 Automatic navigator and its vehicle-state cartoon display method, system and storage medium
CN109816212A (en) * 2018-12-29 2019-05-28 东软集团股份有限公司 Creation method, device, storage medium and the electronic equipment of task list
CN109829145A (en) * 2018-12-29 2019-05-31 东软集团股份有限公司 Method for drafting, device, storage medium and the electronic equipment of business form

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
工作流的动态变更处理方法;刘清华等;《计算机辅助设计与图形学学报》;20110215(第02期);正文第1-8页 *

Also Published As

Publication number Publication date
CN111179376A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
KR102125177B1 (en) Blockchain-based data processing method and device
CN111859470B (en) Business data chaining method and device
CN108415952A (en) User data storage method, label computational methods and computing device
CN106031127B (en) Method and apparatus for management of applications
CN111061678B (en) Service data processing method, device, computer equipment and storage medium
CN108776587B (en) Data acquisition method and device, computer equipment and storage medium
CN106557307B (en) Service data processing method and system
CN110661665B (en) Alarming method based on Internet of things cloud platform, computer storage medium and equipment
CN108984623B (en) Data query condition generation method and device, storage medium and electronic equipment
CN114579561A (en) Data processing method and device, and storage medium
CN111179376B (en) Method and device for generating flow node diagram, storage medium and electronic equipment
CN109101191B (en) Data storage method, data storage device, storage medium and electronic equipment
CN113742332A (en) Data storage method, device, equipment and storage medium
JP2022543905A (en) Regular QC-LDPC code construction method and electronic equipment
CN111177182A (en) Data query method and device, storage medium and electronic equipment
CN116303589A (en) Workflow construction method, device, equipment and readable storage medium
CN106155990A (en) A kind of data process and the method for application continuum
CN112905587B (en) Database data management method and device and electronic equipment
CN112162731B (en) Data expansion method, device, storage medium and electronic device
CN111858158B (en) Data processing method and device and electronic equipment
CN111552847B (en) Method and device for changing number of objects
CN111026615B (en) Method and device for acquiring logical volume list, electronic equipment and storage medium
CN112487032A (en) Data query method and device, storage medium and electronic equipment
CN111880741B (en) Object state setting method and device, electronic equipment and storage medium
CN113312331A (en) Data migration method, device, system, electronic equipment and computer readable medium

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