CN109472540A - Method and device for business processing - Google Patents

Method and device for business processing Download PDF

Info

Publication number
CN109472540A
CN109472540A CN201710800873.4A CN201710800873A CN109472540A CN 109472540 A CN109472540 A CN 109472540A CN 201710800873 A CN201710800873 A CN 201710800873A CN 109472540 A CN109472540 A CN 109472540A
Authority
CN
China
Prior art keywords
identifier
time
cache
instance
service
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.)
Granted
Application number
CN201710800873.4A
Other languages
Chinese (zh)
Other versions
CN109472540B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710800873.4A priority Critical patent/CN109472540B/en
Publication of CN109472540A publication Critical patent/CN109472540A/en
Application granted granted Critical
Publication of CN109472540B publication Critical patent/CN109472540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

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

Abstract

This application discloses method and device for business processing.One specific embodiment of this method includes: that the mark of the flow definition of workflow needed for identifying corresponding business for processing business is determined according to service identification in response to receiving the business processing request including service identification;If being preloaded with the corresponding flow definition of mark in caching, the corresponding flow definition of mark in caching is extracted;According to corresponding flow definition and mark is identified, the flow instance for handling workflow is created;Booting sequence example is to handle workflow;In response to detecting that workflow processing terminates, Shredding Process example.This embodiment improves business processing speed.

Description

