WO2024041081A1 - 数据处理方法、装置、设备及可读存储介质 - Google Patents

数据处理方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2024041081A1
WO2024041081A1 PCT/CN2023/098214 CN2023098214W WO2024041081A1 WO 2024041081 A1 WO2024041081 A1 WO 2024041081A1 CN 2023098214 W CN2023098214 W CN 2023098214W WO 2024041081 A1 WO2024041081 A1 WO 2024041081A1
Authority
WO
WIPO (PCT)
Prior art keywords
instance
execution
function
loop
block
Prior art date
Application number
PCT/CN2023/098214
Other languages
English (en)
French (fr)
Inventor
温冠超
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2024041081A1 publication Critical patent/WO2024041081A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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

Definitions

  • This application relates to the field of computer technology, and in particular to data processing technology.
  • Workflow engine is a low-code technology that uses visual methods such as graphical drag and drop and parameterized configuration to design processes or develop applications. It can lower the programming threshold and improve programming efficiency. Through this low-code technology, various code features in programming can be realized, such as conditional judgment, concurrency and other functions. Using a low-code approach to reduce programming development costs allows people without programming experience to implement various code features through visual programming.
  • the embodiments of the present application provide a data processing method, device, equipment and readable storage medium, which can improve the usability and functionality of the workflow engine.
  • embodiments of the present application provide a data processing method, which is executed by a computer device, including:
  • the execution instance includes a pointing relationship between at least two functional code blocks included in the target workflow;
  • the at least two functional code blocks include a loop starting function code block and a loop ending function code block;
  • the loop function code block is executed cyclically.
  • embodiments of the present application provide a data processing method, which is executed by a computer device, including:
  • a workflow control tree composed of at least two function block controls is displayed on the workflow editing page;
  • the at least two function block controls include a loop start function block control and a loop end control.
  • the target workflow contains at least two function code blocks corresponding to each of the function block controls; at least two function code blocks are between The pointing relationship is determined based on the connection relationship of at least two function block controls; the at least two function code blocks include the cycle start function code block corresponding to the cycle start function block control and the cycle end function code corresponding to the cycle end function block control piece;
  • a data processing device including:
  • the trigger module is used to create an execution instance corresponding to the target workflow; the execution instance includes up to The pointing relationship between at least two function code blocks; at least two function code blocks include a loop starting function code block and a loop ending function code block;
  • the loop start module is used to obtain the loop parameters corresponding to the loop start function code block
  • the loop confirmation module is used to determine the function code block between the loop start function code block and the loop end function code block based on the pointing relationship, as the loop function code block;
  • the loop execution module is used to execute loop function code blocks cyclically based on loop parameters and pointing relationships.
  • a data processing device including:
  • the first response module is used to respond to the creation operation of the target workflow and display the workflow editing page;
  • the second response module is used to respond to the selection connection operation of at least two function block controls, and display a workflow control tree composed of at least two function block controls on the workflow editing page; at least two function block controls include a loop Start function block control and loop end function block control;
  • the third response module is used to respond to the trigger operation for the loop start function block control in the workflow control tree and set loop parameters for the loop start function block control;
  • the fourth response module is used to respond to the creation operation of the workflow control tree, create a target workflow, and send the target workflow to the workflow engine;
  • the target workflow contains at least two functional code blocks corresponding to each of the function block controls; at least The pointing relationship between two function code blocks is determined based on the connection relationship of at least two function block controls; at least two function code blocks include a cycle start function code block and a cycle end function block corresponding to the cycle start function block control.
  • the loop end function code block corresponding to the control;
  • the fifth response module is used to respond to the trigger operation for the target workflow and send the trigger request for the target workflow to the workflow engine.
  • embodiments of the present application provide a computer device, including: a processor, a memory, and a network interface;
  • the above-mentioned processor is connected to the above-mentioned memory and the above-mentioned network interface, wherein the above-mentioned network interface is used to provide data communication network elements, the above-mentioned memory is used to store computer programs, and the above-mentioned processor is used to call the above-mentioned computer programs to execute the embodiments of the present application. method.
  • embodiments of the present application provide a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the computer program is suitable for being loaded by a processor and executing the method in the embodiment of the present application.
  • embodiments of the present application provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions.
  • the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device obtains the computer instructions from the computer-readable storage medium.
  • the medium reads the computer instructions, and the processor executes the computer instructions, so that the computer device performs the method in the embodiment of the present application.
  • an execution instance corresponding to the target workflow is created.
  • the execution instance includes a pointing relationship between at least two functional code blocks included in the target workflow, and the at least two functional code blocks include a loop starting function code block. and the loop end function code block; then, obtain the loop parameters corresponding to the loop start function code block, and according to the pointing relationship, determine the function code block between the loop start function code block and the loop end function code block as the loop function code block; finally, according to the loop parameters and pointing relationship, the loop function code block is executed cyclically.
  • Figure 1 is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • Figure 2a is a schematic diagram of a target workflow creation scenario provided by an embodiment of the present application.
  • Figure 2b is a schematic diagram of a target workflow execution scenario provided by an embodiment of the present application.
  • Figure 3 is a schematic flow chart of a data processing method provided by an embodiment of the present application.
  • Figure 4 is a flow chart of web page callback trigger request processing according to an embodiment of the present application.
  • Figure 5 is a schematic flowchart of a target application instruction execution provided by an embodiment of the present application.
  • Figure 6 is a schematic diagram of a workflow pointing relationship provided by an embodiment of the present application.
  • Figure 7 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • Figure 8 is a schematic diagram of an execution instance message queue provided by an embodiment of the present application.
  • Figure 9 is a schematic diagram of a functional block instance queue provided by an embodiment of the present application.
  • Figure 10 is a schematic diagram of the global variable data structure of the memory during workflow execution provided by the embodiment of the present application.
  • Figure 11 is a schematic diagram of an index determination scenario provided by an embodiment of the present application.
  • Figure 12 is a schematic diagram of an index determination scenario provided by an embodiment of the present application.
  • Figure 13 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • Figure 14a is a schematic flow diagram of an overall workflow execution implementation that supports looping provided by the embodiment of the present application.
  • Figure 14a is a schematic diagram of the overall flow of another workflow execution that supports looping provided by the embodiment of the present application.
  • Figure 15 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • Figure 16 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • Figure 17 is a schematic structural diagram of another data processing device provided by an embodiment of the present application.
  • Figure 18 is a schematic structural diagram of another computer device provided by an embodiment of the present application.
  • App refers to an application module that encapsulates some commonly used functions or interface services. It can also be called a functional code block.
  • An App can be regarded as an atomic task, which is the most basic execution unit in the workflow.
  • App instance An App can be executed multiple times, and each execution (with different parameters) will generate an instance. This instance is the App instance, which can also be called a function block instance. App instance is a specific instantiation of App. The difference between the two is that App is a template and uses default parameters, while App instance uses an App template and uses specific parameters. The relationship between the two is similar to that in object-oriented programming. classes and objects.
  • For loop start App It can be called the loop start function code block. This App indicates that the process begins to enter a For loop body. This App can set the number of loops.
  • For loop end App It can be called the loop end function code block.
  • This App represents the end position of the loop body, that is, the range of the For loop body is the For loop start App to the For loop end App. After entering the For loop end App, The loop body will end when the number of loops is met.
  • Trigger It is the starting App that triggers the running of workflow, including: timer, WebHook (webpage callback), etc.
  • Credentials Mainly refers to some important parameter information, including account password, token, key and other information. Different apps may correspond to different credential parameters.
  • Workflow represents the actual business model in the form of a flow chart, and completes specific work scenarios in an automated manner.
  • the workflow engine is the routing controller for the process.
  • a process corresponds to an actual business flow, and the execution route of the process is controlled by the current App instance data.
  • the flow rules of the process are specified when the process is defined. one Generally, these flow rules are determined based on the variable expression of the current data of the App instance.
  • the task of the workflow engine is to parse these variable expressions based on the context of process execution and find out the next execution direction of the process.
  • Workflow definition language refers to the grammatical specifications used when designing workflows. This article defines workflows in a simple and universal way using Json (a language).
  • Path syntax expression The input or output data of each App instance in the workflow can be indexed through a path in the form of ⁇ AppInstId.data.0.name ⁇ , thereby realizing dynamic parsing and reference of data at runtime.
  • Execution task refers to a specific workflow instance, which can also be called an execution instance.
  • a specific execution task will be generated.
  • the workflow will obtain execution tasks with different results based on different input parameters.
  • Message Queue It is a first-in-first-out data structure.
  • Figure 1 is a schematic diagram of a network architecture provided by an embodiment of the present application.
  • the network architecture may include a business server 100 and a terminal device cluster.
  • the terminal device cluster may include multiple terminal devices. As shown in Figure 1, it may specifically include a terminal device 10a, a terminal device 10b, a terminal device Devices 10c,..., terminal devices 10n.
  • terminal equipment 10a, terminal equipment 10b, terminal equipment 10c,..., terminal equipment 10n can communicate with the above-mentioned business server 100 through the network respectively, so that each terminal equipment can communicate with the business server 100 through the network. Interaction, so that each terminal device can receive service data from the above-mentioned service server 100.
  • each terminal device in the terminal cluster shown in Figure 1 can be installed with an application client.
  • the application client can be a programming application, a game application, a video editing application, a social networking application, an instant messaging application, a live broadcast application, a short video application, a video application, a music application, a shopping application, a novel application, a payment application, a browser, etc.
  • the application client may be an independent client or an embedded sub-client integrated in a certain client (such as a social client, a game client, etc.), which is not limited here.
  • any terminal device in the terminal device cluster can display the workflow editing page by running the application client.
  • the application client running on the terminal device 10a can display the workflow editing page through the terminal device 10a.
  • a function block control corresponds to a function code block.
  • the terminal device 10a determines the pointing relationship between the corresponding function code blocks based on the connection relationship between the function block controls in the workflow control tree, thereby generating the target workflow.
  • the terminal device 10a will send the target workflow to the business server 100, and the business server 100 will store the target workflow, and then execute the target workflow when receiving a trigger request for the target workflow.
  • the business server 100 after receiving the trigger request for the target workflow, the business server 100 will create an execution instance corresponding to the target workflow.
  • the execution instance includes a pointer between at least two functional code blocks contained in the target workflow. relationship, wherein at least two function code blocks may include a loop start function code block and a loop end function code block.
  • the business server 100 When the business server 100 creates a loop start function block instance corresponding to the loop start function code block, it will push the loop start function block instance to the function block instance queue.
  • the loop start function block instance in the function block instance queue When the execution is successful, the business server 100 will obtain the loop parameters corresponding to the loop starting function code block. It should be noted that the function block instances in the function block instance queue will be executed sequentially.
  • the business server 100 will determine the function code block between the loop start function code block and the loop end function code block based on the above pointing relationship as the loop function code block, and then execute the loop according to the loop parameters, function block instance queue and pointing relationship.
  • Loop function code block In short, the loop start function code block and the loop end function code block jointly provide loop functions for the target workflow. Function code blocks that need to be executed multiple times only need to be located between the loop start function code block and the loop end function code block. time. For objects (such as users), just drag the function block control corresponding to the function code block that needs to be executed multiple times to the loop. Just connect the loop start function block control corresponding to the start function code block and the loop end function block control corresponding to the loop end function code block. The user does not need to have additional programming experience to achieve work with loop functions. Stream creation.
  • the network connection between the above-mentioned business server 100 and each terminal device in the terminal device cluster is not limited to a connection method, and can be directly or indirectly connected through wired communication, or directly or indirectly through wireless communication.
  • ground connection, and other connection methods which are not limited in this application.
  • the data processing method provided by the embodiment of the present application can be executed by computer equipment, including but not limited to the above-mentioned business server 100 and terminal equipment.
  • the above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, Cloud servers for basic cloud computing services such as middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
  • the above-mentioned terminals may be smartphones, tablet computers, notebook computers, desktop computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, etc., but are not limited thereto.
  • Embodiments of this application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
  • the terminal device 20 shown in Figures 2a-2b can be any terminal device in the terminal device cluster shown in Figure 1, such as a terminal.
  • the device 20a may be the terminal device 10a; the service server 200 shown in Figures 2a-2b may be the service server 100 shown in Figure 1 above.
  • Figure 2a is a schematic diagram of a scenario for creating a target workflow provided by an embodiment of the present application.
  • an application client 21 is integrated and installed in the terminal device 20.
  • the application client 21 can be used to provide workflow design functions for use objects (such as users).
  • object of use of the terminal device 20 is Object A.
  • Object A does not have programming experience, but wants to design a business model with the business functions it needs. It can apply the workflow design function provided by the client 21 and use visualization. Use drag-and-drop programming to design the target workflow, and then trigger the target workflow to achieve the corresponding business functions.
  • the workflow editing page 22 may include a control selection area 221 and a canvas area 222 .
  • Function block controls are displayed in the control selection area 221.
  • One function block control corresponds to a function code block and can implement a specific function.
  • the control selection area 221 can display the system's built-in default function block control, or can display the function block control customized by the object.
  • the types of function block controls can be mainly divided into three categories.
  • One is the trigger function block control, which corresponds to the trigger function code block.
  • the trigger function code block is mainly the starting function code block of the workflow. Different trigger functions Code blocks can implement different triggering methods of workflow; the second is the business function block control, which corresponds to the business function code block, which is a functional code block that encapsulates common business operations; the third is the logical function block control, which Corresponding to the logical function code block, the logical function code block mainly involves the process relationship of the workflow, for example, between the loop start function code block corresponding to the loop start function block control and the loop end function code block corresponding to the loop end function block control The function code block needs to be executed in a loop.
  • the canvas area 222 is an area used to support the object A design workflow control tree.
  • Object A can select a function block control from the control selection area 221, then drag the selected function block control into the canvas area 222, and connect it with other function block controls to obtain the workflow control tree 223.
  • the workflow control tree 223 designed by object A can sequentially include the trigger function block control A, the loop start function block control, and the business function block control according to the connection relationship. Service function block control B, business function block control A and loop end function block control.
  • the execution number of the function code block corresponding to the function block control is 1, but the function code block corresponding to the function block control located between the loop starting function block control and the loop ending function block control needs to be looped Execution, the number of loops is determined by the loop parameters corresponding to the loop start function block control.
  • object A can perform a trigger operation on the functional code block control in the canvas area 222, and then enter the editing text box corresponding to the functional code block control for editing.
  • the terminal device 20 can display the loop edit text box 224, and then the object A can set loop parameters in the loop edit text box 224, and the terminal device 20 responds to the object A Regarding the input parameters of the loop editing text box 225, it is determined that the loop parameter of the loop start function block control is 5.
  • a trigger operation can be performed on the creation control 225 displayed in the canvas area 222 to realize the creation operation for the workflow control tree 223, and the terminal device can respond to the creation operation for the workflow
  • the creation operation of the control tree 223 creates the target workflow 23, and then sends the target workflow 23 to the workflow engine, where the workflow engine refers to the engine system used to execute the workflow, and can be deployed in the business server 200, That is to say, the terminal device 20 will send the generated target workflow 23 to the business server 200, and the business server 200 will store the target workflow 23 accordingly.
  • the functional code block may also need to use credential information (i.e. account password and other information) during the running process.
  • credential information i.e. account password and other information
  • the database operation function code block needs to use the account password and other credential information related to the database.
  • the application client 21 also has a credential management function, that is, creating and saving credential information that can be used by objects.
  • object A needs to use credential information, it needs to perform a credential management operation before creating the target workflow.
  • the terminal device will display the credential creation page in response to the credential management operation.
  • Object A can use the credential creation page.
  • the terminal device will save the credential information created by object A.
  • the specific creation process can be determined according to the actual situation, and this application is not limited here.
  • Figure 2b is a schematic diagram of a target workflow execution scenario provided by an embodiment of the present application.
  • object A performs a triggering operation on the target workflow through the triggering method corresponding to the triggering function code block A.
  • the terminal device 20 responds to the triggering operation and generates a triggering request 24.
  • the terminal device 20 sends the triggering request 24 to
  • the business server 200 will create an execution instance 25 corresponding to the target workflow 23 according to the trigger request 24 .
  • the target workflow 23 may sequentially include a trigger function code block A, a cycle starting function code block, a business function code block B, a business function code block A, and a cycle ending function code block.
  • the target workflow 23 includes The function code block corresponds to the function block control shown in Figure 2a above.
  • the execution instance 25 is a specific implementation task of the target workflow 23. Different execution instances of the target workflow 23 correspond to different parameters, and the obtained execution results may be different.
  • the business server 200 will determine the pointing relationship between the function code blocks based on the execution instance 25, and then start from the first function code block, that is, the trigger function code block A, create and execute the trigger function block instance corresponding to the trigger function code block A. .
  • the process of creating and executing the trigger function block instance may be that the business server 200 first creates a trigger function block instance corresponding to the trigger function code block A, and then pushes it into the function block instance queue to wait for execution. Among them, the function block instances in the function block instance queue will be taken out sequentially and then executed. When the business server 200 takes out the trigger function block instance from the function block instance queue, it will execute the trigger function block instance.
  • the business server 200 After the execution is completed, the business server 200 will determine the next function code block pointed to by the trigger function code block A according to the pointing relationship. (i.e., the loop starts the function code block), and then continues to create and execute the function block instance corresponding to the next function code block. When the business server 200 creates and executes the loop start function block instance corresponding to the loop start function code block, it will obtain the loop parameters corresponding to the loop start function block instance.
  • object A passes The loop parameters entered in the loop editing text box corresponding to the loop start function block control, and then, for the loop start function code block and loop end function
  • the function code block between the function code blocks that is, the business function code block B and the business function code block A
  • the business server 200 needs to loop after creating and executing business function block instance B for the first time and creating and executing business function block instance A for the second time, and then creates and executes it for the second time.
  • Business function block instance B creates and executes business function block instance A, and then continues the loop until the fifth time business function block instance B is created and executed, business function block instance A is created and executed, and then the business server 200 executes the loop end function. Block instance.
  • the loop end function block instance is created after the first execution of the business function block instance A, that is, after the business server 200 executes the business function block instance A, it creates the business function code block A pointing to according to the pointing relationship.
  • the business server 200 will temporarily cache the loop end function Block instance to perform the above loop process.
  • the business server 200 will create an execution instance table 26 corresponding to the execution instance 25.
  • the execution instance table 26 is used to record the execution status of the execution instance 25.
  • the business server 200 can execute The instance table 26 is sent to the terminal device 20, and the object A can query the execution results corresponding to each function code block based on the execution instance table 26.
  • the loop execution of the function code block can be realized by relying on the loop start function code block and the loop end function code block.
  • the object does not need to have additional programming experience, which improves the workflow engine. ease of use and feasibility.
  • Figure 3 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • the method may be executed by a computer device, where the computer device may be the business server 100 shown in FIG. 1 , or any terminal device in the terminal device cluster shown in FIG. 1 , such as the terminal device 10c.
  • the following will take the example of the method being executed by a computer device as an example.
  • the data processing method may at least include the following steps S101 to S104:
  • Step S101 Create an execution instance corresponding to the target workflow; the execution instance includes a pointing relationship between at least two functional code blocks included in the target workflow; the at least two functional code blocks include a loop starting function code Block and loop end function code blocks.
  • workflow refers to a business model that contains at least two functional code blocks, which can be understood as a process with business functions.
  • a functional code block can be called a node of the workflow, and there is a pointing relationship between at least two functional code blocks.
  • the workflow can be expressed as node A ⁇ node B ⁇ node C, where node A, node B , Node C respectively represent a functional code block. Node A points to node B, and node B points to node C.
  • the computer device executes the workflow, it will execute node A first, then node B, and finally node C.
  • the starting function code block in the workflow is usually the trigger function code block, which can also be called a trigger APP.
  • the trigger function code block which can also be called a trigger APP.
  • Different trigger APPs can trigger the workflow to run in different ways. There are three types of triggers. See Table 1 below:
  • the computer device can receive a trigger request for the target workflow, and respond to the trigger request to create an execution instance corresponding to the target workflow. Because the triggering methods are different, the types of trigger requests received by the computer device are different.
  • the trigger request is a web page callback trigger request
  • the above-mentioned specific implementation process of receiving the trigger request for the target workflow and creating an execution instance corresponding to the target workflow can be: receiving the web page callback trigger request for the target workflow, from the web page Obtain the target token from the callback trigger request; obtain the target workflow in the workflow repository based on the target token; create an execution instance corresponding to the target workflow based on the request parameters included in the web page callback trigger request.
  • the web page callback triggering request can be an HTTP (HyperText Transfer Protocol) request.
  • HTTP HyperText Transfer Protocol
  • the computer device can create and assign a unique Token (token) to the target workflow to form a unique WebHook URL request address.
  • Each WebHook URL corresponds to a workflow.
  • POST a request method
  • the workflow engine API Application Programming Interface, application programming interface
  • the workflow engine API installed in the computer device will receive an HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol) request , and obtain the corresponding workflow execution.
  • Figure 4 is a flow chart of web page callback trigger request processing according to an embodiment of the present application. As shown in Figure 4, the process of request processing triggered by the web page callback mainly includes the following steps:
  • Step S41 The computer device receives a web page callback trigger request.
  • the computer device receives a webpage callback triggering request for the target workflow.
  • the webpage callback triggering request is the HTTP request sent to the computer device when the above-mentioned POST request is made to the URL address corresponding to the workflow.
  • Step S42 obtain the token.
  • the computer device obtains the target token from the web page callback triggering request.
  • the webpage callback triggering request carries the Token.
  • the computer device parses the webpage callback triggering request and can obtain the Token.
  • Step S43 Find the corresponding workflow.
  • the computer device can obtain the target workflow in the workflow repository according to the target token.
  • the workflow repository is used to store workflows.
  • a Token will be bound to a unique workflow, so just get the workflow bound to the Token.
  • Step S44 Confirm whether to enable the workflow.
  • step S45 is executed; if the workflow fails to be enabled, step S49 is executed.
  • Step S45 Obtain request parameters.
  • Step S46 Construct execution records.
  • execution record (execution) table is created, which can record information such as process relationships and execution time of the workflow.
  • Step S47 The computer device asynchronously initiates execution of the workflow.
  • the computer device can create an execution instance corresponding to the target workflow according to the request parameters included in the web page callback trigger request, and then execute the execution instance.
  • Step S48 The computer device generates an execution identifier and ends the process.
  • an execution instance can be identified by a unique execution identifier, and the computer device can first return the execution identifier to the terminal device, and then the terminal device can query the execution result of the execution instance through the execution identifier.
  • the process of web page callback triggering request triggering workflow ends.
  • Step S49 An error message is reported and the process ends.
  • the computer device will return the error prompt to the terminal device.
  • a specific implementation process of receiving the trigger request for the target workflow and creating an execution instance corresponding to the target workflow may be: obtaining the instruction request sent by the first object through the callback address , decrypt the instruction request to obtain the trigger instruction and trigger parameters; obtain the target workflow according to the trigger instruction, and verify the trigger permission of the first object according to the trigger parameters; if the trigger permission of the first object is a qualified permission, create the corresponding target workflow execution instance.
  • the instruction request may refer to a request generated by sending a trigger instruction to the target account.
  • the starting node of the target workflow is an instruction trigger
  • the target application may be an application with an instant conversation function.
  • the triggering instruction can be created by the object itself, and the triggering of a workflow corresponds to a unique triggering instruction.
  • FIG. 5 is a schematic flowchart of target application instruction execution provided by an embodiment of the present application.
  • the target application is an application with instant conversation function and can be integrated and installed in the terminal device.
  • the process of executing the target application instruction mainly includes the following steps:
  • Step S51 The computer device configures the target account and callback address.
  • a workflow engine can be integrated and installed in the computer device, and API services corresponding to the workflow engine can also be provided.
  • the computer device can configure the target account and callback address through the API service corresponding to the workflow engine.
  • the target account is used to receive instructions sent by the terminal device, and the callback address points to the callback API of the workflow engine, which can call the API service of the workflow engine.
  • Step S52 The computer device registers the configured target account and callback address in the target application.
  • all subsequent target accounts logged into the target application on the terminal device can send messages to the target account, and all messages received by the target account will be forwarded to the callback through the callback address in the target application. API.
  • Step S53 Terminal device creation instruction.
  • the terminal device can create trigger instructions.
  • the name of each trigger instruction is unique and corresponds to the current workflow one-to-one.
  • the terminal device can authorize instructions to the object account of a specific object, and only the object account with permission can view the instructions and execute the instructions.
  • the target account logged in to the target application in the terminal device can send a system query command to the target account to check whether it has the permission to use the command.
  • Step S54 The terminal device sends the instruction to the computer device, and the computer device records the instruction and associates it with the corresponding workflow.
  • the computer device will record the trigger instructions created by the terminal device and associate the corresponding workflow.
  • Step S55 The terminal device initiates a message carrying the instruction to the target account.
  • the first object can initiate a message carrying the instruction to the target account.
  • Step S56 After receiving the message through the target account, the target application encrypts and signs the message, obtains the encrypted message, and sends the encrypted message to the computer device.
  • Step S57 The computer device receives the encrypted message sent by the target application through the callback address.
  • Step S58 The computer device decrypts the encrypted message and obtains instructions and parameters.
  • the computer device decrypts the encrypted message in the instruction request to obtain the instruction (i.e., triggering instruction) and parameters (i.e., triggering parameters).
  • the first object is the object who logs in to the object account.
  • Step S59 The computer device obtains the workflow associated with the instruction.
  • the computer device can obtain the target workflow according to the instruction (that is, the triggering instruction), that is, the workflow associated with the triggering instruction.
  • Step S510 The computer device determines whether the first object has instruction authority.
  • the computer device can verify the trigger authority of the first object according to the trigger parameter, that is, determine whether the account of the object that sent the message has the instruction authority. If the trigger authority is a qualified authority, it means that the first object has the instruction authority and can trigger the target workflow, so step S512 is executed; if it does not have the instruction authority, step S511 is executed.
  • Step S511 The computer device sends a no-permission prompt to the terminal device.
  • Step S512 The computer device creates an execution instance corresponding to the workflow.
  • Step S513 The computer device executes the execution instance and obtains the execution result.
  • Step S514 The computer device returns the execution result to the terminal device.
  • a specific implementation process of receiving a trigger request for the target workflow and creating an execution instance corresponding to the target workflow may be: receiving a timer trigger for the target workflow Request, obtain the specified execution time from the timer trigger request; when the system time is the same as the specified execution time, create an execution instance corresponding to the target workflow.
  • the timer trigger request may refer to a request generated by a Cron periodic task trigger.
  • Cron triggers use the syntax of linux crontab (a programming language). After the specified time is reached, an execution instance corresponding to the target workflow will be created.
  • Step S102 Obtain the loop parameters corresponding to the loop starting function code block.
  • the computer device will first obtain the first function code block (usually the above-mentioned triggering function code block), and create a starting function block corresponding to the first function code block. instance, push the starting function block instance to the function block instance queue; it should be understood that the first function code block is usually not the loop starting function code block.
  • the function block instance queue is used to store function block instances waiting to be executed.
  • the computer device will sequentially execute the function block instances in the function block instance queue.
  • the execution order usually adopts the first-in, first-out principle.
  • the computer device can determine the function code block list pointed to by the first function code block based on the pointing relationship, and the function code block list contains the first function code block. One or more function code blocks pointed to by each function code block. At this time, the computer device will sequentially create function block instances corresponding to one or more function code blocks, and then push them to the function block instance queue to wait for execution.
  • the computer device will determine whether the function code block corresponding to the function block instance is a loop starting function code block. If the function block instance If the corresponding function code block is not the loop starting function code block, the computer device will continue to query the function code block list pointed to by the function code block corresponding to the function block instance based on the pointing relationship. If the function code block list pointed to is queried, , continue to create function block instances corresponding to the function code blocks included in the function code block list, and then continue to The created function block example is pushed to the function block instance queue waiting for execution.
  • the target workflow is node A ⁇ node B ⁇ node C ⁇ ...
  • node A corresponds to the first function code block in the workflow
  • the function block instance corresponding to node A is taken out from the function block instance queue.
  • the computer device After execution, the computer device will create a function block instance corresponding to node B. Assuming that node B corresponds to a business function code block, the computer device will push the function block instance corresponding to node B to the function block instance queue to wait for execution. After waiting for the function block instance corresponding to node B to be taken out from the function block instance queue for execution, the computer device will continue to create the function block instance corresponding to node C, and so on.
  • the computer device when the computer device creates a loop start function block instance corresponding to the loop start function code block, the computer device will still push the loop start function block instance to the function block instance queue.
  • the loop start function block instance When the loop start function block instance is in the function block instance queue, When the loop start function block instance is successfully executed, the computer device will first obtain the loop parameters corresponding to the loop start function code block.
  • the loop parameters are the number of For loop traversals, which are used to represent the following loop function code blocks that need to be executed cyclically. frequency.
  • Step S103 According to the pointing relationship, the function code block between the loop start function code block and the loop end function code block is determined as a loop function code block.
  • the number of loop function code blocks can be one or more. Assume that node S corresponds to the loop start function code block, node E corresponds to the loop end function code block, and node D and node F respectively correspond to a business function code block. In the target workflow, node S ⁇ node D ⁇ node F ⁇ node E, then the business function code blocks corresponding to node D and node F are cyclic function code blocks and need to be executed in a loop.
  • Step S104 execute the loop function code block cyclically according to the loop parameter and the pointing relationship.
  • the computer device can cyclically execute the above-mentioned loop function code block according to the loop parameter, the function block examples included in the function block instance queue, and the pointing relationship.
  • the computer device will perform N rounds of iterative execution of the loop function code block based on the function block instance queue and pointing relationship.
  • the computer device may first determine the to-be-executed function code block list pointed to by the loop starting function code block based on the pointing relationship. k is a positive integer less than or equal to N.
  • Figure 6 is a schematic diagram of a workflow orientation relationship provided by an embodiment of the present application. Assume that node s corresponds to the loop start function code block, node e corresponds to the loop end function code block, node a, node b, node c and node d each correspond to a business function code block, because node a, node b, node c and node d is located between node s and node e, so the business function code blocks corresponding to node a, node b, node c, and node d are cyclic function code blocks.
  • node s points to node a and node b, that is, the list of function code blocks to be executed that node s points to will contain node a and node b.
  • the loop function code block forms 2 branches, namely [node a, node c] and [node b, node d]. It can be understood that the execution processes of node a and node b do not affect each other. Correspondingly, the execution processes of the two branches do not affect each other. Therefore, during each round of iterative execution, the execution of the two branches can be performed simultaneously.
  • the computer device can directly create together the to-be-executed function block instances corresponding to the function code blocks included in the above-mentioned to-be-executed function code block list, that is, to jointly create the to-be-executed function block instances corresponding to the node a and the node b, and then They are pushed sequentially to the function block instance queue.
  • the computer device executes a target to-be-executed function block instance corresponding to the target to-be-executed function code block in the function block instance queue, where the target to-be-executed function code block is a function code block in the to-be-executed function code block list. If the list of function code blocks to be executed at this time does not include the loop end function code block, then when the target function block instance to be executed in the function block instance queue is successfully executed, the computer device will continue to determine the target function code block to be executed based on the pointing relationship. The new list of function code blocks to be executed pointed to until it is determined that the k-th round of iterative execution of the loop function code block is completed. If k is less than N, the computer device will continue to execute the k+1 iteration of the loop function code block.
  • the computer device will create a function block instance corresponding to node c, and then push it to the function block instance queue. After the computer device obtains and executes the function block instance corresponding to node c from the function block instance queue, the computer device will then determine the node based on the pointing relationship. The list of function code blocks pointed to by c, and so on. In this way, all nodes included in the branch starting from node a will be executed. In the same way, the nodes included in the branch starting from node b will also be executed. Therefore, during the k-th round of iterative execution, all loop function code blocks will be executed according to the pointing relationship until the k-th round of iterative execution is completed.
  • the new to-be-executed function code block list contains the loop end function code block
  • query the loop end function block instance queue If the loop end function block instance queue is an empty queue, create a loop end function code block corresponding to the loop end function block instance queue. Loop end function block instance, push the loop end function block instance to the loop end function block instance queue; if the loop end function block instance queue is not an empty queue, the computer device can no longer create the loop end corresponding to the loop end function code block Function block instance.
  • the loop function code block may contain multiple branches, and the end nodes of these branches ultimately point to the loop end function code block.
  • the computer device determines that a to-be-executed function code block list contains a loop end function code block, it can only mean that the current branch of the loop function code block has been completed in this round of iterative execution.
  • the computer device because there is no loop execution, the computer device only needs to create its corresponding loop end function code block instance once. However, the End of Loop function code block instance should be executed after the End of Loop function code block loop execution has completed.
  • the computer device when the computer device determines that a to-be-executed function code block list contains a loop end function code block, the computer device will query the loop end function block instance queue, where the loop end function block instance queue is used to temporarily store loop execution.
  • the loop end function code block instance created during the process if the computer device queries that the loop end function block instance queue is an empty queue, it means that the computer device has not created the loop end function code block instance corresponding to the loop end function code block.
  • the computer The device will create an instance of the loop end function code block and push it to the loop end function block instance queue; if the computer device queries that the loop end function block instance queue is not an empty queue, it means that the computer device has already created the loop end function code.
  • the block corresponds to the loop end function code block instance.
  • the function block instance is pushed to the loop end function block instance queue for temporary storage; if there is already a loop end function block instance stored in the loop end function block instance queue, the computer device does not need to create a loop end function block instance corresponding to node e. At this point, the computer device can determine the end of execution of the branch [node a, node c] in this round of iterative execution.
  • the computer device finishes executing a certain node, if it determines that the next node pointed by the node is the loop end function code block , it can be determined that in this round of iterative execution, the branch execution with this node as the end node is completed, but it cannot be directly determined that the current round of iterative execution of the loop function code block is completed.
  • the computer device may determine whether the k-th round of iterative execution is completed by detecting execution data of the execution instance.
  • the execution data can include the number of queue instances and the number of instance executions. See Table 2 below:
  • the computer device can first initialize the number of queue instances as the first default parameter, and initialize the number of execution instances as the second default parameter.
  • the first default parameter and the second default parameter may be the same or different.
  • the first default parameter and the second default parameter may both be set to 0.
  • the computer device will accumulate or decrement the number of queue instances according to the execution status of the function block instance associated with the execution instance, and accumulate or decrement the number of instance executions; if the computer device detects that the number of queue instances is equal to the first default parameter, the number of instance executions is equal to the second default parameter, then it is determined that the execution data of the detected execution instance satisfies the execution end condition.
  • node c and node d are executed, because the node e pointed to is the loop end function code block, when the computer device obtains the loop end function code block, it will only create it for the first time. If the corresponding loop end function block instance is obtained, then the corresponding loop end function block instance will not be created, and the created loop end function block instance will not be pushed to the function block instance queue, but will be pushed to the function block instance queue. It is pushed to the function block instance queue at the end of the cycle and stored temporarily. Therefore, when node c and node d are executed, the number of queue instances will decrease to 0, and the number of instance executions will decrease to 0. Therefore, when it is detected that the execution data of the execution instance satisfies the execution end condition, it can be determined that the execution of this round of iteration is completed.
  • the function block instance associated with the execution instance includes the target function block instance.
  • the number of queue instances is accumulated or decremented, and the number of instance executions is accumulated or decremented.
  • a feasible implementation process of decrement processing can be: when the target function block instance is pushed to the function block instance queue, the queue instance data is subjected to default accumulation processing; when the target function block in the function block instance queue is executed When creating an instance, the number of instance executions is accumulated by default, and the number of queue instances is decremented by default.
  • the computer device can determine the creation of the new target function block instance; if the new target function block instance is successfully created, and the function code block corresponding to the new target function block instance is the end of the cycle function code block, the number of instance executions will be decremented by default; if the new target function block instance is created successfully, and the function code block corresponding to the new target function block instance is not a loop end function code block, then in the new target function block After the block instance is pushed to the function block instance queue, the number of queue instances is accumulated according to the number of new target function block instances, and the number of instance executions is decremented by default; if the creation of the new target function block instance fails, the instance The number of executions is decremented by default.
  • the new target function block instance refers to the function block instance corresponding to the function code block pointed to by the target function code block corresponding to the target function block instance.
  • the default accumulation processing refers to adding one on the basis of the target data.
  • the default accumulation processing for the number of queue instances means adding one to the number of queue instances to obtain the new number of queue instances; the number of instance executions Performing default accumulation processing means adding one to the number of instance executions to obtain a new number of instance executions; similarly, default decrement processing means subtracting one from the target data.
  • the number of queue instances is accumulated according to the number of new target function block instances, that is, the number of queue instances is added to the number of new target function block instances to obtain the new number of queue instances.
  • the number of instance executions and the number of queue instances is initially initialized to 0, and then after the computer device starts executing the instance, the number of instance executions and the number of queue instances will be accumulated or decremented according to the execution status of the target function block instance. As long as the target When the execution of the function block instance is completed, a new target function block instance is created and the new target function block instance is not a cycle ending function block instance. The computer device will queue based on the new target function block instance. If the number of column instances is accumulated, the number of instance executions and the number of queue instances will not decrease to 0 at the same time. At this time, the execution data of the execution instances will not meet the execution end condition.
  • the computer device Only when the execution of the target function block instance is completed, and the computer device does not create a new target function block instance or the new target function block instance it creates is a loop end function block instance, the computer device will only perform a default decrement process on the number of instance executions. At this time, if the number of queue instances is 0 and the number of instance executions is also decremented to 0, the execution data of the execution instances will satisfy the execution end condition.
  • the computer device can determine the k-th round of iterative execution for the loop function code block based on whether the execution data meets the execution end condition. Completed or not.
  • the loop execution of the loop function code block by the computer device ends, but the execution of at least two function code blocks has not yet ended.
  • the computer equipment needs to push the loop end function block instance in the loop end function block instance queue to the function block instance queue and continue to detect new execution data of the execution instance; if the new execution data is detected to meet the execution end condition, and the loop ends If the function block instance queue is an empty queue, it is determined that at least two function code blocks have been executed.
  • the function code blocks located after the loop end function code block among at least two function code blocks are all executed, no new function block instances are created, and the new execution data will also satisfy the execution end condition.
  • the loop end function block instance queue will inevitably temporarily store a new loop end function block instance. Therefore, the computer only needs to determine that the loop end function block instance queue is an empty queue.
  • the function code blocks located after the loop-ending function code block among at least two function code blocks have all been executed, and the function code blocks located before the loop-ending function code block among at least two function code blocks have also been executed, so the computer device can Make sure at least two function code blocks are executed to completion.
  • FIG. 7 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • the method may be executed by a computer device, where the computer device may be the business server 100 shown in FIG. 1 , or any terminal device in the terminal device cluster shown in FIG. 1 , such as the terminal device 10c.
  • the following will take the example of the method being executed by a computer device as an example.
  • the data processing method may at least include the following steps S201 to S205:
  • Step S201 Receive a trigger request for a target workflow, and create an execution instance corresponding to the target workflow.
  • step S201 for the execution process of step S201, reference can be made to the description of the above step S101, which will not be described again here.
  • Step S202 While creating an execution instance corresponding to the target workflow, create an execution instance table corresponding to the execution instance; the execution instance table is used to record the execution status of the execution instance.
  • the execution instance can be represented as execution, and the execution instance table is the execution table.
  • the execution table is used to record the process relationship, execution time and other information of the target workflow. Its table structure is shown in Table 3 below:
  • the apps field which records the process structure of the target workflow.
  • the process structure contains the pointing relationship between at least two functional code blocks corresponding to the target workflow.
  • the computer device traverses and executes at least two functional code blocks according to the pointing relationship contained in its process structure.
  • a process data structure of the target workflow saved in the apps recorded in Table 3 can refer to the following Table 4:
  • each App has a unique InstId, and the computer device can locate and identify the App in the process through the InstId. After the computer device creates the execution table, it will be stored in the database. At the same time, the computer device will push the above execution instance ID to the execution message queue, and then wait for consumption and execution by the distributed workflow engine cluster.
  • Figure 8 is a schematic diagram of an execution example message queue provided by an embodiment of the present application.
  • the computer device will first push it to the execution instance message queue 800, and the execution instance 81 will be located at the end of the execution instance message queue 800.
  • the computer device can consume execution instances in the execution instance message queue 800 through the workflow engine cluster 801.
  • the workflow engine cluster 801 can include multiple containers, and the containers are independent of each other, that is, different containers execute different execution instances. The processes will not affect each other. Whenever the computer device detects that the workflow engine cluster meets the instance execution conditions, the computer device obtains the execution instance from the head of the execution instance message queue and then transfers it to the target container for execution.
  • the fact that the workflow engine cluster meets the instance execution conditions may mean that the workflow engine cluster has idle containers. For example, as shown in Figure 8, assuming that the computer device detects that container 1 is idle, the computer device will obtain the execution instance 82 from the head of the execution instance message queue 800, and then transfer it to container 1 for execution.
  • Step S203 sequentially obtain the first function block instance associated with the execution instance in the function block instance queue as the function block instance to be processed; the function block instance to be processed corresponds to the function block instance identifier to be processed and the function block instance to be processed.
  • Processing function block instance index; the to-be-processed function block instance identifier and the to-be-processed function block instance index are generated when the to-be-processed function block instance is created according to the to-be-processed function code block; the target function block instance index is used to characterize The number of executions of the function code block to be processed; the function code block to be processed belongs to the at least two function code blocks.
  • the computer device After the computer device obtains the execution instance corresponding to the target workflow through the workflow execution engine cluster, it will initialize the status of each functional code block in the execution instance to pending, and then obtain the starting point in the target workflow based on the pointing relationship.
  • the node that is, the trigger App (triggering function code block)
  • creates a trigger App instance and pushes the trigger App instance to the App instance queue (that is, the function block instance queue) to wait for execution.
  • the App instance corresponding to each App created by the computer device will be pushed to the App instance queue.
  • Figure 9 is a schematic diagram of a functional block instance queue provided by an embodiment of the present application.
  • the App instance queue 900 has the same structure as the above-mentioned execution message queue 800.
  • a newly created App instance for example, App instance 91 will be pushed to the end of the App instance queue 900.
  • the computer device consumes an App instance through the workflow engine cluster 901, it will obtain the App instance at the head of the App instance queue, that is, the App instance 92.
  • an optional element format of the App instance queue can be: appInst#executionId#appInstId#index, that is, app instance/execution record id/app instance id/index. Based on this optional element format, the App is consumed on the computer device After the instance, you can locate the specific execution instance and the execution data of a certain App.
  • the App instance has a Parameters array (input parameters), whose structure is ⁇ parameter key, parameter value, parameter type, parameter description>.
  • parameter types include: string (string), boolean (Boolean), number (number), etc.
  • the value in the parameter can either use a constant (number or string), or use a path syntax expression to refer to the output result of any previous app instance.
  • Step S204 Execute the function block instance to be processed to obtain the target execution result.
  • the to-be-processed function block instance can include a demand data acquisition path.
  • the computer device executes the to-be-processed function block instance to obtain a feasible implementation process of the target execution result, which can be: query the idle status of the computing resources of the execution engine container, determine the calculation
  • the execution engine container with the most idle resources is used as the target execution engine container;
  • the pending function block instance is transferred from the function block instance queue to the target execution engine container, and the demand data is obtained in the target execution engine container according to the demand data acquisition path. Execute the pending function block instance to obtain the target execution result.
  • the demand data acquisition path refers to the path syntax expression used in the Parameters array corresponding to the App instance. Because the runtime data of each App instance will be stored in the DB (database), after the computer device creates an execution instance, it will first load all the App instance execution data under the current execution execution instance into the memory to form an App Instance ID mapping map (map) global variable structure.
  • DB database
  • Figure 10 is a schematic diagram of a global variable data structure in memory during workflow execution provided by an embodiment of the present application.
  • the computer device can be located through the function block instance ID of the App instance, and globally obtains the input and output data of any App instance in the workflow, thereby expressing the path syntax used in the App instance parameters.
  • the formula is parsed and replaced with the corresponding data.
  • Step S205 Record the target execution result in the execution instance table according to the to-be-processed function block instance identifier and the to-be-processed function block instance index.
  • the computer device records the pending function corresponding to the target execution result in the execution instance table through the pending function block instance identifier.
  • a code block When a code block is enabled, it is also necessary to record which execution result corresponding to the function code block to be processed is the target execution result through the instance index of the function block to be processed.
  • the computer device when acquiring a function block instance to be processed, the computer device updates the status in the function block instance table corresponding to the function block instance to being processed, and sets the execution start time.
  • the function block instance table can be represented as an App instance table, which is used to record the execution status of a function code block.
  • Table 5 One possible structure of the function block instance table can be seen in Table 5 below:
  • multiple pieces of data can be created in the App instance table corresponding to the App.
  • the index field can uniquely confirm the result of a certain execution of the App.
  • the apps field in Table 5 stores data in a Json structure, which is used to record the execution results of the current App instance at a certain time, the pre- and post-Apps, input parameters, and runtime data information.
  • Table 6 One available format for the Apps field can be seen in Table 6 below:
  • the instance index of the function block to be processed is determined to be the default index; if the instance identifier of the function block to be processed is found in the execution instance table, the instance identifier of the function block to be processed is obtained.
  • the associated historical index with the latest recording time is accumulated and processed to obtain the function block instance index to be processed.
  • the computer device can obtain the historical index of the most recent execution of the function code block to be processed, and by adding one to the historical index, the instance identifier of the function block to be processed corresponding to the function block instance to be processed is obtained; however, if the function code block to be processed is If the code block has not been executed before, then set the pending function block instance identifier to the default index, which is 0.
  • the computer device when the computer device creates an instance of the function block to be processed, it also needs to update the MaxIndexCount in the instance table of the function block to be processed corresponding to the function code block to be processed. Similarly, the computer device can directly obtain the function block instance table from the function block to be processed. Obtain the MaxIndexCount of the most recent execution of the pending function code block, and then add one to the MaxIndexCount of the most recent execution to obtain the MaxIndexCount corresponding to this execution, and then write the MaxIndexCount update corresponding to this execution into the pending function. block instance table.
  • different parameter adjustment methods can also be used to determine index and MaxIndexCount. Assuming that the computer device has finished executing the current App, it needs to create a nextAppInst (next App instance) corresponding to the nextApp (next App) pointed to by the current App. First, the computer device can obtain the InstId corresponding to nextApp, query the App instance table corresponding to nextApp through this InstId, obtain the data of nextAppInst (including template type, parameters, location, etc.), and then construct the instance data corresponding to nextAppInst.
  • Figure 11 is a schematic diagram of an index determination scenario provided by an embodiment of the present application.
  • a ring means that the pointing relationship between functional code blocks can form a ring when conditions are met.
  • Function code block Y2 and function code block N2 in workflow 2 form a ring.
  • workflow 4 assume that the current App is function code block X4, and the nextApp it points to is function code block Y4.
  • nextAppInst.Index todoApp.Index, where todoApp.Index refers to the index of the current App.
  • Figure 12 is a schematic diagram of an index determination scenario provided by an embodiment of the present application.
  • the computer device determines the MaxIndexCount corresponding to nextAppInst: (1)
  • the current App is the function code block X1.
  • the nextApp it points to is the function code block Y1.
  • the current App is function code block Y2.
  • nextAppInst.MaxIndexCount idx+1; (3)
  • the current App is function code block Y3, and the nextApp it points to is function code block N3.
  • the current App is the loop start function code block 4.
  • the nextApp it points to is the function code block X4.
  • nextAppInst is an instance of the loop end function block, the computer device needs to reset its Index to 0 and MaxIndexCount to 1.
  • Figure 13 is a schematic flowchart of a data processing method provided by an embodiment of the present application.
  • the method may be executed by a computer device, where the computer device may be the business server 100 shown in FIG. 1 , or any terminal device in the terminal device cluster shown in FIG. 1 , such as the terminal device 10c.
  • the following will take the example of the method being executed by a computer device as an example.
  • the data processing method may at least include the following steps S301 to S305:
  • Step S301 In response to the creation operation of the target workflow, display the workflow editing page.
  • Step S302 In response to the selection connection operation for at least two function block controls, display a workflow control tree composed of the at least two function block controls on the workflow editing page; the at least two function block controls include Loop start function block control and loop end function block control.
  • Step S303 In response to a triggering operation for the loop start function block control in the workflow control tree, set loop parameters for the loop start function block control.
  • the computer device may display a loop editing text box in response to a triggering operation for the loop starting function block control in the workflow control tree, and respond to an input operation for the loop editing text box to create the loop starting function. Start function block control to set loop parameters.
  • Step S304 In response to the creation operation of the workflow control tree, create a target workflow, and send the target workflow to the workflow engine; the target workflow includes the corresponding functions of the at least two function block controls. code block; the pointing relationship between the at least two function code blocks is determined based on the connection relationship of the at least two function block controls; the at least two function code blocks include the loop start function block control corresponding to The loop start function code block and the loop end function code block corresponding to the loop end function block control.
  • Step S305 In response to the trigger operation for the target workflow, send a trigger request for the target workflow to the workflow engine.
  • Sending the trigger request for the target workflow to the workflow request allows the workflow engine to create an execution instance corresponding to the target workflow; furthermore, according to the loop parameters indicated by the loop starting function code block in the execution instance, And the pointing relationship in the execution instance indicates that the loop function code block between the loop start function code block and the loop end function code block is executed in a loop.
  • steps S301 to S305 can be referred to the scene diagram shown in FIG. 2a, and will not be described in detail here.
  • Figures 14a-14b are schematic flow diagrams of an overall workflow execution implementation that supports loops provided by embodiments of the present application. As can be seen from Figure 14a and Figure 14b, the overall process can be executed by a computer device and mainly includes the following steps:
  • Step S601 trigger workflow.
  • step S101 in the corresponding embodiment of Figure 3 above, which will not be described again here.
  • Step S602 Create an execution instance of the workflow.
  • the computer device will create an execution instance and an execution instance table. After the creation is completed, the computer device will first push the execution instance to the execution instance message queue to wait for execution, as shown in Figure 8 above.
  • Step S603 Obtain the execution instance.
  • the computer device will obtain execution instances from the execution instance message queue in order.
  • Step S604 parse the execution instance.
  • the computer device After obtaining the execution instance from the execution instance message queue, the computer device will first parse the execution instance.
  • steps S602 to S604 please refer to step S202 in the embodiment corresponding to FIG. 7 , which will not be described again here.
  • Step S605 Initialize the initial state of each functional code block and initialize the execution data of the execution instances (the number of queue instances and the number of instance executions).
  • Step S606 Obtain the starting function block instance and push it to the function block instance queue.
  • Step S607 Accumulate the number of queue instances.
  • the computer device will increase the number of queue instances by 1.
  • Step S608 Obtain the function block instance from the function block instance queue.
  • Step S609 Set the status of the function block instance to executing.
  • Step S610 Accumulate the number of instance executions and decrement the number of queue instances.
  • the computer device will increase the number of instance executions by 1 and the number of queue instances by +1.
  • step S104 According to the execution status of the function block instance associated with the execution instance, the number of queue instances is accumulated or decremented, and the number of instance executions is performed. The process of performing accumulation processing or decrement processing will not be described again here.
  • Step S611 Parse the path syntax expression in the function block instance and obtain the data to be executed.
  • the computer device can obtain the data required for execution of the function block instance according to the path syntax expression corresponding to the function block instance.
  • Step S612 Execute the function block instance according to the data to be executed, and obtain the execution result.
  • Step S613 The execution results are stored in the database.
  • the computer device can write the execution result into the database according to the index corresponding to the function block instance and the function block instance identifier.
  • steps S611 to S613 please refer to the description of step S203 and step S204 in the embodiment corresponding to FIG. 7 , and will not be described again here.
  • Step S614 Determine whether the current function code block is a loop start function code block.
  • the current function code block is the function code block corresponding to the function block instance just executed. If yes, perform step S615; if not, perform step S616.
  • Step S617 Obtain the next batch of function code block lists pointed to by the current function code block.
  • Step S618 Perform N cycles according to the number of cycles.
  • step S619 corresponding to node 2
  • step S629 where it can be determined whether the cycle ends.
  • Step S619 Create the next function block instance.
  • the computer device will perform an internal loop based on the next batch of function code block lists and establish function block instances corresponding to the function code blocks included in the next batch of function code block lists.
  • Step S620 Determine the index and maximum number of cycles corresponding to the next function block instance.
  • the index is the above-mentioned index; the maximum number of cycles is the above-mentioned MaxIndexCount.
  • the determination method may refer to the parameter adjustment method shown in FIG. 11 and FIG. 12 above.
  • Step S621 Determine whether the next function code block is a loop end function code block.
  • the computer device can also first determine whether the next function code block is a loop end function code block, and then determine whether to create a function block instance corresponding to the next function code block. This application is not limited here. If the next function code block is the loop end function code block, execute step S622; otherwise, execute step S627.
  • Step S623, determine whether the next function code block is created for the first time.
  • next function code block at this time is the loop end function code block, it only needs to be created once. If the computer device determines that the next function code block is created for the first time, step S624 is executed; otherwise, step S625 is executed.
  • Step S624 Push the next function block instance to the loop end function block instance queue, and execute step S626.
  • Step S625 discard the next function block instance and execute step S626.
  • Step S626 Decrement the number of instance executions and execute step S629.
  • the number of instances executed is -1.
  • Step S627 Push the next function block instance to the function block instance queue.
  • Step S628 Accumulate the number of queue instances and decrement the number of instance executions.
  • the number of queue instances is +1; the number of instance executions is -1.
  • Step S629 Determine whether the execution data meets the execution end condition.
  • step S630 it is determined whether the number of queue instances and the number of instance executions are both 0. If not, wait for the computer device to execute step S608 corresponding to the 1 node; if yes, it means that this cycle is over, and then execute step S630.
  • Step S630 determine whether the outer loop ends.
  • step S631 is executed.
  • Step S631 Determine whether there is a loop end function block instance in the loop end function block instance queue.
  • step S632 is executed; if not, step S634 is executed.
  • Step S632 Accumulate the number of queue instances.
  • the number of queue instances is +1.
  • Step S633 Push the cycle-ending function block instance to the function block instance queue, and wait for the computer device to execute step S608 corresponding to the 1 node.
  • Step S634 Clear the function block instance cache.
  • cache refers to the data temporarily stored by the execution instance during its operation.
  • Step S635 update the execution instance status and update the database.
  • steps S614 to S635 please refer to the description of step S104 in the embodiment corresponding to the above-mentioned FIG. 3 and the optional description of step S205 in the embodiment corresponding to the above-mentioned FIG. 4, and will not be described again here.
  • the For loop traversal function is used in a visual way of the process engine, so that some array or list traversal execution scenarios can be realized.
  • the system designed and implemented based on this solution supports the use of visual low-code methods to implement For loop traversal, which greatly reduces the threshold for using the system, does not require the subject to have specialized programming experience, and greatly improves efficiency.
  • Figure 15 is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
  • the data processing device may be a computer program (including program code) running on a computer device, for example, the data processing device may be an application software; the device may be used to execute corresponding steps in the data processing method provided by the embodiments of the present application.
  • the data processing device 1 may include: a trigger module 101 , a cycle starting module 102 , a cycle confirmation module 103 and a cycle execution module 104 .
  • the trigger module 101 is used to create an execution instance corresponding to the target workflow; the execution instance includes a pointing relationship between at least two functional code blocks included in the target workflow; the at least two functional code blocks include a loop starting function code block and a loop End function code block;
  • the loop starting module 102 is used to obtain the loop parameters corresponding to the loop starting function code block;
  • the loop confirmation module 103 is used to determine the function code block between the loop start function code block and the loop end function code block as the loop function code block according to the pointing relationship;
  • the loop execution module 104 is used to execute loop function code blocks cyclically according to loop parameters and pointing relationships.
  • the trigger module 101 the loop starting module 102, the loop confirmation module 103, and the loop execution module 104, please refer to the detailed description of steps S101 to S104 in the embodiment corresponding to FIG. 3, and will not be described again here.
  • the cycle starting module 102 is specifically used for:
  • the loop execution module 104 is specifically used to:
  • the loop function code block is executed cyclically according to the loop parameter, the function block instance queue and the pointing relationship.
  • the loop parameter is N, and N is a positive integer greater than or equal to 1;
  • the loop execution module 104 includes: a first iteration unit 1041 and a second iteration unit 1042.
  • the first iteration unit 1041 is used to determine the to-be-executed function code block list pointed to by the loop starting function code block according to the pointing relationship during the k-th round of iterative execution of the loop function code block; k is less than or equal to N. positive integer;
  • the first iteration unit 1041 is also used to: if the list of function code blocks to be executed does not include the loop end function code block, and the target function block instance to be executed corresponding to the target function code block to be executed in the function block instance queue is successfully executed, according to The pointing relationship determines the new to-be-executed function code block list pointed to by the target to-be-executed function code block, until it is determined that the k-th round of iterative execution for the loop function code block is completed; the target to-be-executed function code block is in the to-be-executed function code block list function code block;
  • the second iteration unit 1042 is used to continue to perform the k+1th round of iterative execution on the loop function code block if k is less than N.
  • step S104 for the specific implementation of the first iteration unit 1041 and the second iteration unit 1042, please refer to the specific description of step S104 in the embodiment corresponding to FIG. 3, and will not be described again here.
  • the above-mentioned data processing device 1 also includes: a third iteration module 105, a push module 106 and a first detection module 107.
  • the third iteration module 105 is used to query the loop end function block instance queue if the new to-be-executed function code block list contains the loop end function code block. If the loop end function block instance queue is an empty queue, then loop end function The loop end function block instance corresponding to the code block is pushed to the loop end function block instance queue;
  • the third iteration module 105 is also configured to determine that the k-th round of iterative execution for the loop function code block is completed if it is detected that the execution data of the execution instance satisfies the execution end condition;
  • the push module 106 is configured to push the loop end function block instance in the loop end function block instance queue to the function block instance queue when it is determined that the Nth round of iterative execution of the loop function code block is completed, and detect the new execution instance. execution data;
  • the first detection module 107 is configured to determine that the execution of at least two function code blocks is completed if it is detected that the new execution data satisfies the execution end condition and the loop end function block instance queue is an empty queue.
  • step S104 for the specific implementation of the third iteration module 105, the push module 106 and the first detection module 107, please refer to the optional description of step S104 in the embodiment corresponding to Figure 3 above, and will not be described again here.
  • the execution data includes the number of queue instances and the number of instance executions
  • the above-mentioned data processing device 1 also includes: a data initialization module 108, a first data update module 109 and a second detection module 110.
  • the data initialization module 108 is used to initialize the number of queue instances as the first default parameter and the number of initialized instance executions as the second default parameter while creating the execution instance;
  • the first data update module 109 is configured to accumulate or decrement the number of queue instances and accumulate or decrement the number of instance executions according to the execution status of the function block instance associated with the execution instance;
  • the second detection module 110 is configured to determine that the execution data of the detected execution instance satisfies the execution end condition if it is detected that the number of queue instances is equal to the first default parameter and the number of instance executions is equal to the second default parameter.
  • step S104 for the specific implementation of the data initialization module 108, the first data update module 109 and the second detection module 110, please refer to the optional description of step S104 in the embodiment corresponding to Figure 3 above, and will not be described again here.
  • the function block instance associated with the execution instance includes the target function block instance
  • the first data update module 109 includes: a first update unit 1091 and a second update unit 1092.
  • the first update unit 1091 is used to accumulate the queue instance data when the target function block instance is pushed to the function block instance queue;
  • the second update unit 1092 is configured to perform a default accumulation process on the number of instance executions and a default decrement process on the number of queue instances when executing a target function block instance in the function block instance queue.
  • step S104 for the specific implementation of the first update unit 1091 and the second update unit 1092, please refer to the specific description of step S104 in the embodiment corresponding to FIG. 3, and will not be described again here.
  • the above-mentioned data processing device also includes: a second data update module 111.
  • the second data update module 111 is used to determine the creation of a new target function block instance when the execution of the target function block instance is completed;
  • the second data update module 111 is also used to perform a default decrement process on the number of instance executions if the new target function block instance is successfully created and the function code block corresponding to the new target function block instance is the loop end function code block;
  • the second data update module 111 is also used to push the new target function block instance if the new target function block instance is successfully created and the function code block corresponding to the new target function block instance is not the loop end function code block. After reaching the function block instance queue, the number of queue instances is accumulated according to the number of new target function block instances, and the number of instance executions is decremented by default;
  • the second data update module 111 is also used to decrement the number of instance executions by default if the creation of the new target function block instance fails.
  • step S104 for the specific implementation of the second data update module 111, please refer to the specific description of step S104 in the embodiment corresponding to FIG. 3, and will not be described again here.
  • the above-mentioned data processing device 1 also includes: a table creation module 112, an instance acquisition module 113, an instance execution module 114, and a table recording module 115.
  • the table creation module 112 is used to create an execution instance table corresponding to the execution instance while creating the execution instance corresponding to the target workflow; the execution instance table is used to record the execution status of the execution instance;
  • the instance acquisition module 113 is used to sequentially acquire the first function block instance associated with the execution instance in the function block instance queue as the function block instance to be processed; the function block instance to be processed corresponds to the function block instance identifier to be processed and the function to be processed.
  • Block instance index; the pending function block instance identifier and the pending function block instance index are generated when creating a pending function block instance based on the pending function code block; the target function block instance index is used to characterize the number of executions of the pending function code block ;
  • the function code block to be processed belongs to at least two function code blocks;
  • the instance execution module 114 is used to execute the function block instance to be processed and obtain the target execution result
  • the table recording module 115 is configured to record the target execution result in the execution instance table according to the function block instance identifier to be processed and the function block instance index to be processed.
  • the instance acquisition module 113 the instance acquisition module 113, the instance execution module 114, and the table recording module 115, please refer to the detailed description of steps S201 to S205 in the embodiment corresponding to Figure 7, and will not be described again here.
  • the function block instance to be processed contains the required data acquisition path
  • the instance execution module 114 includes: a container determination unit 1141 and a container execution unit 1142.
  • the container determination unit 1141 is used to query the idle computing resources of the execution engine container, and determine the execution engine container with the most idle computing resources as the target execution engine container;
  • the container execution unit 1142 is used to transfer the to-be-processed function block instance from the function block instance queue to the target execution engine container, obtain the demand data according to the demand data acquisition path in the target execution engine container, and execute the to-be-processed function block instance according to the demand data. , get the target execution result.
  • step S204 for the specific implementation of the container determination unit 1141 and the container execution unit 1142, please refer to the detailed description of step S204 in the embodiment corresponding to Figure 7 above, and will not be described again here.
  • the above-mentioned data processing device 1 also includes: an identification determination module 116 and an index determination module 117.
  • the identification determination module 116 is configured to, when creating a to-be-processed function block instance corresponding to the to-be-processed function code block, obtain an identifier that uniquely identifies the to-be-processed function code block as the to-be-processed function block instance identifier corresponding to the to-be-processed function block instance. ;
  • the index determination module 117 is used to determine the function block instance index to be processed as the default index if the function block instance identifier to be processed is not found in the execution instance table;
  • the index determination module 117 is also used to obtain the historical index with the latest recording time associated with the function block instance identifier to be processed if the instance identifier of the function block to be processed is found in the execution instance table, and accumulate the historical indexes to obtain Index of the pending function block instance.
  • step S205 For specific implementation methods of the identification determination module 116 and the index determination module 117, please refer to the optional description of step S205 in the embodiment corresponding to FIG. 7, and will not be described again here.
  • the trigger module 101 is specifically used to:
  • the trigger request includes a web page callback trigger request
  • the trigger module 101 includes: a first trigger unit 1011.
  • the first triggering unit 1011 is configured to receive a webpage callback trigger request for the target workflow, and obtain the target token from the webpage callback trigger request;
  • the first triggering unit 1011 is also used to obtain the target workflow in the workflow repository according to the target token;
  • the first trigger unit 1011 is also configured to create an execution instance corresponding to the target workflow according to the request parameters included in the web page callback trigger request.
  • step S101 for the specific implementation of the first triggering unit 1011, please refer to the specific description of step S101 in the embodiment corresponding to FIG. 3, and will not be described again here.
  • the trigger request includes an instruction request
  • the trigger module 101 includes: a second trigger unit 1012.
  • the second trigger unit 1012 is used to obtain the instruction request sent by the first object through the callback address, decrypt the instruction request, and obtain the trigger instruction and trigger parameters;
  • the second triggering unit 1012 is also used to obtain the target workflow according to the triggering instruction and verify the triggering authority of the first object according to the triggering parameters;
  • the second trigger unit 1012 is also configured to create an execution instance corresponding to the target workflow if the trigger permission of the first object is a qualified permission.
  • step S101 in the embodiment corresponding to FIG. 3, and will not be described again here.
  • the trigger request includes a timer trigger request
  • the trigger module 101 includes: a third trigger unit 1013.
  • the third trigger unit 1013 is used to receive a timer trigger request for the target workflow, and trigger the request from the timer. Get the specified execution time from the request;
  • the third trigger unit 1013 is also used to create an execution instance corresponding to the target workflow when the system time is the same as the specified execution time.
  • step S101 in the embodiment corresponding to FIG. 3, and will not be described again here.
  • FIG. 16 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the computer device 1000 can include: a processor 1001, a network interface 1004 and a memory 1005.
  • the above computer device 1000 Also included: a user interface 1003, and at least one communication bus 1002.
  • the communication bus 1002 is used to realize connection communication between these components.
  • the user interface 1003 may include a display screen (Display) and a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory.
  • the memory 1005 may optionally be at least one storage device located remotely from the aforementioned processor 1001.
  • memory 1005, which is a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.
  • the network interface 1004 can provide network communication network elements; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control stored in the memory 1005 application program to implement the description of the data processing method in any one of the embodiments corresponding to FIG. 3 and FIG. 7, which will not be described again here. In addition, the description of the beneficial effects of using the same method will not be described again.
  • the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the aforementioned data processing device 1, and the above-mentioned computer
  • the program includes program instructions.
  • the above-mentioned processor executes the above-mentioned program instructions, it can execute the description of the above-mentioned data processing method in any one of the embodiments corresponding to Figure 3 and Figure 7. Therefore, the details will not be described here.
  • the description of the beneficial effects of using the same method will not be described again.
  • For technical details not disclosed in the computer-readable storage medium embodiments involved in this application please refer to the description of the method embodiments in this application.
  • FIG. 17 is a schematic structural diagram of another data processing device provided by an embodiment of the present application.
  • the above-mentioned data processing device may be a computer program (including program code) running in a computer device, for example, the data processing device may be an application software; the device may be used to execute corresponding steps in the method provided by the embodiments of the present application.
  • the data processing device 2 may include: a first response module 201 , a second response module 202 , a third response module 203 , a fourth response module 204 and a fifth response module 205 .
  • the first response module 201 is used to respond to the creation operation of the target workflow and display the workflow editing page;
  • the second response module 202 is used to respond to the selection connection operation of at least two function block controls and display a workflow control tree composed of at least two function block controls on the workflow editing page; at least two function block controls include loops Start function block control and loop end function block control;
  • the third response module 203 is used to respond to the trigger operation for the loop start function block control in the workflow control tree and set loop parameters for the loop start function block control;
  • the fourth response module 204 is used to respond to the creation operation of the workflow control tree, create a target workflow, and send the target workflow to the workflow engine;
  • the target workflow includes at least two functional code blocks corresponding to each of the function block controls;
  • the pointing relationship between at least two function code blocks is determined based on the connection relationship of at least two function block controls;
  • at least two function code blocks include a cycle start function code block and a cycle end function corresponding to the cycle start function block control.
  • the fifth response module 205 is used to respond to the trigger operation for the target workflow, and The request is sent to the workflow engine.
  • first response module 201 the second response module 202, the third response module 203, the fourth response module 204 and the fifth response module 205
  • steps S301 to step S305 in the embodiment corresponding to Figure 13. The specific description will not be repeated here.
  • the third response module 203 is specifically used to:
  • a loop edit text box is displayed, and in response to an input operation for the loop edit text box, loop parameters are set for the loop start function block control.
  • FIG. 18 is a schematic structural diagram of another computer device provided by an embodiment of the present application.
  • the data processing apparatus 2 in the embodiment corresponding to Figure 17 above can be applied to a computer device 2000.
  • the computer device 2000 can include: a processor 2001, a network interface 2004 and a memory 2005.
  • the above computer device 2000 also included: a user interface 2003, and at least one communication bus 2002.
  • the communication bus 2002 is used to realize connection communication between these components.
  • the user interface 2003 may include a display screen (Display) and a keyboard (Keyboard), and the optional user interface 2003 may also include a standard wired interface and a wireless interface.
  • the network interface 2004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
  • the memory 2005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory.
  • the memory 2005 may optionally be at least one storage device located remotely from the aforementioned processor 2001. As shown in Figure 18, the memory 2005, which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
  • the network interface 2004 can provide network communication functions; the user interface 2003 is mainly used to provide an input interface for the user; and the processor 2001 can be used to call the device control application stored in the memory 2005
  • the program can implement the description of the access control method in the previous embodiments, and can also execute the description of the data processing device 2 in the previous embodiment corresponding to Figure 13, which will not be described again here. In addition, the description of the beneficial effects of using the same method will not be described again.
  • the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the aforementioned data processing device 2.
  • the server loads and executes the above computer program, it can execute the description of the above access control method in any of the previous embodiments, so the details will not be described again here.
  • the description of the beneficial effects of using the same method will not be described again.
  • the above-mentioned computer-readable storage medium may be the data processing apparatus provided in any of the foregoing embodiments or the internal storage unit of the above-mentioned computer equipment, such as the hard disk or memory of the computer equipment.
  • the computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card equipped on the computer device, Flash card, etc.
  • the computer-readable storage medium may also include both an internal storage unit of the computer device and an external storage device.
  • the computer-readable storage medium is used to store the computer program and other programs and data required by the computer device.
  • the computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.
  • embodiments of the present application also provide a computer program product or computer program.
  • the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium.
  • the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided by any corresponding embodiment mentioned above.

