WO2023050410A1 - 工作流操作的方法和装置 - Google Patents

工作流操作的方法和装置 Download PDF

Info

Publication number
WO2023050410A1
WO2023050410A1 PCT/CN2021/122423 CN2021122423W WO2023050410A1 WO 2023050410 A1 WO2023050410 A1 WO 2023050410A1 CN 2021122423 W CN2021122423 W CN 2021122423W WO 2023050410 A1 WO2023050410 A1 WO 2023050410A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
workflow
event
functional
functional function
Prior art date
Application number
PCT/CN2021/122423
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 西门子股份公司
Priority to PCT/CN2021/122423 priority Critical patent/WO2023050410A1/zh
Priority to CN202180102095.6A priority patent/CN117940904A/zh
Publication of WO2023050410A1 publication Critical patent/WO2023050410A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Definitions

  • the present application relates to the field of computer technology, and more specifically, to a workflow operation method and device.
  • the multiple edge devices may come from different vendors. Therefore, in addition to the need to develop and integrate heterogeneous systems of different devices, the above-mentioned problems will also be encountered during deployment, which not only wastes manpower but also reduces efficiency.
  • the present application provides a workflow operation method and device, which can effectively improve work efficiency on the basis of reducing manpower.
  • a workflow operation method which is characterized by comprising: the first device obtains the workflow, and the workflow is used to indicate at least one function function called by an event and the execution sequence of the at least one function function ; After the first device receives the first event, according to the workflow, determine the first function to be called by the first event, the event includes the first event, and the at least one function Including the first functional function; if the first device is the device where the first functional function is located, then the first device calls the first functional function; if the second device is the first functional function device, the first device routes the first event to the second device.
  • the entire workflow can be completed on the device, that is, the application can be processed through remote deployment without going to the site, which greatly reduces manpower.
  • the device completes the entire workflow according to the workflow used to indicate the at least one functional function invoked by the event and the execution sequence of the at least one functional function, which can effectively improve work efficiency.
  • the device can obtain the workflow, no matter which device the function is deployed on, the device can determine the function called by the event according to the workflow, even if the device is not the device where the function is located, the event can also be routed to the device where the function is located to call the function, so that the flexibility of the entire system can be improved.
  • the functional functions deployed on the first device are determined according to the resources of the first device, and the functional functions deployed on the second device are determined according to the resources of the second device If the resources of the first device are greater than the resources of the second device, more functional functions are deployed on the first device than on the second device.
  • the functional functions are deployed on the device according to the resources of the device. More functional functions are deployed on the device with more resources, and relatively fewer functional functions are deployed on the device with few resources, so that the rational allocation of resources and the allocation of resources can be realized. use efficiently. Further, deploying functional functions on devices according to device resources avoids the problem that a certain functional function must be deployed to a certain device, and improves the flexibility of deploying functional functions.
  • the method further includes: the first device receives feedback information sent by the second device, and the feedback information uses Feedback of an execution result of the first functional function executed by the second device.
  • the device where the function called by the event is located will feed back the result of executing the function to the device receiving the event after executing the function , so that the device receiving the event can continue to execute the next step, avoiding the invalid waiting time of the device receiving the event, and greatly reducing the time for executing the entire workflow.
  • the method further includes: the first device determines the device where the first functional function is located according to record information, and the record information is used to record each of the at least one functional function The device on which the function function resides.
  • the device receiving the event can accurately route the event to the device where the function called by the event is located by recording the recorded information of the device where each functional function is located.
  • the acquiring the workflow by the first device includes: receiving, by the first device, workflow scheduling information sent by a system, where the workflow scheduling information identifies the workflow.
  • the first device receiving the workflow scheduling information sent by the system includes: before the first device leaves the factory, the first device receives the workflow scheduling information sent by the system .
  • the workflow can be obtained before the device receiving the event leaves the factory. In this way, even if the device is disconnected from the central cluster, the workflow can still be executed, which greatly ensures the normal operation of the workflow.
  • the first event includes first information, and the first information is an input of the first functional function.
  • the first device and the second device are edge devices.
  • an apparatus for workflow operation including units for executing the method in the above first aspect or various implementations thereof.
  • a device for workflow operation including: a memory for storing programs; a processor for executing the programs stored in the memory, and when the programs stored in the memory are executed, the processing
  • the device is configured to execute the method in the above first aspect or its various implementation manners.
  • a computer-readable storage medium storing program code for execution by a device, where the program code includes instructions for executing the steps in the method in the above-mentioned first aspect or each implementation manner thereof.
  • Fig. 1 is a schematic diagram of a workflow operation method according to an embodiment of the present application.
  • Fig. 2 is a schematic diagram of a service mesh according to an embodiment of the present application.
  • Fig. 3 is a schematic diagram of step 1 in the flow of an event-triggered workflow according to an embodiment of the present application.
  • Fig. 4 is a schematic diagram of step 2 in the flow of an event-triggered workflow according to an embodiment of the present application.
  • Fig. 5 is a schematic diagram of step 3 in the flow of an event-triggered workflow according to an embodiment of the present application.
  • Fig. 6 is a schematic block diagram of an apparatus for workflow operation according to an embodiment of the present application.
  • Fig. 7 is a schematic block diagram of an apparatus for workflow operation according to an embodiment of the present application.
  • the first device acquires a workflow
  • the first device After the first device receives the first event, determine the first function to be called by the first event according to the workflow;
  • the first device If the first device is the device where the first function is located, the first device calls the first function
  • the first device routes the first event to the second device
  • control panel control panel
  • SC sidecar (sidecar);
  • serial numbers of the processes do not mean the order of execution, and the execution order of the processes should be determined by their functional functions and internal logic, and should not be used in the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • the embodiment of the present application proposes a method for invoking a function, which can effectively improve work efficiency on the basis of reducing manpower.
  • FIG. 1 shows a schematic flowchart of a workflow operation method 100 according to an embodiment of the present application.
  • the method 100 may be executed by a first device.
  • the method 100 may include at least part of the following contents.
  • step 110 the first device obtains the workflow.
  • step 120 after the first device receives the first event, according to the workflow, determine the first function to be called by the first event.
  • step 130 if the first device is the device where the first function resides, the first device calls the first function.
  • step 140 if the second device is the device where the first function resides, the first device routes the first event to the second device.
  • the first device is different from the second device, and the first device and/or the second device may be an edge device.
  • An edge device can be a device that provides an entry point into an enterprise or service provider core network.
  • edge devices may include edge routers, routing switches, firewalls, multiplexers, and other wide area network (wide area network, WAN) devices.
  • wide area network wide area network
  • edge devices With the development of artificial intelligence and Internet of things (IoT) technology, edge devices generally have built-in processors with onboard analysis or artificial intelligence capabilities. These devices may include sensors, drivers, and IoT gateways.
  • first device and the second device may also be other devices except the edge device, which is not specifically limited in this embodiment of the present application.
  • the above functional functions may be, but not limited to, message queuing telemetry transport (message queuing telemetry transport, MQTT) protocol analysis functional functions, data processing functional functions, and the like.
  • message queuing telemetry transport messages queuing telemetry transport, MQTT
  • MQTT message queuing telemetry transport
  • a workflow may be used to indicate at least one functional function invoked by an event (event) of the workflow and an execution sequence of the at least one functional function. It can be seen that workflow can be used to orchestrate functional functions into coordinated microservice applications, that is, to combine functional functions and events into a coherent unit, and to describe the execution of functional functions and the information delivered in a prescribed manner.
  • FIG. 2 shows a schematic diagram of a possible network in the embodiment of the present application.
  • the workflow is: event 1 calls function 1, and after function 1 is executed, function 2 is called. After function function 2 is executed, event 2 calls function function 3.
  • event 1 may also call function function 3
  • event 2 may also call function function 1 and function function 2.
  • events and workflows can be defined by referring to the specification CloudEvents.
  • CloudEvents is a specification for describing event data in a common format to provide interoperability across services, platforms, and systems.
  • the definition of events and workflow can also refer to the cloud native computing foundation (cloud native computing foundation, CNCF) serverless workflow (serverless workflow).
  • Each function in the workflow can be driven by events from different sources, that is, the workflow in this embodiment of the present application is triggered by events.
  • an event can call one or more function functions. As shown in FIG. 2 , event 1 calls function function 1 and function function 2 , and event 2 calls function function 3 .
  • multiple events can call a single function.
  • workflows can be developer-created and pre-configured on the built system.
  • the system here may be, but not limited to, a function as a service (function as a service, FaaS) system.
  • FaaS function as a service
  • the FaaS system may include two parts, one of which is a function management module.
  • the functional function management module can be used to be responsible for the full life cycle management of functional functions, such as creation, release, update, destruction, etc.
  • the functional function management module can refer to the following actions to control the life cycle of the functional function:
  • the other part is the workflow management module, as shown in Figure 2, the workflow management module includes workflow.
  • the developer may first join the first device and/or the second device to the network.
  • the network may be a service mesh (service mesh).
  • the service mesh may include a control plane (control plane) and equipment.
  • control plane control plane
  • the control panel can also perform other actions, such as routing control management, function registration, function discovery, monitoring and traffic tracking.
  • developers can create functional functions according to business requirements, and configure the created functional functions on the functional function management module in the FaaS system.
  • the functional function management module can hot-deploy these functional functions to the device.
  • the functional function management module can hot-deploy these functional functions into containers (containers) on the device.
  • the functional function management module can hot-deploy these functional functions to different devices according to the resources of each device. That is, the functional functions deployed on the first device may be determined according to the resources of the first device, and similarly, the functional functions deployed on the second device may also be determined according to the resources of the second device.
  • the resources of the first device and the resources of the second device may be central processing unit (central processing unit, CPU) resources, gateway resources, etc. of the first device.
  • the resource of the first device may be the total resource of the first device, or may be a resource not used by the first device at the current moment.
  • the resources of the second device may also be the total resources of the second device or the resources not used by the second device at the current moment.
  • the service mesh can monitor the resource status of the first device and the second device. After the service mesh monitors the resource status of the first device and the resource status of the second device, it can control the function management module to deploy the function to the first device and the second device.
  • the function deployed on the device with more resources Functions can be more than functional functions deployed on devices with few resources.
  • the resource of device 1 is more than that of device 2
  • the functional functions deployed on device 1 are more than those deployed on device 2, that is, functional function 1 and functional function 2 are deployed on device 1
  • Function 2 is deployed on device 2.
  • function 2 and function 3 may also be deployed on device 1
  • function 1 may be deployed on device 2.
  • the embodiment of the present application does not specifically limit which device the function function is deployed on, as long as the number of function functions deployed on the device with more resources is greater than the number of function functions deployed on the device with fewer resources.
  • the functional functions are deployed on the device according to the resources of the device. More functional functions are deployed on the device with more resources, and relatively fewer functional functions are deployed on the device with few resources, so that the rational allocation of resources and the allocation of resources can be realized. use efficiently. Further, deploying functional functions on devices according to device resources avoids the problem that a certain functional function must be deployed to a certain device, and improves the flexibility of deploying functional functions.
  • the developer may determine it according to the input of the function function.
  • the event may include information, which is an input of a function called by the event.
  • a first event calls a first function
  • the first event includes first information
  • the first information is an input of the first function.
  • step 110 may specifically include: the first device receives workflow scheduling information sent by the FaaS system, where the workflow scheduling information identifies a workflow.
  • the FaaS system may send workflow scheduling information to the first device every preset time period.
  • the preset time period may be 5s. In this way, the probability that the first device obtains the workflow can be improved.
  • the first device may receive workflow scheduling information sent to it by the FaaS system.
  • the workflow can be obtained before the first device leaves the factory, so that even if the first device is disconnected from the central cluster, the workflow can still be executed, which greatly ensures the normal execution of the workflow.
  • the method 100 may further include: the first device determines the device where the first functional function is located according to the record information, where the record information is used to record the device where each functional function of the at least one functional function is located.
  • the functional function management module after the functional function management module deploys at least one functional function to different devices, the functional function management module sends record information to each device, so as to notify the device of the device where each functional function in the at least one functional function is located .
  • each device may include a sidecar, and the function management module may send record information to the sidecar, so that the sidecar of each device may record the functions deployed on each device.
  • the sidecar of device 1 may record function 1 and function 3 on device 1, and function 2 on device 2.
  • the first device After the first device receives the first event, if the first device determines that it is the device where the first function resides according to the recorded information, the first device may directly call the first function.
  • the first device may route the first event to the second device.
  • device 2 receives event 1, determines that event 1 invokes function 1 according to the workflow, and determines that function 1 is on device 1, therefore, device 2 routes event 1 to device 1, so that event 1 The functional function 1 is called, and the device 1 executes the functional function 1.
  • device 2 receives event 1 and device 2 routes event 1 to device 1, both of which are executed by the sidecar of the device. That is, the sidecar of device 2 receives event 1 and routes event 1 to the sidecar of device 1.
  • device 2 receiving event 1 and device 2 routing event 1 to device 1 may also be executed by other modules of the device, which is not specifically limited in this embodiment of the present application.
  • the second device may also send feedback information to the first device, where the feedback information is used to feed back an execution result of the second device executing the first function.
  • the second device may send feedback information to the first device during the process of executing the first function, such as sending a negative acknowledgment (negative acknowledgment, NACK), so that the first device knows that the second device is executing the first function.
  • NACK negative acknowledgment
  • the second device may send feedback information to the first device after executing the first function, such as sending an acknowledgment (acknowledgment, ACK), so that the first device knows that the second device has completed the execution of the first function.
  • ACK acknowledgment
  • the device where the function called by the event is located will feed back the result of executing the function to the device receiving the event after executing the function , so that the device receiving the event can continue to execute the next step, avoiding the invalid waiting time of the device receiving the event, and greatly reducing the time for executing the entire workflow.
  • Device 1 and Device 2 wait for an event to trigger.
  • event 1 invokes function 1 according to the workflow. Since function 1 is deployed on device 1, the sidecar routes event 1 to device 1 to invoke function 1.
  • device 1 After executing function 1, device 1 sends feedback information to the sidecar of device 2 through the sidecar, so that device 2 determines that device 1 has executed function 1.
  • the device 2 again determines to call the functional function 2 according to the workflow, and the functional function 2 is deployed on the device 2. Therefore, the device 2 directly calls the functional function 2.
  • the event 2 may trigger the workflow to call the functional function 3 . Therefore, after executing function 2, the system waits for event 2 to be triggered.
  • the sidecar in device 2 determines that event 2 calls function 3 according to the workflow. Since function 3 is deployed on device 1, the sidecar routes event 2 to device 1 to invoke function 3.
  • the container in device 1 can send feedback information to the sidecar of device 1. At this point, the workflow execution is complete.
  • the entire workflow can be completed on the device, that is, the application can be processed through remote deployment without going to the site, which greatly reduces manpower.
  • the device completes the entire workflow according to the workflow used to indicate the at least one functional function invoked by the event and the execution sequence of the at least one functional function, which can effectively improve work efficiency.
  • the device can obtain the workflow, no matter which device the function is deployed on, the device can determine the function called by the event according to the workflow, even if the device is not the device where the function is located, the event can also be routed to the device where the function is located to call the function, so that the flexibility of the entire system can be improved.
  • FIG. 6 shows a schematic block diagram of an apparatus 600 for workflow operation according to an embodiment of the present application.
  • the workflow operation apparatus 600 may execute the workflow operation method 100 in the embodiment of the present application, and the workflow operation apparatus 600 may be the first device in the aforementioned method.
  • the device 600 for the workflow operation includes:
  • An acquiring unit 610 configured to acquire workflow scheduling information, where the workflow scheduling information is used to indicate at least one functional function called by an event of the workflow and an execution order of the at least one functional function;
  • the determining unit 620 is configured to determine a first function to be called by the first event according to the workflow scheduling information after the first device receives the first event, the event of the workflow includes the a first event, said at least one functional function comprising said first functional function;
  • a calling unit 630 configured to call the first functional function if the first device is the device where the first functional function is located;
  • the routing unit 640 is configured to route the first event to the second device if the second device is the device where the first function resides.
  • the functional functions deployed on the first device are determined according to the resources of the first device, and the functional functions deployed on the second device are determined according to the second The resources of the device are determined.
  • the resources of the first device are greater than the resources of the second device, more functional functions are deployed on the first device than on the second device.
  • the apparatus 600 may further include: a communication unit configured to receive feedback information sent by the second device, so The feedback information is used to feed back an execution result of the second device executing the first function.
  • the determining unit 620 may be further configured to: determine the device where the first functional function is located according to the record information, where the record information is used to record each of the at least one functional function The device where the function is located.
  • the apparatus 600 may further include: a communication unit, configured to receive the workflow scheduling information sent by the system.
  • the communication unit is specifically configured to: receive the workflow scheduling information sent by the system before the first device leaves the factory.
  • the first event includes first information, and the first information is an input of the first functional function.
  • the first device and the second device are edge devices.
  • FIG. 7 is a schematic diagram of a hardware structure of an apparatus for workflow operation according to an embodiment of the present application.
  • the workflow operation apparatus 700 shown in FIG. 7 may be a first device, and the workflow operation apparatus 700 includes a memory 701 , a processor 702 , a communication interface 703 and a bus 704 .
  • the memory 701 , the processor 702 , and the communication interface 703 are connected to each other through a bus 704 .
  • the memory 701 may be a read-only memory (read-only memory, ROM), a static storage device and a random access memory (random access memory, RAM).
  • the memory 701 can store a program. When the program stored in the memory 701 is executed by the processor 702, the processor 702 and the communication interface 703 are used to execute each step of the workflow operation method of the embodiment of the present application.
  • the processor 702 may adopt a general-purpose CPU, a microprocessor, an application specific integrated circuit (ASIC), a graphics processing unit (GPU), or one or more integrated circuits for executing related programs, In order to realize the functional functions to be executed by the units in the device of the embodiment of the present application, or execute the workflow operation method of the embodiment of the present application.
  • ASIC application specific integrated circuit
  • GPU graphics processing unit
  • the processor 702 may also be an integrated circuit chip, which has a signal processing capability.
  • each step of the workflow operation method in the embodiment of the present application may be completed by an integrated logic circuit of hardware in the processor 702 or instructions in the form of software.
  • processor 702 can also be general-purpose processor, digital signal processor (digital signal processing, DSP), ASIC, off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic device, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital signal processor
  • ASIC off-the-shelf programmable gate array
  • FPGA field programmable gate array
  • Various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the steps of the methods disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
  • the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register.
  • the storage medium is located in the memory 701, and the processor 702 reads the information in the memory 701, and combines its hardware to complete the functions required by the units included in the device of the embodiment of the present application, or execute the workflow operation of the embodiment of the present application method.
  • the communication interface 703 implements communication between the workflow operation apparatus 700 and other devices or communication networks by using a transceiver device such as but not limited to a transceiver.
  • the apparatus 700 may receive the feedback information sent by the second device through the communication interface 703 .
  • the bus 704 may include pathways for transferring information between various components of the apparatus 700 (eg, memory 701 , processor 702 , communication interface 703 ) for workflow operations.
  • workflow operation device 700 only shows a memory, a processor, and a communication interface
  • the workflow operation device 700 may also include other necessary devices.
  • the workflow operation apparatus 700 may also include hardware devices for implementing other additional functions.
  • the apparatus 700 for workflow operation may only include components necessary to realize the embodiment of the present application, and does not necessarily include all the components shown in FIG. 7 .
  • the embodiment of the present application also provides a computer-readable storage medium, which stores program code for execution by a device, and the program code includes instructions for executing the steps in the above-mentioned workflow operation method.
  • the embodiment of the present application also provides a computer program product, the computer program product includes a computer program stored on a computer-readable storage medium, the computer program includes program instructions, and when the program instructions are executed by the computer, the The computer executes the above-mentioned workflow operation method.
  • the above-mentioned computer-readable storage medium may be a transitory computer-readable storage medium, or a non-transitory computer-readable storage medium.
  • the disclosed devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function function division.
  • multiple units or components can be combined Or it can be integrated into another system, or some features can be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the aspects, implementations, implementations or features of the described embodiments can be used alone or in any combination. Aspects of the described embodiments can be implemented by software, hardware or a combination of hardware and software.
  • the described embodiments may also be embodied by a computer-readable medium storing computer-readable code comprising instructions executable by at least one computing device.
  • the computer readable medium can be associated with any data storage device that can store data that can be read by a computer system.
  • Exemplary computer readable media may include read-only memory, random access memory, compact disc read-only memory (CD-ROM), hard disk drive (HDD), digital Video disc (digital video disc, DVD), magnetic tape, and optical data storage device, etc.
  • the computer readable medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

Landscapes

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

Abstract

本申请实施例提供了一种工作流操作的方法和装置,能够在减少人力的基础上有效提高工作效率。所述方法包括:第一设备获取工作流,所述工作流用于指示事件调用的至少一个功能函数以及所述至少一个功能函数的执行顺序;在所述第一设备接收到第一事件后,根据所述工作流,确定所述第一事件待调用的第一功能函数,所述事件包括所述第一事件,所述至少一个功能函数包括所述第一功能函数;若所述第一设备为所述第一功能函数所在的设备,则所述第一设备调用所述第一功能函数;若第二设备为所述第一功能函数所在的设备,则所述第一设备将所述第一事件路由到所述第二设备。

Description

工作流操作的方法和装置 技术领域
本申请涉及计算机技术领域,并且更为具体地,涉及一种工作流操作的方法和装置。
背景技术
目前,在工程师需要对应用程序进行部署或运维时,一般需要花费大量的时间在现场通过数据线直连到设备等方式为不同设备进行解决方案的现场部署。如果对应用程序进行了修改,则需要重新部署应用程序,使得工程师又要重复之前复杂繁琐的流程。
进一步地,如果需要跨多个边缘设备运行任务来完成一系列的业务流程,由于多个边缘设备可能来自不同的厂商。因此,除了需要对不同设备的异构***进行开发和集成,在部署时也会遇到上述问题,不仅浪费人力而且效率较低。
发明内容
本申请提供了一种工作流操作的方法和装置,能够在减少人力的基础上有效提高工作效率。
第一方面,提供了一种工作流操作的方法,其特征在于,包括:第一设备获取工作流,所述工作流用于指示事件调用的至少一个功能函数以及所述至少一个功能函数的执行顺序;在所述第一设备接收到第一事件后,根据所述工作流,确定所述第一事件待调用的第一功能函数,所述事件包括所述第一事件,所述至少一个功能函数包括所述第一功能函数;若所述第一设备为所述第一功能函数所在的设备,则所述第一设备调用所述第一功能函数;若第二设备为所述第一功能函数所在的设备,则所述第一设备将所述第一事件路由到所述第二设备。
上述技术方案,通过在设备上部署功能函数,使得整个工作流可以在设 备上完成,即通过远程部署而不用去现场即可实现对应用程序的处理,极大地减少了人力。此外,设备根据用于指示事件调用的至少一个功能函数以及该至少一个功能函数的执行顺序的工作流,来完成整个工作流程,能够有效提高工作效率。
进一步地,由于设备可以获取到工作流,这样不论功能函数部署到哪个设备上,设备都可以根据工作流确定事件调用的功能函数,即使该设备不是该功能函数所在的设备,也可以将事件路由到该功能函数所在的设备,以调用该功能函数,从而可以提高整个***的灵活性。
在一些可能的实现方式中,所述第一设备上部署的功能函数是根据所述第一设备的资源确定的,所述第二设备上部署的功能函数是根据所述第二设备的资源确定的;若所述第一设备的资源大于所述第二设备的资源,则在所述第一设备上部署的功能函数多于在所述第二设备上部署的功能函数。
上述技术方案,根据设备的资源在设备上部署功能函数,资源多的设备上部署的功能函数较多,资源少的设备上部署的功能函数相对较少,从而能够实现资源的合理分配和资源的有效利用。进一步地,根据设备的资源在设备上部署功能函数,避免了某个功能函数必须部署到某个设备的问题,提高了部署功能函数的灵活性。
在一些可能的实现方式中,若第二设备为所述第一功能函数所在的设备,所述方法还包括:所述第一设备接收所述第二设备发送的反馈信息,所述反馈信息用于反馈所述第二设备执行所述第一功能函数的执行结果。
上述技术方案,在接收事件的设备不是该事件调用的功能函数所在的设备的情况下,该事件调用的功能函数所在的设备在执行完该功能函数后向接收事件的设备反馈执行功能函数的结果,使得接收事件的设备能够继续执行下一个步骤,避免了接收事件的设备无效等待的时间,有利于大大减小执行整个工作流的时间。
在一些可能的实现方式中,所述方法还包括:所述第一设备根据记录信息,确定所述第一功能函数所在的设备,所述记录信息用于记录所述至少一个功能函数中每个功能函数所在的设备。
上述技术方案,接收事件的设备通过记录的每个功能函数所在的设备的记录信息,可以准确地将事件路由到该事件调用的功能函数所在的设备。
在一些可能的实现方式中,所述第一设备获取工作流,包括:所述第一设备接收***发送的工作流调度信息,所述工作流调度信息标识出所述工作流。
在一些可能的实现方式中,所述第一设备接收***发送的工作流调度信息,包括:在所述第一设备出厂前,所述第一设备接收所述***发送的所述工作流调度信息。
上述技术方案,在接收事件的设备出厂之前即可获取到工作流,这样,即使该设备与中央集群断开连接仍然可以执行工作流,极大地保证了工作流的正常运行。
在一些可能的实现方式中,所述第一事件包括第一信息,所述第一信息为所述第一功能函数的输入。
在一些可能的实现方式中,所述第一设备和所述第二设备为边缘设备。
第二方面,提供了一种工作流操作的装置,包括用于执行上述第一方面或其各实现方式中的方法的各单元。
第三方面,提供了一种工作流操作的装置,包括:存储器,用于存储程序;处理器,用于执行所述存储器存储的程序,当所述存储器存储的程序被执行时,所述处理器用于执行上述第一方面或其各实现方式中的方法。
第四方面,提供了一种计算机可读存储介质,存储用于设备执行的程序代码,所述程序代码包括用于执行上述第一方面或其各实现方式中的方法中的步骤的指令。
附图说明
图1是本申请实施例的工作流操作的方法的示意性图。
图2是本申请实施例的一种service mesh的示意性图。
图3是本申请实施例的一种事件触发工作流的流程中步骤1的示意性图。
图4是本申请实施例的一种事件触发工作流的流程中步骤2的示意性图。
图5是本申请实施例的一种事件触发工作流的流程中步骤3的示意性图。
图6是本申请实施例的工作流操作的装置的示意性框图。
图7是本申请实施例的工作流操作的装置的示意性框图。
附图标记列表:
100,本申请实施例的工作流操作的方法
110,第一设备获取工作流;
120,在第一设备接收到第一事件后,根据工作流,确定第一事件待调用的第一功能函数;
130,若第一设备为第一功能函数所在的设备,则第一设备调用第一功能函数;
140,若第二设备为,第一功能函数所在的设备,则第一设备将第一事件路由到第二设备;
CP,控制面板(control plane);
F1,功能函数1;
F2,功能函数2;
F3,功能函数3;
S,开始;
S1-S3,步骤1-3;
E,结束;
e1,事件1;
e2,事件2;
D1,设备1;
D2,设备2;
C,容器(container);
SC,边车(sidecar);
600,工作流操作的装置;
610,获取单元;
620,确定单元;
630,调用单元;
640,路由单元;
700,工作流操作的装置;
701,存储器;
702,处理器;
703,通信接口;
704,总线。
具体实施方式
下面结合附图,对本申请实施例中的技术方案进行描述。应理解,本说明书中的具体的例子只是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。
应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能函数和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还应理解,本说明书中描述的各种实施方式,既可以单独实施,也可以组合实施,本申请实施例对此不作限定。
除非另有说明,本申请实施例所使用的所有技术和科学术语与本申请的技术领域的技术人员通常理解的含义相同。本申请中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本申请的范围。
目前,在工程师需要对应用程序进行部署或运维时,一般需要花费大量的时间在现场通过数据线直连到设备等方式为不同设备进行解决方案的现场部署。如果对应用程序进行了修改,则需要重新部署应用程序,使得工程师又要重复之前复杂繁琐的流程。
进一步地,如果需要跨多个边缘设备运行任务来完成一系列的业务流程,由于多个边缘设备可能来自不同的厂商。因此,除了需要大量的精力去处理异构***的开发、通信、调试和集成,在部署时也会遇到上述问题,不仅浪费人力而且效率较低。
鉴于此,本申请实施例提出了一种功能函数(function)调用的方法,能够在减少人力的基础上有效提高工作效率。
图1示出了本申请实施例的工作流操作的方法100的示意性流程图。方法100可以由第一设备执行。如图1所示,方法100可以包括以下内容中的至少部分内容。
在步骤110中,第一设备获取工作流。
在步骤120中,在第一设备接收到第一事件后,根据工作流,确定第一 事件待调用的第一功能函数。
在步骤130中,若第一设备为第一功能函数所在的设备,则第一设备调用第一功能函数。
在步骤140中,若第二设备为第一功能函数所在的设备,则第一设备将第一事件路由到第二设备。
其中,第一设备不同于第二设备,第一设备和/或第二设备可以是边缘设备。边缘设备可以是向企业或服务提供商核心网络提供入口点的设备。例如,边缘设备可以包括边缘路由器、路由交换机、防火墙、多路复用器和其他广域网(wide area network,WAN)设备。随着人工智能和物联网(internet of things,IoT)技术的发展,边缘设备一般还有内置的处理器,具有板载分析或人工智能能力,这些设备可能包括传感器、驱动器和物联网网关等。
当然,第一设备和第二设备也可以是除边缘设备之外的其他设备,本申请实施例对此不作具体限定。
需要说明的是,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
可选地,上文中的功能函数可以为但不限于消息队列遥测传输(message queuing telemetry transport,MQTT)协议解析功能函数、数据处理功能函数等。
工作流(workflow)可用于指示工作流的事件(event)调用的至少一个功能函数以及该至少一个功能函数的执行顺序。可以看出,工作流可以用于将功能函数编排为协调的微服务应用程序,即将功能函数和事件组合成一个连贯的单元,并描述功能函数的执行和以规定方式传递的信息。
举例说明,图2示出了本申请实施例的一种可能的网络示意性图。在图2中,工作流为:事件1调用功能函数1,在执行完功能函数1后,调用功能函数2。在执行完功能函数2后,事件2调用功能函数3。
应理解,图2仅是为了帮助本领域技术人员更好地理解本申请实施例,而非限制本申请实施例的范围。比如,事件1也可以调用功能函数3,在执行完功能函数3后,事件2也可以调用功能函数1和功能函数2。
可选地,事件和工作流的定义可以参考规范CloudEvents。CloudEvents 是一种用通用格式描述事件数据的规范,以提供跨服务、平台和***的互操作性。当然,事件和工作流的定义也可以参考云原生计算基金会(cloud native computing foundation,CNCF)无服务器工作流(serverless workflow)。
工作流中的每个功能函数都可以由来自不同来源的事件驱动,即本申请实施例的工作流是由事件触发的。可选地,一个事件可以调用一个或者多个功能函数。如图2所示,事件1调用功能函数1和功能函数2,事件2调用功能函数3。
或者,多个事件可以调用一个功能函数。
可选地,工作流可以是开发人员创建的,并预配置在构建的***上。这里的***可以是但不限于函数即服务(function as a service,FaaS)***。为了描述方便,下文以***为FaaS***为例进行说明。
继续参考图2,FaaS***可包括两个部分,其中一个部分为功能函数管理模块。功能函数管理模块可以用于负责功能函数的全生命周期管理,如创建、发布、更新、销毁等。示例性地,功能函数管理模块可以参照以下动作控制功能函数的生命周期:
(a)创建:创建新功能函数,包括其规格和代码;
(b)发布:创建可以在集群(cluster)上部署的新版本;
(c)更新别名/标签(版本):更新版本别名;
(d)获取:返回功能函数元数据和规格;
(e)更新:修改功能函数的最新版本;
(f)删除:删除功能函数,可以删除特定版本或所有版本的功能函数;
(g)列表:显示功能函数及其元数据的列表;
(h)获取统计信息:返回有关功能函数运行时使用情况的统计信息;
(i)获取日志:返回功能函数生成的日志。
另外一个部分为工作流管理模块,如图2所示,工作流管理模块包括工作流。
开发人员在创建工作流之前,开发人员可以先将第一设备和/或第二设备加入网络。其中,该网络可以是服务网格(service mesh)。
继续以图2为例进行说明,service mesh可包括控制面板(control plane)和设备。其中,控制面板除了包括FaaS***之外,还可以执行其他动作, 如路由控制管理、功能函数注册、功能函数发现、监控和流量追踪等。
可选地,开发人员可以根据业务需求创建功能函数,并将创建的功能函数配置在FaaS***中的功能函数管理模块上。之后,功能函数管理模块可将这些功能函数热部署到设备。例如,功能函数管理模块可以将这些功能函数热部署到设备上容器(container)中。
在一种可能的实现方式中,功能函数管理模块可根据每个设备的资源将这些功能函数热部署到不同的设备上。也就是说,第一设备上部署的功能函数可以是根据第一设备的资源确定的,类似地,第二设备上部署的功能函数也可以是根据第二设备的资源确定的。
第一设备的资源和第二设备的资源可以是第一设备的中央处理器(central processing unit,CPU)资源、网关资源等。第一设备的资源可以是第一设备的总资源,也可以是第一设备当前时刻未使用的资源。相应地,第二设备的资源也可以是第二设备的总资源或者第二设备当前时刻未使用的资源。
具体来说,service mesh能够监控第一设备和第二设备的资源状况。在service mesh监控到第一设备的资源状况和第二设备的资源状况后,可以控制功能函数管理模块将功能函数部署到第一设备和第二设备上,其中,资源多的设备上部署的功能函数可以多于资源少的设备上部署的功能函数。继续参考图2,设备1的资源多于设备2的资源,则在设备1上部署的功能函数多于在设备2上部署的功能函数,即设备1上部署有功能函数1和功能函数2,设备2上部署有功能函数2。当然,设备1上也可以部署功能函数2和功能函数3,设备2上部署功能函数1。
应理解,本申请实施例对功能函数具体部署到哪个设备上不作具体限定,只需资源多的设备上部署的功能函数的数量大于资源少的设备上部署的功能函数即可。
上述技术方案,根据设备的资源在设备上部署功能函数,资源多的设备上部署的功能函数较多,资源少的设备上部署的功能函数相对较少,从而能够实现资源的合理分配和资源的有效利用。进一步地,根据设备的资源在设备上部署功能函数,避免了某个功能函数必须部署到某个设备的问题,提高了部署功能函数的灵活性。
可选地,开发人员在确定事件调动的功能函数时,可以根据功能函数的输入确定。具体而言,事件中可以包括信息,该信息为该事件调用的功能函数的输入。比如,第一事件调用第一功能函数,第一事件包括第一信息,第一信息为第一功能函数的输入。
可选地,步骤110具体可以包括:第一设备接收FaaS***发送的工作流调度信息,该工作流调度信息标识出工作流。
作为一种示例,FaaS***可以每隔预设时间段向第一设备发送工作流调度信息。示例性地,预设时间段可以是5s。如此,能够提高第一设备获取到工作流的概率。
作为另一种示例,在第一设备出厂前,第一设备可以接收FaaS***向其发送的工作流调度信息。该技术方案,在第一设备出厂之前即可获取到工作流,这样,即使第一设备与中央集群断开连接仍然可以执行工作流,极大地保证了工作流的正常执行。
进一步地,方法100还可以包括:第一设备根据记录信息,确定第一功能函数所在的设备,该记录信息用于记录至少一个功能函数中每个功能函数所在的设备。
可选地,在功能函数管理模块将至少一个功能函数部署到不同的设备之后,功能函数管理模块向每个设备发送记录信息,以将至少一个功能函数中每个功能函数所在的设备通知给设备。
作为示例,每个设备都可以包括边车(sidecar),功能函数管理模块可以将记录信息发送给sidecar,这样,每个设备的sidecar可以记录有每个设备上部署的功能函数。继续以图2为例进行说明,设备1的sidecar可以记录有功能函数1和功能函数3在设备1上,功能函数2在设备2上。
在第一设备接收到第一事件后,若第一设备根据记录信息,确定自己为第一功能函数所在的设备,则第一设备可以直接调用第一功能函数。
若第一设备根据记录信息,确定自己不是第一功能函数所在的设备,而第二设备为第一功能函数所在的设备,则第一设备可以将第一事件路由到第二设备。
如图3所示,设备2接收到事件1,根据工作流确定事件1调用功能函数1,并确定功能函数1在设备1上,因此,设备2将事件1路由到设备1, 以使事件1调用功能函数1,并且设备1执行功能函数1。
从图3中可以看出,设备2接收事件1以及设备2将事件1路由到设备1,均是由设备的sidecar执行的。也就是说,设备2的sidecar接收事件1并将事件1路由到设备1的sidecar。
当然,设备2接收事件1以及设备2将事件1路由到设备1,也可以由设备的其他模块执行的,本申请实施例对此不作具体限定。
可选地,第二设备还可以向第一设备发送反馈信息,该反馈信息用于反馈第二设备执行第一功能函数的执行结果。
比如,第二设备可以在执行第一功能函数的过程中向第一设备发送反馈信息,比如,发送否定应答(negative acknowledgment,NACK),以使第一设备知道第二设备正在执行第一功能函数。
或者,第二设备可以在执行完第一功能函数后,向第一设备发送反馈信息,比如,发送肯定应答(acknowledgment,ACK),以使第一设备知道第二设备以执行完第一功能函数。
上述技术方案,在接收事件的设备不是该事件调用的功能函数所在的设备的情况下,该事件调用的功能函数所在的设备在执行完该功能函数后向接收事件的设备反馈执行功能函数的结果,使得接收事件的设备能够继续执行下一个步骤,避免了接收事件的设备无效等待的时间,有利于大大减小执行整个工作流的时间。
为了更加清楚地理解本申请实施例,下面在图2的基础上进一步结合图3-图5举例说明本申请实施例的事件触发工作流的具体流程。
步骤1
初始状态下,设备1和设备2等待事件触发。当设备2中的sidecar接收到事件1时,根据工作流,确定事件1调用功能函数1。由于功能函数1部署在设备1上,因此sidecar将事件1路由到设备1上,以调用功能函数1。
步骤2
在执行完功能函数1后,设备1通过sidecar向设备2的sidecar发送反馈信息,从而设备2确定设备1已执行完功能函数1。
接下来,设备2再次根据工作流,确定调用功能函数2,功能函数2部署在设备2上,因此,设备2直接调用功能函数2。
根据工作流可以知道,在执行完功能函数2后,事件2可以触发工作流,以调用功能函数3。因此,执行功能函数2后,***等待事件2的触发。
步骤3
设备2中的sidecar接收到事件2后,根据工作流,确定事件2调用功能函数3。由于功能函数3部署在设备1上,因此sidecar将事件2路由到设备1上,以调用功能函数3。
在执行完功能函数3后,设备1中的容器可向设备1的sidecar发送反馈信息。至此,工作流执行完毕。
本申请实施例,通过在设备上部署功能函数,使得整个工作流可以在设备上完成,即通过远程部署而不用去现场即可实现对应用程序的处理,极大地减少了人力。此外,设备根据用于指示事件调用的至少一个功能函数以及该至少一个功能函数的执行顺序的工作流,来完成整个工作流程,能够有效提高工作效率。
进一步地,由于设备可以获取到工作流,这样不论功能函数部署到哪个设备上,设备都可以根据工作流确定事件调用的功能函数,即使该设备不是该功能函数所在的设备,也可以将事件路由到该功能函数所在的设备,以调用该功能函数,从而可以提高整个***的灵活性。
上文详细描述了本申请实施例的方法实施例,下面描述本申请实施例的装置实施例,装置实施例与方法实施例相互对应,因此未详细描述的部分可参见前面各方法实施例,装置可以实现上述方法中任意可能实现的方式。
图6示出了本申请一个实施例的工作流操作的装置600的示意性框图。该工作流操作的装置600可以执行上述本申请实施例的工作流操作的方法100,该工作流操作的装置600可以为前述方法中的第一设备。
如图6所示,该工作流操作的装置600包括:
获取单元610,用于获取工作流调度信息,所述工作流调度信息用于指示工作流的事件调用的至少一个功能函数以及所述至少一个功能函数的执行顺序;
确定单元620,用于在所述第一设备接收到第一事件后,根据所述工作流调度信息,确定所述第一事件待调用的第一功能函数,所述工作流的事件包括所述第一事件,所述至少一个功能函数包括所述第一功能函数;
调用单元630,用于若所述第一设备为所述第一功能函数所在的设备,则调用所述第一功能函数;
路由单元640,用于若第二设备为所述第一功能函数所在的设备,则将所述第一事件路由到所述第二设备。
可选地,在本申请一个实施例中,所述第一设备上部署的功能函数是根据所述第一设备的资源确定的,所述第二设备上部署的功能函数是根据所述第二设备的资源确定的。
若所述第一设备的资源大于所述第二设备的资源,则在所述第一设备上部署的功能函数多于在所述第二设备上部署的功能函数。
可选地,在本申请一个实施例中,若第二设备为所述第一功能函数所在的设备,装置600还可以包括:通信单元,用于接收所述第二设备发送的反馈信息,所述反馈信息用于反馈所述第二设备执行所述第一功能函数的执行结果。
可选地,在本申请一个实施例中,确定单元620还可以用于:根据记录信息,确定所述第一功能函数所在的设备,所述记录信息用于记录所述至少一个功能函数中每个功能函数所在的设备。
可选地,在本申请一个实施例中,装置600还可以包括:通信单元,用于接收***发送的所述工作流调度信息。
可选地,在本申请一个实施例中,通信单元具体用于:在所述第一设备出厂前,接收所述***发送的所述工作流调度信息。
可选地,在本申请一个实施例中,所述第一事件包括第一信息,所述第一信息为所述第一功能函数的输入。
可选地,在本申请一个实施例中,所述第一设备和所述第二设备为边缘设备。
图7是本申请实施例的工作流操作的装置的硬件结构示意图。图7所示的工作流操作的装置700可以为第一设备,工作流操作的装置700包括存储器701、处理器702、通信接口703以及总线704。其中,存储器701、处理器702、通信接口703通过总线704实现彼此之间的通信连接。
存储器701可以是只读存储器(read-only memory,ROM),静态存储设备和随机存取存储器(random access memory,RAM)。存储器701可以存储 程序,当存储器701中存储的程序被处理器702执行时,处理器702和通信接口703用于执行本申请实施例的工作流操作的方法的各个步骤。
处理器702可以采用通用的CPU,微处理器,应用专用集成电路(application specific integrated circuit,ASIC),图形处理器(graphics processing unit,GPU)或者一个或多个集成电路,用于执行相关程序,以实现本申请实施例的装置中的单元所需执行的功能函数,或者执行本申请实施例的工作流操作的方法。
处理器702还可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,本申请实施例的工作流操作的方法的各个步骤可以通过处理器702中的硬件的集成逻辑电路或者软件形式的指令完成。
上述处理器702还可以是通用处理器、数字信号处理器(digital signal processing,DSP)、ASIC、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器701,处理器702读取存储器701中的信息,结合其硬件完成本申请实施例的装置中包括的单元所需执行的功能函数,或者执行本申请实施例的工作流操作的方法。
通信接口703使用例如但不限于收发器一类的收发装置,来实现工作流操作的装置700与其他设备或通信网络之间的通信。例如,装置700可以通过通信接口703接收第二设备发送的反馈信息。
总线704可包括在工作流操作的装置700各个部件(例如,存储器701、处理器702、通信接口703)之间传送信息的通路。
应注意,尽管上述工作流操作的装置700仅仅示出了存储器、处理器、通信接口,但是在具体实现过程中,本领域的技术人员应当理解,工作流操作的装置700还可以包括实现正常运行所必须的其他器件。同时,根据具体需要,本领域的技术人员应当理解,工作流操作的装置700还可包括实现其 他附加功能函数的硬件器件。此外,本领域的技术人员应当理解,工作流操作的装置700也可仅仅包括实现本申请实施例所必须的器件,而不必包括图7中所示的全部器件。
本申请实施例还提供了一种计算机可读存储介质,存储用于设备执行的程序代码,所述程序代码包括用于执行上述工作流操作的方法中的步骤的指令。
本申请实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述工作流操作的方法。
上述的计算机可读存储介质可以是暂态计算机可读存储介质,也可以是非暂态计算机可读存储介质。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能函数划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
本申请中使用的用词仅用于描述实施例并且不用于限制权利要求。如在实施例以及权利要求的描述中使用的,除非上下文清楚地表明,否则单数形式的“一个”和“所述”旨在同样包括复数形式。类似地,如在本申请中所使用的术语“和/或”是指包含一个或一个以上相关联的列出的任何以及所有可能的组合。另外,当用于本申请中时,术语“包括”指陈述的特征、整体、步骤、操作、元素,和/或组件的存在,但不排除一个或一个以上其它特征、整体、步骤、操作、元素、组件和/或这些的分组的存在或添加。
所描述的实施例中的各方面、实施方式、实现或特征能够单独使用或以任意组合的方式使用。所描述的实施例中的各方面可由软件、硬件或软硬件 的结合实现。所描述的实施例也可以由存储有计算机可读代码的计算机可读介质体现,该计算机可读代码包括可由至少一个计算装置执行的指令。所述计算机可读介质可与任何能够存储数据的数据存储装置相关联,该数据可由计算机***读取。用于举例的计算机可读介质可以包括只读存储器、随机存取存储器、紧凑型光盘只读储存器(compact disc read-only memory,CD-ROM)、硬盘驱动器(hard disk drive,HDD)、数字视频光盘(digital video disc,DVD)、磁带以及光数据存储装置等。所述计算机可读介质还可以分布于通过网络联接的计算机***中,这样计算机可读代码就可以分布式存储并执行。
上述技术描述可参照附图,这些附图形成了本申请的一部分,并且通过描述在附图中示出了依照所描述的实施例的实施方式。虽然这些实施例描述的足够详细以使本领域技术人员能够实现这些实施例,但这些实施例是非限制性的;这样就可以使用其它的实施例,并且在不脱离所描述的实施例的范围的情况下还可以做出变化。比如,流程图中所描述的操作顺序是非限制性的,因此在流程图中阐释并且根据流程图描述的两个或两个以上操作的顺序可以根据若干实施例进行改变。作为另一个例子,在若干实施例中,在流程图中阐释并且根据流程图描述的一个或一个以上操作是可选的,或是可删除的。另外,某些步骤或功能函数可以添加到所公开的实施例中,或两个以上的步骤顺序被置换。所有这些变化被认为包含在所公开的实施例以及权利要求中。
另外,上述技术描述中使用术语以提供所描述的实施例的透彻理解。然而,并不需要过于详细的细节以实现所描述的实施例。因此,实施例的上述描述是为了阐释和描述而呈现的。上述描述中所呈现的实施例以及根据这些实施例所公开的例子是单独提供的,以添加上下文并有助于理解所描述的实施例。上述说明书不用于做到无遗漏或将所描述的实施例限制到本申请的精确形式。根据上述教导,若干修改、选择适用以及变化是可行的。在某些情况下,没有详细描述为人所熟知的处理步骤以避免不必要地影响所描述的实施例。
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请实施例揭露的 技术范围内,可轻易想到变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。

Claims (11)

  1. 一种工作流操作的方法,其特征在于,包括:
    第一设备获取(110)工作流,所述工作流用于指示事件调用的至少一个功能函数以及所述至少一个功能函数的执行顺序;
    在所述第一设备接收到第一事件后,根据所述工作流,确定(120)所述第一事件待调用的第一功能函数,所述事件包括所述第一事件,所述至少一个功能函数包括所述第一功能函数;
    若所述第一设备为所述第一功能函数所在的设备,则所述第一设备调用(130)所述第一功能函数;
    若第二设备为所述第一功能函数所在的设备,则所述第一设备将所述第一事件路由(140)到所述第二设备。
  2. 根据权利要求1所述的方法,其特征在于,所述第一设备上部署的功能函数是根据所述第一设备的资源确定的,所述第二设备上部署的功能函数是根据所述第二设备的资源确定的;
    若所述第一设备的资源大于所述第二设备的资源,则在所述第一设备上部署的功能函数多于在所述第二设备上部署的功能函数。
  3. 根据权利要求1或2所述的方法,其特征在于,若第二设备为所述第一功能函数所在的设备,所述方法还包括:
    所述第一设备接收所述第二设备发送的反馈信息,所述反馈信息用于反馈所述第二设备执行所述第一功能函数的执行结果。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    所述第一设备根据记录信息,确定所述第一功能函数所在的设备,所述记录信息用于记录所述至少一个功能函数中每个功能函数所在的设备。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一设备获取(110)工作流,包括:
    所述第一设备接收***发送的工作流调度信息,所述工作流调度信息标识出所述工作流。
  6. 根据权利要求5所述的方法,其特征在于,所述第一设备接收*** 发送的工作流调度信息,包括:
    在所述第一设备出厂前,所述第一设备接收所述***发送的所述工作流调度信息。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述第一事件包括第一信息,所述第一信息为所述第一功能函数的输入。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述第一设备和所述第二设备为边缘设备。
  9. 一种工作流操作的装置(600),其特征在于,所述装置为第一设备,包括:
    获取单元(610),用于获取工作流,所述工作流用于指示事件调用的至少一个功能函数以及所述至少一个功能函数的执行顺序;
    确定单元(620),用于在所述第一设备接收到第一事件后,根据所述工作流,确定所述第一事件待调用的第一功能函数,所述事件包括所述第一事件,所述至少一个功能函数包括所述第一功能函数;
    调用单元(630),用于若所述第一设备为所述第一功能函数所在的设备,则调用所述第一功能函数;
    路由单元(640),用于若第二设备为所述第一功能函数所在的设备,则将所述第一事件路由到所述第二设备。
  10. 一种工作流操作的装置,其特征在于,包括:
    存储器(701),用于存储程序;
    处理器(702),用于执行所述存储器(701)存储的程序,当所述存储器(701)存储的程序被执行时,所述处理器(702)用于执行根据权利要求1至8中任一项所述的工作流操作的方法。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读介质存储用于设备执行的程序代码,所述程序代码包括用于执行根据权利要求1至8中任一项所述的工作流操作的方法中的步骤的指令。
PCT/CN2021/122423 2021-09-30 2021-09-30 工作流操作的方法和装置 WO2023050410A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2021/122423 WO2023050410A1 (zh) 2021-09-30 2021-09-30 工作流操作的方法和装置
CN202180102095.6A CN117940904A (zh) 2021-09-30 2021-09-30 工作流操作的方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/122423 WO2023050410A1 (zh) 2021-09-30 2021-09-30 工作流操作的方法和装置

Publications (1)

Publication Number Publication Date
WO2023050410A1 true WO2023050410A1 (zh) 2023-04-06

Family

ID=85781189

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/122423 WO2023050410A1 (zh) 2021-09-30 2021-09-30 工作流操作的方法和装置

Country Status (2)

Country Link
CN (1) CN117940904A (zh)
WO (1) WO2023050410A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101305551A (zh) * 2005-11-09 2008-11-12 诺基亚公司 用于通信***中的分布式工作流的构造和执行的方法
CN106488057A (zh) * 2015-08-25 2017-03-08 三星电子株式会社 用于生成图像形成作业的工作流的方法和图像形成装置
US20190205186A1 (en) * 2017-12-29 2019-07-04 Futurewei Technologies, Inc. Event-driven serverless function orchestration
US20200241944A1 (en) * 2019-01-30 2020-07-30 Salesforce.Com, Inc. Orchestration of a Sequence of Computations by External Systems
CN113067898A (zh) * 2021-06-02 2021-07-02 支付宝(杭州)信息技术有限公司 为业务流程合约调度计算服务的方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101305551A (zh) * 2005-11-09 2008-11-12 诺基亚公司 用于通信***中的分布式工作流的构造和执行的方法
CN106488057A (zh) * 2015-08-25 2017-03-08 三星电子株式会社 用于生成图像形成作业的工作流的方法和图像形成装置
US20190205186A1 (en) * 2017-12-29 2019-07-04 Futurewei Technologies, Inc. Event-driven serverless function orchestration
US20200241944A1 (en) * 2019-01-30 2020-07-30 Salesforce.Com, Inc. Orchestration of a Sequence of Computations by External Systems
CN113067898A (zh) * 2021-06-02 2021-07-02 支付宝(杭州)信息技术有限公司 为业务流程合约调度计算服务的方法

Also Published As

Publication number Publication date
CN117940904A (zh) 2024-04-26

Similar Documents

Publication Publication Date Title
US10440138B2 (en) Provisioning IaaS services
US8099720B2 (en) Translating declarative models
JP6514687B2 (ja) ローカルまたは分散型コンピュータ・システムにおける柔軟なノード構成方法およびシステム
JP5067833B2 (ja) 高可用性異種クラスタ・マネージャ
CN110262902B (zh) 信息处理方法及***、介质和计算设备
WO2016121834A1 (ja) ネットワーク機能仮想化管理方法とシステムと装置とプログラム
WO2019200984A1 (zh) 分布式应用的生命周期管理方法、管理器、设备和介质
CN102339234A (zh) 一种协议栈运行装置和方法
US20140237373A1 (en) Method of provisioning a cloud-based render farm
CN111262908A (zh) 基于jenkins的任务构建方法及***
CN111371898B (zh) 一种消息监听方法、装置、设备及存储介质
US8438573B2 (en) Dependency on a resource type
CN113835911B (zh) 内网穿透代理方法、***、主机及计算机可读存储介质
CN111193610B (zh) 一种基于物联网的智慧监控数据***和方法
US20100228951A1 (en) Parallel processing management framework
CN114338722A (zh) 云边存储资源管理***及方法、存储介质和电子设备
WO2020062914A1 (zh) 一种算法的更新方法及装置
US20240086236A1 (en) Computing node management method and system
CN112583630A (zh) 设备管理方法、装置、***、设备及存储介质
CN112688794A (zh) Yang模型的管理方法、装置、***、设备及存储介质
CN114546648A (zh) 任务处理方法及任务处理平台
WO2023050410A1 (zh) 工作流操作的方法和装置
CN117194039A (zh) K8s驱动集成***、请求处理方法、设备及存储介质
US7802253B2 (en) System for session management of resources and tasks having records in the lookup table for the session
US20220394211A1 (en) Information transmission method and related device

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: 21958978

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180102095.6

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE