CN109634764A - Work-flow control method, apparatus, equipment, storage medium and system - Google Patents

Work-flow control method, apparatus, equipment, storage medium and system Download PDF

Info

Publication number
CN109634764A
CN109634764A CN201811566191.2A CN201811566191A CN109634764A CN 109634764 A CN109634764 A CN 109634764A CN 201811566191 A CN201811566191 A CN 201811566191A CN 109634764 A CN109634764 A CN 109634764A
Authority
CN
China
Prior art keywords
component
workflow
target object
processing
processing status
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811566191.2A
Other languages
Chinese (zh)
Inventor
陈林
王春伟
李升起
李琛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201811566191.2A priority Critical patent/CN109634764A/en
Publication of CN109634764A publication Critical patent/CN109634764A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a kind of Work-flow control method, apparatus, equipment, storage medium and systems.Wherein, method includes: the workflow for obtaining and being handled target object, the workflow includes processing operation needed for the previous processing status to latter treatment state of at least two processing statuses and target object from two neighboring processing status of target object during processing;At least one component is called according to the workflow, to carry out processing operation to the target object by least one component.The embodiment of the present invention can lightweight workflow, make its clear process, simple and easy to maintain.

Description

Work-flow control method, apparatus, equipment, storage medium and system
Technical field
The present embodiments relate to computer technology more particularly to a kind of Work-flow control method, apparatus, equipment, storage Medium and system.
Background technique
Workflow is to being abstracted of business rule between workflow and its each operating procedure, is broadly described.Currently, very much Process, business can be abstracted into workflow, for example, by workflow is abstracted into the process flow of the objects such as article, small video.
In practical application scene, the workflow that different object needs to pass through is often different, with business development and The continuous promotion of user demand, various workflows are mixed in together, include a large amount of logic judgment, lead to code redundancy, Workflow maintenance, adjustment are difficult, it is difficult to maintain the iteratively faster of function.
Summary of the invention
The embodiment of the present invention provides a kind of Work-flow control method, apparatus, equipment, storage medium and system, with lightweight Workflow makes its clear process, simple and easy to maintain.
In a first aspect, the embodiment of the invention provides a kind of Work-flow control methods, comprising:
Obtain the workflow that is handled target object, the workflow include target object during processing extremely Needed for the few previous processing status to latter treatment state of two processing statuses and target object from two neighboring processing status Processing operation;
Call at least one component according to the workflow, with by least one component to the target object at Reason operation.
Second aspect, the embodiment of the invention also provides a kind of Work-flow control devices, comprising:
Module is obtained, for obtaining the workflow handled target object, the workflow includes that target object exists At least two processing statuses and target object in treatment process are from the previous processing status of two neighboring processing status to rear Processing operation needed for one processing status;
Calling module, for calling at least one component according to the workflow, to pass through at least one component to described Target object carries out processing operation.
The third aspect, the embodiment of the invention also provides a kind of electronic equipment, the electronic equipment includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes Work-flow control method described in any embodiment.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes Work-flow control method described in any embodiment when the program is executed by processor.
5th aspect, the embodiment of the invention also provides a kind of workflow control systems, comprising: Work-flow control device and Access at least one component of the Work-flow control device;
The Work-flow control device, for obtaining the workflow handled target object, the workflow includes Target object at least two processing statuses during processing and target object from two neighboring processing status it is previous from Processing operation needed for reason state to latter treatment state;At least one component is called according to the workflow;
At least one described component, for carrying out processing operation to the target object.
In the embodiment of the present invention, by obtaining the workflow handled target object, the workflow is with processing status For node, using operation content of the processing operation needed between two neighboring processing status between node, to pass through processing Entire workflow is cut into a section small process by state;By calling at least one component according to workflow, by extremely A few component carries out processing operation to target object, to based on processing status, realize that operation logic is simple, clearly work It flows;Moreover, the workflow in the present embodiment is mainly used for operating control, a large amount of logic judgment, processing operation are abstracted into In component, component access is simple, quick, realizes the light-weight design of Work-flow control.
Detailed description of the invention
Fig. 1 a is a kind of flow chart for Work-flow control method that the embodiment of the present invention one provides;
Fig. 1 b is a kind of logical relation schematic diagram for processing status that the embodiment of the present invention one provides;
Fig. 1 c is the logical relation schematic diagram for another processing status that the embodiment of the present invention one provides;
Fig. 2 a is a kind of flow chart of Work-flow control method provided by Embodiment 2 of the present invention;
Fig. 2 b is a kind of schematic diagram of workflow provided by Embodiment 2 of the present invention;
Fig. 2 c is a kind of schematic diagram of workflow configuration file content provided by Embodiment 2 of the present invention;
Fig. 3 a is a kind of flow chart for Work-flow control method that the embodiment of the present invention three provides;
Fig. 3 b is the schematic diagram of a kind of normal queue and exception queue that the embodiment of the present invention three provides;
Fig. 4 is a kind of flow chart for Work-flow control method that the embodiment of the present invention four provides;
Fig. 5 is a kind of structural schematic diagram for Work-flow control device that the embodiment of the present invention five provides;
Fig. 6 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention six provides;
Fig. 7 is a kind of structural schematic diagram for workflow control system that the embodiment of the present invention eight provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 a is a kind of flow chart for Work-flow control method that the embodiment of the present invention one provides, and the present embodiment is applicable to The case where handling according to workflow target object, this method can be executed by Work-flow control device, which can With by hardware and/or software sharing, and it is typically integrated in electronic equipment, as shown in Figure 1a, method tool provided in this embodiment Body includes following operation:
S110, acquisition workflow that target object is handled, workflow include target object during processing At least two processing statuses and target object are from the previous processing status of two neighboring processing status to latter treatment state institute The processing operation needed.
Optionally, target object includes but is not limited to the data of article, picture, small video.Different type (such as article class Type, picture type and video type) the corresponding workflow of target object it is different or even same type of target object is in difference Application scenarios in, corresponding workflow may also be different, application scenarios include but is not limited to terminal display application scenarios, Application scenarios, data summarization or application scenarios of excavation of image procossing etc..Therefore, it is necessary to the type of integration objective object and Application scenarios select suitable workflow.
In the present embodiment, workflow is using the processing status of target object as node, with institute between two neighboring processing status Operation content of the processing operation needed between node, so that entire workflow is cut into the small of a section by processing status Process.Optionally, the quantity for the processing status that workflow includes is two or more.More than two processing statuses can at least have There is successive logical relation, there can also be logical relation arranged side by side simultaneously.As shown in fig. 1b and fig. lc, processing status include state 1, State 2, state 3 and state 4 in Fig. 1 b, have a successive logical relation between 4 states, in Fig. 1 c, between state 1- state 3 With successive logical relation, state 4 has logical relation arranged side by side after state 1, with state 2.Two neighboring processing status refers to Processing status with successive logical relation can after passing through corresponding processing operation to the target object of previous processing status Obtain the target object of latter treatment state.
Optionally, the quantity of processing operation needed for from previous processing status to latter treatment state is at least one.Place Processing operation needed between reason state can be the same or different.
S120, at least one component is called according to workflow, to handle by least one component target object Operation.
In the present embodiment, a kind of processing operation is abstracted as a component in advance.Optionally, the number of various processing operations is enabled Meet the invocation protocol of Work-flow control device according to transmission mode.For example, Work-flow control device is assisted using remote procedure call It discusses (Remote Procedure Call Protocol, RPC), then enables the input data of various processing operations and output data full Sufficient RPC protocol requirement, so that various processing operations are abstracted as the component of Work-flow control device.
In the present embodiment, Work-flow control device defines the interface interacted between component, including sync cap And asynchronous interface.As long as component abides by interface specification, Work-flow control device can be quickly accessed, for Work-flow control device It is called by interface.
Since the quantity of processing operation needed for from previous processing status to latter treatment state is at least one, and it is a kind of Processing operation is abstracted as a component, then the quantity of component needed for from previous processing status to latter treatment state is at least one It is a.Work-flow control device according to workflow successively invocation component optionally, Work-flow control device can it is serial, parallel or It goes here and there and mixes invocation component, improve the concurrency of entire workflow, it is time-consuming to reduce workflow.Called component to target object into The corresponding processing operation of row, realizes the processing to target object.
Below with a concrete application scene, component call process is described in detail.
Firstly, obtaining the current processing status of target object, which may be original state or work Make any state in process, thus, since current processing status, respective handling is carried out to target object.Then, according to working as Pre-treatment state and workflow determine target processing operation needed for from current processing status to latter treatment state.Specifically, Workflow includes at least two processing statuses, current processing status is searched from workflow, and then find from current processing status To processing operation needed for latter treatment state, referred to as target processing operation.Then, it is called according to target processing operation corresponding Target element, to carry out target processing operation to target object by target element.Then, according to the return of target processing operation As a result, determining the new current processing status of target object, in one example, returning the result is A, then new current processing status is A1,;Returning the result is B, then new current processing status is B1.After new current processing status determines, return execution " according to The behaviour of current processing status and workflow, determining target processing operation needed for from current processing status to latter treatment state " Make, until the processing status of target object stops updating.Optionally, it includes that processing status reaches work that processing status, which stops updating, End-state or processing status in stream rest on a certain intermediate state.
In the embodiment of the present invention, by obtaining the workflow handled target object, the workflow is with processing status For node, using operation content of the processing operation needed between two neighboring processing status between node, to pass through processing Entire workflow is cut into a section small process by state;By calling at least one component according to workflow, by extremely A few component carries out processing operation to target object, to based on processing status, realize that operation logic is simple, clearly work It flows;Moreover, the workflow in the present embodiment is mainly used for operating control, a large amount of logic judgment, processing operation are abstracted into In component, component access is simple, quick, realizes the light-weight design of Work-flow control.
Embodiment two
The present embodiment on the basis of the above embodiments, further refines the acquisition process of workflow.Optionally, it will grasp Make " obtaining the workflow for handling target object " to be optimized for " obtaining the workflow configuration file of target object, workflow Configuration file includes that the corresponding configuration item of state and target object are managed everywhere in target object from two neighboring processing shape The corresponding configuration item of processing operation needed for previous processing status to latter treatment state in state ", to improve workflow Configurability and readability, convenient for safeguarding, development stream.Fig. 2 a is a kind of Work-flow control provided by Embodiment 2 of the present invention The flow chart of method specifically includes following operation:
S210, the workflow configuration file for obtaining target object, workflow configuration file includes managing everywhere in target object The corresponding configuration item of state and target object are from the previous processing status in two neighboring processing status to latter treatment The corresponding configuration item of processing operation needed for state.
Fig. 2 b is a kind of schematic diagram of workflow provided by Embodiment 2 of the present invention.Target object is article, to article into Row processing workflow include four processing statuses, respectively analysis in, audit in, refused and issued.To careful in analysis Component needed for core includes " picture understandings " component and " small video processing " component, required to having refused or having issued in audit Component include " small video audit " component.For the processing status of article to having refused still to have issued from audit, what is depended on is " small Video audit " component returns the result, if returning the result is that audit passes through, processing status is updated to issue;If returned It returns the result is that the audit fails, then processing status is updated to refuse.
Fig. 2 c is a kind of schematic diagram of workflow configuration file content provided by Embodiment 2 of the present invention, the workflow configuration File content is visualization, editable.Workflow configuration file realizes workflow shown in Fig. 2 b when being executed.Such as Fig. 2 c institute Show, the workflow configuration document presentation: a processing status of article is in analysis, and article will be issued normally, need to distinguish It executes picture and understands that handling two with small video operates, that is, needs to call " picture understanding " component and " small video processing " component, No matter returning the result, processing status is updated in audit from analysis.Then, when current processing status is in audit, text Chapter will be issued normally, and small video review operations are needed to be implemented, that is, need to call " small video audit " component.If " small video is examined Returning the result for core " component is that audit passes through, and processing status is updated to issue;The return knot of " if small video audit " component Fruit is that the audit fails, and processing status is updated to refuse.Configuration in condition can determine text according to returning the result for component The new current processing status of chapter, until processing status stops updating.Optionally, it includes processing status that processing status, which stops updating, The end-state or processing status reached in workflow configuration file rests on a certain intermediate state.
S220, at least one component is called according to workflow configuration file, to pass through at least one component to target object Carry out processing operation.
Firstly, obtaining the current processing status of target object;Then, according to current processing status and workflow configuration text Part determines target processing operation needed for from current processing status to latter treatment state;According to target processing operation calling pair The target element answered, to carry out target processing operation to target object by target element;According to the return of target processing operation As a result, determine the new current processing status of target object, return and execute " according to current processing status and workflow configuration file, The operation of determining target processing operation needed for from current processing status to latter treatment state ", until the processing of target object State stops updating.
In the embodiment of the present invention, workflow configuration file includes that the corresponding configuration of state is managed everywhere in target object And target object from processing operation needed for the previous processing status to latter treatment state in two neighboring processing status Corresponding configuration item realizes workflow to replace the correlative code of processing status and processing operation with simplified configuration item Configuration;By writing configuration item, without writing correlative code, reduces the workload of research staff, improve workflow Configurability and readability, convenient for safeguarding, development stream.
Embodiment three
Fig. 3 a is a kind of flow chart for Work-flow control method that the embodiment of the present invention three provides.The embodiment of the present invention is upper It states and advanced optimizes on the basis of the technical solution of each embodiment.Optionally, operation " is called at least one group according to workflow Part, to carry out processing operation to target object by least one component " is refined as " calling at least one group according to workflow Part;Determine the component of malloc failure malloc;It carries out continuing to call to the component of malloc failure malloc by message-oriented middleware, until component call Success, alternatively, determining that workflow is interrupted ", to carry out repeating calling by component of the message-oriented middleware to malloc failure malloc, is realized Exception handling;The isolation of normal flow and abnormal process is realized by message-oriented middleware simultaneously.In conjunction with Fig. 3 a, the present embodiment The method of offer includes following operation:
S310, acquisition workflow that target object is handled, workflow include target object during processing At least two processing statuses and target object are from the previous processing status of two neighboring processing status to latter treatment state institute The processing operation needed.
S320, at least one component is called according to workflow.
At least one component includes asynchronous access component and/or synchronous access component.
Optionally, asynchronous access component (such as long time-consuming component) accesses Work-flow control device by asynchronous interface, different Step interface includes asynchronism callback interface and asynchronous return interface, and Work-flow control device passes through RPC agreement to asynchronous access component Call request is sent, within the component call period, i.e., in this RPC period, asynchronous access component is returned by asynchronous return interface Return outstanding message;After component is completed to the processing operation of target object, filled by asynchronism callback interface notification Work-flow control It is set effective result.Fig. 3 b is the schematic diagram of a kind of normal queue and exception queue that the embodiment of the present invention three provides, wherein work Flow control device access has multiple components.In conjunction with Fig. 3 b, effective result that asynchronous access component returns will be stored in normal queue In, for the reading of Work-flow control device.
Optionally, synchronous access component (such as short time-consuming component) accesses Work-flow control device by sync cap.Work Make flow control device and call request is sent to synchronous access component by RPC agreement, synchronous access component is in the component call period It is interior, i.e., in this RPC period, return to effective result.
Certainly, some components can access Work-flow control device by asynchronous interface and sync cap simultaneously, that is, mix Synchronous, asynchronous access, this component are embodied as synchronous access component in practical calling process or synchronization call;It is different Step is used, and asynchronous call component is embodied as.
It is worth noting that as long as meeting synchronous, asynchronous interface specification when component accesses, so that it may voluntarily be embodied as synchronizing Component or asynchronous access component are accessed, access is simple, flexible.
S330, the component for determining malloc failure malloc.
S330 comprises at least one of the following optional embodiment.
The first optional embodiment: effective result that synchronous access component returns is not received within the component call period Number reach preset times, determine that synchronous access component is the component of malloc failure malloc.Each component call can generate a group Part calls period, such as this RPC period, if do not received effectively within a component call period as a result, will be after supervention Sending component call request.If the number for not receiving effective result reaches preset times, such as 5 times, illustrate synchronous access group Part malloc failure malloc.
Second of optional embodiment: the outstanding message that asynchronous access component returns is not received within the component call period Number reach preset times, alternatively, in normal queue it is unread to it is asynchronous access component return effective result number Reach preset times, determines that asynchronous access component is the component of malloc failure malloc.It is similar with the first optional embodiment, if In one component call period, outstanding message is not received, will continue sending assembly call request.If not receiving waiting letter The number of breath reaches preset times, illustrates asynchronous access component call failure.If unread to effectively knot in normal queue Fruit will continue sending assembly call request.If the number for not receiving effective result reaches preset times, illustrate asynchronous access Component call failure.
Optionally, in above two embodiment, not receiving effective result includes receiving null result and not connecing Receive any result.If the result that component returns does not meet the result of the processing operation of the component, it is believed that the result is invalid As a result;If the structure that component returns meets the result of the processing operation of the component, it is believed that the result is effective result.
S340, it carries out continuing to call to the component of malloc failure malloc by message-oriented middleware, until component call success, or Person determines that workflow is interrupted.
Optionally, as shown in Figure 3b, the module information of malloc failure malloc is stored into the exception queue of message-oriented middleware;It is logical Message-oriented middleware is crossed successively the corresponding component of module information in exception queue to be carried out continuing to call, until component call success, Alternatively, determining that workflow is interrupted.
Optionally, the corresponding component of a module information of the message-oriented middleware into exception queue sends call request, if Component does not return effectively as a result, continuing to send call request, until component returns effectively as a result, i.e. component call success;If After message-oriented middleware sends the call request of preset times, component is not returned effectively yet as a result, determining that workflow is interrupted.Some In the case of, if component does not return effectively as a result, according to situation is returned, judge whether to need to continue to send call request.For example, If returning to null result, without sending call request again, directly judgement workflow is interrupted;If not returning to any knot Fruit, it may be possible to which component is busy or network failure, can send call request again.
In the embodiment of the present invention, message-oriented middleware provides the entrance of abnormal process, realizes abnormal process and normal stream The isolation of journey.Normal queue and exception queue are separated by message-oriented middleware, guarantees normal operating processing not by abnormal operation Reason interference.
Example IV
Fig. 4 is a kind of flow chart for Work-flow control method that the embodiment of the present invention four provides.The embodiment of the present invention is upper It states and carries out operation addition on the basis of the technical solution of each embodiment.Optionally, based on the above method, additional operation " during calling at least one component according to workflow, updating and show the recalls information of each component " is realized and calls letter The visualization of breath;Optionally, based on the above method, additional operation " is calling at least one component according to workflow In the process, the processing status for showing target object on interface is updated according to the current processing status of target object ", thus to user Show newest processing status.A kind of Work-flow control method as shown in Figure 4, comprising:
S410, acquisition workflow that target object is handled, workflow include target object during processing At least two processing statuses and target object are from the previous processing status of two neighboring processing status to latter treatment state institute The processing operation needed.
S420, at least one component is called according to workflow, to handle by least one component target object Operation.
S430, during calling at least one component according to workflow, update and show the recalls information of each component, Recalls information includes at least whether call, whether return to one of effective result and calling sequence.
Table 1 shows the recalls information of the offer of the embodiment of the present invention four.Wherein, if calling includes having called including calling Success and malloc failure malloc) and never call.Whether return effective result include returned, etc. to be returned and never call.Calling sequence Calling sequence of i.e. each component in workflow, is indicated with Arabic numerals.Further, different recalls informations is using different Font color show, with distinguish display;By etc. the exception calls information such as to be returned be highlighted, to highlight exception call Information quickly carries out abnormal positioning.
Table 1
Component Component 1 Component 2 Component 3 Component 4
Whether call It has called Never call It has called It has called
Whether return It has returned Never call Etc. to be returned It has returned
Calling sequence 1 4 3 2
Optionally, during calling at least one component database is written in recalls information by Work-flow control device In;Recalls information is read, from database again to update and show the recalls information of each component.
S440, during calling at least one component according to workflow, according to the current processing status of target object Update the processing status for showing target object on interface.
Show that interface is the displaying interface of target object, content, uplink time and processing status including target object.Such as Fruit processing status is to have issued, and shows on interface to further include recommending number, reading number, thumb up number etc..
Optionally, during calling at least one component number is written in current processing status by Work-flow control device According in library.Current processing status is read from database again, shows target object on interface to update by current processing status Processing status.Further, the reason of causing current processing status can also be being shown on showing interface, such as currently processed State is that the audit fails, then shows " the audit fails, and existing subscriber issues Similar content before ".
It is worth noting that S430 and S440 can be executed parallel or successively be executed, such as first carries out S430 and execute again S440, or first carry out S440 and execute S430 again.
In the present embodiment, by during calling at least one component according to workflow, updating and showing each component Recalls information, can quickly judge work flow anomalies interrupt the reason of, even if not known about to system, can also quickly position different Reason condition, and then handle abnormal conditions;Target object on interface is shown by updating according to the current processing status of target object Processing status, so that user intuitively be allowed to know newest processing status;Meanwhile processing status is only by Work-flow control device It updates, ensures that processing status will not accidentally be write.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for Work-flow control device that the embodiment of the present invention five provides, the embodiment of the present invention The case where suitable for handling according to workflow target object, in conjunction with Fig. 5, Work-flow control device includes: acquisition module 51 and calling module 52.
Module 51 is obtained, for obtaining the workflow handled target object, workflow includes that target object is being located At least two processing statuses and target object during reason are from the previous processing status of two neighboring processing status to latter Processing operation needed for processing status;
Calling module 52, for calling at least one component according to workflow, to pass through at least one component to target pair As carrying out processing operation.
In the embodiment of the present invention, by obtaining the workflow handled target object, the workflow is with processing status For node, using operation content of the processing operation needed between two neighboring processing status between node, to pass through processing Entire workflow is cut into a section small process by state;By calling at least one component according to workflow, by extremely A few component carries out processing operation to target object, to based on processing status, realize that operation logic is simple, clearly work It flows;Moreover, the workflow in the present embodiment is mainly used for operating control, a large amount of logic judgment, processing operation are abstracted into In component, component access is simple, quick, realizes the light-weight design of Work-flow control.
Optionally, module 51 is obtained in the workflow that acquisition handles target object, is specifically used for: being obtained target The workflow configuration file of object, workflow configuration file include that the corresponding configuration item of state is managed everywhere in target object, And target object is from processing operation pair needed for the previous processing status to latter treatment state in two neighboring processing status The configuration item answered.
Optionally, calling module 52 is calling at least one component according to workflow, to pass through at least one component to mesh When marking object progress processing operation, it is specifically used for: obtains the current processing status of target object;According to current processing status and work It flows, determines target processing operation needed for from current processing status to latter treatment state;It is called according to target processing operation Corresponding target element, to carry out target processing operation to target object by target element;According to returning for target processing operation It returns as a result, determining the new current processing status of target object, return to performance objective processing operation determines operation, until target pair The processing status of elephant stops updating.
Optionally, calling module 52 is calling at least one component according to workflow, to pass through at least one component to mesh When marking object progress processing operation, it is specifically used for: at least one component is called according to workflow;Determine the component of malloc failure malloc; It carries out continuing to call to the component of malloc failure malloc by message-oriented middleware, until component call success, alternatively, determining in workflow It is disconnected.
Optionally, calling module 52 is carrying out continuing to call by message-oriented middleware to the component of malloc failure malloc, until group Part calls successfully, alternatively, being specifically used for when determining that workflow is interrupted: the module information of malloc failure malloc being stored to message In the exception queue of part;Successively the corresponding component of module information in exception queue is carried out continuing to call by message-oriented middleware, Until component call success, alternatively, determining that workflow is interrupted.
Optionally, at least one component includes asynchronous access component and/or synchronous access component.Calling module 52 is in determination When the component of malloc failure malloc, it is specifically used for: does not receive effective result that synchronous access component returns within the component call period Number reach preset times, determine that synchronous access component is the component of malloc failure malloc;And/or within the component call period not The number for receiving the outstanding message that asynchronous access component returns reaches preset times, alternatively, unread in normal queue arrive The number for effective result that asynchronous access component returns reaches preset times, determines that asynchronous access component is the group of malloc failure malloc Part.
Optionally, device further include: the first update module.First update module is used to call at least according to workflow During one component, update and show that the recalls information of each component, recalls information include at least whether call, whether return One of effective result and calling sequence.
Optionally, device further include: the second update module.Second update module is used to call at least according to workflow During one component, the processing status for showing target object on interface is updated according to the current processing status of target object.
Work provided by any embodiment of the invention can be performed in Work-flow control device provided by the embodiment of the present invention Method of flow control has the corresponding functional module of execution method and beneficial effect.
Embodiment six
Fig. 6 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present invention six provides.Fig. 6, which is shown, to be suitable for being used in fact The block diagram of the example electronic device 12 of existing embodiment of the present invention.The electronic equipment 12 that Fig. 6 is shown is only an example, no The function and use scope for coping with the embodiment of the present invention bring any restrictions.
As shown in fig. 6, electronic equipment 12 is showed in the form of universal computing device.The component of electronic equipment 12 may include But be not limited to: one or more processor or processing unit 16, system storage 28, connect different system components (including System storage 28 and processing unit 16) bus 18.
Bus 18 indicates one of a few class bus structures or a variety of, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using any bus structures in a variety of bus structures.It lifts For example, these architectures include but is not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Electronic equipment 12 typically comprises a variety of computer system readable media.These media can be it is any can be electric The usable medium of sub- equipment access, including volatile and non-volatile media, moveable and immovable medium.
System storage 28 may include the computer system readable media of form of volatile memory, such as arbitrary access Memory (RAM) 30 and/or cache memory 32.Electronic equipment 12 may further include other removable/not removable Dynamic, volatile/non-volatile computer system storage medium.Only as an example, storage system 34 can be used for read and write can not Mobile, non-volatile magnetic media (Fig. 6 do not show, commonly referred to as " hard disk drive ").Although being not shown in Fig. 6, Ke Yiti For the disc driver for being read and write to removable non-volatile magnetic disk (such as " floppy disk "), and to moving non-volatile light The CD drive of disk (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, each driver It can be connected by one or more data media interfaces with bus 18.Memory 28 may include that at least one program produces Product, the program product have one group of (for example, at least one) program module, these program modules are configured to perform of the invention each The function of embodiment.
Program/utility 40 with one group of (at least one) program module 42 can store in such as memory 28 In, such program module 42 include but is not limited to operating system, one or more application program, other program modules and It may include the realization of network environment in program data, each of these examples or certain combination.Program module 42 is usual Execute the function and/or method in embodiment described in the invention.
Electronic equipment 12 can also be with one or more external equipments 14 (such as keyboard, sensing equipment, display 24 etc.) Communication, can also be enabled a user to one or more equipment interact with the electronic equipment 12 communicate, and/or with make the electricity Any equipment (such as network interface card, modem etc.) that sub- equipment 12 can be communicated with one or more of the other calculating equipment Communication.This communication can be carried out by input/output (I/O) interface 22.Also, electronic equipment 12 can also be suitable by network Orchestration 20 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network, such as internet) Communication.As shown, network adapter 20 is communicated by bus 18 with other modules of electronic equipment 12.Although should be understood that It is not shown in the figure, other hardware and/or software module can be used in conjunction with electronic equipment 12, including but not limited to: microcode is set Standby driver, redundant processing unit, external disk drive array, RAID system, tape drive and data backup storage system System etc..
Processing unit 16 by the program that is stored in system storage 28 of operation, thereby executing various function application and Data processing, such as realize Work-flow control method provided by the embodiment of the present invention.
Embodiment seven
The embodiment of the present invention seven additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should The Work-flow control method of any embodiment is realized when program is executed by processor.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD- ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, programming language include object oriented program language-such as Java, Smalltalk, C++, are also wrapped Include conventional procedural programming language-such as " C " language or similar programming language.Program code can be complete Ground executes on the user computer, partly executes on the user computer, executing as an independent software package, partially existing Part executes on the remote computer or executes on a remote computer or server completely on subscriber computer.It is being related to In the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or wide area Net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as utilize ISP To be connected by internet).
Embodiment eight
Fig. 7 is a kind of structural schematic diagram for workflow control system that the embodiment of the present invention eight provides.Work-flow control system System is the computer software system for handling workflow, and major function is to go definition by the support of computer technology, execute and manage Manage workflow, the information exchange in co-ordination stream implementation procedure between component and between target object.Work-flow control system System includes Work-flow control device 71 and at least one component 72 for accessing Work-flow control device 71, and Fig. 7 shows 4 groups Part.The access way of component is detailed in the associated description of above-described embodiment, and details are not described herein again.
Work-flow control device 71, for obtaining the workflow handled target object, workflow includes target pair As during processing at least two processing statuses and target object from the previous processing status of two neighboring processing status To processing operation needed for latter treatment state;At least one component 72 is called according to workflow;At least one component 72, is used for Processing operation is carried out to target object.
The optional embodiment of Work-flow control device 71 is detailed in the associated description of above-described embodiment, and details are not described herein again.
In the embodiment of the present invention, by obtaining the workflow handled target object, the workflow is with processing status For node, using operation content of the processing operation needed between two neighboring processing status between node, to pass through processing Entire workflow is cut into a section small process by state;By calling at least one component according to workflow, by extremely A few component carries out processing operation to target object, to based on processing status, realize that operation logic is simple, clearly work It flows;Moreover, the workflow in the present embodiment is mainly used for operating control, a large amount of logic judgment, processing operation are abstracted into In component, component access is simple, quick, realizes the light-weight design of Work-flow control.
Optionally, workflow control system further includes message-oriented middleware.Message-oriented middleware is used for the component to malloc failure malloc It carries out continuing to call, until component call success, alternatively, determining that workflow is interrupted.Optionally, message-oriented middleware will be for that will call The module information of failure is stored into exception queue, and successively carries out continuing to adjust to the corresponding component of module information in exception queue With until component call success, alternatively, determining that workflow is interrupted.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (13)