Abstract

本发明公开了一种数据处理方法、装置、设备及可读存储介质,该方法包括:创建目标工作流对应的执行实例;获取执行实例中循环起始功能代码块对应的循环参数;根据执行实例中的指向关系,确定循环起始功能代码块与循环结束功能代码块之间的功能代码块,作为循环功能代码块;根据循环参数以及指向关系,循环执行循环功能代码块。采用本发明,可以提高工作流引擎的易用性和功能性。

Description

数据处理方法、装置、设备及可读存储介质
本申请要求于2022年08月22日提交中国专利局、申请号为2022110078327、申请名称为“数据处理方法、装置、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,尤其涉及数据处理技术。
背景技术
工作流引擎是一种通过图形化拖拽、参数化配置等可视化方式来设计流程或开发应用的低代码技术,其能够降低编程门槛,提高编程效率。通过这种低代码的技术,可以实现编程中的各种代码特性,例如条件判断、并发等功能。以低代码的方式降低编程开发成本,可以让没有编程经验的对象通过可视化编程来实现各种代码特性。
但是目前绝大部分的工作流引擎仅支持简单的串行执行任务,即每个应用模块(App)仅支持执行一次。对于一些基于数组或列表执行循环遍历操作的场景,则无法支持,工作流引擎的易用性和功能性较差。
发明内容
本申请实施例提供了一种数据处理方法、装置、设备及可读存储介质,可以提高工作流引擎的易用性和功能性。
本申请实施例一方面提供了一种数据处理方法,由计算机设备执行,包括:
创建目标工作流对应的执行实例;执行实例包括目标工作流包含的至少两个功能代码块之间的指向关系;至少两个功能代码块包括循环起始功能代码块和循环结束功能代码块;
获取循环起始功能代码块对应的循环参数;
根据指向关系,确定循环起始功能代码块与循环结束功能代码块之间的功能代码块,作为循环功能代码块;
根据循环参数以及指向关系,循环执行循环功能代码块。
本申请实施例一方面提供了一种数据处理方法,由计算机设备执行,包括:
响应针对目标工作流的创建操作,显示工作流编辑页面;
响应针对至少两个功能块控件的选择连线操作,在工作流编辑页面显示由至少两个功能块控件构成的工作流控件树;至少两个功能块控件包括循环起始功能块控件和循环结束功能块控件;
响应针对工作流控件树中的循环起始功能块控件的触发操作,为循环起始功能块控件设置循环参数;
响应针对工作流控件树的创建操作,创建目标工作流,将目标工作流发送至工作流引擎;目标工作流包含至少两个功能块控件各自对应的功能代码块;至少两个功能代码块之间的指向关系是根据至少两个功能块控件的连接关系确定的;至少两个功能代码块包括循环起始功能块控件对应的循环起始功能代码块和循环结束功能块控件对应的循环结束功能代码块;
响应针对目标工作流的触发操作,将针对目标工作流的触发请求发送至工作流引擎。
本申请实施例一方面提供了一种数据处理装置,包括:
触发模块,用于创建目标工作流对应的执行实例;执行实例包括目标工作流包含的至 少两个功能代码块之间的指向关系;至少两个功能代码块包括循环起始功能代码块和循环结束功能代码块;
循环起始模块,用于获取循环起始功能代码块对应的循环参数;
循环确认模块,用于根据指向关系,确定循环起始功能代码块与循环结束功能代码块之间的功能代码块,作为循环功能代码块;
循环执行模块,用于根据循环参数以及指向关系,循环执行循环功能代码块。
本申请实施例一方面提供了一种的数据处理装置,包括:
第一响应模块,用于响应针对目标工作流的创建操作,显示工作流编辑页面;
第二响应模块,用于响应针对至少两个功能块控件的选择连线操作,在工作流编辑页面显示由至少两个功能块控件构成的工作流控件树;至少两个功能块控件包括循环起始功能块控件和循环结束功能块控件;
第三响应模块,用于响应针对工作流控件树中的循环起始功能块控件的触发操作,为循环起始功能块控件设置循环参数;
第四响应模块,用于响应针对工作流控件树的创建操作,创建目标工作流,将目标工作流发送至工作流引擎;目标工作流包含至少两个功能块控件各自对应的功能代码块;至少两个功能代码块之间的指向关系是根据至少两个功能块控件的连接关系确定的;至少两个功能代码块包括循环起始功能块控件对应的循环起始功能代码块和循环结束功能块控件对应的循环结束功能代码块;
第五响应模块,用于响应针对目标工作流的触发操作,将针对目标工作流的触发请求发送至工作流引擎。
本申请实施例一方面提供了一种计算机设备,包括:处理器、存储器、网络接口;
上述处理器与上述存储器、上述网络接口相连,其中,上述网络接口用于提供数据通信网元,上述存储器用于存储计算机程序,上述处理器用于调用上述计算机程序,以执行本申请实施例中的方法。
本申请实施例一方面提供了一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,上述计算机程序适于由处理器加载并执行本申请实施例中的方法。
本申请实施例一方面提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中,计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行本申请实施例中的方法。
本申请实施例中,创建目标工作流对应的执行实例,该执行实例包括目标工作流包含的至少两个功能代码块之间的指向关系,至少两个功能代码块中包括循环起始功能代码块和循环结束功能代码块;然后,获取循环起始功能代码块对应的循环参数,并根据指向关系,确定循环起始功能代码块与循环结束功能代码块之间的功能代码块,作为循环功能代码块;最后根据循环参数以及指向关系,循环执行循环功能代码块。由此可见,对象在通过工作流引擎创建工作流时,针对想要多次执行的功能代码块,只需将其放入循环起始功能代码块与循环结束功能代码块之间即可,对象无需具备其他的编程经验,降低了工作流引擎的使用门槛,提高了工作流引擎的易用性和功能性。
附图说明
图1是本申请实施例提供的一种网络架构示意图;
图2a是本申请实施例提供的一种目标工作流创建的场景示意图;
图2b是本申请实施例提供的一种目标工作流执行的场景示意图;
图3是本申请实施例提供的一种数据处理方法的流程示意图;
图4是本申请实施例一种网页回调触发请求处理的流程图;
图5是本申请实施例提供的一种目标应用指令执行的流程示意图;
图6是本申请实施例提供的一种工作流指向关系示意图;
图7是本申请实施例提供的一种数据处理方法的流程示意图;
图8是本申请实施例提供的一种执行实例消息队列的示意图;
图9是本申请实施例提供的一种功能块实例队列的示意图;
图10是本申请实施例提供的一种工作流执行时内存的全局变量数据结构的示意图;
图11是本申请实施例提供的一种索引确定的场景示意图;
图12是本申请实施例提供的一种索引确定的场景示意图;
图13是本申请实施例提供的一种数据处理方法的流程示意图;
图14a是本申请实施例提供的一种支持循环的工作流执行实现的整体流程示意图;
图14a是本申请实施例提供的另一种支持循环的工作流执行实现的整体流程示意图;
图15是本申请实施例提供的一种数据处理装置的结构示意图;
图16是本申请实施例提供的一种计算机设备的结构示意;
图17是本申请实施例提供的另一种数据处理装置的结构示意图;
图18是本申请实施例提供的另一种计算机设备的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为便于理解,以下先对本申请应用的相关概念进行阐述:
App:指一个应用模块,封装了某些常用的功能或接口服务,也可以将其称为功能代码块。可以将一个App当成一个原子任务,是工作流里面最基础的执行单元。
App实例:一个App可以被执行多次,每次执行(不同的参数)会生成一个实例,这个实例就是App实例,也可以将其称为功能块实例。App实例是App的具体实例化,两者的区别是,App是一个模板,使用默认参数,而App实例是使用某个App模板,并且使用具体的参数,两者的关系类似于面向对象编程里的类和对象。
For循环体:类似代码中的For循环代码片段,循环体中的App会依次遍历执行N次。
For循环开始App:可以称为循环起始功能代码块,该App表示流程开始进入到一个For循环体中,这个App可以设置循环的次数。
For循环结束App:可以称为循环结束功能代码块,该App表示循环体的结束位置,即For循环体的范围为For循环开始App到该For循环结束App,进入到该For循环结束App后,当满足循环次数后会结束循环体。
触发器:是触发工作流运行的起始App,包括:定时器、WebHook(网页回调)等。
凭据:主要指一些重要的参数信息,包括账号密码、token(令牌)、密钥等信息,不同的App可能对应不同的凭据参数。
工作流:通过流程图的方式表示实际业务的模型,以自动化的方式完成特定的工作场景。
工作流引擎:工作流引擎是流程的路由控制器。一个流程对应一个实际流转的业务,流程的执行路线受当前的App实例数据的控制。流程定义时就指定了流程的流转规则。一 般情况下,这些流转规则根据App实例当前数据的变量表达式决定。工作流引擎的任务是根据流程执行的上下文环境,对这些变量表达式进行解析,找出流程的下一步执行方向。
工作流定义语言:指设计工作流时使用的语法规范,本文通过Json(一种语言)这种简单、通用的方式定义工作流。
路径语法表达式:可通过形如{{AppInstId.data.0.name}}的路径索引到工作流中各个App实例的输入或输出数据,从而实现数据在运行时的动态解析引用。
执行任务:指具体的工作流实例,也可以称为执行实例,当工作流被触发执行时,会生成具体的执行任务,工作流会根据输入的参数不同,从而得到不同结果的执行任务。
消息队列:是一种数据先进先出的数据结构。
请参见图1,图1是本申请实施例提供的一种网络架构示意图。如图1所示,该网络架构可以包括业务服务器100以及终端设备集群,其中,上述终端设备集群可以包括多个终端设备,如图1所示,具体可以包括终端设备10a、终端设备10b、终端设备10c、…、终端设备10n。如图1所示,终端设备10a、终端设备10b、终端设备10c、…、终端设备10n可以分别与上述业务服务器100通过网络进行通信,以便于每个终端设备可以通过网络与业务服务器100进行数据交互,以便于每个终端设备可以接收到来自于上述业务服务器100的业务数据。
应该理解,如图1所示的终端集群中的每个终端设备均可以安装有应用客户端,当该应用客户端运行于各终端设备中时,可以分别与上述图1所示的业务服务器100之间进行数据交互。其中,该应用客户端可以为编程应用、游戏应用、视频编辑应用、社交应用、即时通信应用、直播应用、短视频应用、视频应用、音乐应用、购物应用、小说应用、支付应用、浏览器等具有显示文字、图像、音频以及视频等数据信息功能的应用的应用客户端。其中,该应用客户端可以为独立的客户端,也可以为集成在某客户端(例如社交客户端、游戏客户端等)中的嵌入式子客户端,在此不做限定。
如图1所示,终端设备集群中的任一终端设备可以通过运行该应用客户端来显示工作流编辑页面,以终端设备10a为例,终端设备10a上运行的应用客户端可以通过终端设备10a显示的工作流编辑页面,对该工作流编辑页面显示的功能块控件进行选择连线操作,从而构建工作流控件树。其中,一个功能块控件对应一个功能代码块。终端设备10a会基于该工作流控件树中功能块控件之间的连接关系,确定其对应的功能代码块之间的指向关系,从而生成目标工作流。终端设备10a会将目标工作流发送至业务服务器100,业务服务器100会存储该目标工作流,等接收到针对该目标工作流的触发请求时,再执行该目标工作流。
如图1所示,业务服务器100接收到针对目标工作流的触发请求后,会创建该目标工作流对应的执行实例,该执行实例包括目标工作流包含的至少两个功能代码块之间的指向关系,其中,至少两个功能代码块可以包括循环起始功能代码块和循环结束功能代码块。当业务服务器100创建循环起始功能代码块对应的循环起始功能块实例后,会将循环起始功能块实例推送至功能块实例队列中,当功能块实例队列中的循环起始功能块实例执行成功时,业务服务器100会获取循环起始功能代码块对应的循环参数。需要说明的是,功能块实例队列中的功能块实例将顺序被执行。业务服务器100会根据上述指向关系,确定循环起始功能代码块与循环结束功能代码块之间的功能代码块,作为循环功能代码块,然后根据循环参数、功能块实例队列以及指向关系,循环执行循环功能代码块。简言之,循环起始功能代码块与循环结束功能代码块共同为目标工作流提供循环功能,需要多次执行的功能代码块,只需位于循环起始功能代码块与循环结束功能代码块之间即可,对于使用对象(如用户)来说,即只需将需要多次执行的功能代码块对应的功能块控件,拖拽至循环 起始功能代码块对应的循环起始功能块控件和循环结束功能代码块对应的循环结束功能块控件之间进行连接即可,使用对象无需具备额外的编程经验,即可实现具备循环功能的工作流的创建。
其中,可以理解的是,上述的业务服务器100与终端设备集群中各个终端设备的网络连接不限定连接方式,可以通过有线通信方式进行直接或间接地连接,也可以通过无线通信方式进行直接或间接地连接,还可以通过其他连接方式,本申请在此不做限制。
可以理解的是,本申请实施例提供的数据处理方法可以由计算机设备执行,计算机设备包括但不限于上述业务服务器100、终端设备。上述服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。上述终端可以是智能手机、平板电脑、笔记本电脑、台式计算机、智能语音交互设备、智能家电、车载终端等,但并不局限于此。
本申请实施例可应用于各种场景,包括但不限于云技术、人工智能、智慧交通、辅助驾驶等。
可以理解的是,当本申请实施例运用到具体产品或技术中时,所涉及的工作流等相关的数据需要获得用户许可或者同意,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。
为便于理解上述过程,请一并参见图2a-图2b,其中,图2a-图2b所示的终端设备20可以为上述图1所示的终端设备集群中的任一终端设备,如,终端设备20a可以为终端设备10a;图2a-图2b所示的业务服务器200可以为上述图1所示的业务服务器100。
请先参见图2a,图2a是本申请实施例提供的一种创建目标工作流的场景示意图。如图2a所示,终端设备20中集成安装有应用客户端21,该应用客户端21可以用于为使用对象(如用户)提供工作流设计功能。假设终端设备20的使用对象为对象A,对象A不具备编程经验,但是想设计出一种具有自己需要的业务功能的业务模型,就可以通过应用客户端21提供的工作流设计功能,采用可视化拖拽编程的方式来设计目标工作流,然后触发该目标工作流,从而实现对应的业务功能。如图2a所示,当应用客户端21在终端设备20中运行时,对象A可以通过应用客户端21进行针对目标工作流的创建操作,终端设备20可以响应针对目标工作流的创建操作,显示工作流编辑页面22,工作流编辑页面22可以包括控件选择区域221和画布区域222。控件选择区域221中显示有功能块控件,一个功能块控件对应一个功能代码块,可以实现特定的功能。控件选择区域221中可以显示系统内置的默认功能块控件,也可以显示由对象自定义设计的功能块控件。
需要说明的是,功能块控件的类型主要可以分为三类,一是触发功能块控件,其对应触发功能代码块,触发功能代码块主要是工作流的起始功能代码块,不同的触发功能代码块可以实现工作流的不同触发方式;二是业务功能块控件,其对应业务功能代码块,业务功能代码块是封装有比较常用的业务操作的功能代码块;三是逻辑功能块控件,其对应逻辑功能代码块,逻辑功能代码块主要涉及工作流的流程关系,例如,针对循环起始功能块控件对应的循环起始功能代码块和循环结束功能块控件对应的循环结束功能代码块之间的功能代码块,需要循环执行。
画布区域222是用于支持对象A设计工作流控件树的区域。对象A可以从控件选择区域221中选择功能块控件,然后将选择的功能块控件拖入画布区域222中,将其与其它功能块控件进行连线操作,进而得到工作流控件树223。如图2a所示,对象A设计的工作流控件树223根据连接关系可以顺序包含触发功能块控件A、循环起始功能块控件、业 务功能块控件B、业务功能块控件A以及循环结束功能块控件。需要说明的是,默认情况下,功能块控件对应的功能代码块的执行次数为1,但是位于循环起始功能块控件和循环结束功能块控件之间的功能块控件对应的功能代码块需要循环执行,循环次数由循环起始功能块控件对应的循环参数决定。
可以理解的是,针对功能代码块执行时所需使用的参数,对象A可以通过在画布区域222中针对功能代码块控件执行触发操作,进而进入该功能代码块控件对应的编辑文本框进行编辑,例如,当对象A针对循环起始功能块控件执行触发操作时,终端设备20可以显示循环编辑文本框224,然后对象A可以在该循环编辑文本框224中设置循环参数,终端设备20响应对象A针对循环编辑文本框225的输入参数,确定循环起始功能块控件的循环参数为5。
在对象A设置完每个功能块控件所需参数时,可以针对画布区域222中显示的创建控件225执行触发操作,以实现针对工作流控件树223的创建操作,终端设备可以响应该针对工作流控件树223的创建操作,创建目标工作流23,然后将该目标工作流23发送至工作流引擎,其中,工作流引擎是指用于执行工作流的引擎系统,可以部署在业务服务器200中,也就是说,终端设备20会将生成的目标工作流23发送至业务服务器200中,业务服务器200相应地会存储目标工作流23。
此外,需要补充说明的是,功能代码块在运行过程中,也可能会需要使用凭据信息(即账号密码等信息),例如,数据库操作功能代码块需要使用与数据库相关的账号密码等凭据信息,为了便于管理,应用客户端21还具有凭据管理功能,即创建并保存对象可以使用的凭据信息。简言之,当对象A需要使用凭据信息时,在进行针对目标工作流的创建操作之前,需要先进行凭据管理操作,终端设备响应凭据管理操作会显示凭据创建页面,对象A可以通过凭据创建页面创建需要使用的凭据信息,终端设备会保存对象A创建的凭据信息,具体创建流程可以根据实际情况决定,本申请在此不作限制。
进一步地,请参见图2b,图2b是本申请实施例提供的一种目标工作流执行的场景示意图。如图2b所示,对象A通过触发功能代码块A对应的触发方式进行针对目标工作流的触发操作,终端设备20响应该触发操作,生成触发请求24,终端设备20将该触发请求24发送至业务服务器200后,业务服务器200会根据该触发请求24,创建目标工作流23对应的执行实例25。其中,目标工作流23可以顺序包含有触发功能代码块A、循环起始功能代码块、业务功能代码块B、业务功能代码块A以及循环结束功能代码块,可以理解,目标工作流23包含的功能代码块与上述图2a所示的功能块控件一一对应。其中,执行实例25是目标工作流23的一个具体实施任务,目标工作流23不同的执行实例对应有不同的参数,得到的执行结果可能不同。
业务服务器200会根据执行实例25确定功能代码块之间的指向关系,然后从第一个功能代码块,也就是触发功能代码块A开始,创建并执行触发功能代码块A对应的触发功能块实例。其中,创建并执行触发功能块实例的过程,可以为,业务服务器200先创建触发功能代码块A对应的触发功能块实例,然后将其推入进功能块实例队列中等待执行。其中,功能块实例队列中的功能块实例会顺序被取出然后执行。当业务服务器200从功能块实例队列中取出该触发功能块实例后,会执行该触发功能块实例,执行完成后,业务服务器200会根据指向关系确定触发功能代码块A指向的下一个功能代码块(即循环起始功能代码块),然后继续创建并执行下一个功能代码块对应的功能块实例。当业务服务器200创建并执行循环起始功能代码块对应的循环起始功能块实例时,会获取循环起始功能块实例对应的循环参数,也就是在上述图2a所示实施例中对象A通过循环起始功能块控件对应的循环编辑文本框输入的循环参数,然后,针对循环起始功能代码块和循环结束功 能代码块之间的功能代码块,即业务功能代码块B和业务功能代码块A,业务服务器200会将其作为循环功能代码块,然后循环执行。如图2a所示,假设循环参数为5,业务服务器200在第一次创建并执行业务功能块实例B,创建并执行业务功能块实例A后,还需要进行循环,然后第二次创建并执行业务功能块实例B,创建并执行业务功能块实例A,然后继续循环,直至第五次创建并执行业务功能块实例B,创建并执行业务功能块实例A,然后业务服务器200会执行循环结束功能块实例。
需要说明的是,循环结束功能块实例是在第一次执行完业务功能块实例A后创建的,即业务服务器200执行完业务功能块实例A后,根据指向关系去创建业务功能代码块A指向的下一个功能代码块对应的功能块实例时,若检测到业务功能代码块A指向的下一个功能代码块对应的功能块实例为循环结束功能块实例,业务服务器200会暂时缓存该循环结束功能块实例,去进行上述循环过程。
如图2b所示,业务服务器200会创建执行实例25对应的执行实例表26,该执行实例表26用于记录执行实例25的执行情况,在执行实例25执行完成后,业务服务器200可以将执行实例表26发送至终端设备20,对象A可以基于该执行实例表26查询各个功能代码块对应的执行结果。
应当理解,上述工作流的执行过程也可以在终端设备中直接执行,本申请在此不作限制。
由此可见,采用本申请实施例所述的方法,依靠循环起始功能代码块和循环结束功能代码块可以实现功能代码块的循环执行,对象不需要具备额外的编程经验,提高了工作流引擎的易用性和可行性。
进一步地,请参见图3,图3是本申请实施例提供的一种数据处理方法的流程示意图。其中,该方法可以由计算机设备执行,其中,计算机设备可以为上述图1所示的业务服务器100,也可以为上述图1所示的终端设备集群中的任一终端设备,例如终端设备10c。以下将以本方法由计算机设备执行为例进行说明,其中,该数据处理方法至少可以包括以下步骤S101-步骤S104:
步骤S101,创建目标工作流对应的执行实例;所述执行实例包括所述目标工作流包含的至少两个功能代码块之间的指向关系;所述至少两个功能代码块包括循环起始功能代码块和循环结束功能代码块。
具体的,工作流是指包含有至少两个功能代码块的业务模型,可以理解是具有业务功能的一种流程。其中,一个功能代码块可以称为工作流的一个节点,至少两个功能代码块之间具有指向关系,例如,工作流可以表示为节点A→节点B→节点C,其中,节点A、节点B、节点C分别代表一个功能代码块,节点A指向节点B,节点B指向节点C,计算机设备在执行工作流时,会先执行节点A,再执行节点B,最后执行节点C。
具体的,工作流中的起始功能代码块通常为触发功能代码块,又可称为触发器APP,不同的触发器APP可以通过不同的方式来触发工作流运行,具体有3种触发器可以参见下述表1:
表1

