CN106529917B - Workflow processing method and device - Google Patents

Workflow processing method and device Download PDF

Info

Publication number
CN106529917B
CN106529917B CN201611158853.3A CN201611158853A CN106529917B CN 106529917 B CN106529917 B CN 106529917B CN 201611158853 A CN201611158853 A CN 201611158853A CN 106529917 B CN106529917 B CN 106529917B
Authority
CN
China
Prior art keywords
node
cache
preset
node type
workflow
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
CN201611158853.3A
Other languages
Chinese (zh)
Other versions
CN106529917A (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201611158853.3A priority Critical patent/CN106529917B/en
Publication of CN106529917A publication Critical patent/CN106529917A/en
Application granted granted Critical
Publication of CN106529917B publication Critical patent/CN106529917B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Abstract

The embodiment of the invention discloses a workflow processing method, which is used for solving the problems that the workflow tasks are limited by the size of a cache, the overstock of the workflow tasks is easy to cause, and the processing efficiency is low. The method provided by the embodiment of the invention comprises the following steps: acquiring a node type of a target workflow node; judging whether the node type meets a preset first condition or a preset second condition; if the node type meets a preset first condition, loading the target workflow node into a database, and processing the target workflow node in the database; and if the node type meets a preset second condition, loading the target workflow node into a processing queue of the database, and sequentially refreshing the target workflow node in the processing queue into a cache for processing. The embodiment of the invention also provides a workflow processing device.

Description

Workflow processing method and device
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a workflow processing method and apparatus.
Background
Workflow (Workflow), which refers to the "automation of a part or the whole of a business process in a computer application environment," is an abstract and generalized description of the business rules between the Workflow and its various operational steps. In the insurance industry, workflows are often used for automating task flows, for example, in a task of processing a claim request, workflow nodes such as "receiving a request," obtaining claim case information, "obtaining policy information," collecting claim materials, "examining claim materials," outputting an examination result, "and" outputting a claim result "may be roughly divided.
Currently, when a system performs workflow processing, workflows of all tasks are generally loaded into a cache. However, due to the limitation of the available cache size of the system, when there are a large number of tasks to be processed, all workflow nodes of the tasks to be processed can only queue in the cache to wait for processing, and for the workflow of the tasks to be processed, since the previous node waits for processing in the cache and is not completed, the workflow cannot enter the next node, thereby easily causing a large amount of backlogs of the workflow tasks, the tasks cannot be circulated, and the processing efficiency of the tasks is greatly reduced.
Disclosure of Invention
Embodiments of the present invention provide a workflow processing method and apparatus, which can reduce workload of cache, facilitate reducing backlog of workflow tasks, promote circulation of workflow tasks, and improve processing efficiency of tasks.
The workflow processing method provided by the embodiment of the invention comprises the following steps:
acquiring a node type of a target workflow node;
judging whether the node type meets a preset first condition or a preset second condition;
if the node type meets a preset first condition, loading the target workflow node into a database, and processing the target workflow node in the database;
and if the node type meets a preset second condition, loading the target workflow node into a processing queue of the database, and sequentially refreshing the target workflow node in the processing queue into a cache for processing.
Optionally, the determining whether the node type meets a preset first condition includes:
acquiring processing operation required by the node type;
judging whether the required processing operation is executed in a database;
and/or
The judging whether the node type meets a preset first condition or not comprises the following steps: judging whether the node type is within a preset first node type range or not;
the step of judging whether the node type meets a preset second condition comprises the following steps:
acquiring processing operation required by the node type;
judging whether the required processing operation is executed in a cache or not;
and/or
The step of judging whether the node type meets a preset second condition comprises the following steps: and judging whether the node type is within a preset second node type range.
Optionally, the workflow processing method further includes:
monitoring whether the current workload of the cache exceeds a preset warning threshold value;
and if the current workload of the cache exceeds a preset warning threshold value, cleaning the cache.
Optionally, the clearing the cache specifically includes:
acquiring the entering time of a target workflow node in the cache into the cache;
acquiring the updating time of the workflow task corresponding to the target workflow node in the cache;
sequencing all target workflow nodes in the cache according to the entry time and the update time to obtain a sequencing result;
and sequentially cleaning the target workflow nodes in the cache according to the sequencing result until the current workload of the cache is less than a preset warning threshold value.
Optionally, the workflow processing method further includes:
and if the node type does not accord with the preset first condition or the preset second condition, loading the target workflow node into a cache, and processing the target workflow node in the cache.
An embodiment of the present invention provides a workflow processing apparatus, including:
the node type acquisition module is used for acquiring the node type of the target workflow node;
the judging module is used for judging whether the node type meets a preset first condition or a preset second condition;
the first processing module is used for loading the target workflow node into a database and processing the target workflow node in the database if the node type meets a preset first condition;
and the second processing module is used for loading the target workflow nodes into a processing queue of the database and sequentially refreshing the target workflow nodes in the processing queue into a cache for processing if the node type meets a preset second condition.
Optionally, the determining module includes:
the first judgment submodule is used for judging whether the node type meets a preset first condition or not;
the second judgment submodule is used for judging whether the node type meets a preset second condition or not;
the first judgment sub-module includes:
a first operation obtaining unit, configured to obtain a required processing operation corresponding to the node type;
a first operation judgment unit operable to judge whether the required processing operation is executed in a database;
and/or
The first judgment sub-module includes: the first range judging unit is used for judging whether the node type is in a preset first node type range or not;
the second judgment sub-module includes:
a second operation obtaining unit, configured to obtain a required processing operation corresponding to the node type;
a second operation judgment unit configured to judge whether the required processing operation is executed in a cache;
and/or
The second judgment sub-module includes: and the second range judging unit is used for judging whether the node type is in a preset second node type range or not.
Optionally, the workflow processing apparatus further includes:
the monitoring module is used for monitoring whether the current workload of the cache exceeds a preset warning threshold value;
and the cache cleaning module is used for cleaning the cache if the current workload of the cache exceeds a preset warning threshold value.
Optionally, the cache cleaning module includes:
the entry time acquisition submodule is used for acquiring the entry time of the target workflow node in the cache into the cache;
the update time acquisition submodule is used for acquiring the update time of the workflow task corresponding to the target workflow node in the cache;
the sequencing submodule is used for sequencing all the target workflow nodes in the cache according to the entry time and the updating time to obtain a sequencing result;
and the cleaning submodule is used for sequentially cleaning the target workflow nodes in the cache according to the sequencing result until the current workload of the cache is less than a preset warning threshold value.
Optionally, the workflow processing apparatus further includes:
and the third processing module is used for loading the target workflow node into a cache and processing the target workflow node in the cache if the node type does not meet the preset first condition or the preset second condition.
According to the technical scheme, the embodiment of the invention has the following advantages:
in the embodiment of the invention, firstly, the node type of a target workflow node is obtained; then, judging whether the node type meets a preset first condition or a preset second condition; if the node type meets a preset first condition, loading the target workflow node into a database, and processing the target workflow node in the database; and if the node type meets a preset second condition, loading the target workflow node into a processing queue of the database, and sequentially refreshing the target workflow node in the processing queue into a cache for processing. In the embodiment of the invention, whether the node type of the target workflow node meets the preset first condition or second condition is judged, so that the target workflow node meeting the condition can be loaded into the database for processing, or loaded into the database for queuing and processed in the cache, part of the workflow nodes do not need to be loaded in the cache, and even part of the workflow nodes do not need to be loaded and processed in the cache, the workload of the cache is greatly reduced, the overstock of the workflow tasks is favorably reduced, the circulation of the workflow tasks is promoted, and the processing efficiency of the tasks is improved.
Drawings
FIG. 1 is a flowchart of a workflow processing method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a workflow processing method according to a second embodiment of the present invention;
FIG. 3 is a schematic flowchart illustrating step 208 of a workflow processing method in an application scenario according to the embodiment shown in FIG. 2;
FIG. 4 is a block diagram of a workflow processing apparatus according to a first embodiment of the present invention;
FIG. 5 is a diagram illustrating a second embodiment of a workflow processing apparatus according to an embodiment of the present invention;
fig. 6 is a structural diagram of a workflow processing apparatus according to a third embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a workflow processing method and a workflow processing device, which are used for solving the problems that the workflow tasks are limited by the size of a cache, the backlog of the workflow tasks is easy to cause and the processing efficiency is low.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a first embodiment of a workflow processing method according to an embodiment of the present invention includes:
101. acquiring a node type of a target workflow node;
in this embodiment, first, the node type of the target workflow node may be obtained. It is understood that all workflow nodes are preset in the system as several node types, and these node types can indicate to which users the corresponding workflow nodes are directed to operate or manage. Thus, different node types may be handled by users of different authorities. Workflow nodes such as ' receiving request ', acquiring claim case information, acquiring policy information ', collecting claim material ', checking the claim material ', outputting checking result ', outputting the claim result ' and the like in the claim task, wherein the nodes of ' receiving request ' and ' collecting the claim material ' need participation of claim requesters and can be operated by users with ' client ' level authority; and the rest of nodes, such as nodes for checking claims materials, outputting checking results and the like, need to be processed by staff in the insurance institution, so that the nodes are operated by users with higher authority level than the client.
102. Judging whether the node type meets a preset first condition, if so, executing a step 103, and if not, executing a step 104;
after the node type of the target workflow node is obtained, it may be determined whether the node type meets a preset first condition, if yes, step 103 is executed, and if no, step 104 is executed.
Further, the determining whether the node type meets a preset first condition may include: acquiring processing operation required by the node type; determining whether the required processing operation is performed in a database.
When the processing operation corresponding to the node type is obtained, the feature value of the node type may be extracted first. The characteristic values may include a unique Identification (ID) of each workflow task, a business primary key, a current node step name, a last node submitter, a last node submission time, a current node handler, a priority of the current node handler, and so forth. After the feature value of the node type is extracted, the processing operation required by the node type can be acquired according to the corresponding relationship between the feature value and the operation function. Therefore, it can be determined whether these processing operations can be executed in the database, and if so, in order to reduce the load of the cache, step 103 may be executed to load the corresponding workflow node into the database for processing.
Further, the determining whether the node type meets a preset first condition may further include: and judging whether the node type is in a preset first node type range. It is understood that a range of the first node type may be set in advance for determining the node type, and when the node type falls within the range, the node type is considered to meet the preset first condition.
103. Loading the target workflow node into a database, and processing the target workflow node in the database;
if the node type meets a preset first condition, the target workflow node can be loaded into a database, and the target workflow node is processed in the database. It can be understood that, by loading the target workflow node into the database and processing the target workflow node in the database, a part of target workflow nodes meeting the first condition can be effectively handed over to the database for loading and processing, thereby greatly reducing the work load of the cache.
104. Judging whether the node type meets a preset second condition, if so, executing a step 105, and if not, executing a step 106;
if the node type does not meet the preset first condition, it may be determined whether the node type meets the preset second condition, if so, step 105 is performed, and if not, step 106 is performed.
Further, the determining whether the node type meets a preset second condition may include: acquiring processing operation required by the node type; and judging whether the required processing operation is executed in a cache or not.
When the processing operation corresponding to the node type is obtained, the feature value of the node type may be extracted first. The characteristic values may include a unique Identification (ID) of each workflow task, a business primary key, a current node step name, a last node submitter, a last node submission time, a current node handler, a priority of the current node handler, and so forth. After the feature value of the node type is extracted, the processing operation required by the node type can be acquired according to the corresponding relationship between the feature value and the operation function. Therefore, it may be determined whether these processing operations can be executed in the cache, and if so, in order to reduce the load of the cache, step 104 may be executed to load the corresponding workflow node into the database, and then, when the target workflow node needs to be executed, the target workflow node is flushed into the cache for processing.
Further, the determining whether the node type meets a preset second condition may further include: and judging whether the node type is within a preset second node type range. It is understood that a range of the second node type may be set in advance for determining the node type, and when the node type falls within the range, the node type is considered to meet the preset second condition.
It can be understood that, in this embodiment, the step 102 is preferentially executed to determine whether the node type meets a preset first condition, if yes, the target workflow node is loaded into the database, and the target workflow node is processed in the database, so that the workload of the cache can be maximally reduced. And when the node type confirms that the node type does not meet the preset first condition, executing step 104, judging whether the node type meets the preset second condition, if so, loading the target workflow node into a processing queue of the database, and sequentially refreshing the target workflow node in the processing queue into a cache for processing, thereby further reducing part of workload for the cache. Therefore, in this embodiment, step 102 is performed first, and then step 104 is performed. In an application scenario, step 104 may be executed first, and then step 102 is executed, or steps 102 and 104 may be executed simultaneously.
105. Loading the target workflow nodes into a processing queue of a database, and sequentially refreshing the target workflow nodes in the processing queue into a cache for processing;
if the node type meets a preset second condition, the target workflow node can be loaded into a processing queue of a database, and the target workflow nodes in the processing queue are sequentially refreshed into a cache for processing.
The processing queue stores each target workflow node, and the target workflow nodes can be stored in the processing queue according to the loading time sequence, and also can be stored in the processing queue from high to low according to the priority of a handler corresponding to the target workflow node or the preset priority of the target workflow node.
In this embodiment, after the work in the cache is completed, the database is operated to refresh the target workflow node in the processing queue into the cache for processing; or when the residual workload in the cache is lower than a set threshold, the operation database refreshes the target workflow node in the processing queue into the cache for processing.
106. And processing the target workflow nodes according to a default processing flow.
And if the node type does not meet the preset second condition, processing the target workflow node according to a default processing flow. It can be understood that, if the node type does not meet the preset first condition, or does not meet the preset second condition, the target workflow node may be processed according to a default processing flow or processing manner. In this embodiment, the default processing flow may be to load the target workflow node into a cache and process the target workflow node in the cache.
In this embodiment, first, a node type of a target workflow node is obtained; then, judging whether the node type meets a preset first condition or a preset second condition; if the node type meets a preset first condition, loading the target workflow node into a database, and processing the target workflow node in the database; and if the node type meets a preset second condition, loading the target workflow node into a processing queue of the database, and sequentially refreshing the target workflow node in the processing queue into a cache for processing. In this embodiment, by determining whether the node type of the target workflow node meets the preset first condition or second condition, the target workflow node meeting the condition may be loaded into the database for processing, or loaded into the database for queuing and processed in the cache, so that part of the workflow nodes do not need to be loaded in the cache, or even part of the workflow nodes do not need to be loaded and processed in the cache, thereby greatly reducing the workload of the cache, facilitating reduction of the backlog of workflow tasks, promoting the flow of the workflow tasks, and improving the processing efficiency of the tasks.
For ease of understanding, a workflow processing method of the present invention will be described in more detail from another aspect, and referring to fig. 2, a second embodiment of a workflow processing method according to an embodiment of the present invention includes:
201. acquiring a node type of a target workflow node;
in this embodiment, first, the node type of the target workflow node may be obtained. It is understood that all workflow nodes are preset in the system as several node types, and these node types can indicate to which users the corresponding workflow nodes are directed to operate or manage. Thus, different node types may be handled by users of different authorities. Workflow nodes such as ' receiving request ', acquiring claim case information, acquiring policy information ', collecting claim material ', checking the claim material ', outputting checking result ', outputting the claim result ' and the like in the claim task, wherein the nodes of ' receiving request ' and ' collecting the claim material ' need participation of claim requesters and can be operated by users with ' client ' level authority; and the rest of nodes, such as nodes for checking claims materials, outputting checking results and the like, need to be processed by staff in the insurance institution, so that the nodes are operated by users with higher authority level than the client.
202. Judging whether the node type meets a preset first condition, if so, executing a step 203, and if not, executing a step 204;
after the node type of the target workflow node is obtained, it may be determined whether the node type meets a preset first condition, if yes, step 203 is executed, and if not, step 204 is executed.
Further, the determining whether the node type meets a preset first condition may include: acquiring processing operation required by the node type; determining whether the required processing operation is performed in a database.
When the processing operation corresponding to the node type is obtained, the feature value of the node type may be extracted first. The characteristic values may include a unique Identification (ID) of each workflow task, a business primary key, a current node step name, a last node submitter, a last node submission time, a current node handler, a priority of the current node handler, and so forth. After the feature value of the node type is extracted, the processing operation required by the node type can be acquired according to the corresponding relationship between the feature value and the operation function. Therefore, it can be determined whether these processing operations can be executed in the database, and if so, in order to reduce the load of the cache, step 203 can be executed to load the corresponding workflow node into the database for processing.
Further, the determining whether the node type meets a preset first condition may further include: and judging whether the node type is in a preset first node type range. It is understood that a range of the first node type may be set in advance for determining the node type, and when the node type falls within the range, the node type is considered to meet the preset first condition.
203. Loading the target workflow node into a database, and processing the target workflow node in the database;
if the node type meets a preset first condition, the target workflow node can be loaded into a database, and the target workflow node is processed in the database. It can be understood that, by loading the target workflow node into the database and processing the target workflow node in the database, a part of target workflow nodes meeting the first condition can be effectively handed over to the database for loading and processing, thereby greatly reducing the work load of the cache.
It should be noted that the processing operation described above may include querying, updating, or deleting. When these operations are handled directly in the database, they may include:
and (3) inquiring: 1, inquiring according to a service main key, if the node where the current workflow task is located is unknown, checking a cache, if no data exists, and then checking a database;
2, according to the node name, the data can be directly inquired as the name and the node type of the workflow node are determined.
Updating: 1, updating service data, namely inquiring and determining the node type of a workflow node, and then only updating a database;
and 2, pushing the workflow node, judging the node type of the next workflow node, determining whether the next workflow node is loaded in the database or the cache, and then updating.
And (3) deleting: after the workflow task is cancelled or completed, the data in the original table in the database is recorded into the backup table, and the corresponding data in the original table is deleted, so that the data in the original table is controlled to be in a certain order of magnitude, and the efficiency problem caused by infinite increase is avoided.
204. Judging whether the node type meets a preset second condition, if so, executing a step 205, and if not, executing a step 206;
if the node type does not meet the first preset condition, it may be determined whether the node type meets the second preset condition, if so, step 205 is performed, and if not, step 206 is performed.
Further, the determining whether the node type meets a preset second condition may include: acquiring processing operation required by the node type; and judging whether the required processing operation is executed in a cache or not.
When the processing operation corresponding to the node type is obtained, the feature value of the node type may be extracted first. The characteristic values may include a unique Identification (ID) of each workflow task, a business primary key, a current node step name, a last node submitter, a last node submission time, a current node handler, a priority of the current node handler, and so forth. After the feature value of the node type is extracted, the processing operation required by the node type can be acquired according to the corresponding relationship between the feature value and the operation function. Therefore, it may be determined whether these processing operations can be executed in the cache, and if so, in order to reduce the load of the cache, step 204 may be executed to load the corresponding workflow node into the database, and then, when the target workflow node needs to be executed, the target workflow node is flushed into the cache for processing.
Further, the determining whether the node type meets a preset second condition may further include: and judging whether the node type is within a preset second node type range. It is understood that a range of the second node type may be set in advance for determining the node type, and when the node type falls within the range, the node type is considered to meet the preset second condition.
It can be understood that, in this embodiment, the step 202 is preferentially executed to determine whether the node type meets a preset first condition, if yes, the target workflow node is loaded into the database, and the target workflow node is processed in the database, so that the workload of the cache can be maximally reduced. And when the node type confirms that the node type does not meet the preset first condition, executing step 204, judging whether the node type meets the preset second condition, if so, loading the target workflow node into a processing queue of the database, and sequentially refreshing the target workflow node in the processing queue into a cache for processing, thereby further reducing part of workload for the cache. Therefore, in this embodiment, step 202 is performed first, and then step 204 is performed. In an application scenario, step 204 may be performed first, and then step 202 may be performed, or steps 202 and 204 may be performed simultaneously.
205. And loading the target workflow nodes into a processing queue of a database, and sequentially refreshing the target workflow nodes in the processing queue into a cache for processing.
If the node type meets a preset second condition, the target workflow node can be loaded into a processing queue of a database, and the target workflow nodes in the processing queue are sequentially refreshed into a cache for processing.
The processing queue stores each target workflow node, and the target workflow nodes can be stored in the processing queue according to the loading time sequence, and also can be stored in the processing queue from high to low according to the priority of a handler corresponding to the target workflow node or the preset priority of the target workflow node.
In this embodiment, after the work in the cache is completed, the database is operated to refresh the target workflow node in the processing queue into the cache for processing; or when the residual workload in the cache is lower than a set threshold, the operation database refreshes the target workflow node in the processing queue into the cache for processing.
It should be noted that the processing operation described above may include querying, updating, or deleting. When these operations are loaded in the database and processed in the cache, they may include:
and (3) inquiring: and directly querying the cache, if the result cannot be queried, querying the database, and refreshing the queried result into the cache.
Updating: after the workflow task is inquired, the workflow task exists in the cache, the cache can be updated firstly, meanwhile, the workflow task is added into a queue to be synchronized, and the other system task can synchronize the modified data to the database.
And (3) deleting: and deleting the workflow task from the cache, writing the data in the database into the backup table, and deleting the data in the original table.
206. Loading the target workflow node into a cache, and processing the target workflow node in the cache;
if the node type does not meet the preset first condition or the preset second condition, the target workflow node may be loaded into a cache, and the target workflow node is processed in the cache. It can be understood that, if the node type does not meet the preset first condition, or does not meet the preset second condition, the target workflow node may be processed according to a default processing flow or processing manner. In this embodiment, the default processing flow may be to load the target workflow node into a cache and process the target workflow node in the cache.
207. Monitoring whether the current workload of the cache exceeds a preset warning threshold, if so, executing a step 208, otherwise, returning to continue executing the step 207;
in this embodiment, in order to ensure the processing efficiency of the cache and avoid the occurrence of abnormalities such as jamming and data overflow due to an excessive workload of the cache, whether the current workload of the cache exceeds a preset warning threshold may be monitored, if so, step 208 is executed, and if not, step 207 is executed again.
208. And cleaning the cache.
And if the current workload of the cache exceeds a preset warning threshold value, cleaning the cache.
Further, as shown in fig. 3, the step 208 specifically includes:
301. acquiring the entering time of a target workflow node in the cache into the cache;
302. acquiring the updating time of the workflow task corresponding to the target workflow node in the cache;
303. sequencing all target workflow nodes in the cache according to the entry time and the update time to obtain a sequencing result;
304. and sequentially cleaning the target workflow nodes in the cache according to the sequencing result until the current workload of the cache is less than a preset warning threshold value.
For the step 301, the entry time refers to a time when the target workflow node flushes from the database into the cache, or a time when the target workflow node directly loads into the cache.
In the step 302, the update time refers to the update time of the workflow task corresponding to the target workflow node, and it can be understood that if the workflow task is operated or changed, the modification date or modification time of the workflow task is updated.
As for the step 303, it may specifically include: calculating the difference between the current system time and the entering time to obtain a first time length A; and calculating the difference between the current system time and the updating time to obtain a second duration B. Then, calculating the product of the first duration A and a preset first weight value to obtain a first numerical value; calculating the product of the second duration B and a preset second weight value to obtain a second value; and then, calculating the sum of the first numerical value and the second numerical value to obtain an ordering numerical value. And finally, sequencing all target workflow nodes in the cache according to the sequencing numerical value to obtain a sequencing result. It is to be understood that the first weight value and the second weight value may be set according to actual use conditions. In this embodiment, if the target workflow node exceeds the processing timeliness, the system may consider the target workflow node as a difficult task, and may automatically flush the target workflow node out of the cache, resulting in a failure in processing the target workflow node. Therefore, in order to avoid the target workflow node exceeding the processing age, the first weight value may be set to be much larger than the second weight value.
For the above step 304, after the sorting result is obtained, the target workflow nodes in the cache may be sequentially cleaned according to the sorting result until the current workload of the cache is less than the preset alert threshold.
In addition, a first-in first-out algorithm (FIFO) and a least recently used algorithm (LFU) may be further used to clean the cache and flush out the less used tasks or threads in the cache.
The above mainly describes a workflow processing method, and a workflow processing apparatus will be described in detail below.
Fig. 4 is a block diagram showing a first embodiment of a workflow processing apparatus according to an embodiment of the present invention.
In this embodiment, a workflow processing apparatus includes:
a node type obtaining module 401, configured to obtain a node type of a target workflow node;
a determining module 402, configured to determine whether the node type meets a preset first condition or a preset second condition;
a first processing module 403, configured to load the target workflow node into a database if the node type meets a preset first condition, and process the target workflow node in the database;
a second processing module 404, configured to load the target workflow node into a processing queue of a database if the node type meets a preset second condition, and sequentially refresh the target workflow node in the processing queue into a cache for processing.
Fig. 5 is a block diagram showing a second embodiment of a workflow processing apparatus according to an embodiment of the present invention.
Further, as shown in fig. 5, the determining module 402 may include:
the first judging submodule 4021 is configured to judge whether the node type meets a preset first condition;
the second judgment sub-module 4022 is configured to judge whether the node type meets a preset second condition;
the first judgment sub-module 4021 includes:
a first operation acquiring unit 0211, configured to acquire a processing operation required by the node type;
a first operation determination unit 0212 for determining whether the required processing operation is executed in the database;
and/or
The first judgment sub-module 4021 includes: a first range determining unit 0213, configured to determine whether the node type is within a preset first node type range;
the second determination sub-module 4022 includes:
a second operation obtaining unit 0221, configured to obtain a required processing operation corresponding to the node type;
a second operation determination unit 0222 configured to determine whether the required processing operation is executed in a cache;
and/or
The second determination sub-module 4022 includes: a second range determination unit 0223, configured to determine whether the node type is within a preset second node type range.
Further, as shown in fig. 5, the workflow processing apparatus may further include:
a monitoring module 405, configured to monitor whether the current workload of the cache exceeds a preset warning threshold;
a cache cleaning module 406, configured to clean the cache if the current workload of the cache exceeds a preset warning threshold.
Further, the cache cleaning module 406 includes:
an entry time obtaining submodule 4061, configured to obtain entry time of a target workflow node in the cache into the cache;
the update time obtaining sub-module 4062 is configured to obtain update time of a workflow task corresponding to a target workflow node in the cache;
the sorting submodule 4063 is configured to sort all the target workflow nodes in the cache according to the entry time and the update time, so as to obtain a sorting result;
and the cleaning submodule 4064 is configured to sequentially clean the target workflow nodes in the cache according to the sorting result until the current workload of the cache is less than a preset alert threshold.
Fig. 6 is a block diagram showing a third embodiment of a workflow processing apparatus according to an embodiment of the present invention.
Further, as shown in fig. 6, the workflow processing apparatus further includes:
a third processing module 407, configured to load the target workflow node into a cache and process the target workflow node in the cache if the node type does not meet either a preset first condition or a preset second condition.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (8)

1. A workflow processing method, comprising:
acquiring a node type of a target workflow node;
judging whether the node type meets a preset first condition or not;
if the node type meets a preset first condition, loading the target workflow node into a database, and processing the target workflow node in the database;
if the node type does not accord with the first condition, judging whether the node type accords with a preset second condition;
if the node type meets a preset second condition, loading the target workflow node into a processing queue of a database, and sequentially refreshing the target workflow node in the processing queue into a cache for processing;
and if the node type does not accord with the preset first condition or the preset second condition, loading the target workflow node into a cache, and processing the target workflow node in the cache.
2. The workflow processing method according to claim 1, wherein the determining whether the node type meets a preset first condition comprises:
acquiring processing operation required by the node type;
judging whether the required processing operation is executed in a database;
and/or
The judging whether the node type meets a preset first condition or not comprises the following steps: judging whether the node type is within a preset first node type range or not;
the step of judging whether the node type meets a preset second condition comprises the following steps:
acquiring processing operation required by the node type;
judging whether the required processing operation is executed in a cache or not;
and/or
The step of judging whether the node type meets a preset second condition comprises the following steps: and judging whether the node type is within a preset second node type range.
3. The workflow processing method according to claim 1, further comprising:
monitoring whether the current workload of the cache exceeds a preset warning threshold value;
and if the current workload of the cache exceeds a preset warning threshold value, cleaning the cache.
4. The workflow processing method according to claim 3, wherein the clearing the cache specifically comprises:
acquiring the entering time of a target workflow node in the cache into the cache;
acquiring the updating time of the workflow task corresponding to the target workflow node in the cache;
sequencing all target workflow nodes in the cache according to the entry time and the update time to obtain a sequencing result;
and sequentially cleaning the target workflow nodes in the cache according to the sequencing result until the current workload of the cache is less than a preset warning threshold value.
5. A workflow processing apparatus, comprising:
the node type acquisition module is used for acquiring the node type of the target workflow node;
the judging module is used for judging whether the node type meets a preset first condition or not;
the first processing module is used for loading the target workflow node into a database and processing the target workflow node in the database if the node type meets a preset first condition;
the judging module is further configured to judge whether the node type meets a preset second condition if the node type does not meet the first condition;
the second processing module is used for loading the target workflow nodes into a processing queue of a database and sequentially refreshing the target workflow nodes in the processing queue into a cache for processing if the node type meets a preset second condition;
and the third processing module is used for loading the target workflow node into a cache and processing the target workflow node in the cache if the node type does not meet the preset first condition or the preset second condition.
6. The workflow processing apparatus of claim 5 wherein the determining means comprises:
the first judgment submodule is used for judging whether the node type meets a preset first condition or not;
the second judgment submodule is used for judging whether the node type meets a preset second condition or not;
the first judgment sub-module includes:
a first operation obtaining unit, configured to obtain a required processing operation corresponding to the node type;
a first operation judgment unit operable to judge whether the required processing operation is executed in a database;
and/or
The first judgment sub-module includes: the first range judging unit is used for judging whether the node type is in a preset first node type range or not;
the second judgment sub-module includes:
a second operation obtaining unit, configured to obtain a required processing operation corresponding to the node type;
a second operation judgment unit configured to judge whether the required processing operation is executed in a cache;
and/or
The second judgment sub-module includes: and the second range judging unit is used for judging whether the node type is in a preset second node type range or not.
7. The workflow processing apparatus according to claim 5, further comprising:
the monitoring module is used for monitoring whether the current workload of the cache exceeds a preset warning threshold value;
and the cache cleaning module is used for cleaning the cache if the current workload of the cache exceeds a preset warning threshold value.
8. The workflow processing apparatus of claim 7 wherein the cache scrubbing module comprises:
the entry time acquisition submodule is used for acquiring the entry time of the target workflow node in the cache into the cache;
the update time acquisition submodule is used for acquiring the update time of the workflow task corresponding to the target workflow node in the cache;
the sequencing submodule is used for sequencing all the target workflow nodes in the cache according to the entry time and the updating time to obtain a sequencing result;
and the cleaning submodule is used for sequentially cleaning the target workflow nodes in the cache according to the sequencing result until the current workload of the cache is less than a preset warning threshold value.
CN201611158853.3A 2016-12-15 2016-12-15 Workflow processing method and device Active CN106529917B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611158853.3A CN106529917B (en) 2016-12-15 2016-12-15 Workflow processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611158853.3A CN106529917B (en) 2016-12-15 2016-12-15 Workflow processing method and device

Publications (2)

Publication Number Publication Date
CN106529917A CN106529917A (en) 2017-03-22
CN106529917B true CN106529917B (en) 2020-07-03

Family

ID=58339574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611158853.3A Active CN106529917B (en) 2016-12-15 2016-12-15 Workflow processing method and device

Country Status (1)

Country Link
CN (1) CN106529917B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107844947A (en) * 2017-09-25 2018-03-27 平安科技(深圳)有限公司 Method, apparatus, storage medium and the terminal of insured amount preposition verification
CN107909488A (en) * 2017-11-10 2018-04-13 平安科技(深圳)有限公司 The processing method and processing device of settlement of insurance claim flow
CN108038667B (en) * 2017-12-21 2021-01-08 平安科技(深圳)有限公司 Policy generation method, device and equipment
CN110069465A (en) * 2019-03-16 2019-07-30 平安城市建设科技(深圳)有限公司 HDFS data managing method, device, equipment and medium based on workflow
CN112596865A (en) * 2020-12-22 2021-04-02 航天信息股份有限公司企业服务分公司 System for pushing to-do message based on workflow affair
CN115658270B (en) * 2022-11-02 2023-08-25 广州市易鸿智能装备有限公司 Workflow execution method, device and equipment of vision system and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551745A (en) * 2009-05-13 2009-10-07 山东中创软件工程股份有限公司 Method for greatly improving performance of workflow engine
US7774354B2 (en) * 2007-08-02 2010-08-10 International Business Machines Corporation Method and system for response time optimization for task list retrieval from databases
CN102521712A (en) * 2011-12-27 2012-06-27 东软集团股份有限公司 Process instance data processing method and device
CN104699411A (en) * 2013-12-06 2015-06-10 北京慧正通软科技有限公司 Technical method for improving performance of cache in workflow engine process instance

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1758051A1 (en) * 2005-08-22 2007-02-28 Ubs Ag System, method and computer program for workflow based on data processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7774354B2 (en) * 2007-08-02 2010-08-10 International Business Machines Corporation Method and system for response time optimization for task list retrieval from databases
CN101551745A (en) * 2009-05-13 2009-10-07 山东中创软件工程股份有限公司 Method for greatly improving performance of workflow engine
CN102521712A (en) * 2011-12-27 2012-06-27 东软集团股份有限公司 Process instance data processing method and device
CN104699411A (en) * 2013-12-06 2015-06-10 北京慧正通软科技有限公司 Technical method for improving performance of cache in workflow engine process instance

Also Published As

Publication number Publication date
CN106529917A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN106529917B (en) Workflow processing method and device
CN106294206B (en) Cache data processing method and device
US8171060B2 (en) Storage system and method for operating storage system
US20100198776A1 (en) System and method for dependency and root cause discovery
CN108255620B (en) Service logic processing method, device, service server and system
CN109241042B (en) Data processing method and device and electronic equipment
JP6097666B2 (en) Job management system
JP2007286703A (en) Master and slave license management method, master and slave license management method and master and slave license management program
CN116562715A (en) Index data monitoring method, device, computer equipment and storage medium
CN115774602A (en) Container resource allocation method, device, equipment and storage medium
US20090164288A1 (en) Scheduling Apparatus, Scheduling Method and Recording Medium
Sajadi et al. An Improved WAGNER-WHITIN Algorithm
WO2017069775A1 (en) Data storage device monitoring
CN114546999A (en) Data cleaning method and device, electronic equipment and storage medium
CN114399228A (en) Task scheduling method and device, electronic equipment and medium
CN110908777B (en) Job scheduling method, device and system
CN112286922A (en) Data cleaning method, device, equipment and storage medium
CN110991177B (en) Material weight removing method and device
CN112215527A (en) Logistics management method and device
US20170199911A1 (en) Method and Query Processing Server for Optimizing Query Execution
CN112330156B (en) KPI management method, apparatus, device and storage medium
JP3952043B2 (en) Analysis equipment
US20050021431A1 (en) Parallel availability control checks in financial management system
CN116821105A (en) Data processing method, device, electronic equipment and medium
CN111091902B (en) Bed management method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 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