1. a kind of Work-flow control method characterized by comprising
The workflow handled target object is obtained, the workflow includes at least two of target object during processing Needed for the previous processing status to latter treatment state of a processing status and target object from two neighboring processing status Reason operation;
At least one component is called according to the workflow, to carry out processing behaviour to the target object by least one component Make.
2. the method according to claim 1, wherein described obtain the workflow that is handled target object, Include:
The workflow configuration file of target object is obtained, the workflow configuration file includes that state point is managed everywhere in target object Not corresponding configuration item and target object are from the previous processing status in two neighboring processing status to latter treatment state institute The corresponding configuration item of processing operation needed.
3. the method according to claim 1, wherein described call at least one component according to the workflow, To carry out processing operation to the target object by least one component, comprising:
Obtain the current processing status of target object;
According to current processing status and workflow, the processing behaviour of target needed for from current processing status to latter treatment state is determined Make;
Corresponding target element is called according to target processing operation, to carry out at target by target element to the target object Reason operation;
According to returning the result for target processing operation, the new current processing status of target object is determined, return to performance objective processing Operation determines operation, until the processing status of target object stops updating.
4. the method according to claim 1, wherein at least one component is called according to the workflow, with logical It crosses at least one component and processing operation is carried out to the target object, comprising:
At least one component is called according to the workflow;
Determine the component of malloc failure malloc;
It carries out continuing to call to the component of malloc failure malloc by message-oriented middleware, until component call success, alternatively, determining work Stream interrupts.
5. according to the method described in claim 4, it is characterized in that, it is described by component from message-oriented middleware to malloc failure malloc into Row continues to call, until component call success, alternatively, determining that workflow is interrupted, comprising:
The module information of malloc failure malloc is stored into the exception queue of message-oriented middleware;
Successively the corresponding component of module information in exception queue is carried out continuing to call by the message-oriented middleware, until component It calls successfully, alternatively, determining that workflow is interrupted.
6. according to the method described in claim 4, it is characterized in that, at least one described component include asynchronous access component and/ Or synchronous access component;
Correspondingly, the component of the determining malloc failure malloc, comprising:
The number for not receiving effective result that synchronous access component returns within the component call period reaches preset times, determines The synchronous access component is the component of malloc failure malloc;And/or
The number for not receiving the outstanding message that asynchronous access component returns within the component call period reaches preset times, or Person, the number of the unread effective result returned to asynchronous access component reaches preset times in normal queue, determine described in Asynchronous access component is the component of malloc failure malloc.
7. method according to claim 1-6, which is characterized in that the method also includes:
During calling at least one component according to the workflow, the recalls information of each component is updated and shown, call Information includes at least whether call, whether return to one of effective result and calling sequence.
8. method according to claim 1-6, which is characterized in that the method also includes:
During calling at least one component according to the workflow, exhibition is updated according to the current processing status of target object Show the processing status of target object on interface.
9. a kind of Work-flow control device characterized by comprising
Module is obtained, for obtaining the workflow handled target object, the workflow includes that target object is being handled At least two processing statuses in the process and target object are from the previous processing status of two neighboring processing status to from latter Processing operation needed for reason state;
Calling module, for calling at least one component according to the workflow, to pass through at least one component to the target Object carries out processing operation.
10. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as Work-flow control method described in any one of claims 1-8.
11. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor Such as Work-flow control method described in any one of claims 1-8 is realized when execution.
12. a kind of workflow control system characterized by comprising Work-flow control device and the access Work-flow control At least one component of device;
The Work-flow control device, for obtaining the workflow handled target object, the workflow includes target The previous processing shape of object at least two processing statuses during processing and target object from two neighboring processing status Processing operation needed for state to latter treatment state;At least one component is called according to the workflow;
At least one described component, for carrying out processing operation to the target object.
13. system according to claim 12, which is characterized in that the system also includes message-oriented middlewares;
The message-oriented middleware, for carrying out continuing to call to the component of malloc failure malloc, until component call success, alternatively, sentencing Determine workflow interruption.
CN201811566191.2A 2018-12-20 2018-12-20 Work-flow control method, apparatus, equipment, storage medium and system Pending CN109634764A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811566191.2A CN109634764A (en) 2018-12-20 2018-12-20 Work-flow control method, apparatus, equipment, storage medium and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811566191.2A CN109634764A (en) 2018-12-20 2018-12-20 Work-flow control method, apparatus, equipment, storage medium and system

Publications (1)

Publication Number Publication Date
CN109634764A true CN109634764A (en) 2019-04-16

Family

ID=66076084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811566191.2A Pending CN109634764A (en) 2018-12-20 2018-12-20 Work-flow control method, apparatus, equipment, storage medium and system

Country Status (1)

Country Link
CN (1) CN109634764A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297927A (en) * 2019-05-17 2019-10-01 百度在线网络技术(北京)有限公司 Article dissemination method, device, equipment and storage medium
CN110764932A (en) * 2019-10-22 2020-02-07 网易传媒科技(北京)有限公司 Data processing method, system, medium and computing device
CN110851283A (en) * 2019-11-14 2020-02-28 百度在线网络技术(北京)有限公司 Resource processing method and device and electronic equipment
CN111277599A (en) * 2020-01-21 2020-06-12 浙江大华技术股份有限公司 Remote call processing method and device
CN112579315A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Method and device for processing operation execution state, storage medium and equipment
CN112612568A (en) * 2020-12-25 2021-04-06 中电金信软件有限公司 Workflow task item display method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030105654A1 (en) * 2001-11-26 2003-06-05 Macleod Stewart P. Workflow management based on an integrated view of resource identity
CN1636207A (en) * 2000-02-25 2005-07-06 奥克文技术交流公司 Method for workflow processing through computer network
CN101174206A (en) * 2007-11-27 2008-05-07 深圳国人通信有限公司 Flow engine scheduling method based on finite state machine
US20090125884A1 (en) * 2007-11-13 2009-05-14 International Business Machines Corporation System and method for workflow-driven data storage
CN101751619A (en) * 2008-12-18 2010-06-23 西门子公司 Method and system for managing results of an analysis process on objects handled along a technical process line

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1636207A (en) * 2000-02-25 2005-07-06 奥克文技术交流公司 Method for workflow processing through computer network
US20030105654A1 (en) * 2001-11-26 2003-06-05 Macleod Stewart P. Workflow management based on an integrated view of resource identity
US20090125884A1 (en) * 2007-11-13 2009-05-14 International Business Machines Corporation System and method for workflow-driven data storage
CN101174206A (en) * 2007-11-27 2008-05-07 深圳国人通信有限公司 Flow engine scheduling method based on finite state machine
CN101751619A (en) * 2008-12-18 2010-06-23 西门子公司 Method and system for managing results of an analysis process on objects handled along a technical process line

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110297927A (en) * 2019-05-17 2019-10-01 百度在线网络技术(北京)有限公司 Article dissemination method, device, equipment and storage medium
CN110297927B (en) * 2019-05-17 2022-07-29 百度在线网络技术(北京)有限公司 Article publishing method, device, equipment and storage medium
CN112579315A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Method and device for processing operation execution state, storage medium and equipment
CN110764932A (en) * 2019-10-22 2020-02-07 网易传媒科技(北京)有限公司 Data processing method, system, medium and computing device
CN110851283A (en) * 2019-11-14 2020-02-28 百度在线网络技术(北京)有限公司 Resource processing method and device and electronic equipment
CN111277599A (en) * 2020-01-21 2020-06-12 浙江大华技术股份有限公司 Remote call processing method and device
CN111277599B (en) * 2020-01-21 2022-10-18 浙江大华技术股份有限公司 Remote call processing method and device
CN112612568A (en) * 2020-12-25 2021-04-06 中电金信软件有限公司 Workflow task item display method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN109634764A (en) Work-flow control method, apparatus, equipment, storage medium and system
US10452251B2 (en) Transactional conversation-based computing system
CN109194736B (en) Message duplicate removal method and device, electronic equipment, medium and unmanned vehicle
CN107451062B (en) User interface traversal test method, device, server and storage medium
CN104765621B (en) A kind of method and system of the deployment program in clustered node
US11288637B2 (en) Systems and methods for analytics integration into electronic applications
US20090150556A1 (en) Memory to storage communication for hybrid systems
CN110740145A (en) Message consumption method, device, storage medium and electronic equipment
CN114500481B (en) Service request processing method, system and device
CN110287009A (en) A kind of working node selection method, device, storage medium and server
CN112363913B (en) Parallel test task scheduling optimizing method, device and computing equipment
CN113282444B (en) Visualization method and device for debugging business process
CN113766042A (en) Container address configuration method, system, device, equipment and medium
CN112817562A (en) Service processing method and device
CN113760242B (en) Data processing method, device, server and medium
CN112486825B (en) Multi-lane environment architecture system, message consumption method, device, equipment and medium
CN113849449A (en) Communication system and information interaction method, device and medium
CN109873861A (en) The exchange method and device, storage medium and electronic equipment of transregional piece of chain node
CN110807535A (en) Construction method and construction device of unified reservation platform and unified reservation platform system
US10339205B2 (en) Efficient handling of bi-directional data
CN116932147A (en) Streaming job processing method and device, electronic equipment and medium
CN109151033B (en) Communication method and device based on distributed system, electronic equipment and storage medium
CN110445874A (en) A kind of conversation processing method, device, equipment and storage medium
CN112887803B (en) Session processing method, device, storage medium and electronic equipment
CN109241164A (en) A kind of data processing method, device, server and storage 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190416