具体的,计算机设备可以接收针对目标工作流的触发请求,并响应该触发请求,创建目标工作流对应的执行实例。因为触发方式不同,计算机设备接收到的触发请求的类型不同。当触发请求为网页回调触发请求时,上述接收针对目标工作流的触发请求,创建目标工作流对应的执行实例的一个具体实施过程,可以为:接收针对目标工作流的网页回调触发请求,从网页回调触发请求中获取目标令牌;根据目标令牌在工作流存储库中获取目标工作流;根据网页回调触发请求中包含的请求参数,创建目标工作流对应的执行实例。
其中,网页回调触发请求可以是HTTP(HyperText Transfer Protocol,超文本传输协议)请求。当目标工作流的起始节点为WebHook触发器时,计算机设备可以为目标工作流创建并分配一个唯一的Token(令牌),以构成一个唯一的WebHook URL请求地址。每个WebHook URL对应一个工作流。当对这个URL发起POST(一种请求方式)请求时,计算机设备中安装的工作流引擎API(Application Programming Interface,应用程序编程接口)服务会接收到HTTP(HyperText Transfer Protocol,超文本传输协议)请求,并获取对应的工作流执行。
为便于理解,请一并参见图4,图4是本申请实施例一种网页回调触发请求处理的流程图。如图4所示,该网页回调触发请求处理的流程主要包括以下步骤:
步骤S41,计算机设备接收网页回调触发请求。
具体的,计算机设备接收针对目标工作流的网页回调触发请求,网页回调触发请求即上述对工作流对应的URL地址进行POST请求时,向计算机设备发送的HTTP请求。
步骤S42,获取令牌。
具体的,计算机设备从网页回调触发请求中获取目标令牌。网页回调触发请求携带有Token,计算机设备解析该网页回调触发请求,可以获取到Token。
步骤S43,查找对应的工作流。
具体的,计算机设备可以根据目标令牌在工作流存储库中获取目标工作流。其中,工作流存储库用于存储工作流。一个Token将绑定有一个唯一的工作流,因此只需获取与该Token绑定的工作流即可。
步骤S44,确实是否启用工作流。
具体的,若启用该工作流成功,则执行步骤S45;若启用该工作流失败,则执行步骤S49。
步骤S45,获取请求参数。
具体的,获取POST请求参数。
步骤S46,构建执行记录。
具体的,创建执行记录(execution)表,该execution表可以记录工作流的流程关系、执行时间等信息。
步骤S47,计算机设备异步发起执行工作流。
具体的,计算机设备可以根据网页回调触发请求中包含的请求参数,创建目标工作流对应的执行实例,然后执行该执行实例。
步骤S48,计算机设备生成执行标识,结束流程。
具体的,一个执行实例可以用唯一的执行标识来标识,计算机设备可以先将该执行标识返回给终端设备,之后,终端设备可以通过该执行标识来查询执行实例的执行结果。至此,网页回调触发请求触发工作流的流程结束。
步骤S49,报错提示,结束流程。
具体的,计算机设备会将该报错提示返回给终端设备。
可选地,当触发请求为指令请求时,上述接收针对目标工作流的触发请求,创建目标工作流对应的执行实例的一个具体实施过程,可以为:通过回调地址获取第一对象发送的指令请求,对指令请求进行解密,得到触发指令以及触发参数;根据触发指令获取目标工作流,根据触发参数验证第一对象的触发权限;若第一对象的触发权限为合格权限,则创建目标工作流对应的执行实例。
其中,指令请求可以是指通过向目标账号发送触发指令生成的请求。当目标工作流的起始节点为指令触发器时,可以在目标应用上申请并注册一个目标账号,并将这个目标账号的回调地址指向计算机设备中安装的工作流引擎的回调API(接口)。后续所有向该目标账号发送的消息都会通过目标应用转发给如下的回调API接口。其中,目标应用可以是具备即时会话功能的应用。其中,触发指令可以是对象自行创建的,一个工作流的触发对应一个唯一的触发指令。
为便于理解,请一并参见图5,图5是本申请实施例提供的一种目标应用指令执行的流程示意图。如图5所示,目标应用是具备即时会话功能的应用,可以集成安装在终端设备中。该目标应用指令执行的流程主要包括以下步骤:
步骤S51,计算机设备配置目标账号以及回调地址。
具体的,计算机设备中可以集成安装有工作流引擎,还可以提供工作流引擎对应的API服务。计算机设备可以通过工作流引擎对应的API服务配置目标账号以及回调地址。其中,目标账号用于接收终端设备发送的指令,回调地址则指向工作流引擎的回调API,可以调用工作流引擎的API服务。
步骤S52,计算机设备在目标应用中注册配置的目标账号以及回调地址。
具体的,目标账号在目标应用中注册成功后,后续终端设备中登录了目标应用的对象账号均可以向目标账号发送消息,目标账号接收到的消息均会通过目标应用中的回调地址转发给回调API。
步骤S53,终端设备创建指令。
具体的,终端设备可以创建触发指令,每个触发指令的名称是唯一的,跟当前的工作流一一对应。同时,终端设备可以授权指令给具体对象的对象账号,只有具有权限的对象账号才可以查看到指令并执行指令。
可选的,终端设备中登录了目标应用的对象账号可以向目标账号发送系统查询指令,来查询自己是否具有指令的使用权限。
步骤S54,终端设备将指令发送至计算机设备,计算机设备记录指令,并关联对应的工作流。
具体的,计算机设备会记录终端设备创建的触发指令,并关联对应的工作流。
步骤S55,终端设备向目标账号发起携带指令的消息。
具体的,第一对象通过终端设备上运行的目标应用登录了对象账号后,可以向目标账号发起携带指令的消息。
步骤S56,目标应用通过目标账号接收到消息后,对消息进行加密签名,得到加密消息,将加密消息发给计算机设备。
步骤S57,计算机设备通过回调地址接收目标应用发送的加密消息。
步骤S58,计算机设备对加密消息解密,得到指令及参数。
具体的,计算机设备通过回调地址获取第一对象发送的携带加密消息的指令请求后,对指令请求中的加密消息进行解密,得到指令(即触发指令)以及参数(即触发参数)。其中,第一对象即登录对象账号的对象。
步骤S59,计算机设备获取指令关联的工作流。
具体的,计算机设备可以根据指令(即触发指令)获取目标工作流,即触发指令关联的工作流。
步骤S510,计算机设备确定第一对象是否有指令权限。
具体的,计算机设备可以根据触发参数验证第一对象的触发权限,即确定发送该消息的对象账号是否具有指令权限。若触发权限为合格权限,说明第一对象具有指令权限,可以触发目标工作流,所以执行步骤S512;若不具有指令权限,则执行步骤S511。
步骤S511,计算机设备向终端设备发送无权限提示。
步骤S512,计算机设备创建工作流对应的执行实例。
步骤S513,计算机设备执行该执行实例,得到执行结果。
步骤S514,计算机设备向终端设备返回执行结果。
可选的,当触发请求为定时器触发请求时,上述接收针对目标工作流的触发请求,创建目标工作流对应的执行实例的一个具体实施过程,可以为:接收针对目标工作流的定时器触发请求,从定时器触发请求中获取指定执行时间;当系统时间与指定执行时间相同时,创建目标工作流对应的执行实例。
其中,定时器触发请求可以是指提供Cron周期任务触发器生成的请求。Cron触发器使用linux crontab(一种编程语言)的语法方式。到了指定的时间后就会创建目标工作流对应的执行实例执行。
步骤S102,获取所述循环起始功能代码块对应的循环参数。
具体的,针对执行实例中的至少两个功能代码块,计算机设备会先获取第一个功能代码块(通常为上述触发功能代码块),创建该第一个功能代码块对应的起始功能块实例,将该起始功能块实例推送至功能块实例队列中;应理解,第一个功能代码块通常不为循环起始功能代码块。其中,功能块实例队列用于存储等待执行的功能块实例,计算机设备会顺序执行功能块实例队列中的功能块实例,执行顺序通常采用先进先出的原则。当计算机设备从功能块实例队列中取出该起始功能块实例并执行后,计算机设备可以根据指向关系,确定第一个功能代码块指向的功能代码块列表,该功能代码块列表中包含第一个功能代码块指向的一个或多个功能代码块,此时计算机设备会顺序创建一个或多个功能代码块各自对应的功能块实例,然后将其均推送至功能块实例队列中等待执行。
需要说明的是,与执行实例关联的每个功能块实例从功能块实例队列执行成功后,计算机设备会确定该功能块实例对应的功能代码块是否为循环起始功能代码块,如果功能块实例对应的功能代码块不为循环起始功能代码块,计算机设备就会继续根据指向关系,查询该功能块实例对应的功能代码块指向的功能代码块列表,如果查询到其指向的功能代码块列表,就继续创建功能代码块列表中包含的功能代码块对应的功能块实例,然后继续将 所创建的功能块示例推送至功能块实例队列中等待执行。例如,假设目标工作流为节点A→节点B→节点C→……,其中,节点A对应工作流中的第一个功能代码块,在节点A对应的功能块实例从功能块实例队列中取出执行后,计算机设备就会去创建节点B对应的功能块实例,假设节点B对应一个业务功能代码块,那么计算机设备就会将节点B对应的功能块实例推送至功能块实例队列中等待执行,等待节点B对应的功能块实例从功能块实例队列中取出执行后,计算机设备就会继续去创建节点C对应的功能块实例,以此类推。
具体的,当计算机设备创建了循环起始功能代码块对应的循环起始功能块实例,计算机设备还是会先将循环起始功能块实例推送至功能块实例队列中,当功能块实例队列中的循环起始功能块实例执行成功时,计算机设备会先获取该循环起始功能代码块对应的循环参数,其中,循环参数即For循环遍历次数,用于表征下述循环功能代码块需要循环执行的次数。
步骤S103,根据所述指向关系,确定所述循环起始功能代码块与所述循环结束功能代码块之间的功能代码块,作为循环功能代码块。
具体的,循环功能代码块的数量可以为一个或多个,假设节点S对应循环起始功能代码块,节点E对应循环结束功能代码块,节点D和节点F分别对应一个业务功能代码块,在目标工作流中,节点S→节点D→节点F→节点E,则节点D和节点F各自对应的业务功能代码块即为循环功能代码块,需要循环执行。
步骤S104,根据所述循环参数以及所述指向关系,循环执行所述循环功能代码块。
即,计算机设备可以根据循环参数、功能块实例队列中包括的功能块示例、以及指向关系,循环执行上述循环功能代码块。
具体的,假设循环参数为N,N为大于或等于1的正整数,计算机设备会根据功能块实例队列以及指向关系对循环功能代码块进行N轮迭代执行。在针对循环功能代码块进行的第k轮迭代执行过程中,计算机设备可以先根据指向关系确定循环起始功能代码块指向的待执行功能代码块列表。k为小于或等于N的正整数。
为便于理解,请一并参见图6,图6是本申请实施例提供的一种工作流指向关系示意图。假设节点s对应循环起始功能代码块,节点e对应循环结束功能代码块,节点a、节点b、节点c以及节点d分别对应一个业务功能代码块,因为节点a、节点b、节点c以及节点d位于节点s与节点e之间,因此节点a、节点b、节点c以及节点d对应的业务功能代码块即为循环功能代码块。如图6所示,节点s指向节点a和节点b,即节点s指向的待执行功能代码块列表中会包含节点a和节点b。此时,循环功能代码块形成了2个分支,即[节点a,节点c]和[节点b,节点d]。可以理解,节点a与节点b的执行过程互不影响,相对应的,2个分支的执行过程互不影响,因此在每轮迭代执行过程中,2个分支的执行可以同时进行。换言之,计算机设备可以直接一同创建上述待执行功能代码块列表中包含的功能代码块各自对应的待执行功能块实例,也就是一同创建节点a与节点b各自对应的待执行功能块实例,然后将其顺序推送至功能块实例队列中。
然后,计算机设备执行功能块实例队列中的目标待执行功能代码块对应的目标待执行功能块实例,其中,目标待执行功能代码块为待执行功能代码块列表中的功能代码块。若此时待执行功能代码块列表中不包含循环结束功能代码块,则当功能块实例队列中的目标待执行功能块实例执行成功时,计算机设备将继续根据指向关系确定目标待执行功能代码块所指向的新的待执行功能代码块列表,直至确定针对所述循环功能代码块进行的第k轮迭代执行完成。若k小于N,计算机设备将继续针对循环功能代码块进行第k+1轮迭代执行。
为便于理解上述过程,请再参见图6,假设在第k轮迭代执行的过程中,计算机设备 创建了循环起始功能代码块指向的节点a和节点b各自对应的功能块实例,计算机设备会将节点a和节点b各自对应的功能块实例一起推送至功能块实例队列中。当计算机设备从功能块实例队列中获取并执行节点a对应的功能块实例后,计算机设备会根据指向关系确定节点a指向的功能代码块列表,此时下一批功能代码块列表仅包含节点c,计算机设备会创建节点c对应的功能块实例,然后推送至功能块实例队列中,等到计算机设备从功能块实例队列中获取并执行节点c对应的功能块实例后,计算机设备再根据指向关系确定节点c指向的功能代码块列表,以此类推。如此,以节点a为起点的分支中包含的节点均会被执行。同理,以节点b为起点的分支中包含的节点也会被执行。因此,在第k轮迭代执行的过程中,所有循环功能代码块会根据指向关系被执行,直至第k轮迭代执行完成。
可选的,若新的待执行功能代码块列表中包含循环结束功能代码块,则查询循环结束功能块实例队列,若循环结束功能块实例队列为空队列,则创建循环结束功能代码块对应的循环结束功能块实例,将循环结束功能块实例推送至循环结束功能块实例队列中;若循环结束功能块实例队列不为空队列,计算机设备则可以不再创建循环结束功能代码块对应的循环结束功能块实例。
可以理解,因为循环功能代码块中可能包含多个分支,而这些分支的末尾节点最终指向的均为循环结束功能代码块。当计算机设备确定一个待执行功能代码块列表中包含的是循环结束功能代码块时,只能说明循环功能代码块的当前分支在本轮迭代执行中已经完成了。此外,针对循环结束功能代码块,因为不用循环执行,计算机设备只需要创建一次其对应的循环结束功能代码块实例即可。不过,循环结束功能代码块实例应该在循环功能代码块循环执行结束完成后执行。因此,当计算机设备确定一个待执行功能代码块列表中包含的是循环结束功能代码块时,计算机设备会去查询循环结束功能块实例队列,其中,循环结束功能块实例队列用于暂存循环执行过程中创建的循环结束功能代码块实例,若计算机设备查询到循环结束功能块实例队列为空队列,说明计算机设备还未创建过循环结束功能代码块对应的循环结束功能代码块实例,此时计算机设备会去创建循环结束功能代码块实例,并将其推送至循环结束功能块实例队列中;若计算机设备查询到循环结束功能块实例队列不为空队列,说明计算机设备已经创建过循环结束功能代码块对应的循环结束功能代码块实例了。
为便于理解,可以再参见图6,如图6所示,针对分支[节点a,节点c],在节点c执行完成时,计算机设备会确定其指向的下一个节点为节点e,因为节点e对应循环结束功能代码块,计算机设备会去查询循环结束功能块实例队列,假设该循环结束功能块实例队列为空队列,计算机设备会创建节点e对应的循环结束功能块实例,并将该循环结束功能块实例推送至循环结束功能块实例队列中暂存;若循环结束功能块实例队列中已经存储有循环结束功能块实例,计算机设备就不用再创建节点e对应的循环结束功能块实例了。至此,计算机设备可以确定分支[节点a,节点c]在本轮迭代执行中的执行结束,换言之,计算机设备执行完某个节点后,若确定该节点指向的下一个节点为循环结束功能代码块,则可以判定在本轮迭代执行中,以该节点为末尾节点的分支执行完成了,但不能直接确定循环功能代码块的本轮迭代执行完成了。
可选的,计算机设备可以通过检测执行实例的执行数据来确定第k轮迭代执行是否完成。其中,执行数据可以包括队列实例数量和实例执行数量,可以参见下述表2:
表2

可选的,计算机设备在创建执行实例的同时,可以先初始化队列实例数量为第一默认参数,初始化实例执行数量为第二默认参数。其中,第一默认参数和第二默认参数可以相同,也可以不同,通常情况下,第一默认参数和第二默认参数可以均设置为0。计算机设备会与执行实例相关联的功能块实例的执行状态,对队列实例数量进行累加处理或递减处理,对实例执行数量进行累加处理或递减处理;若计算机设备检测到队列实例数量等于第一默认参数,实例执行数量等于第二默认参数,则确定检测到执行实例的执行数据满足执行结束条件。
例如,请再参见图6,在节点c和节点d执行完成时,因为其指向的节点e为循环结束功能代码块,计算机设备获取到循环结束功能代码块时,只会在第一次创建其对应的循环结束功能块实例,再获取到该循环结束功能代码块就不创建其对应的循环结束功能块实例了,而且创建的循环结束功能块实例也不是推送至功能块实例队列中,而是推送至循环结束功能块实例队列中暂存,因此,当节点c和节点d执行完成后,队列实例数量会递减为0,实例执行数量会递减为0。因此,当检测到执行实例的执行数据满足执行结束条件时,可以确定本轮迭代执行完成。
假设与执行实例相关联的功能块实例包括目标功能块实例,上述根据与执行实例相关联的功能块实例的执行状态,对队列实例数量进行累加处理或递减处理,对实例执行数量进行累加处理或递减处理的一个可行实施过程,可以为:当目标功能块实例被推送至所述功能块实例队列中时,对所述队列实例数据进行默认累加处理;当执行功能块实例队列中的目标功能块实例时,对实例执行数量进行默认累加处理,对队列实例数量进行默认递减处理。然后,当目标功能块实例执行完成时,计算机设备可以确定新的目标功能块实例的创建情况;若新的目标功能块实例创建成功,且新的目标功能块实例对应的功能代码块为循环结束功能代码块,则对实例执行数量进行默认递减处理;若新的目标功能块实例创建成功,且新的目标功能块实例对应的功能代码块不为循环结束功能代码块,则在新的目标功能块实例被推送至功能块实例队列后,根据新的目标功能块实例的数量对队列实例数量进行累加处理,对实例执行数量进行默认递减处理;若新的目标功能块实例创建失败,则对实例执行数量进行默认递减处理。
其中,新的目标功能块实例是指目标功能块实例对应的目标功能代码块指向的功能代码块对应的功能块实例。其中,默认累加处理是指在目标数据的基础上进行加一处理,例如,对队列实例数量进行默认累加处理,即指对队列实例数量进行加一,得到新的队列实例数量;对实例执行数量进行默认累加处理,即指对实例执行数量进行加一,得到新的实例执行数量;同理,默认递减处理是指在目标数据的基础上进行减一处理。其中,根据新的目标功能块实例的数量对队列实例数量进行累加处理,就是将队列实例数量加上新的目标功能块实例的数量,得到新的队列实例数量。
由上述可知,实例执行数量与队列实例数量一开始初始化为0,然后在计算机设备开始执行实例后,实例执行数量与队列实例数量会根据目标功能块实例的执行状态进行累加或者递减处理,只要目标功能块实例执行完成时,有新的目标功能块实例被创建且该新的目标功能块实例不为循环结束功能块实例,计算机设备就会根据新的目标功能块实例对队 列实例数量进行累加处理,实例执行数量与队列实例数量就不会同时递减为0,此时执行实例的执行数据不会满足执行结束条件。只有当目标功能块实例执行完成时,计算机设备没有创建新的目标功能块实例或者其创建的新的目标功能块实例为循环结束功能块实例,计算机设备只会对实例执行数量进行默认递减处理,此时如果队列实例数量为0,实例执行数量也递减为0,执行实例的执行数据就会满足执行结束条件。所以,计算机设备在对循环功能代码块进行k轮迭代执行时,尽管循环功能代码块可能包含多个分支,但由于每个分支的末尾节点指向的功能代码块均为循环结束功能代码块,因此当所有分支的末尾节点执行完成后,队列实例数量与实例执行数量均会递减为0,因此计算机设备可以根据执行数据是否满足执行结束条件,来确定针对循环功能代码块进行的第k轮迭代执行是否完成。
可选的,当计算机设备确定针对循环功能代码块进行的第N轮迭代执行完成时,计算机设备针对循环功能代码块的循环执行就结束了,但是针对至少两个功能代码块的执行还没有结束。计算机设备需要将循环结束功能块实例队列中的循环结束功能块实例推送至功能块实例队列中,继续检测执行实例的新的执行数据;若检测到新的执行数据满足执行结束条件,且循环结束功能块实例队列为空队列,则确定至少两个功能代码块执行完成。
可以理解,当循环结束功能块实例推送至功能块实例队列中后,随着计算机设备从功能块实例队列中取出该循环结束功能块实例并执行后,至少两个功能代码块中位于循环结束功能代码块之后的功能代码块会根据指向关系被顺序执行,在至少两个功能代码块中位于循环结束功能代码块之后的功能代码块被顺序执行的过程中,计算机设备也会继续对执行数据进行累加处理或者递减处理。当计算机设备再次检测到新的执行数据满足执行结束条件时,有两种可能,一是出现了新的循环功能代码块,新的循环功能代码块的循环执行与上述循环功能代码块的循环执行一样,这里不再赘述;二是至少两个功能代码块中位于循环结束功能代码块之后的功能代码块全部被执行,没有新的功能块实例建立了,新的执行数据也会满足执行结束条件。可以理解,两种情况中,第一种情况下循环结束功能块实例队列必然会暂存有新的循环结束功能块实例,因此,计算机只要确定循环结束功能块实例队列为空队列,即可以确定至少两个功能代码块中位于循环结束功能代码块之后的功能代码块全部被执行,而至少两个功能代码块中位于循环结束功能代码块之前的功能代码块也已经执行完成,故计算机设备可以确定至少两个功能代码块执行完成。
采用本申请实施例提供的方法,对象在通过工作流引擎创建工作流时,针对想要多次执行的功能代码块,只需将其放入循环起始功能代码块与循环结束功能代码块之间即可,对象无需具备其他的编程经验,降低了工作流引擎的使用门槛,提高了工作流引擎的易用性和功能性。
进一步地,请参见图7,图7是本申请实施例提供的一种数据处理方法的流程示意图。其中,该方法可以由计算机设备执行,其中,计算机设备可以为上述图1所示的业务服务器100,也可以为上述图1所示的终端设备集群中的任一终端设备,例如终端设备10c。以下将以本方法由计算机设备执行为例进行说明,其中,该数据处理方法至少可以包括以下步骤S201-步骤S205:
步骤S201,接收针对目标工作流的触发请求,创建所述目标工作流对应的执行实例。
具体的,步骤S201的执行过程可以参见上述步骤S101的描述,这里不再进行赘述。
步骤S202,在创建所述目标工作流对应的执行实例的同时,创建所述执行实例对应的执行实例表;所述执行实例表用于记录所述执行实例的执行情况。
具体的,执行实例可以表示为execution,执行实例表即execution表,该execution表用于记录目标工作流的流程关系、执行时间等信息,其表结构如下表3所示:
表3
其中,较为重要的是apps字段,其记录了目标工作流的流程结构,该流程结构中包含了目标工作流对应的至少两个功能代码块之间的指向关系。计算机设备就是依据其流程结构中包含的指向关系对至少两个功能代码块进行遍历执行的。
其中,表3中记录的apps中保存的目标工作流的一种流程数据结构可以参考下述表4:
表4
可以理解,每个App都有一个唯一的InstId,计算机设备可以通过InstId定位识别流程中的App。计算机设备创建execution表后,会将其入库至数据库中。同时,计算机设备会将上述执行实例id推送至execution消息队列,然后等待被分布式工作流引擎集群消费执行。
为便于理解,请一并参见图8,图8是本申请实施例提供的一种执行实例消息队列的示意图。如图8所示,针对新生成的执行实例81,计算机设备会先将其推送至执行实例消息队列800中,该执行实例81会位于执行实例消息队列800的队尾。计算机设备可以通过工作流引擎集群801来消费执行实例消息队列800中的执行实例,其中,工作流引擎集群801可以包含有多个容器,容器之间互相独立,即不同容器执行不同的执行实例的过程将互不影响。每当计算机设备检测到工作流引擎集群符合实例执行条件时,计算机设备就会从执行实例消息队列的队首获取执行实例,然后将其转移至目标容器中执行。其中, 工作流引擎集群符合实例执行条件可以是指工作流引擎集群具有空闲的容器。例如,如图8所示,假设计算机设备检测到容器1空闲,计算机设备会从执行实例消息队列800的队首获取执行实例82,然后将其转移至容器1进行执行。
步骤S203,顺序获取所述功能块实例队列中与所述执行实例相关联的第一个功能块实例,作为待处理功能块实例;所述待处理功能块实例对应待处理功能块实例标识和待处理功能块实例索引;所述待处理功能块实例标识和所述待处理功能块实例索引是根据待处理功能代码块创建所述待处理功能块实例时生成的;目标功能块实例索引用于表征所述待处理功能代码块的执行次数;所述待处理功能代码块属于所述至少两个功能代码块。
具体的,计算机设备通过工作流执行引擎集群获取目标工作流对应的执行实例后,会初始化执行实例中每个功能代码块的状态为待处理,然后根据指向关系,获取目标工作流中的起始节点,即触发器App(触发功能代码块),然后创建触发器App实例,将触发器App实例推送至App实例队列(即功能块实例队列)中等待执行。在执行实例的后续执行过程中,计算机设备创建的每个App对应的App实例,均会推送至App实例队列。
为便于理解,请一并参见图9,图9是本申请实施例提供的一种功能块实例队列的示意图。如图9所示,App实例队列900与上述execution消息队列800结构一样,新创建的App实例,例如,App实例91会被推送至App实例队列900的队尾。计算机设备在通过工作流引擎集群901消费App实例时,会获取App实例队列的队首的App实例,即App实例92。此外,App实例队列的一种可选元素格式,可以为:appInst#executionId#appInstId#index,即app实例/执行记录id/app实例id/索引,基于该可选元素格式,在计算机设备消费App实例之后,可以定位到具体的执行实例以及某个App某次的执行数据。
其中,上述表4所示的数据结构中,App实例拥有一个Parameters数组(入参),其结构为<参数key,参数value,参数类型,参数描述>。其中,参数类型有:string(字符串)、boolean(布尔)、number(数字)等。参数中value既可以使用常量(数字或字符串),也可以使用路径语法表达式引用前面任意一个app实例的输出结果。
步骤S204,执行所述待处理功能块实例,得到目标执行结果。
具体的,待处理功能块实例中可以包含需求数据获取路径,计算机设备执行待处理功能块实例,得到目标执行结果的一个可行实施过程,可以为:查询执行引擎容器的计算资源空闲情况,确定计算资源空闲最多的执行引擎容器作为目标执行引擎容器;将待处理功能块实例从功能块实例队列中转移至目标执行引擎容器,在目标执行引擎容器中根据需求数据获取路径获取需求数据,根据需求数据执行待处理功能块实例,得到目标执行结果。
其中,需求数据获取路径是指App实例对应的Parameters数组中使用的路径语法表达式。因为每一个App实例的运行时数据都会存储到DB(数据库)中,因此计算机设备在创建执行实例后,会先把当前execution执行实例下的所有App实例执行数据都加载到内存中,形成一个App实例ID的映射map(地图)全局变量结构。
为便于理解,请一并参见图10,图10是本申请实施例提供的一种工作流执行时内存的全局变量数据结构的示意图。通过如图10所示的结构,计算机设备可以通过App实例的功能块实例id进行定位,全局获取到工作流中任意一个App实例的输入、输出数据,从而将App实例参数中使用的路径语法表达式解析替换成对应的数据。
步骤S205,根据所述待处理功能块实例标识和待处理功能块实例索引,在所述执行实例表中记录所述目标执行结果。
具体的,因为流程中某一个App可以被执行多次,因此其会对应多个执行结果,计算机设备在执行实例表中通过待处理功能块实例标识来记录目标执行结果对应的待处理功 能代码块时,还需要通过待处理功能块实例索引来记录是目标执行结果是该待处理功能代码块对应的哪一次执行结果。
可选的,计算机设备在获取待处理功能块实例时,会将该功能块实例对应的功能块实例表中的状态更新为处理中,并设置开始执行时间。其中,功能块实例表可以表示为App实例表,用于记录一个功能代码块的执行情况。功能块实例表的一个可用结构可以参见下述表5:
表5
可选的,因为流程中某一个App可以被执行多次,因此可以在该App对应的App实例表中创建多条数据。例如,App实例的多个执行结果可以表示为:[{app_inst_id=x,index=0},{app_inst_id=x,index=1},…,{app_inst_id=x,index=n}],通过app_inst_id和index字段可以唯一确认App的某次执行结果。
其中,表5中的apps字段存储的是一个Json结构的数据,用于记录当前App实例在某次的执行结果,前置和后置的App,入参以及运行时数据信息。Apps字段的一个可用格式可以参见下述表6:
表6

其中,apps中的App实例成员Index和MaxIndexCount的说明可以参见下述表7:
表7
需要说明的是,当要获取执行实例中某个App的执行结果,由于App可能在For循环体中执行多次,则首先需要获取到它执行的次数,即MaxIndexCount,然后依次根据App的InstId和Index索引依次获取到App所有的执行结果。
可选的,当创建待处理功能代码块对应的待处理功能块实例时,获取用于唯一标识待处理功能代码块的标识,作为待处理功能块实例对应的待处理功能块实例标识;若未在执行实例表中查找到待处理功能块实例标识,则确定待处理功能块实例索引为默认索引;若在执行实例表中查找到待处理功能块实例标识,则获取与待处理功能块实例标识关联的记录时间最晚的历史索引,对历史索引进行累加处理,得到待处理功能块实例索引。
简言之,计算机设备可以获取待处理功能代码块最近一次执行时的历史索引,将该历史索引加一,就得到了待处理功能块实例对应的待处理功能块实例标识;不过若待处理功能代码块之前并未执行过,则设置待处理功能块实例标识为默认索引,也就是0就可以了。
可选的,计算机设备在创建待处理功能块实例时,还需要更新待处理功能代码块对应的待处理功能块实例表中的MaxIndexCount,同理,计算机设备可以直接从该待处理功能块实例表中获取该待处理功能代码块最近一次执行时的MaxIndexCount,然后对最近一次执行时的MaxIndexCount进行加一,就得到本次执行对应的MaxIndexCount,然后将本次执行对应的MaxIndexCount更新写入待处理功能块实例表中。
可选的,针对不同的工作流结构,也可以采取不同的参数调整方式来确定index和MaxIndexCount。假设计算机设备执行完了当前App,需要创建当前App指向的nextApp(下一个App)对应的nextAppInst(下一个App实例)。首先,计算机设备可以获取nextApp对应的InstId,通过这个InstId查询nextApp对应的App实例表,从中获取nextAppInst的数据(包括模板类型、参数、位置等),然后构造nextAppInst对应的实例数据,进而,计算机设备可以根据nextApp对应的executionId和appInstId获取nextApp最新一次执行时的Index值:lastIndex,并初始化变量idx=lastIndex+1。需要说明的是,若nextApp是第一次执行,则此时其对应的App实例表中没有执行记录,则默认lastIndex为-1。然后,计算机设备就可以根据当前App与nextApp之间的逻辑结构来确定nextAppInst对应的index和MaxIndexCount。
为便于理解计算机设备基于当前App确定nextAppInst对应的index的过程,请一并参见图11,图11是本申请实施例提供的一种索引确定的场景示意图。计算机设备确定 nextAppInst对应的index主要分为四种情况:(1)如图11所示的工作流1中,当前App是循环开始功能代码块1(即For循环开始App),此时其指向的nextApp为功能代码块X1,则计算机设备会确定nextAppInst.Index=idx;(2)如图11所示的工作流2中,假设当前App是功能代码块X2,其指向的nextApp为功能代码块Y2,此时当前App不是For循环开始App,且当前App不在环中,但是nextApp在环中,则计算机设备可以确定nextAppInst.Index=idx。其中,环是指功能代码块之间的指向关系在满足条件的情况可以形成环,工作流2中的功能代码块Y2与功能代码块N2就形成了一个环。(3)如图11所示的工作流3中,假设当前App是功能代码块X3,其指向的nextApp为功能代码块Y3,此时当前App不是For循环开始App,且当前App在环中,则计算机设备可以确定nextAppInst.Index=idx。(4)如图11所示的工作流4中,假设当前App是功能代码块X4,其指向的nextApp为功能代码块Y4,此时当前App不是For循环开始App,且当前App不在环中,nextApp也不在环中,则计算机设备可以确定nextAppInst.Index=todoApp.Index,其中,todoApp.Index指当前App的索引。
为便于理解计算机设备基于当前App确定nextAppInst对应的MaxIndexCount的过程,请一并参见图12,图12是本申请实施例提供的一种索引确定的场景示意图。计算机设备确定nextAppInst对应的MaxIndexCount主要分为四种情况:(1)如图12所示的工作流1中,当前App是功能代码块X1,此时其指向的nextApp为功能代码块Y1,此时当前App不在环中,但nextApp在环中,则计算机设备会确定nextAppInst.MaxIndexCount=idx+1;(2)如图12所示的工作流2中,当前App是功能代码块Y2,此时其指向的nextApp为功能代码块N2,此时当前App在环中,但nextApp不在环中,则计算机设备会确定nextAppInst.MaxIndexCount=idx+1;(3)如图12所示的工作流3中,当前App是功能代码块Y3,此时其指向的nextApp为功能代码块N3,此时当前App不在环中,nextApp也不在环中,则计算机设备会确定nextAppInst.MaxIndexCount=todoApp.MaxIndexCount,其中,todoApp.MaxIndexCount指当前App的MaxIndexCount;(4)如图12所示的工作流4中,当前App是循环开始功能代码块4,此时其指向的nextApp为功能代码块X4,此时计算机设备会确定nextAppInst.MaxIndexCount=最大循环次数,其中,最大循环次数即为上文中的循环参数。
需要说明的是,在上述确定nextAppInst对应的index和MaxIndexCoun的过程中,如果nextAppInst为循环结束功能块实例,计算机设备需要将其Index重置为0,MaxIndexCount重置为1。
采用上述基于当前App来确定nextAppInst对应的index和MaxIndexCount的方式,在后续对App的执行结果进行数据组装时会更加容易,因为无环情况下index和MaxIndexCount会向上继承,也就是同一轮执行的App对应的执行结果对应的index和MaxIndexCount相同。
进一步地,请参见图13,图13是本申请实施例提供的一种数据处理方法的流程示意图。其中,该方法可以由计算机设备执行,其中,计算机设备可以为上述图1所示的业务服务器100,也可以为上述图1所示的终端设备集群中的任一终端设备,例如终端设备10c。以下将以本方法由计算机设备执行为例进行说明,其中,该数据处理方法至少可以包括以下步骤S301-步骤S305:
步骤S301,响应针对目标工作流的创建操作,显示工作流编辑页面。
步骤S302,响应针对至少两个功能块控件的选择连线操作,在所述工作流编辑页面显示由所述至少两个功能块控件构成的工作流控件树;所述至少两个功能块控件包括循环起始功能块控件和循环结束功能块控件。
步骤S303,响应针对工作流控件树中的所述循环起始功能块控件的触发操作,为所述循环起始功能块控件设置循环参数。
具体实现时,计算机设备可以响应针对工作流控件树中的所述循环起始功能块控件的触发操作,显示循环编辑文本框,响应针对所述循环编辑文本框的输入操作,为所述循环起始功能块控件设置循环参数。
步骤S304,响应针对所述工作流控件树的创建操作,创建目标工作流,将所述目标工作流发送至工作流引擎;所述目标工作流包含所述至少两个功能块控件各自对应的功能代码块;所述至少两个功能代码块之间的指向关系是根据所述至少两个功能块控件的连接关系确定的;所述至少两个功能代码块包括所述循环起始功能块控件对应的循环起始功能代码块和所述循环结束功能块控件对应的循环结束功能代码块。
步骤S305,响应针对所述目标工作流的触发操作,将针对所述目标工作流的触发请求发送至所述工作流引擎。
将针对目标工作流的触发请求发送至工作流请求,可以使所述工作流引擎创建所述目标工作流对应的执行实例;进而,根据该执行实例中循环起始功能代码块指示的循环参数、以及该执行实例中的所述指向关系,指示所述循环起始功能代码块与所述循环结束功能代码块之间的循环功能代码块进行循环执行。
具体的,步骤S301-步骤S305的实现过程可以参见上述图2a所示的场景示意图,本申请在此不作赘述。
采用本申请实施例提供的方法,对象在通过工作流引擎创建工作流时,针对想要多次执行的功能代码块,只需将其放入循环起始功能代码块与循环结束功能代码块之间即可,对象无需具备其他的编程经验,降低了工作流引擎的使用门槛,提高了工作流引擎的易用性和功能性。
进一步地,请参见图14a-图14b,图14a-图14b是本申请实施例提供的一种支持循环的工作流执行实现的整体流程示意图。由图14a和图14b可知,该整体流程可以由计算机设备执行,主要包括以下步骤:
步骤S601,触发工作流。
具体的,工作流触发的方式很多,例如,网页回调,即上述webhook调用;指令请求,即上述指令触发;周期任务,即上述Cron触发。计算机设备可以根据不同的触发请求确定工作流的触发,具体实现过程可以参见上述图3对应实施例中步骤S101的描述,这里不再进行赘述。
步骤S602,创建工作流的执行实例。
具体的,计算机设备会创建执行实例以及执行实例表,创建完成后,计算机设备会如上述图8所示,先将执行实例推送至执行实例消息队列中等待执行。
步骤S603,获取执行实例。
具体的,计算机设备会按序从执行实例消息队列获取执行实例。
步骤S604,解析执行实例。
具体的,计算机设备从执行实例消息队列中获取到执行实例后,会先解析该执行实例。
具体的,步骤S602-步骤S604的实现,可以参见上述图7所对应实施例中步骤S202,这里不再进行赘述。
步骤S605,初始化各个功能代码块初始状态,初始化执行实例的执行数据(队列实例数量和实例执行数量)。
具体的,计算机设备解析完执行实例后,会将执行实例表中的各个功能代码块的初始状态更改为待处理状态,然后初始化队列实例数量=0,初始化实例执行数量=0。
步骤S606,获取起始功能块实例并推送至功能块实例队列中。
步骤S607,对队列实例数量进行累加。
具体的,计算机设备会对队列实例数量+1。
步骤S608,从功能块实例队列中获取功能块实例。
步骤S609,设置功能块实例的状态为执行中。
步骤S610,对实例执行数量进行累加,对队列实例数量进行递减。
具体的,计算机设备会对实例执行数量+1,对队列实例数量+1。
具体的,步骤S605-步骤S610的实现过程,可以参见上述步骤S104中所述的根据与执行实例相关联的功能块实例的执行状态,对队列实例数量进行累加处理或递减处理,对实例执行数量进行累加处理或递减处理的过程,这里不再进行赘述。
步骤S611,解析功能块实例中的路径语法表达式,获取待执行数据。
具体的,计算机设备可以根据功能块实例对应的路径语法表达式获取功能块实例执行时所需的数据。
步骤S612,根据待执行数据执行功能块实例,得到执行结果。
步骤S613,执行结果入库。
具体的,计算机设备可以根据功能块实例对应的索引和功能块实例标识将执行结果写入数据库。
具体的,步骤S611-步骤S613可以参见上述图7所对应实施例中步骤S203和步骤S204的描述,这里不再进行赘述。
步骤S614,确定当前功能代码块是否为循环开始功能代码块。
具体的,当前功能代码块即刚刚执行的功能块实例对应的功能代码块。若是,则执行步骤S615;若否,则执行步骤S616。
步骤S615,设置循环次数:N=循环参数。
步骤S616,设置循环次数:N=1。
步骤S617,获取当前功能代码块所指向的下一批功能代码块列表。
步骤S618,根据循环次数进行N次循环。
具体的,一次循环的过程从②节点对应的步骤S619开始,一直到步骤S629,可以确定一次循环是否结束。
步骤S619,创建下一个功能块实例。
具体的,计算机设备会根据下一批功能代码块列表进行一次内部循环,建立下一批功能代码块列表包含的功能代码块分别对应的功能块实例。
步骤S620,确定下一个功能块实例对应的索引和最大循环次数。
具体的,索引为上述index;最大循环次数为上述MaxIndexCount。
具体的,确定方式可以参见上述图11和图12所示的参数调整方式。
步骤S621,确定下一个功能代码块是否为循环结束功能代码块。
具体的,计算机设备也可以先确定下一个功能代码块是否为循环结束功能代码块,再确定是否创建下一个功能代码块对应的功能块实例,本申请在此不作限制。若下一个功能代码块为循环结束功能代码块,则执行步骤S622,否则执行步骤S627。
步骤S622,重置索引=0,最大循环次数=1。
步骤S623,确定下一个功能代码块是否第一次创建。
具体的,因为此时的下一个功能代码块为循环结束功能代码块,因此其只需要创建一次即可。若计算机设备确定下一个功能代码块为第一次创建,则执行步骤S624;否则执行步骤S625
步骤S624,将下一个功能块实例推送到循环结束功能块实例队列中,执行步骤S626。
步骤S625,舍弃下一个功能块实例,执行步骤S626。
步骤S626,对实例执行数量进行递减,执行步骤S629。
具体的,对实例执行数量-1。
步骤S627,将下一个功能块实例推送到功能块实例队列中。
步骤S628,对队列实例数量进行累加,对实例执行数量进行递减。
具体的,对队列实例数量+1;对实例执行数量-1。
步骤S629,确定执行数据是否满足执行结束条件。
具体的,即确定队列实例数量和实例执行数量是否均为0。若否,则等待计算机设备执行①节点对应的步骤S608;若是,说明本次循环结束,则执行步骤S630。
步骤S630,确定外层循环是否结束。
具体的,若外层循环没有结束,说明循环的次数还没有达到N次,计算机设备需要从②节点对应的步骤S619开始进行下一轮循环,此时步骤S619中创建的下一个功能块实例是根据循环开始功能代码块所指向的下一批功能块列表确定的。若外层循环结束,则执行步骤S631。
步骤S631,确定循环结束功能块实例队列是否有循环结束功能块实例。
具体的,若有,则执行步骤S632;若没有,则执行步骤S634。
步骤S632,对队列实例数量进行累加。
具体的,即对队列实例数量+1。
步骤S633,将循环结束功能块实例推送到功能块实例队列中,等待计算机设备执行①节点对应的步骤S608。
步骤S634,清理功能块实例缓存。
具体的,缓存是指执行实例在运行过程中暂时存储的数据。
步骤S635,更新执行实例状态并更新数据库。
具体的,步骤S614-步骤S635的实现过程,可以一并参见上述图3所对应实施例中步骤S104的描述和上述图4所对应实施例中步骤S205的可选描述,这里不再进行赘述。
通过本申请实施例提供的方法,基于App的细粒度执行机制并结合For循环索引Index调整算法,实现了流程引擎可视化的方式使用For循环遍历功能,使得一些数组或列表遍历执行的场景得以实现。基于该方案设计实现的系统,支持使用可视化的低代码方式来实现For循环遍历,极大降低了系统的使用门槛,不需要对象掌握专门的编程经验,极大提高了效率。
请参见图15,图15是本申请实施例提供的一种数据处理装置的结构示意图。该数据处理装置可以是运行于计算机设备的一个计算机程序(包括程序代码),例如该数据处理装置为一个应用软件;该装置可以用于执行本申请实施例提供的数据处理方法中的相应步骤。如图15所示,该数据处理装置1可以包括:触发模块101、循环起始模块102、循环确认模块103以及循环执行模块104。
触发模块101,用于创建目标工作流对应的执行实例;执行实例包括目标工作流包含的至少两个功能代码块之间的指向关系;至少两个功能代码块包括循环起始功能代码块和循环结束功能代码块;
循环起始模块102,用于获取循环起始功能代码块对应的循环参数;
循环确认模块103,用于根据指向关系,确定循环起始功能代码块与循环结束功能代码块之间的功能代码块,作为循环功能代码块;
循环执行模块104,用于根据循环参数以及指向关系,循环执行循环功能代码块。
其中,触发模块101、循环起始模块102、循环确认模块103以及循环执行模块104的具体实现方式可以参见上述图3所对应实施例中步骤S101-步骤S104的具体描述,这里不再进行赘述。
其中,所述循环起始模块102具体用于:
创建所述循环起始功能代码块对应的循环起始功能块实例,将所述循环起始功能块实例推送至功能块实例队列中,当所述功能块实例队列中的所述循环起始功能块实例执行成功时,获取所述循环起始功能代码块对应的循环参数;
所述循环执行模块104具体用于:
根据所述所述循环参数、所述功能块实例队列以及所述指向关系,循环执行所述循环功能代码块。
其中,循环参数为N,N为大于或等于1的正整数;
循环执行模块104,包括:第一迭代单元1041以及第二迭代单元1042。
第一迭代单元1041,用于在针对循环功能代码块进行的第k轮迭代执行过程中,根据指向关系确定循环起始功能代码块指向的待执行功能代码块列表;k为小于或等于N的正整数;
第一迭代单元1041,还用于若待执行功能代码块列表中不包含循环结束功能代码块,且功能块实例队列中目标待执行功能代码块对应的目标待执行功能块实例执行成功,则根据指向关系确定目标待执行功能代码块指向的新的待执行功能代码块列表,直至确定针对循环功能代码块进行的第k轮迭代执行完成;目标待执行功能代码块为待执行功能代码块列表中的功能代码块;
第二迭代单元1042,用于若k小于N,则继续针对循环功能代码块进行第k+1轮迭代执行。
其中,第一迭代单元1041以及第二迭代单元1042的具体实现方式可以参见上述图3所对应实施例中步骤S104的具体描述,这里不再进行赘述。
其中,上述数据处理装置1,还包括:第三迭代模块105、推送模块106以及第一检测模块107。
第三迭代模块105,用于若新的待执行功能代码块列表中包含循环结束功能代码块,则查询循环结束功能块实例队列,若循环结束功能块实例队列为空队列,则将循环结束功能代码块对应的循环结束功能块实例推送至循环结束功能块实例队列中;
第三迭代模块105,还用于若检测到执行实例的执行数据满足执行结束条件,则确定针对循环功能代码块进行的第k轮迭代执行完成;
推送模块106,用于当确定针对循环功能代码块进行的第N轮迭代执行完成时,将循环结束功能块实例队列中的循环结束功能块实例推送至功能块实例队列中,检测执行实例的新的执行数据;
第一检测模块107,用于若检测到新的执行数据满足执行结束条件,且循环结束功能块实例队列为空队列,则确定至少两个功能代码块执行完成。
其中,第三迭代模块105、推送模块106以及第一检测模块107的具体实现方式可以参见上述图3所对应实施例中步骤骤S104的可选描述,这里不再进行赘述。
其中,执行数据包括队列实例数量和实例执行数量;
上述数据处理装置1,还包括:数据初始化模块108、第一数据更新模块109以及第二检测模块110。
数据初始化模块108,用于在创建执行实例的同时,初始化队列实例数量为第一默认参数,初始化实例执行数量为第二默认参数;
第一数据更新模块109,用于根据与执行实例相关联的功能块实例的执行状态,对队列实例数量进行累加处理或递减处理,对实例执行数量进行累加处理或递减处理;
第二检测模块110,用于若检测到队列实例数量等于第一默认参数,实例执行数量等于第二默认参数,则确定检测到执行实例的执行数据满足执行结束条件。
其中,数据初始化模块108、第一数据更新模块109以及第二检测模块110的具体实现方式可以参见上述图3所对应实施例中步骤S104的可选描述,这里不再进行赘述。
其中,与执行实例相关联的功能块实例包括目标功能块实例;
第一数据更新模块109,包括:第一更新单元1091以及第二更新单元1092。
第一更新单元1091,用于当目标功能块实例被推送至功能块实例队列中时,对队列实例数据进行累加处理;
第二更新单元1092,用于当执行功能块实例队列中的目标功能块实例时,对实例执行数量进行默认累加处理,对队列实例数量进行默认递减处理。
其中,第一更新单元1091以及第二更新单元1092的具体实现方式可以参见上述图3所对应实施例中步骤S104的具体描述,这里不再进行赘述。
其中,上述数据处理装置,还包括:第二数据更新模块111。
第二数据更新模块111,用于当目标功能块实例执行完成时,确定新的目标功能块实例的创建情况;
第二数据更新模块111,还用于若新的目标功能块实例创建成功,且新的目标功能块实例对应的功能代码块为循环结束功能代码块,则对实例执行数量进行默认递减处理;
第二数据更新模块111,还用于若新的目标功能块实例创建成功,且新的目标功能块实例对应的功能代码块不为循环结束功能代码块,则在将新的目标功能块实例推送至功能块实例队列后,根据新的目标功能块实例的数量对队列实例数量进行累加处理,对实例执行数量进行默认递减处理;
第二数据更新模块111,还用于若新的目标功能块实例创建失败,则对实例执行数量进行默认递减处理。
其中,第二数据更新模块111的具体实现方式可以参见上述图3所对应实施例中步骤S104的具体描述,这里不再进行赘述。
其中,上述数据处理装置1,还包括:表创建模块112、实例获取模块113、实例执行模块114以及表记录模块115。
表创建模块112,用于在创建目标工作流对应的执行实例的同时,创建执行实例对应的执行实例表;执行实例表用于记录执行实例的执行情况;
实例获取模块113,用于顺序获取功能块实例队列中与执行实例相关联的第一个功能块实例,作为待处理功能块实例;待处理功能块实例对应待处理功能块实例标识和待处理功能块实例索引;待处理功能块实例标识和待处理功能块实例索引是根据待处理功能代码块创建待处理功能块实例时生成的;目标功能块实例索引用于表征待处理功能代码块的执行次数;待处理功能代码块属于至少两个功能代码块;
实例执行模块114,用于执行待处理功能块实例,得到目标执行结果;
表记录模块115,用于根据待处理功能块实例标识和待处理功能块实例索引,在执行实例表中记录目标执行结果。
其中,表创建模块112、实例获取模块113、实例执行模块114以及表记录模块115的具体实现方式可以参见上述图7所对应实施例中步骤S201-步骤S205的具体描述,这里不再进行赘述。
其中,待处理功能块实例包含有需求数据获取路径;
实例执行模块114,包括:容器确定单元1141以及容器执行单元1142。
容器确定单元1141,用于查询执行引擎容器的计算资源空闲情况,确定计算资源空闲最多的执行引擎容器作为目标执行引擎容器;
容器执行单元1142,用于将待处理功能块实例从功能块实例队列中转移至目标执行引擎容器,在目标执行引擎容器中根据需求数据获取路径获取需求数据,根据需求数据执行待处理功能块实例,得到目标执行结果。
其中,容器确定单元1141以及容器执行单元1142的具体实现方式可以参见上述图7所对应实施例中步骤S204的具体描述,这里不再进行赘述。
其中,上述数据处理装置1,还包括:标识确定模块116以及索引确定模块117。
标识确定模块116,用于当创建待处理功能代码块对应的待处理功能块实例时,获取用于唯一标识待处理功能代码块的标识,作为待处理功能块实例对应的待处理功能块实例标识;
索引确定模块117,用于若未在执行实例表中查找到待处理功能块实例标识,则确定待处理功能块实例索引为默认索引;
索引确定模块117,还用于若在执行实例表中查找到待处理功能块实例标识,则获取与待处理功能块实例标识关联的记录时间最晚的历史索引,对历史索引进行累加处理,得到待处理功能块实例索引。
其中,标识确定模块116以及索引确定模块117的具体实现方式可以参见上述图7所对应实施例中步骤S205的可选描述,这里不再进行赘述。
可选的,所述触发模块101具体用于:
接收针对所述目标工作流的触发请求,创建所述目标工作流对应的执行实例。
其中,触发请求包括网页回调触发请求;
触发模块101,包括:第一触发单元1011。
第一触发单元1011,用于接收针对目标工作流的网页回调触发请求,从网页回调触发请求中获取目标令牌;
第一触发单元1011,还用于根据目标令牌在工作流存储库中获取目标工作流;
第一触发单元1011,还用于根据网页回调触发请求中包含的请求参数,创建目标工作流对应的执行实例。
其中,第一触发单元1011的具体实现方式可以参见上述图3所对应实施例中步骤S101的具体描述,这里不再进行赘述。
其中,触发请求包括指令请求;
触发模块101,包括:第二触发单元1012。
第二触发单元1012,用于通过回调地址获取第一对象发送的指令请求,对指令请求进行解密,得到触发指令以及触发参数;
第二触发单元1012,还用于根据触发指令获取目标工作流,根据触发参数验证第一对象的触发权限;
第二触发单元1012,还用于若第一对象的触发权限为合格权限,则创建目标工作流对应的执行实例。
其中,第二触发单元1012的具体实现方式可以参见上述图3所对应实施例中步骤S101的具体描述,这里不再进行赘述。
其中,触发请求包括定时器触发请求;
触发模块101,包括:第三触发单元1013。
第三触发单元1013,用于接收针对目标工作流的定时器触发请求,从定时器触发请 求中获取指定执行时间;
第三触发单元1013,还用于当系统时间与指定执行时间相同时,创建目标工作流对应的执行实例。
其中,第三触发单元1013的具体实现方式可以参见上述图3所对应实施例中步骤S101的具体描述,这里不再进行赘述。
请参见图16,图16是本申请实施例提供的一种计算机设备的结构示意图。如图16所示,上述图15所对应实施例中的数据处理装置1可以应用于计算机设备1000,该计算机设备1000可以包括:处理器1001,网络接口1004和存储器1005,此外,上述计算机设备1000还可以包括:用户接口1003,和至少一个通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。其中,用户接口1003可以包括显示屏(Display)、键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图16所示,作为一种计算机可读存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及设备控制应用程序。
在如图16所示的计算机设备1000中,网络接口1004可提供网络通讯网元;而用户接口1003主要用于为用户提供输入的接口;而处理器1001可以用于调用存储器1005中存储的设备控制应用程序,以实现前文图3、图7任一个所对应实施例中对该数据处理方法的描述,在此不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。
此外,这里需要指出的是:本申请实施例还提供了一种计算机可读存储介质,且上述计算机可读存储介质中存储有前文提及的数据处理装置1所执行的计算机程序,且上述计算机程序包括程序指令,当上述处理器执行上述程序指令时,能够执行前文图3、图7任一个所对应实施例中对上述数据处理方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机可读存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述。
进一步地,请参见图17,图17是本申请实施例提供的另一种数据处理装置的结构示意图。上述数据处理装置可以是运行于计算机设备中的一个计算机程序(包括程序代码),例如该数据处理装置为一个应用软件;该装置可以用于执行本申请实施例提供的方法中的相应步骤。如图17所示,该数据处理装置2可以包括:第一响应模块201、第二响应模块202、第三响应模块203、第四响应模块204以及第五响应模块205。
第一响应模块201,用于响应针对目标工作流的创建操作,显示工作流编辑页面;
第二响应模块202,用于响应针对至少两个功能块控件的选择连线操作,在工作流编辑页面显示由至少两个功能块控件构成的工作流控件树;至少两个功能块控件包括循环起始功能块控件和循环结束功能块控件;
第三响应模块203,用于响应针对工作流控件树中的循环起始功能块控件的触发操作,为循环起始功能块控件设置循环参数;
第四响应模块204,用于响应针对工作流控件树的创建操作,创建目标工作流,将目标工作流发送至工作流引擎;目标工作流包含至少两个功能块控件各自对应的功能代码块;至少两个功能代码块之间的指向关系是根据至少两个功能块控件的连接关系确定的;至少两个功能代码块包括循环起始功能块控件对应的循环起始功能代码块和循环结束功能块控件对应的循环结束功能代码块;
第五响应模块205,用于响应针对目标工作流的触发操作,将针对目标工作流的触发 请求发送至工作流引擎。
其中,第一响应模块201、第二响应模块202、第三响应模块203、第四响应模块204以及第五响应模块205的具体实现方式可以参见上述图13所对应实施例中步骤S301-步骤S305的具体描述,这里不再进行赘述。
可选的,所述第三响应模块203具体用于:
响应针对工作流控件树中的循环起始功能块控件的触发操作,显示循环编辑文本框,响应针对所述循环编辑文本框的输入操作,为循环起始功能块控件设置循环参数。
进一步地,请参见图18,图18是本申请实施例提供的另一种计算机设备的结构示意图。如图18所示,上述图17所对应实施例中的数据处理装置2可以应用于计算机设备2000,该计算机设备2000可以包括:处理器2001,网络接口2004和存储器2005,此外,上述计算机设备2000还包括:用户接口2003,和至少一个通信总线2002。其中,通信总线2002用于实现这些组件之间的连接通信。其中,用户接口2003可以包括显示屏(Display)、键盘(Keyboard),可选用户接口2003还可以包括标准的有线接口、无线接口。网络接口2004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器2005可以是高速RAM存储器,也可以是非不稳定的存储器(non-volatile memory),例如至少一个磁盘存储器。存储器2005可选的还可以是至少一个位于远离前述处理器2001的存储装置。如图18所示,作为一种计算机可读存储介质的存储器2005中可以包括操作系统、网络通信模块、用户接口模块以及设备控制应用程序。
在图18所示的计算机设备2000中,网络接口2004可提供网络通讯功能;而用户接口2003主要用于为用户提供输入的接口;而处理器2001可以用于调用存储器2005中存储的设备控制应用程序,以实现前文各个实施例中对该访问控制方法的描述,也可执行前文图13所对应实施例中对该数据处理装置2的描述,在此不再赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。
此外,这里需要指出的是:本申请实施例还提供了一种计算机可读存储介质,且上述计算机可读存储介质中存储有前文提及的数据处理装置2所执行的计算机程序,当上述处理器加载并执行上述计算机程序时,能够执行前文任一实施例对上述访问控制方法的描述,因此,这里将不再进行赘述。另外,对采用相同方法的有益效果描述,也不再进行赘述。对于本申请所涉及的计算机可读存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述。
上述计算机可读存储介质可以是前述任一实施例提供的数据处理装置或者上述计算机设备的内部存储单元,例如计算机设备的硬盘或内存。该计算机可读存储介质也可以是该计算机设备的外部存储设备,例如该计算机设备上配备的插接式硬盘,智能存储卡(smart media card,SMC),安全数字(secure digital,SD)卡,闪存卡(flash card)等。进一步地,该计算机可读存储介质还可以既包括该计算机设备的内部存储单元也包括外部存储设备。该计算机可读存储介质用于存储该计算机程序以及该计算机设备所需的其他程序和数据。该计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。
此外,这里需要指出的是:本申请实施例还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行前文任一个所对应实施例提供的方法。
本申请实施例的说明书和权利要求书及附图中的术语“第一”、“第二”等是用于区别不同对象,而非用于描述特定顺序。此外,术语“包括”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、装置、产品或设备没有限定于 已列出的步骤或模块,而是可选地还包括没有列出的步骤或模块,或可选地还包括对于这些过程、方法、装置、产品或设备固有的其他步骤单元。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照网元一般性地描述了各示例的组成及步骤。这些网元究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的网元,但是这种实现不应认为超出本申请的范围。
以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。

Claims (20)

  1. 一种数据处理方法,由计算机设备执行,包括:
    创建目标工作流对应的执行实例;所述执行实例包括所述目标工作流包含的至少两个功能代码块之间的指向关系;所述至少两个功能代码块包括循环起始功能代码块和循环结束功能代码块;
    获取所述循环起始功能代码块对应的循环参数;
    根据所述指向关系,确定所述循环起始功能代码块与所述循环结束功能代码块之间的功能代码块,作为循环功能代码块;
    根据所述循环参数以及所述指向关系,循环执行所述循环功能代码块。
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述循环起始功能代码块对应的循环参数,包括:
    创建所述循环起始功能代码块对应的循环起始功能块实例,将所述循环起始功能块实例推送至功能块实例队列中,当所述功能块实例队列中的所述循环起始功能块实例执行成功时,获取所述循环起始功能代码块对应的循环参数;
    所述根据所述循环参数以及所述指向关系,循环执行所述循环功能代码块,包括:
    根据所述所述循环参数、所述功能块实例队列以及所述指向关系,循环执行所述循环功能代码块。
  3. 根据权利要求2所述的方法,所述循环参数为N,N为大于或等于1的正整数;所述根据所述循环参数、所述功能块实例队列以及所述指向关系,循环执行所述循环功能代码块,包括:
    在针对所述循环功能代码块进行的第k轮迭代执行过程中,根据所述指向关系确定所述循环起始功能代码块指向的待执行功能代码块列表;k为小于或等于N的正整数;
    若所述待执行功能代码块列表中不包含所述循环结束功能代码块,且所述功能块实例队列中目标待执行功能代码块对应的目标待执行功能块实例执行成功,则根据所述指向关系确定所述目标待执行功能代码块指向的新的待执行功能代码块列表,直至确定针对所述循环功能代码块进行的第k轮迭代执行完成;所述目标待执行功能代码块为所述待执行功能代码块列表中的功能代码块;
    若k小于N,则继续针对所述循环功能代码块进行第k+1轮迭代执行。
  4. 根据权利要求3所述的方法,还包括:
    若所述新的待执行功能代码块列表中包含所述循环结束功能代码块,则查询循环结束功能块实例队列,若所述循环结束功能块实例队列为空队列,则将所述循环结束功能代码块对应的循环结束功能块实例推送至所述循环结束功能块实例队列中;
    若检测到所述执行实例的执行数据满足执行结束条件,则确定针对所述循环功能代码块进行的第k轮迭代执行完成;
    当确定针对所述循环功能代码块进行的第N轮迭代执行完成时,将所述循环结束功能块实例队列中的所述循环结束功能块实例推送至所述功能块实例队列中,检测所述执行实例的新的执行数据;
    若检测到所述新的执行数据满足执行结束条件,且所述循环结束功能块实例队列为空队列,则确定所述至少两个功能代码块执行完成。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述执行实例的执行数据包括队列实例数量和实例执行数量;
    所述方法还包括:
    在创建所述执行实例的同时,初始化所述队列实例数量为第一默认参数,初始化所述 实例执行数量为第二默认参数;
    根据与所述执行实例相关联的功能块实例的执行状态,对所述队列实例数量进行累加处理或递减处理,对所述实例执行数量进行累加处理或递减处理;
    若检测到所述队列实例数量等于所述第一默认参数,所述实例执行数量等于所述第二默认参数,则确定检测到所述执行实例的执行数据满足执行结束条件。
  6. 根据权利要求5所述的方法,所述与所述执行实例相关联的功能块实例包括目标功能块实例;
    所述根据与所述执行实例相关联的功能块实例的执行状态,对所述队列实例数量进行累加处理或递减处理,对所述实例执行数量进行累加处理或递减处理,包括:
    当所述目标功能块实例被推送至所述功能块实例队列中时,对所述队列实例数据进行累加处理;
    当执行所述功能块实例队列中的所述目标功能块实例时,对所述实例执行数量进行默认累加处理,对所述队列实例数量进行默认递减处理。
  7. 根据权利要求6所述的方法,还包括:
    当所述目标功能块实例执行完成时,确定新的目标功能块实例的创建情况;
    若所述新的目标功能块实例创建成功,且所述新的目标功能块实例对应的功能代码块为所述循环结束功能代码块,则对所述实例执行数量进行默认递减处理;
    若所述新的目标功能块实例创建成功,且所述新的目标功能块实例对应的功能代码块不为所述循环结束功能代码块,则在将所述新的目标功能块实例推送至所述功能块实例队列后,根据所述新的目标功能块实例的数量对所述队列实例数量进行累加处理,对所述实例执行数量进行默认递减处理;
    若所述新的目标功能块实例创建失败,则对所述实例执行数量进行默认递减处理。
  8. 根据权利要求2至7任一项所述的方法,还包括:
    在创建所述目标工作流对应的执行实例的同时,创建所述执行实例对应的执行实例表;所述执行实例表用于记录所述执行实例的执行情况;
    顺序获取所述功能块实例队列中与所述执行实例相关联的第一个功能块实例,作为待处理功能块实例;所述待处理功能块实例对应待处理功能块实例标识和待处理功能块实例索引;所述待处理功能块实例标识和所述待处理功能块实例索引是根据待处理功能代码块创建所述待处理功能块实例时生成的;目标功能块实例索引用于表征所述待处理功能代码块的执行次数;所述待处理功能代码块属于所述至少两个功能代码块;
    执行所述待处理功能块实例,得到目标执行结果;
    根据所述待处理功能块实例标识和待处理功能块实例索引,在所述执行实例表中记录所述目标执行结果。
  9. 根据权利要求8所述的方法,所述待处理功能块实例包含有需求数据获取路径;
    所述执行所述待处理功能块实例,得到目标执行结果,包括:
    查询执行引擎容器的计算资源空闲情况,确定计算资源空闲最多的执行引擎容器作为目标执行引擎容器;
    将所述待处理功能块实例从所述功能块实例队列中转移至所述目标执行引擎容器,在所述目标执行引擎容器中根据所述需求数据获取路径获取需求数据,根据所述需求数据执行所述待处理功能块实例,得到所述目标执行结果。
  10. 根据权利要求8或9所述的方法,还包括:
    当创建所述待处理功能代码块对应的所述待处理功能块实例时,获取用于唯一标识所述待处理功能代码块的标识,作为所述待处理功能块实例对应的待处理功能块实例标识;
    若未在所述执行实例表中查找到所述待处理功能块实例标识,则确定所述待处理功能块实例索引为默认索引;
    若在所述执行实例表中查找到所述待处理功能块实例标识,则获取与所述待处理功能块实例标识关联的记录时间最晚的历史索引,对所述历史索引进行累加处理,得到所述待处理功能块实例索引。
  11. 根据权利要求1至10任一项所述的方法,所述创建目标工作流对应的执行实例,包括:
    接收针对所述目标工作流的触发请求,创建所述目标工作流对应的执行实例。
  12. 根据权利要求11所述的方法,所述触发请求包括网页回调触发请求;
    所述接收针对所述目标工作流的触发请求,创建所述目标工作流对应的执行实例,包括:
    接收针对目标工作流的所述网页回调触发请求,从所述网页回调触发请求中获取目标令牌;
    根据所述目标令牌在工作流存储库中获取所述目标工作流;
    根据所述网页回调触发请求中包含的请求参数,创建所述目标工作流对应的执行实例。
  13. 根据权利要求11所述的方法,所述触发请求包括指令请求;
    所述接收针对所述目标工作流的触发请求,创建所述目标工作流对应的执行实例,包括:
    通过回调地址获取第一对象发送的所述指令请求,对所述指令请求进行解密,得到触发指令以及触发参数;
    根据所述触发指令获取目标工作流,根据所述触发参数验证所述第一对象的触发权限;
    若所述第一对象的触发权限为合格权限,则创建所述目标工作流对应的执行实例。
  14. 根据权利要求11所述的方法,所述触发请求包括定时器触发请求;
    所述接收针对所述目标工作流的触发请求,创建所述目标工作流对应的执行实例,包括:
    接收针对目标工作流的所述定时器触发请求,从所述定时器触发请求中获取指定执行时间;
    当系统时间与所述指定执行时间相同时,创建所述目标工作流对应的执行实例。
  15. 一种数据处理方法,由计算机设备执行,包括:
    响应针对目标工作流的创建操作,显示工作流编辑页面;
    响应针对至少两个功能块控件的选择连线操作,在所述工作流编辑页面显示由所述至少两个功能块控件构成的工作流控件树;所述至少两个功能块控件包括循环起始功能块控件和循环结束功能块控件;
    响应针对工作流控件树中的所述循环起始功能块控件的触发操作,为所述循环起始功能块控件设置循环参数;
    响应针对所述工作流控件树的创建操作,创建目标工作流,将所述目标工作流发送至工作流引擎;所述目标工作流包含所述至少两个功能块控件各自对应的功能代码块;所述至少两个功能代码块之间的指向关系是根据所述至少两个功能块控件的连接关系确定的;所述至少两个功能代码块包括所述循环起始功能块控件对应的循环起始功能代码块和所述循环结束功能块控件对应的循环结束功能代码块;
    响应针对所述目标工作流的触发操作,将针对所述目标工作流的触发请求发送至所述工作流引擎。
  16. 一种数据处理装置,包括:
    触发模块,用于创建目标工作流对应的执行实例;所述执行实例包括所述目标工作流包含的至少两个功能代码块之间的指向关系;所述至少两个功能代码块包括循环起始功能代码块和循环结束功能代码块;
    循环起始模块,用于获取所述循环起始功能代码块对应的循环参数;
    循环确认模块,用于根据所述指向关系,确定所述循环起始功能代码块与所述循环结束功能代码块之间的功能代码块,作为循环功能代码块;
    循环执行模块,用于根据所述循环参数以及所述指向关系,循环执行所述循环功能代码块。
  17. 一种数据处理装置,包括:
    第一响应模块,用于响应针对目标工作流的创建操作,显示工作流编辑页面;
    第二响应模块,用于响应针对至少两个功能块控件的选择连线操作,在工作流编辑页面显示由至少两个功能块控件构成的工作流控件树;至少两个功能块控件包括循环起始功能块控件和循环结束功能块控件;
    第三响应模块,用于响应针对工作流控件树中的循环起始功能块控件的触发操作,为循环起始功能块控件设置循环参数;
    第四响应模块,用于响应针对工作流控件树的创建操作,创建目标工作流,将目标工作流发送至工作流引擎;目标工作流包含至少两个功能块控件各自对应的功能代码块;至少两个功能代码块之间的指向关系是根据至少两个功能块控件的连接关系确定的;至少两个功能代码块包括循环起始功能块控件对应的循环起始功能代码块和循环结束功能块控件对应的循环结束功能代码块;
    第五响应模块,用于响应针对目标工作流的触发操作,将针对目标工作流的触发请求发送至工作流引擎。
  18. 一种计算机设备,包括:处理器、存储器以及网络接口;
    所述处理器与所述存储器、所述网络接口相连,其中,所述网络接口用于提供数据通信功能,所述存储器用于存储程序代码,所述处理器用于调用所述程序代码,以执行权利要求1-15任一项所述的方法。
  19. 一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,所述计算机程序适于由处理器加载并执行权利要求1-15任一项所述的方法。
  20. 一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时,可以执行权利要求1-15任一项所述的方法。
PCT/CN2023/098214 2022-08-22 2023-06-05 数据处理方法、装置、设备及可读存储介质 WO2024041081A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211007832.7A CN117667322A (zh) 2022-08-22 2022-08-22 数据处理方法、装置、设备及可读存储介质
CN202211007832.7 2022-08-22

Publications (1)

Publication Number Publication Date
WO2024041081A1 true WO2024041081A1 (zh) 2024-02-29

Family

ID=90012308

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/098214 WO2024041081A1 (zh) 2022-08-22 2023-06-05 数据处理方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN117667322A (zh)
WO (1) WO2024041081A1 (zh)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140359558A1 (en) * 2013-06-02 2014-12-04 Mark Spencer Chamberlain System and methods for end-users to graphically program and manage computers and devices
CN110244944A (zh) * 2019-08-12 2019-09-17 中国人民解放军国防科技大学 一种基于图形化编程的网络安全扫描功能实现方法
CN111198686A (zh) * 2019-12-26 2020-05-26 平安国际智慧城市科技股份有限公司 编程方法、装置、设备及计算机可读存储介质
CN111580806A (zh) * 2020-04-10 2020-08-25 天津大学 一种协作机器人图形化编程系统
CN111967038A (zh) * 2019-09-30 2020-11-20 华控清交信息科技(北京)有限公司 数据处理系统、方法、设备、编辑器及存储介质
CN112000370A (zh) * 2020-08-27 2020-11-27 北京百度网讯科技有限公司 循环指令的处理方法、装置、设备和存储介质
CN112306481A (zh) * 2020-10-16 2021-02-02 深圳市大富网络技术有限公司 图形化编程场景的代码展示方法、系统、装置及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140359558A1 (en) * 2013-06-02 2014-12-04 Mark Spencer Chamberlain System and methods for end-users to graphically program and manage computers and devices
CN110244944A (zh) * 2019-08-12 2019-09-17 中国人民解放军国防科技大学 一种基于图形化编程的网络安全扫描功能实现方法
CN111967038A (zh) * 2019-09-30 2020-11-20 华控清交信息科技(北京)有限公司 数据处理系统、方法、设备、编辑器及存储介质
CN111198686A (zh) * 2019-12-26 2020-05-26 平安国际智慧城市科技股份有限公司 编程方法、装置、设备及计算机可读存储介质
CN111580806A (zh) * 2020-04-10 2020-08-25 天津大学 一种协作机器人图形化编程系统
CN112000370A (zh) * 2020-08-27 2020-11-27 北京百度网讯科技有限公司 循环指令的处理方法、装置、设备和存储介质
CN112306481A (zh) * 2020-10-16 2021-02-02 深圳市大富网络技术有限公司 图形化编程场景的代码展示方法、系统、装置及存储介质

Also Published As

Publication number Publication date
CN117667322A (zh) 2024-03-08

Similar Documents

Publication Publication Date Title
US10430510B2 (en) Method for controlling access to electronic documents based on stateless communication
US9473562B2 (en) Mediated data exchange for sandboxed applications
US10521393B2 (en) Remote direct memory access (RDMA) high performance producer-consumer message processing
US10135940B2 (en) Subscribing to event notifications using object instances
US10129111B2 (en) Subscription watch lists for event handling
WO2019109518A1 (zh) 一种数据列表的上传方法及其终端
US9454620B2 (en) Methods, apparatuses and computer program products for automated learning of data models
US9600681B2 (en) Method for controlling access to electronic documents using locks
WO2019109923A1 (zh) 消息处理方法及系统、存储介质、电子设备
WO2021137757A1 (en) Authority management method and apparatus, and electronic device, and storage medium thereof
US20150280786A1 (en) Near field communication based data transfer
CN110968367A (zh) 一种电商商品字段配置方法、装置、服务器及存储介质
CN117221324B (zh) 云服务器的创建任务分发方法、装置、电子设备及介质
WO2019109922A1 (zh) 资源处理方法及系统、存储介质、电子设备
WO2024041081A1 (zh) 数据处理方法、装置、设备及可读存储介质
CN113127775A (zh) 一种页面加载方法、装置、设备和存储介质
WO2022083342A1 (zh) 数据传输方法和电子设备
CN117435215A (zh) 研发环境部署方法、系统、计算机设备和存储介质
EP3910911B1 (en) Method for service decision distribution among multiple terminal devices and system
WO2020220272A1 (zh) 更改资源状态的方法、系统、终端及存储介质
CN109150993B (zh) 一种获取网络请求切面的方法、终端装置及存储介质
KR20210128096A (ko) 사물인터넷 플랫폼 간 연동 방법 및 장치
CN113196235A (zh) 快应用的添加方法、装置、电子设备及存储介质
WO2024037132A1 (zh) 工作流处理方法、装置、设备、存储介质和程序产品
WO2010148864A1 (zh) 具有多管理对象的终端处理操作指令的方法、终端以及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23856173

Country of ref document: EP

Kind code of ref document: A1