Service processing method and device
Technical Field
The present application relates to the field of computer technologies, in particular, to the field of internet technologies, and in particular, to a method and an apparatus for processing a service.
Background
Today, when an adversary has a new business or a new idea, if a company is not able to respond to the new business demand quickly, the business will be influenced in the market promotion priority.
Currently, the rapid response of most companies is to overlay modifications on the original business process logic. Therefore, each new service processing must ensure that the original service can be normally circulated. If only a few business needs change or update, the processing logic of the code can be adjusted and modified by filling manpower. But with the continual iteration and frequent updating of business logic, code becomes increasingly bloated. This results in a significant time cost for development and testing personnel to pay for traffic grooming when subsequent iterative updates are performed. Moreover, the influence range of the original flow and codes is not reduced due to the increase of personnel. In addition, one person of the research and development personnel can solve the problem that the modification and the change of the codes are difficult, so that the access of new requirements cannot enter the development stage quickly. Therefore, the existing service processing technology has a slow response speed to the service.
Disclosure of Invention
An object of the embodiments of the present application is to provide an improved service processing method and apparatus, so as to solve the technical problems mentioned in the above background.
In a first aspect, an embodiment of the present application provides a service processing method, where the method includes: in response to receiving a service processing request comprising a service identifier, determining an identifier of a flow definition of a workflow required for processing the service corresponding to the service identifier according to the service identifier; if the flow definition corresponding to the identifier is pre-loaded in the cache, extracting the flow definition corresponding to the identifier in the cache; creating a process instance for processing the workflow according to the process definition and the identification corresponding to the identification; starting a process instance to process a workflow; the process instance is destroyed in response to detecting the end of the workflow process.
In some embodiments, the method further comprises: and when the time for occupying the cache by the process definition corresponding to the identifier exceeds a preset occupied time threshold, deleting the process definition corresponding to the identifier from the cache.
In some embodiments, the method further comprises: acquiring historical records of a process definition creation process instance and a destruction process instance corresponding to the identification, wherein the historical records comprise creation time and destruction time of a plurality of process instances; determining the average execution time of the plurality of process instances according to the creation time and the destruction time of the plurality of process instances; and setting an occupation duration threshold value of the flow definition occupied cache corresponding to the identifier according to the average execution time.
In some embodiments, the method further comprises: and if the flow definition corresponding to the identifier is not pre-loaded in the cache, acquiring the flow definition corresponding to the identifier from the database and loading the flow definition into the cache.
In some embodiments, the method further comprises: and for each process instance in the plurality of process instances, determining the execution time of the process instance according to the creation time and the destruction time of the process instance, and outputting alarm information aiming at the process instance when the execution time exceeds a preset execution time threshold.
In some embodiments, the occupancy duration threshold is proportional to a frequency at which process instances are created within a predetermined time from identifying corresponding process definitions.
In a second aspect, an embodiment of the present application provides a service processing apparatus, where the apparatus includes: the determining unit is used for responding to the received service processing request comprising the service identification, and determining the identification of the flow definition of the workflow required by processing the service corresponding to the service identification according to the service identification; the extracting unit is used for extracting the process definition corresponding to the identifier in the cache if the process definition corresponding to the identifier is preloaded in the cache; the creating unit is used for creating a process instance for processing the workflow according to the process definition and the identification corresponding to the identification; an execution unit to initiate a process instance to process a workflow; and the destruction unit is used for destroying the process instance in response to the detection of the end of the workflow processing.
In some embodiments, the apparatus further comprises a deletion unit to: and when the time for occupying the cache by the process definition corresponding to the identifier exceeds a preset occupied time threshold, deleting the process definition corresponding to the identifier from the cache.
In some embodiments, the apparatus further comprises an occupancy duration threshold setting unit configured to: acquiring historical records of a process definition creation process instance and a destruction process instance corresponding to the identification, wherein the historical records comprise creation time and destruction time of a plurality of process instances; determining the average execution time of the plurality of process instances according to the creation time and the destruction time of the plurality of process instances; and setting an occupation duration threshold value of the flow definition occupied cache corresponding to the identifier according to the average execution time.
In some embodiments, the extraction unit is further to: and if the flow definition corresponding to the identifier is not pre-loaded in the cache, acquiring the flow definition corresponding to the identifier from the database and loading the flow definition into the cache.
In some embodiments, the apparatus further comprises an alarm unit for: and for each process instance in the plurality of process instances, determining the execution time of the process instance according to the creation time and the destruction time of the process instance, and outputting alarm information aiming at the process instance when the execution time exceeds a preset execution time threshold.
In some embodiments, the occupancy duration threshold is proportional to a frequency at which process instances are created within a predetermined time from identifying corresponding process definitions.
In a third aspect, an embodiment of the present application provides a server, including: one or more processors; storage means for storing one or more programs which, when executed by one or more processors, cause the one or more processors to carry out a method according to any one of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method according to any one of the first aspect.
According to the service processing method and device provided by the embodiment of the application, the identification of the process definition is determined according to the service identification, the process definition is loaded through the identification of the process definition, then the process instance processing workflow is created, and the process instance is destroyed after the workflow is processed. Thereby improving the service processing speed.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a business process method according to the present application;
FIG. 3 is a schematic diagram of an application scenario of a business process method according to the present application;
FIG. 4 is a flow diagram of yet another embodiment of a business process method according to the present application;
FIG. 5 is a schematic block diagram of one embodiment of a traffic processing apparatus according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 shows an exemplary system architecture 100 to which embodiments of the service processing method or service processing apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as a page browser application, a shopping-like application, a search-like application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting page browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background business process server providing support for business process pages displayed on the terminal devices 101, 102, 103. The background service processing server may analyze and perform other processing on the received data such as the service processing request, and feed back a processing result (for example, page data of a successful service processing) to the terminal device.
It should be noted that the service processing method provided in the embodiment of the present application is generally executed by the server 105, and accordingly, the service processing apparatus is generally disposed in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a business process method according to the present application is shown. The service processing method comprises the following steps:
step 201, in response to receiving a service processing request including a service identifier, determining, according to the service identifier, an identifier of a flow definition of a workflow required for processing a service corresponding to the service identifier.
In this embodiment, an electronic device (for example, a server shown in fig. 1) on which the service processing method operates may receive a service processing request from a terminal with which a user performs service processing through a wired connection manner or a wireless connection manner.
The service processing request may include a service identifier, and the workflow required for processing the service may be determined by searching a preset correspondence table between the service identifier and an identifier defined by the process according to the service identifier. A transaction refers to a transaction that requires computer processing. The service identification refers to identification of a transaction requiring computer processing, such as a service name. Workflow refers to a process that can be fully or partially automated and that can be passed and executed between different actors according to a series of rules, documents, information, or tasks. The flow definition is used to describe a complete business process, which consists of several activities. The information of the basic information of the workflow, the starting and ending conditions of the workflow, the composed activities, the rules of the activity transfer, the work tasks (work items) required to be executed by the user, the possibly invoked application programs, the related data of the workflow and the like are included. An activity definition refers to a unit of work contained within a flow definition that represents a relatively independent, logical unit of work. An activity represents a task that needs to be processed by the relevant resource, or by the computer. Where basic information for the activity, participants in performing the activity, time constraints, work item information, triggering events, start-up policies, etc. are defined. Work items refer to work that represents a participant to do to complete an activity instance. An activity instance may correspond to one or more work items. The flow-defined identifier may be a key, or may be represented by [ key: version: generation ID —, where key is a key and generation ID is an automatically generated unique number. keys are used to distinguish different flow definitions. In the case that the flow definition keys are the same, the version is upgraded from 1 to 1.
For example, if a user wants to buy insurance, the user sends a service identifier, which includes an insurance company name, an insurance type, and the like and can identify the service type, to the electronic device through the terminal, and then the electronic device can determine whether a general insurance application process or a special insurance application process is needed according to the service identifier, and determine identifiers of process definitions corresponding to different processes, so that the electronic device loads the process definitions corresponding to the identifiers.
Step 202, if the flow definition corresponding to the identifier is pre-loaded in the cache, extracting the flow definition corresponding to the identifier in the cache.
In this embodiment, the flow definition needs to be obtained through the identifier of the flow definition. The flow definition needs to be pre-loaded in the cache when in use.
In some optional implementation manners of this embodiment, if the flow definition corresponding to the identifier is not preloaded in the cache, the flow definition corresponding to the identifier is obtained from the database and loaded into the cache. If the flow definition is loaded into the cache for a long time, certain offline flow definitions and obsolete flow definition versions occupy resources for a long time and cannot be removed even if the flow is not used any more.
In some optional implementation manners of this embodiment, when the time that the flow definition corresponding to the identifier occupies the cache exceeds the preset occupied duration threshold, the flow definition corresponding to the identifier is deleted from the cache. Therefore, invalid or expired flow definitions can be prevented from occupying the cache, and common flow definitions can be prevented from being frequently loaded.
And step 203, creating a process instance for processing the workflow according to the process definition and the identification corresponding to the identification.
In this embodiment, after the flow definition is submitted and issued to the server, the flow can be started, and an instance of the flow definition is created during the starting process, called a flow instance. There may be multiple process instances for the same process definition. Each flow instance is stored in a flow instance library (WFProcessInst), including information such as flow instance ID (unique identifier), flow instance name, identification of flow definition, state of the flow instance, initiator of the instance, start time, related data, etc. An activity instance refers to each activity in a flow instance referred to as an activity instance. Each activity instance is stored in an activity instance library (WFActivityInst), including information such as an activity instance ID (unique identifier), a state of the activity instance, an identifier of an associated activity definition and a process instance ID, a time limit, whether to timeout, creation time, and the like. The flow definition and the activity definition are determined in the workflow development phase; the process instance, activity instance, and work item are determined during the workflow's run phase. A flow definition consists of multiple activity definitions. A flow definition may create multiple flow instances. A process instance contains multiple activity instances, each of which may contain one or more work items in certain situations (e.g., an activity is executed in a loop multiple times), and multiple activity instances may exist for an activity definition.
Step 204, a process instance is initiated to process the workflow.
In this embodiment, the process instance may be started using a key of the process definition, where the key corresponds to an attribute value of the identifier of the process definition, and the process instance is started using the key, and the default is started according to the latest version of the process definition. After the process instance is started, the workflow which is executed by a certain process instance together can be inquired.
Step 205, in response to detecting the workflow processing is finished, the process instance is destroyed.
In this embodiment, whether the current state of a certain workflow is still in the process of execution or is finished can be identified and queried through a process instance. And when the process instance is finished (the unmarked variable associates the process instance), clearing the mark of the process instance, recycling all unmarked process instances as garbage, and releasing the memory space occupied by the garbage process instance.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the service processing method according to the present embodiment. In the application scenario of fig. 3, after receiving an application request sent by a user through a terminal, the flow control center 300 determines that a general application flow and a general settlement flow, or a special application flow and a special settlement flow need to be performed according to a service identifier. And then distributing the identification of the flow definition corresponding to each flow, and loading the general insurance flow definition and the general settlement flow definition or loading the special insurance flow definition and the special settlement flow definition according to the identification. And respectively generating a general application process instance 302 or a special application process instance 303. When the process control center 300 detects that the general application process instance 302 is executed completely or detects that the special application process instance 303 is executed completely, a general settlement process instance 304 or a special settlement process instance 305 is generated. When settlement completion is detected, the general application process instance 302 and the general settlement process instance 304, or the special application process instance 303 and the special settlement process instance 305 are destroyed.
The method provided by the above embodiment of the present application can quickly respond to the processing of multiple services by loading different process definitions according to different services.
With further reference to fig. 4, a flow 400 of yet another embodiment of a business process method is shown. The process 400 of the service processing method includes the following steps:
step 401, in response to receiving a service processing request including a service identifier, determining, according to the service identifier, an identifier of a flow definition of a workflow required for processing a service corresponding to the service identifier.
Step 402, if the flow definition corresponding to the identifier is pre-loaded in the cache, extracting the flow definition corresponding to the identifier in the cache.
And step 403, creating a process instance for processing the workflow according to the process definition and the identifier corresponding to the identifier.
At step 404, a process instance is launched to process the workflow.
Step 405, in response to detecting the end of the workflow process, destroys the process instance.
Step 401-.
And 406, acquiring historical records of creating the process instances and destroying the process instances according to the process definitions corresponding to the identifiers, wherein the historical records comprise creation time and destruction time of a plurality of process instances.
In this embodiment, for processing the same service processing request multiple times, the time used for each processing may be different. The creation time and destruction time of the process instance may be recorded in the history of creating the process instance and destroying the process instance. Suppose that the time for creating a flow instance triggered by a user requesting service processing is TStart of. The system monitors that the service triggered by the user starts, and records the time of destroying the process example as T after the service processing process is finishedEnd upThen obtain the execution time T of the ith time of the process instanceiAs shown in the following formula, i is a natural number:
Ti=Tend up-TStart of(formula 1)
Step 407, determining an average execution time of the plurality of process instances according to the creation time and the destruction time of the plurality of process instances.
In the present embodiment, the execution time T of each flow instance calculated according to equation 1iCalculating the average execution time of executing the flow instance n timesn is a natural number:
and step 408, setting an occupation duration threshold value of the flow definition occupying the cache corresponding to the identifier according to the average execution time.
In this embodiment, the dynamic value of the average execution time may approximate the jitter state of the real-time perceptual service. Thereby determining the time value falling into the cache when loading the flow definition. The time distribution falling into the buffer according to equation 1 and equation 2 is shown as K in the following equation:
wherein, aiRepresenting the weight value of the i-th instance of the execution flow.
In some optional implementations of this embodiment, the occupancy duration threshold is proportional to a frequency of creating the flow instance according to the flow definition corresponding to the identifier within a predetermined time. Equation 3 can be modified to obtain K as shown below:
wherein,is the frequency with which flow instances are created per unit time.
The cache occupancy duration threshold T at the time of loading the cache according to equations 1-4 may be determined using the following equation:
T=K T0(formula 5)
Wherein, T0Is a predetermined length of time.
In some optional implementation manners of this embodiment, for each of the plurality of process instances, an execution time of the process instance is determined according to the creation time and the destruction time of the process instance, and when the execution time exceeds a preset execution time threshold, alarm information for the process instance is output. Therefore, the process definition in the cache is cleared in time, and the invalid process definition is prevented from occupying the cache for a long time.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the service processing method in this embodiment highlights the step of cleaning the flow definition in the cache. Therefore, the scheme described in this embodiment can timely clean invalid flow definitions, and can avoid frequent loading behaviors caused by cleaning up common flow definitions. Thereby improving the efficiency of service processing.
With further reference to fig. 5, as an implementation of the methods shown in the above-mentioned figures, the present application provides an embodiment of a service processing apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the service processing apparatus 500 of the present embodiment includes: a determination unit 501, an extraction unit 502, a creation unit 503, an execution unit 504, and a destruction unit 505. The determining unit 501 is configured to, in response to receiving a service processing request including a service identifier, determine, according to the service identifier, an identifier of a flow definition of a workflow required for processing a service corresponding to the service identifier; the extracting unit 502 is configured to extract the flow definition corresponding to the identifier in the cache if the flow definition corresponding to the identifier is preloaded in the cache; the creating unit 503 is configured to create a process instance for processing the workflow according to the process definition and the identifier corresponding to the identifier; the execution unit 504 is used to launch a process instance to process a workflow; the destruction unit 505 is configured to destroy the process instance in response to detecting that the workflow processing is finished.
In this embodiment, the specific processing of the determining unit 501, the extracting unit 502, the creating unit 503, the executing unit 504 and the destroying unit 505 of the service processing apparatus 500 may refer to step 201, step 202, step 203, step 204 and step 205 in the corresponding embodiment of fig. 2.
In some optional implementations of this embodiment, the apparatus 500 further includes a deletion unit (not shown) configured to: and when the time for occupying the cache by the process definition corresponding to the identifier exceeds a preset occupied time threshold, deleting the process definition corresponding to the identifier from the cache.
In some optional implementations of the present embodiment, the apparatus 500 further includes an occupancy duration threshold setting unit (not shown) configured to: acquiring historical records of a process definition creation process instance and a destruction process instance corresponding to the identification, wherein the historical records comprise creation time and destruction time of a plurality of process instances; determining the average execution time of the plurality of process instances according to the creation time and the destruction time of the plurality of process instances; and setting an occupation duration threshold value of the flow definition occupied cache corresponding to the identifier according to the average execution time.
In some optional implementations of the present embodiment, the extracting unit 502 is further configured to: and if the flow definition corresponding to the identifier is not pre-loaded in the cache, acquiring the flow definition corresponding to the identifier from the database and loading the flow definition into the cache.
In some optional implementations of this embodiment, the apparatus 500 further comprises an alarm unit (not shown) for: and for each process instance in the plurality of process instances, determining the execution time of the process instance according to the creation time and the destruction time of the process instance, and outputting alarm information aiming at the process instance when the execution time exceeds a preset execution time threshold.
In some optional implementations of this embodiment, the occupancy duration threshold is proportional to a frequency of creating the flow instance according to the flow definition corresponding to the identifier within a predetermined time.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a server according to embodiments of the present application. The server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a determination unit, an extraction unit, a creation unit, an execution unit, and a destruction unit. The names of these units do not form a limitation on the units themselves in some cases, for example, the determining unit may also be described as "a unit that determines, in response to receiving a service processing request including a service identifier, an identifier of a flow definition of a workflow required for processing a service corresponding to the service identifier from the service identifier".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: in response to receiving a service processing request comprising a service identifier, determining an identifier of a flow definition of a workflow required for processing the service corresponding to the service identifier according to the service identifier; if the flow definition corresponding to the identifier is pre-loaded in the cache, extracting the flow definition corresponding to the identifier in the cache; creating a process instance for processing the workflow according to the process definition and the identification corresponding to the identification; starting a process instance to process a workflow; the process instance is destroyed in response to detecting the end of the workflow process.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (14)

1. A method for processing a service, the method comprising:
in response to receiving a service processing request comprising a service identifier, determining an identifier of a flow definition of a workflow required for processing a service corresponding to the service identifier according to the service identifier;
if the flow definition corresponding to the identifier is pre-loaded in the cache, extracting the flow definition corresponding to the identifier in the cache;
creating a process instance for processing the workflow according to the process definition corresponding to the identifier and the identifier;
initiating the process instance to process the workflow;
destroying the flow instance in response to detecting the workflow processing is finished.
2. The method of claim 1, further comprising:
and when the time for occupying the cache by the process definition corresponding to the identifier exceeds a preset occupied time threshold, deleting the process definition corresponding to the identifier from the cache.
3. The method of claim 2, further comprising:
acquiring historical records of a process instance creation and a process instance destruction according to the process definition corresponding to the identification, wherein the historical records comprise creation time and destruction time of a plurality of process instances;
determining the average execution time of the plurality of process instances according to the creation time and the destruction time of the plurality of process instances;
and setting an occupation duration threshold value of the flow definition corresponding to the identifier for occupying the cache according to the average execution time.
4. The method of claim 2, further comprising:
and if the flow definition corresponding to the identifier is not pre-loaded in the cache, acquiring the flow definition corresponding to the identifier from a database and loading the flow definition into the cache.
5. The method of claim 3, further comprising:
and for each process instance in the plurality of process instances, determining the execution time of the process instance according to the creation time and the destruction time of the process instance, and outputting alarm information aiming at the process instance when the execution time exceeds a preset execution time threshold.
6. The method of claim 3, wherein the duration of occupancy threshold is proportional to a frequency of creating process instances from the process definition corresponding to the identity within a predetermined time.
7. A traffic processing apparatus, characterized in that the apparatus comprises:
the system comprises a determining unit, a processing unit and a processing unit, wherein the determining unit is used for responding to a received service processing request comprising a service identifier, and determining an identifier of a flow definition of a workflow required by processing a service corresponding to the service identifier according to the service identifier;
an extracting unit, configured to extract, if a flow definition corresponding to the identifier is preloaded in a cache, the flow definition corresponding to the identifier in the cache;
a creating unit, configured to create a process instance for processing the workflow according to the process definition corresponding to the identifier and the identifier;
an execution unit to initiate the process instance to process the workflow;
and the destruction unit is used for destroying the process instance in response to the detection of the workflow processing end.
8. The apparatus of claim 7, further comprising a deletion unit configured to:
and when the time for occupying the cache by the process definition corresponding to the identifier exceeds a preset occupied time threshold, deleting the process definition corresponding to the identifier from the cache.
9. The apparatus of claim 7, further comprising an occupancy duration threshold setting unit configured to:
acquiring historical records of a process instance creation and a process instance destruction according to the process definition corresponding to the identification, wherein the historical records comprise creation time and destruction time of a plurality of process instances;
determining the average execution time of the plurality of process instances according to the creation time and the destruction time of the plurality of process instances;
and setting an occupation duration threshold value of the flow definition corresponding to the identifier for occupying the cache according to the average execution time.
10. The apparatus of claim 7, wherein the extraction unit is further configured to:
and if the flow definition corresponding to the identifier is not pre-loaded in the cache, acquiring the flow definition corresponding to the identifier from a database and loading the flow definition into the cache.
11. The apparatus of claim 9, further comprising an alarm unit for:
and for each process instance in the plurality of process instances, determining the execution time of the process instance according to the creation time and the destruction time of the process instance, and outputting alarm information aiming at the process instance when the execution time exceeds a preset execution time threshold.
12. The apparatus of claim 9, wherein the duration of occupancy threshold is proportional to a frequency of creating process instances from the process definition corresponding to the identifier within a predetermined time.
13. A server, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201710800873.4A 2017-09-07 2017-09-07 Service processing method and device Active CN109472540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710800873.4A CN109472540B (en) 2017-09-07 2017-09-07 Service processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710800873.4A CN109472540B (en) 2017-09-07 2017-09-07 Service processing method and device

Publications (2)

Publication Number Publication Date
CN109472540A true CN109472540A (en) 2019-03-15
CN109472540B CN109472540B (en) 2021-11-02

Family

ID=65657603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710800873.4A Active CN109472540B (en) 2017-09-07 2017-09-07 Service processing method and device

Country Status (1)

Country Link
CN (1) CN109472540B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764817A (en) * 2019-09-27 2020-02-07 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for acquiring process instance
CN112749193A (en) * 2019-10-31 2021-05-04 北京京东尚科信息技术有限公司 Workflow processing method and device, storage medium and electronic equipment
CN112925519A (en) * 2021-03-29 2021-06-08 建信金融科技有限责任公司 Workflow creating method and device
CN113762702A (en) * 2021-04-19 2021-12-07 北京沃东天骏信息技术有限公司 Workflow deployment method, device, computer system and readable storage medium
CN114462859A (en) * 2022-02-10 2022-05-10 中国工商银行股份有限公司 Workflow processing method and device, computer equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552739A (en) * 2008-04-03 2009-10-07 北京邮电大学 Method and system for managing life cycle of network service process example
CN102521712A (en) * 2011-12-27 2012-06-27 东软集团股份有限公司 Process instance data processing method and device
CN106155769A (en) * 2015-03-26 2016-11-23 北大方正集团有限公司 A kind of workflow processing method, device and workflow engine
US20160358103A1 (en) * 2015-06-05 2016-12-08 Facebook, Inc. Machine learning system flow processing
CN106845741A (en) * 2015-12-03 2017-06-13 北大方正集团有限公司 The customization device and customization method of workflow
CN106897810A (en) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 Method for processing business and system, workflow engine and system, operation system
CN106897857A (en) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 A kind of workflow processing method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552739A (en) * 2008-04-03 2009-10-07 北京邮电大学 Method and system for managing life cycle of network service process example
CN102521712A (en) * 2011-12-27 2012-06-27 东软集团股份有限公司 Process instance data processing method and device
CN106155769A (en) * 2015-03-26 2016-11-23 北大方正集团有限公司 A kind of workflow processing method, device and workflow engine
US20160358103A1 (en) * 2015-06-05 2016-12-08 Facebook, Inc. Machine learning system flow processing
CN106845741A (en) * 2015-12-03 2017-06-13 北大方正集团有限公司 The customization device and customization method of workflow
CN106897810A (en) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 Method for processing business and system, workflow engine and system, operation system
CN106897857A (en) * 2015-12-17 2017-06-27 北京奇虎科技有限公司 A kind of workflow processing method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郭芬 等: "海量流程实例的存储、索引与检索", 《计算机集成制造系统》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764817A (en) * 2019-09-27 2020-02-07 北京字节跳动网络技术有限公司 Method, device, medium and electronic equipment for acquiring process instance
CN112749193A (en) * 2019-10-31 2021-05-04 北京京东尚科信息技术有限公司 Workflow processing method and device, storage medium and electronic equipment
CN112925519A (en) * 2021-03-29 2021-06-08 建信金融科技有限责任公司 Workflow creating method and device
CN113762702A (en) * 2021-04-19 2021-12-07 北京沃东天骏信息技术有限公司 Workflow deployment method, device, computer system and readable storage medium
CN114462859A (en) * 2022-02-10 2022-05-10 中国工商银行股份有限公司 Workflow processing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109472540B (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN109472540B (en) Service processing method and device
CN105677250B (en) The update method and updating device of object data in object storage system
US20140075301A1 (en) Information processing apparatus, control method, and recording medium
RU2690759C2 (en) Assessment of file reputation
CN109582873B (en) Method and device for pushing information
CN109522751B (en) Access right control method and device, electronic equipment and computer readable medium
CN108287708B (en) Data processing method and device, server and computer readable storage medium
US20170109371A1 (en) Method and Apparatus for Processing File in a Distributed System
CN103198090A (en) A method and a system for optimizing storage allocation in a virtual desktop environment
WO2014139300A1 (en) Method and device for loading a plug-in
US11182500B2 (en) Sensitive data management
CN107203574B (en) Aggregation of data management and data analysis
US10496696B2 (en) Search method and apparatus
CN110473036B (en) Method and device for generating order number
CN111324786A (en) Method and device for processing consultation problem information
CN109213824B (en) Data capture system, method and device
CN110753084A (en) Uplink data reading method, cache server and computer readable storage medium
TW201546627A (en) Conditional saving of input data
CN108897729B (en) Transaction template sharing method and device, electronic equipment and storage medium
CN110119418B (en) Data export method and device
CN108520401B (en) User list management method, device, platform and storage medium
CN112559913A (en) Data processing method and device, computing equipment and readable storage medium
CN110505289B (en) File downloading method and device, computer readable medium and wireless communication equipment
CN112115738A (en) Image identification method and device applied to browser end
US8495033B2 (en) Data processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant