WO2022135547A1 - 业务运行方法、装置、电子设备和计算机存储介质 - Google Patents

业务运行方法、装置、电子设备和计算机存储介质 Download PDF

Info

Publication number
WO2022135547A1
WO2022135547A1 PCT/CN2021/140994 CN2021140994W WO2022135547A1 WO 2022135547 A1 WO2022135547 A1 WO 2022135547A1 CN 2021140994 W CN2021140994 W CN 2021140994W WO 2022135547 A1 WO2022135547 A1 WO 2022135547A1
Authority
WO
WIPO (PCT)
Prior art keywords
business
function
running
functions
information
Prior art date
Application number
PCT/CN2021/140994
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 WO2022135547A1 publication Critical patent/WO2022135547A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • 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/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/509Offload

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a business operation method, apparatus, electronic device, computer storage medium, and computer program product.
  • FaaS Function as a Service
  • RPC Remote Procedure Call
  • the embodiments of the present disclosure provide a service operation method, apparatus, electronic device, computer storage medium and computer program product.
  • An embodiment of the present disclosure provides a business operation method, including: acquiring a business flow chart associated with a business to be run; parsing the business flow chart to obtain at least two first business functions in the business flow chart.
  • the running sequence, and the dependencies between the running results of the at least two first business functions create a first shared storage space, and the first shared storage space is used to save the running results of the first business functions;
  • the at least two first business functions are run according to the dependency between the running order and the running results, and the running results of the at least two first business functions are stored in the first shared storage space.
  • An embodiment of the present disclosure further provides a service operation platform, including: a flowchart acquisition module, configured to acquire a service flowchart associated with a service to be executed; a parsing module, configured to parse the service flowchart to obtain Obtain the running sequence of at least two first business functions in the business flow chart, and the dependencies between the running results of the at least two first business functions; the storage space creation module is configured to create a first shared storage space , the first shared storage space is used to save the running result of the first business function; a business running module is configured to run the at least two first business functions based on the running order and the dependency between the running results business functions, and store the running results of the at least two first business functions in the first shared storage space.
  • a flowchart acquisition module configured to acquire a service flowchart associated with a service to be executed
  • a parsing module configured to parse the service flowchart to obtain Obtain the running sequence of at least two first business functions in the business flow chart, and the dependencies between the running
  • An embodiment of the present disclosure further provides an electronic device, the electronic device includes: a processor; a memory for storing executable instructions of the processor; the processor for reading the executable instructions from the memory The instruction is executed, and the instruction is executed to realize the above-mentioned business operation method.
  • This public embodiment also provides a computer-readable storage medium, where a computer program is stored in the storage medium, and the computer program is used to execute the above-mentioned service operation method.
  • This public embodiment also provides a computer program product, which is used for executing the above-mentioned business operation method.
  • the embodiments of the present disclosure provide a technical solution, wherein a first shared storage space is created, and the first shared storage space is used to save the running result of the first business function, which is obtained by creating at least one of the same business flowcharts.
  • the two first business functions create a first shared storage space, in which the running results of the above-mentioned business functions can be stored, so that calls or communications between the first business functions can be stored in the above-mentioned shared storage space. It can be solved by reading the running results, so that no additional time consumption is required, the overall execution time of the business is shortened, and the business operation efficiency is improved.
  • FIG. 1 is a schematic flowchart of a service operation method provided by an embodiment of the present disclosure
  • FIG. 2 is a schematic diagram of a service flow diagram according to an embodiment of the present disclosure
  • FIG. 3 is a schematic flowchart of another service operation method provided by an embodiment of the present disclosure.
  • FIG. 4 is a schematic flowchart of a service offloading process according to an embodiment of the present disclosure
  • FIG. 5 is a schematic flowchart of an update service flowchart according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic flowchart of a function development process provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic flowchart of another function development process provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a service operation platform provided by an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of another service operation platform provided by an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of still another service operation platform provided by an embodiment of the present disclosure.
  • FIG. 11 is a schematic structural diagram of another service operation platform provided by an embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
  • the communication between business functions is often based on a proprietary network protocol or a Remote Procedure Call (Remote Procedure Call, RPC) protocol to implement call or communication, and complex services are generally implemented by It is composed of multiple business functions, so that the invocation or communication between the business functions will cause extra time consumption, resulting in long time consuming for the overall business execution and low business operation efficiency.
  • RPC Remote Procedure Call
  • the shared storage space can store the running results of the above-mentioned business functions, so that calls or communications between business functions can be performed by the above-mentioned shared storage space It can be solved by storing and reading the operation results in the storage space, so that no additional time consumption is required, the overall execution time of the business is shortened, and the business operation efficiency is improved.
  • FIG. 1 is a schematic flowchart of a service operation method provided by an embodiment of the present disclosure.
  • the service operation method may be implemented by a service operation platform, and the service operation platform runs on an electronic device, and the electronic device includes but is not limited to a cloud A server, a local server, or a local host device, etc.; and the above-mentioned business operation platform may include an operation engine, and the operation engine runs at least two business functions in the business flowchart.
  • the above-mentioned business operation platform may also include an interactive interface, and through the interactive interface, a business flow chart or other instructions sent by the user may be received;
  • the components of the business operation platform can be set according to actual requirements, which are not limited in the embodiments of the present disclosure.
  • the method includes the following steps:
  • Step 101 obtaining a business flow chart associated with the business to be run
  • the above-mentioned business flow chart mainly defines which business functions are required for business operation, the specific running order of the business functions, which business function runs first, which business function runs later, which business function runs in parallel, etc.; and business functions Dependency between the running results of the first run, that is, there are two business functions in the order of execution, the execution result of the business function that runs first is the input information of the business function that runs later, or it can be limited that the execution result of the business function that runs first satisfies the predetermined order. Only when conditions are set, the business function that runs later can be officially run;
  • the business flow chart associated with the to-be-run business is obtained, and the business flow chart may be a business flow chart arranged or edited by the user according to actual business requirements.
  • An interactive interface is provided, and through the interactive interface, the business flow chart sent by the user and associated with the to-be-run business is received.
  • the above-mentioned interactive interface may include, but is not limited to, at least one of an interface interactive interface, an SDK interface, or an API interface, and a user can send a business flowchart through any one or several of the above-mentioned interfaces, and optionally Yes, the user can be provided with an online editing function through any of the above-mentioned interactive interfaces, that is, the user can edit the business flowchart online through the above-mentioned interactive interface.
  • Step 102 Analyze the business flow chart to obtain the running sequence of at least two first business functions in the business flow chart, and the dependencies between the running results of the at least two first business functions;
  • the business flow chart can be parsed to obtain the content defined by the business flow chart, so as to prepare for the subsequent operation of at least two business functions in the business flow chart.
  • the business function in the business flowchart is referred to as the first business function.
  • the business flow chart defines the running sequence of at least two first business functions and the dependencies between the running results of at least two first business functions, the above information can be obtained by parsing the business flow chart.
  • FIG. 2 is a schematic diagram of a business flow chart provided by an embodiment of the present disclosure.
  • the business flow chart includes four business functions, namely business function A, business function B, business function C and business function D , where the running order is to run business function A first, then run business function B and business function C in parallel, and finally run business function D, that is, A>(B, C)>D; in which, the operating conditions of business function D can be limited is the running result of at least one of the business function B and the business function C, or the running condition of the business function B is the running result of the business function A, thereby defining the dependency between the above running results.
  • an entry and an exit can be further set, the external data required for service execution is injected through the entry, and the result obtained after the completion of the service execution is output through the exit, and the result can usually be the running result of the business function D.
  • Step 103 creating a first shared storage space, the first shared storage space is used to save the running result of the first business function;
  • a first business flow chart is created for each business flow chart, that is, the at least two first business functions in the business flow chart.
  • a shared storage space so that the operation results generated during the operation of the first business function can be stored in the first shared storage space, so that mutual calls can be made conveniently and quickly, thereby shortening the overall execution time of the business and improving the business operation efficiency.
  • a service operation instruction sent by the user may be received through an interactive interface, and then the first shared storage space is created based on the service operation instruction.
  • the interaction interface may include, but is not limited to, at least one of an interface interaction interface, an SDK interface, or an API interface, and the user may send a service flow chart and a service operation instruction through any one or more of the above-mentioned interfaces.
  • Step 104 run the at least two first business functions based on the above-mentioned running sequence and the dependencies between the above-mentioned running results, and store the running results of the at least two first business functions in the first shared storage space created in step 103 .
  • the running results are stored in the first shared storage space, which can save the efficiency of calling between the first business functions.
  • the execution results of business function A, business function B, business function C, and business function D can all be stored in the first shared storage space, and named as running result A, running result respectively B.
  • Operation result C and operation result D wherein, in some embodiments, the business operation process can be as follows:
  • Step 1 run the first business function A, store the result of its operation in the first shared storage space, and name it as the running result A;
  • Step 2 Run the business function B and the business function C. If the operation of the business function B needs to use the running result A, the running result A will be read from the first shared storage space, and then run. The running process of the business function C The same is true; after the running of business function B and business function C is completed, the corresponding running results are stored in the first shared storage space, named as running results B and running results C;
  • Step 3 Run the business function D. Assuming that its operation requires the running result B and the running result C, the running result B and the running result C will be read from the first shared storage space, and then run, and the running result will be stored in the first shared storage space. In a shared storage space, it is named as running result D.
  • the operation result D or one of the above-mentioned operation result A, operation result B and operation result C may be output from the outlet as a business output result.
  • the business output result output from the outlet may be fed back to the sender who sends the business flowchart, or may be another third party, so as to support the adaptation and matching of various business scenarios, and the application scenarios are more widely.
  • the operation results of the above-mentioned business function B and business function C can also be set to be the operation result Y.
  • the business function can be operated based on the operation result Y of any one of the business function B and the business function C.
  • the first business function may further include sub-functions associated with the first business function body.
  • the sub-functions are classified according to types, including but not limited to conditional sub-functions. At least one of a function, a pre-sub-function, a post-sub-function, a timeout sub-function, and a fault-tolerant sub-function.
  • the execution condition sub-function means that the first business function body is run only when the execution condition sub-function passes;
  • the pre-sub-function refers to the sub-function that will run before the first business function body is executed;
  • the post-sub function refers to the sub-function that will run after the first business function body runs successfully;
  • the timeout sub-function refers to the sub-function that will run after the first business function body runs out of time, and the timeout can be set by the user The timeout period or the default timeout period of the system;
  • the fault-tolerant sub-function refers to the sub-function that only runs when the first business function body runs in error. When the timeout sub-function is set, the running error usually does not include the running timeout.
  • the first business function body and its sub-functions will run as a whole function node.
  • the first business functions will be configured with sub-functions, and they may not be configured with any sub-functions or only Configure one or several sub-functions.
  • the method may further include:
  • Step 105 Obtain function operation information of at least two first business functions, where the function operation information includes function codes of at least two first business functions;
  • step 104 in the above embodiment shown in FIG. 1 the step of running at least two first business functions based on the running order and the dependency between the running results may include:
  • the at least two first business functions are run based on the running order, the dependencies between the running results, and the function code.
  • the method before running the at least two first business functions, the method further includes:
  • Step 106 Acquire running configuration information of the at least two first service functions, where the above configuration information may include data-dependent interface information and/or storage system configuration information required for running the at least two first service functions.
  • Step 107 Acquire dependent data required for the operation of at least two first business functions based on the dependent data interface information, and/or, acquire storage system data required for the operation of at least two first business functions based on the storage system configuration information;
  • Step 108 Inject dependency data and/or storage system data required to run the at least two first business functions into the function code.
  • the above-mentioned dependent data or storage system data is the data required for the initial operation of the first business function. For example, a certain computing task needs to obtain initial external data during operation.
  • the above-mentioned external data can be stored in the storage system, or from the Obtained from external data suppliers, and external data suppliers provide corresponding results, so before the official operation of the business, you can obtain dependent data from the dependent data interface, or obtain storage system data from the storage system, and then inject it into function code to take advantage of the normal operation of the subsequent business.
  • the above-mentioned function operation information may further include description information of at least two first business functions, and the description information of the first business functions may include introduction information such as functions and characteristics of the functions, so that users can fully understand Each first business function.
  • the above-mentioned function operation information may further include initialization processing information, and the method may further include:
  • Initialization processing is performed for running the first business function based on the initialization processing information.
  • the business operation platform may include a running engine
  • each step of All are executed in the running engine.
  • the function running information including function code, description information and initialization information, etc., can be recorded in the function library after being developed by the developer.
  • the flow chart is analyzed to obtain the required first business function, and then the corresponding function operation information can be obtained from the function library, and the function information of at least two first business functions can be loaded into the same operation engine to use
  • the first shared storage space is subsequently created to realize memory sharing and reduce the efficiency of calling the running results between each other.
  • the dependency data required for the operation of the at least two first business functions is obtained based on the dependency data interface information, and/or, the operation of the at least two first business functions is obtained based on the storage system configuration information
  • the required storage system data which can be a configuration center module set in the business operation platform, is sent to the configuration center by the operation engine after extracting the dependent data interface information and/or storage system configuration information from the function operation information Module, the configuration center module obtains the corresponding data based on the above-mentioned dependent data interface information and/or storage system configuration information, and then feeds it back to the running engine.
  • FIG. 4 is a schematic flowchart of a service offloading process provided by an embodiment of the present disclosure, as shown in FIG. 4 , including the following steps:
  • Step 401 Receive a task unloading request sent by a user through an interactive interface, which is an external interactive interface provided by the business operation platform, just like an interactive interface for receiving a business flowchart, and the above-mentioned interactive interface may include but not limited to an interface interactive interface. , at least one of SDK interface or API interface.
  • Step 402 Uninstall the function operation information of the at least two first business functions, which may specifically include uninstalling the function codes of the at least two first business functions from the running engine, and deleting the description information and initialization of the first business functions. information, etc., when the above-mentioned first business function includes a first business function ontology, and a sub-function associated with the first business function ontology, the sub-function includes a conditional sub-function, a pre-sub-function, a post-sub-function, and a timeout sub-function. When at least one of the function and the fault-tolerant sub-function, the above-mentioned first business function ontology and the sub-function associated with the first business function ontology can be uninstalled.
  • the method may further include:
  • Step 403 perform destruction processing based on destruction processing information.
  • the destruction process may include clearing the running results generated during the running of the at least two first business functions, including the final running results, the intermediate running results, and the like.
  • the destruction processing step the data information generated during the operation of the first business function can be further cleared.
  • the storage space can be saved.
  • the technical solution of the present disclosure can be applied to application scenarios such as cloud servers, the business function can be cleared in time.
  • the data generated by the operation can also achieve the function of protecting data security.
  • the business flow chart is updated.
  • first run according to the steps in the embodiment shown in FIG. 1 and then run the updated business flow chart.
  • the first business function in the business flow chart that was run before is uninstalled.
  • FIG. 5 is a schematic flowchart of an update service flowchart provided by an embodiment of the present disclosure, as shown in FIG. 5 , including the following steps:
  • Step 501 Receive a flowchart update request through an interactive interface to obtain an updated business flowchart
  • the flowchart update request sent by the user may be received through various types of interfaces in the manner in step 101 shown in FIG. 1 , and the flowchart update request includes the updated business flowchart.
  • the following steps 502 to 504 can be continued according to the steps 102 to 104 shown in FIG. 1 , and the following steps 502 to 504 are not described in detail in this embodiment;
  • Step 502 analysing the updated business flow chart to obtain the running sequence of at least two second business functions in the updated business flow chart, and the dependencies between the running results of at least two second business functions;
  • Step 503 creating a second shared storage space, the second shared storage space is used to save the running result of the second business function;
  • Step 504 Run at least two second business functions based on the above-mentioned running order and the dependencies between the above-mentioned running results, and store the running results of the at least two second business functions in the second shared storage space;
  • Step 505 Unload the original business flow chart and/or the function operation information of at least two first business functions and/or the at least two first business functions previously loaded into the running engine and associated with the business to be run.
  • the destruction processing method can refer to the embodiment shown in FIG. 4 , and after the uninstallation is completed, the destruction processing can be further performed based on the destruction processing information. In some embodiments, the destruction processing method can also refer to the embodiment shown in FIG. 4 above.
  • the service operation platform in the embodiment of the present disclosure runs the service based on the first service function developed by the developer in the above-mentioned embodiment.
  • Step 601 issuing a function development toolkit to the user, so that the user can develop a first business function based on the function development toolkit;
  • the above-mentioned first business function may be one or more functions in a business flowchart.
  • a business flow diagram can complete a complete functional task, and a function is usually a part of the complete functional task, such as a recommendation service, which can be divided into three parts: material recall, model sorting and rule rearrangement according to the business flow diagram
  • a first business function can be a function corresponding to one of the modules.
  • the development task can be clarified to the developer, and the user can develop based on the above function development toolkit.
  • the function code is obtained through development, and after the development is completed, the function code can be packaged by an editing tool.
  • the developer may further provide description information or initialization information of the first service function.
  • Step 602 Receive the first service function developed by the user, and store it in the function library.
  • step 601 on the basis of step 601, the function code of the first business function is added.
  • the description information or initialization information of the first service function can be further sent to the service operation platform, so as to store the above information in the function library, the function code, description information and initialization information of the above-mentioned first service function. , which can be collectively referred to as the operation information of the first business function to be used when the business is running.
  • the dependent data interface information and/or storage system configuration information required for developing the first business function can also be delivered to the user, and the user responsible for developing the first business function can directly reference
  • the above-mentioned dependent data interface information and storage system configuration information are edited into the function code of the first business function, so that there is no need to care about the environment and cluster configuration in some embodiments when the first business function is finally running.
  • the above-mentioned dependent data interface information and/or storage system configuration information required to develop the function code of the first business function may be issued simultaneously with the function development toolkit, and the above-mentioned information is embedded in the function development toolkit. It can be viewed at any time as the first business function is developed.
  • FIG. 7 is a schematic flowchart of another function development process provided by an embodiment of the present disclosure, which, on the basis of the embodiment shown in FIG. 6 , may further include:
  • Step 603 Deliver to the user a virtual running environment for running at least two first business functions in the business flow chart, so that the user can test the first business function developed based on the virtual running environment.
  • the virtual running environment in this step can simulate the running engine in the business running platform, and run the first business function developed by the user in the virtual running environment, so as to achieve the purpose that the user can develop and test the function locally, and can reduce the test time cost.
  • the first business function is executed in a business flow chart. Therefore, the virtual operating environment can also be tested according to the business flow chart.
  • the user develops a business flow chart
  • All the first business functions in the flow chart can be tested at the same time, and when the user only needs to develop one first business function in the business flow chart, in order to realize the test of the first business function developed by the user, At the same time, other first business functions in the business flow chart required for a test can also be delivered to the virtual operating environment.
  • the virtual operating environment can be integrated into the function development toolkit, and a test button is added to the function development toolkit to implement real-time testing of the developed first business function.
  • the function development toolkit therein can support multiple programming languages, so that the user can develop the first business function based on different programming languages.
  • the embodiments of the present disclosure further provide a service operation platform, which can be used to execute the above-mentioned service operation method, and the technical solutions in some embodiments may refer to the above-mentioned FIG. 1 to FIG. 7 .
  • the embodiment of the service operation platform is not described in detail in this embodiment of the service operation platform.
  • FIG. 8 is a schematic structural diagram of a service operation platform provided by an embodiment of the present disclosure. As shown in FIG. 8 , it includes: a flowchart acquisition module 11, which is configured to acquire a service flowchart associated with a to-be-run service;
  • the parsing module 12 is configured to parse the business flow chart to obtain the running sequence of at least two first business functions in the business flow chart, and the difference between the running results of the at least two first business functions. dependencies;
  • the storage space creation module 13 is configured to create a first shared storage space, and the first shared storage space is used to save the running result of the first business function;
  • the business running module 14 is configured to run the at least two first business functions based on the dependency between the running order and the running results, and store the running results of the at least two first business functions in the in the first shared storage space.
  • FIG. 9 is a schematic structural diagram of another service operation platform provided by an embodiment of the present disclosure. As shown in FIG. 9 , in addition to the structure shown in FIG. 8 , it also includes:
  • the interactive interface 15 is configured to receive, through the interactive interface, a business flow chart sent by the user and associated with the to-be-run business.
  • the interactive interface is configured to receive service operation instructions sent by the user
  • the storage space creation module 13 is configured to create a first shared storage space based on the service operation instruction.
  • the first business function includes a first business function ontology, and sub-functions associated with the first business function ontology, the sub-functions include a conditional sub-function, a pre-sub-function, and a post-sub function At least one of a function, a timeout sub-function, and a fault-tolerance sub-function.
  • it also includes:
  • the operation information acquisition module 16 is configured to acquire function operation information of the at least two first business functions, where the function operation information includes function codes of the at least two first business functions;
  • the service operation module 14 is configured to execute the at least two first service functions based on the execution order, the dependencies between the execution results and the function codes.
  • it also includes:
  • the configuration information acquisition module 17 is configured to acquire the operation configuration information of the at least two first business functions, where the operation configuration information includes the dependent data interface information required for the operation of the at least two first business functions and/or Storage system configuration information: obtain dependent data required for the operation of the at least two first business functions based on the dependent data interface information, and/or obtain the at least two first business functions based on the storage system configuration information Storage system data required for operation; and injecting dependency data and/or storage system data required for operation of the at least two first business functions into the function code.
  • the function operation information further includes description information of the at least two first business functions.
  • the function operation information further includes initialization processing information, and the method further includes: an initialization module configured to perform initialization processing for running the first business function based on the initialization processing information.
  • FIG. 10 is a schematic structural diagram of still another service operation platform provided by an embodiment of the present disclosure.
  • the above service operation platform further includes an operation engine 10 and a function library 20 .
  • the above-mentioned flow chart acquisition module 11, analysis module 12, storage space creation module 13, operation information acquisition module 16 and business operation module 14 are all set in the running engine, and at least two business functions in the same business flow chart are set in the running engine.
  • the function operation information is loaded into the same operation engine 10 ; the function operation information of the at least two first business functions is stored in the function library 20 and obtained.
  • the above configuration information acquisition module it can also be set in the running engine 10 and complete all the above disclosures, but in some cases, a special configuration center module 30 can also be set up, wherein the configuration information acquisition module 17 is in the acquisition
  • the operation configuration information includes the data-dependent interface information and/or storage system configuration information required for the operation of the at least two first business functions;
  • the operation configuration information is sent to the configuration center module 30, and the configuration center module 30 obtains the dependency data required for the operation of the at least two first business functions based on the dependency data interface information, and/or obtains all the data based on the storage system configuration information.
  • the storage system data required for the operation of the at least two first business functions is then fed back to the configuration information acquisition module 17; the configuration information acquisition module 17 obtains the dependent data required for the operation of the at least two first business functions And/or storage system data is injected into the function code.
  • the interactive interface 15 is configured to receive a task unloading request sent by a user; the execution engine 10 further includes: an unloading module 18 for unloading the function running information of the at least two first business functions .
  • the interaction interface 15 is configured to receive a flowchart update request, and the flowchart acquisition module is configured to acquire an updated service flowchart associated with the to-be-run service;
  • the parsing module 12 is further configured to parse the updated business flow chart to obtain the running sequence of at least two second business functions in the updated business flow chart, and the at least two second business functions in the updated business flow chart. Dependency between the results of the second business function;
  • the storage space creation module 13 is further configured to create a second shared storage space, and the second shared storage space is used to save the running result of the second business function;
  • the business operation module 14 is further configured to run the at least two second business functions based on the dependency between the running order and the running results, and to calculate the running results of the at least two second business functions.
  • the running engine 10 Stored in the second shared storage space; the running engine 10 further includes:
  • the unloading module 18 is configured to unload the original business flow chart and/or the function operation information of at least two first business functions and/or the at least two first business functions previously loaded into the execution engine and associated with the business to be run.
  • FIG. 11 is a schematic structural diagram of another service operation platform provided by the embodiments of the present disclosure.
  • the service operation platform further includes: a toolkit delivery module 21 configured to deliver a function development toolkit to users, The first business function is developed by the user based on the function development toolkit; the function receiving module 22 is configured to receive the first business function developed by the user and store it in the function library 20 .
  • it may further include: an information delivery module 23, configured to deliver the dependent data interface information and/or storage system configuration information required for developing the first service function to the user, so that the user can send all the information to the user.
  • the data-dependent interface information and the storage system configuration information are edited into the function code of the first service function.
  • the information issuing module 23 is provided in the toolkit issuing module 21 .
  • an operating environment issuing module 24 configured to issue a virtual operating environment for running at least two first business functions in the business flowchart to the user, so that the user can execute the virtual operating environment based on the virtual operating environment.
  • the first business function developed is tested.
  • the virtual runtime environment is integrated in the function development kit.
  • the interaction interface includes at least one of an interface interaction interface, an SDK interface, or an API interface.
  • FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure.
  • the electronic device can be either a cloud server, a local host, or a client device in the above embodiment.
  • the electronic device 500 in the embodiment of the present disclosure may include, but is not limited to, such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), an in-vehicle terminal ( For example, mobile terminals such as car navigation terminals) and the like, and stationary terminals such as digital TVs, desktop computers, and the like.
  • the illustrated electronic device is only an example, and should not impose any limitations on the functionality and occupancy scope of the embodiments of the present disclosure.
  • electronic device 500 may include processing means (eg, central processing unit, graphics processor, etc.) 510 that may be loaded into random access memory according to a program stored in read only memory (ROM) 520 or from storage means 580
  • the program in the (RAM) 5030 executes various appropriate operations and processes.
  • RAM 530 various programs and data required for the operation of the electronic device 500 are also stored.
  • the processing device 510, the ROM 520, and the RAM 530 are connected to each other through a bus 540.
  • An input/output (I/O) interface 550 is also connected to bus 540 .
  • the following devices may be connected to the I/O interface 550: input devices 560 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 570 of a computer, etc.; a storage device 580 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 590.
  • the communication means 590 may allow the electronic device 500 to communicate wirelessly or by wire with other devices to exchange data. While the electronic device 500 is shown having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the methods illustrated in the flowcharts.
  • the computer program may be downloaded and installed from the network via the communication device 590, or from the storage device 580, or from the ROM 520.
  • the processing device 510 When the computer program is executed by the processing device 510, the above-mentioned functions defined in the performance information acquisition method of the AB test algorithm of the embodiment of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • the client and server can use any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol) to communicate, and can communicate with digital data in any form or medium.
  • Data communications eg, communication networks
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • LAN local area networks
  • WAN wide area networks
  • the Internet eg, the Internet
  • peer-to-peer networks eg, ad hoc peer-to-peer networks
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device can: acquire a business flow chart associated with the business to be executed; parsing to obtain the running order of the at least two first business functions in the business flow chart, and the dependencies between the running results of the at least two first business functions; create a first shared storage space, the first The shared storage space is used to save the running result of the first business function; run the at least two first business functions based on the running order and the dependency between the running results, and store the at least two first business functions.
  • the running result of the business function is stored in the first shared storage space.
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, using an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
  • the functions described herein above may be performed, at least in part, by one or more hardware logic components.
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • the present disclosure provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is used to execute any one of the services provided by the present disclosure run method.
  • the present disclosure provides a computer program for executing any one of the business operation methods provided by the present disclosure.
  • the above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed.
  • Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, and should also cover the technical solutions made of the above-mentioned technical features or Other technical solutions formed by any combination of its equivalent features.
  • a technical solution is formed by replacing the above features with the technical features disclosed in the present disclosure (but not limited to) with similar functions.
  • An embodiment of the present disclosure provides a business operation method, including: acquiring a business flow chart associated with a business to be executed; and parsing the business flow chart to obtain at least two first business functions in the business flow chart.
  • the running sequence, and the dependencies between the running results of the at least two first business functions create a first shared storage space, and the first shared storage space is used to save the running results of the first business functions;
  • the at least two first business functions are run according to the dependency between the running order and the running results, and the running results of the at least two first business functions are stored in the first shared storage space.
  • a first shared storage space is created, and the first shared storage space is used to save the running result of the first business function, which is achieved by at least two first services in the same business flow chart.
  • the function creates a first shared storage space in which the running results of the above-mentioned business functions can be stored, so that calls or communications between the first business functions can be stored and read in the above-mentioned shared storage space.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

本公开实施例涉及一种业务运行方法、装置、电子设备、计算机存储介质和计算机程序产品,其中方法包括:获取与待运行业务关联的业务流程图;对所述业务流程图进行解析,以得到所述业务流程图中至少两个第一业务函数的运行顺序,以及所述至少两个第一业务函数的运行结果间的依赖关系;创建第一共享存储空间,所述第一共享存储空间用于保存所述第一业务函数的运行结果;基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,并将所述至少两个第一业务函数的运行结果存储到所述第一共享存储空间中。上述技术方案能够缩短业务整体的执行时间,提高业务运行效率。

Description

业务运行方法、装置、电子设备和计算机存储介质
本公开要求于2020年12月25日提交中国专利局、申请号为202011565743.5、发明名称为“业务运行方法、装置、电子设备和计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。
技术领域
本公开涉及计算机技术领域,尤其涉及一种业务运行方法、装置、电子设备、计算机存储介质和计算机程序产品。
背景技术
为了减少服务器应用开发中的重复逻辑开发,提升代码复用性,从而整体提升开发效率,“无服务器(Serverless)”平台越来越广泛的应用。这些平台基于函数即服务(Function as a Service,简称:FaaS)的架构,从而使得开发者只需要关注业务函数的开发,而不用担心基础架构和相关的运维操作。然而,这些FaaS平台在实现中,业务函数之间的通信往往基于专有的网络协议或者远程过程调用(Remote Procedure Call,简称:RPC)协议来实现调用或通信,而复杂的业务一般由多个业务函数组成,这样业务函数之间的调用或通信会带来额外的时间消耗,导致业务整体的执行耗时时间长,业务运行效率低的缺陷。
发明内容
为了解决上述技术问题,本公开实施例提供了一种业务运行方法、装置、电子设备、计算机存储介质和计算机程序产品。
本公开实施例提供了一种业务运行方法,包括:获取与待运行业务关联的业务流程图;对所述业务流程图进行解析,以得到所述业务流程图中至少两个第一业务函数的运行顺序,以及所述至少两个第一业务函数的运行结果间的依赖关系;创建第一共享存储空间,所述第一共享存储空间用于保存所述第一业务函数的运行结果;基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,并将所述至少两个第一业务函数的运行结果存储到所述第一共享存储空间中。
本公开实施例还提供了一种业务运行平台,包括:流程图获取模块,被配置为获取与待运行业务关联的业务流程图;解析模块,被配置为对所述业务流程图进行解析,以得到所述业务流程图中至少两个第一业务函数的运行顺序,以及所述至少两个第一业务函数的运行结果间的依赖关系;存储空间创建模块,被配置为创建第一共享存储空间,所述第一共享存储空间用于保存所述第一业务函数的运行结果;业务运行模块,被配置为基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,并将所述至少两个第一业务函数的运行结果存储到所述第一共享存储空间中。
本公开实施例还提供一种电子设备,所述电子设备包括:处理器;用于存 储所述处理器可执行指令的存储器;所述处理器,用于从所述存储器中读取所述可执行指令,并执行所述指令以实现上述的业务运行方法。
本公共实施例还提供一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行上述的业务运行方法。
本公共实施例还提供一种计算机程序产品,所述计算机程序产品用于执行上述的业务运行方法。
本公开实施例提供了一种技术方案,其中创建第一共享存储空间,该第一共享存储空间用于保存所述第一业务函数的运行结果,其是通过为同一个业务流程图中的至少两个第一业务函数创建第一共享存储空间,该第一共享存储空间中可以存储上述业务函数的运行结果,进而使得第一业务函数之间的调用或通信可以由在上述共享存储空间中存储和读取运行结果来解决,从而不需要带来额外的时间消耗,缩短业务整体的执行时间,提高业务运行效率。
附图说明
图1为本公开实施例提供的一种业务运行方法的流程示意图;
图2为本公开实施例提供的一种业务流程图的示意图;
图3为本公开实施例提供的另一种业务运行方法的流程示意图;
图4为本公开实施例提供的一种业务卸载流程的流程示意图;
图5为本公开实施例提供的一种更新业务流程图的流程示意图;
图6为本公开实施例提供的一种函数开发流程的流程示意图;
图7为本公开实施例提供的另一种函数开发流程的流程示意图;
图8为本公开实施例提供的一种业务运行平台的结构示意图;
图9为本公开实施例提供的另一种业务运行平台的结构示意图;
图10为本公开实施例提供的再一种业务运行平台的结构示意图;
图11为本公开实施例提供的又一种业务运行平台的结构示意图;
图12为本公开实施例提供的一种电子设备的结构示意图。
具体实施方式
需要说明的是,在本文中,诸如“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。
针对现有技术中FaaS平台在实现中,业务函数之间的通信往往基于专有的网络协议或者远程过程调用(Remote Procedure Call,简称:RPC)协议来实现调用或通信,而复杂的业务一般由多个业务函数组成,这样业务函数之间的调用或通信会带来额外的时间消耗,导致业务整体的执行耗时时间长,业务运行效率低的缺陷,本公开实施例提供了一种技术方案,是通过为同一个业务流程图中的至少两个业务函数创建共享存储空间,该共享存储空间中可以存储上述业务函数的运行结果,进而使得业务函数之间的调用或通信可以由在上述共享存储空间中存储和读取运行结果来解决,从而不需要带来额外的时间消耗,缩短业务整体的执行时间,提高业务运行效率。
图1为本公开实施例提供的一种业务运行方法的流程示意图,该业务运行方法可以是通过一个业务运行平台来实现,该业务运行平台运行在电子设备上,该电子设备包括但不限于云服务器、本地服务器或者本地主机设备等;且上述的业务运行平台可以包括运行引擎,并通过运行引擎运行业务流程图中的至少两个业务函数。可选的,上述的业务运行平台还可以包括交互接口,并通过该交互接口接收用户的发送的业务流程图,或者其他的指令;可选的,上述的业务运行平台还可以包括函数库,用于存储业务函数等等,该业务运行平台的组成部分可以根据实际需求进行设置,本公开实施例中并不进行限制。如图1所示,示例性的,该方法包括如下步骤:
步骤101、获取与待运行业务关联的业务流程图;
在一些实施例中,上述的业务流程图主要限定业务运行需要哪些业务函数,该业务函数的具体运行顺序,哪个业务函数先运行,哪个业务函数后运行,哪个业务函数并行运行等;以及业务函数的运行结果间的依赖关系,即存在先后执行顺序的两个业务函数,先运行的业务函数的执行结果是后运行的业务函数的输入信息,或者可以限定先运行的业务函数的执行结果满足预设条件的情况下,后运行的业务函数才能够正式运行;
另外,本步骤中的获取与待运行业务关联的业务流程图,其中的业务流程图可以是由用户根据实际的业务需求编排或编辑得到的业务流程图,在一些实施例中,可以是向用户提供交互接口,并通过交互接口接收用户发送的与待运行业务关联的业务流程图。在一些实施例中,上述的交互接口可以包括但不限于界面交互接口、SDK接口或者API接口中的至少一种,用户可以通过上述任意一种或几种接口来发送业务流程图,并且可选的,可以通过上述任意一种交互接口为用户提供在线编辑功能,即由用户通过上述交互接口在线编辑业务流程图。
步骤102、对业务流程图进行解析,以得到业务流程图中至少两个第一业务函数的运行顺序,以及至少两个第一业务函数的运行结果间的依赖关系;
在获取到上述的业务流程图后,即可以对业务流程图进行解析以得到业务流程图所限定的内容,为后续运行业务流程图中的至少两个业务函数做准备,为了描述更加清晰,本公开实施例中,将业务流程图中的业务函数称为第一业务函数。如上的,业务流程图中限定了至少两个第一业务函数的运行顺序,以及至少两个第一业务函数的运行结果间的依赖关系,则可以从上述业务流程图中解析得到上述信息。
图2为本公开实施例提供的一种业务流程图的示意图,如图2所示,该业务流程图中包括四个业务函数,即业务函数A、业务函数B、业务函数C和业务函数D,其中的运行顺序是先运行业务函数A,然后并行运行业务函数B和业务函数C,最后运行业务函数D,即A>(B,C)>D;其中,可以限定业务函数D的运行条件是业务函数B和业务函数C中至少一个的运行结果,或者业务函数B的运行条件是业务函数A的运行结果,从而限定出上述运行结果间的依 赖关系。
可选的,可以进一步设置入口和出口,通过入口注入业务执行所需的外部数据,通过出口输出业务执行完成后得到的结果,该结果通常可以为业务函数D的运行结果。
步骤103、创建第一共享存储空间,该第一共享存储空间用于保存第一业务函数的运行结果;
本步骤中为了解决在至少两个第一业务函数运行过程中,相互之间需要调用执行结果的问题,为每个业务流程图,也就是业务流程图中的至少两个第一业务函数创建第一共享存储空间,使得第一业务函数运行过程中所产生的运行结果可以存储到第一共享存储空间中,使得可以方便快捷的相互调用,从而缩短业务整体的执行时间,提高业务运行效率。
在一些实施例中,本步骤中在创建第一共享存储空间之前,可以是先通过交互接口接收用户发送的业务运行指令,然后基于业务运行指令,创建第一共享存储空间。其中的交互接口可以包括但不限于界面交互接口、SDK接口或者API接口中的至少一种,用户可以通过上述任意一种或几种接口来发送业务流程图,以及发送业务运行指令。
步骤104、基于上述运行顺序和上述运行结果间的依赖关系运行上述至少两个第一业务函数,并将至少两个第一业务函数的运行结果存储到步骤103创建的第一共享存储空间中。
本步骤中即在业务流程图所包括的两个第一业务函数的运行过程中,将运行结果都存储到第一共享存储空间中,可以节约第一业务函数间调用时的效率。例如图2所示的实施例中,可以将业务函数A、业务函数B、业务函数C和业务函数D的执行结果都存储到第一共享存储空间中,并分别命名为运行结果A、运行结果B、运行结果C和运行结果D,其中,在一些实施例中业务运行流程可以如下所示:
步骤一、运行第一个业务函数A,将其运行的结果存储到第一共享存储空间中,命名为运行结果A;
步骤二、运行业务函数B和业务函数C,若业务函数B的运行需要用到运行结果A,则会从第一共享存储空间中去读取运行结果A,然后运行,业务函数C的运行过程也同理;在运行业务函数B和业务函数C运行结束后,将对应的运行结果存储到第一共享存储空间中,命名为运行结果B和运行结果C;
步骤三、运行业务函数D,假定其运行需要运行结果B和运行结果C,则会从第一共享存储空间中读取运行结果B和运行结果C,然后再运行,并将运行结果存到第一共享存储空间中,命名为运行结果D。
如果检测到整个业务流程图的运行步骤结束,则可以将运行结果D,或者还包括上述运行结果A、运行结果B和运行结果C中的一个作为业务输出结果从出口输出。本公开实施例中,从出口输出的业务输出结果,其可以是反馈给发送业务流程图的发送方,也可以是其他的第三方,以支持对多种业务场景的 适应和匹配,应用场景更加广泛。
在一些实施例中,也可以设置上述的业务函数B和业务函数C的运行结果均为运行结果Y,此时业务函数可以基于业务函数B和业务函数C中的任一个运行结果Y而运行。
在一些实施例中,其中的第一业务函数除可以包括第一业务函数本体外,还可以进一步包括与第一业务函数本体关联的子函数,该子函数按照类型划分,包括但不限于条件子函数、前置子函数、后置子函数、超时子函数和容错子函数中的至少一个。
其中执行条件子函数,是指仅当执行条件子函数运行通过时才运行第一业务函数本体;前置子函数,是指在运行第一业务函数本体前会运行的子函数;后置子函数,是指在第一业务函数本体运行成功后,才会运行的子函数;超时子函数,是指在第一业务函数本体运行超时后才会运行的子函数,其中的超时可以是用户设置的超时时间或系统默认的超时时间;容错子函数,是指第一业务函数本体运行出错时才会运行的子函数,在设置了超时子函数时,其中的运行出错通常不包括运行超时的情况。
本公开实施例中,其中第一业务函数本体及其子函数会作为一个整体的函数节点来运行,当然,并不是所有的第一业务函数都会配置子函数,其可以不配置任何子函数或只配置某一个或某几个子函数。
通过上述子函数的配置,可以设置第一业务函数运行的各种条件,或者出现异常情况的处理方式,从而可以丰富其应用场景,满足用户的各种业务需求。
在一些实施例中,如图3所示,其中在对业务流程图进行解析之后,运行上述至少两个第一业务函数之前,还可以进一步包括:
步骤105、获取至少两个第一业务函数的函数运行信息,该函数运行信息包括至少两个第一业务函数的函数代码;
则上述图1所示实施例中的步骤104中,其中的基于运行顺序和运行结果间的依赖关系运行至少两个第一业务函数的步骤,可以包括:
基于运行顺序、运行结果间的依赖关系和函数代码运行上述至少两个第一业务函数。
在一些实施例中,仍如图3所示,其中在运行上述至少两个第一业务函数之前,还包括:
步骤106、获取所述至少两个第一业务函数的运行配置信息,上述的配置信息可以包括至少两个第一业务函数运行所需的依赖数据接口信息和/或存储系统配置信息。
步骤107、基于依赖数据接口信息获取至少两个第一业务函数运行所需的依赖数据,和/或,基于存储系统配置信息获取至少两个第一业务函数运行所需的存储系统数据;
步骤108、将该至少两个第一业务函数运行所需的依赖数据和/或存储系统数据注入函数代码中。
上述依赖数据或者存储系统数据是第一业务函数初始运行时所需要的数据,例如某一个计算任务,其在运行时需要获取初始的外部数据,上述的外部数据可以存储在存储系统中,或者从外部的数据供应商处获取,而外部的数据供应商提供了相应的结果,因此可以在业务正式运行前,从依赖数据接口获取依赖数据,或者从存储系统获取存储系统数据,然后将其注入到函数代码中,以利用后续业务的正常运行。
在一些实施例中,上述的函数运行信息还可包括至少两个第一业务函数的描述信息,该第一业务函数的描述信息可以包括函数的功能、特性等介绍信息,以使得用户可以充分了解每个第一业务函数。
在一些实施例中,上述的函数运行信息还可包括初始化处理信息,则该方法还可以进一步包括:
基于初始化处理信息为运行第一业务函数进行初始化处理。
如上所述的,本公开实施例提供的技术方案中,其中可以运行在业务运行平台中,而该业务运行平台可以包括运行引擎,则本公开上述图1所示的实施例中,其中各步骤均在运行引擎中执行,对于其中的函数运行信息,包括函数代码、描述信息和初始化信息等,都可以由开发者开发后记录在函数库中,运行引擎在获取到业务流程图后,对业务流程图进行解析,得到所需要的第一业务函数,进而可以去函数库中获取对应的函数运行信息,并可以将至少两个第一业务函数的函数信息加载在同一个运行引擎中,以利用后续创建第一共享存储空间,实现内存共享,降低相互间调用运行结果的效率。
另外,在一些实施例中,对于上述步骤中基于依赖数据接口信息获取至少两个第一业务函数运行所需的依赖数据,和/或,基于存储系统配置信息获取至少两个第一业务函数运行所需的存储系统数据,其可以是在业务运行平台中设置配置中心模块,由运行引擎在从函数运行信息中提取出来依赖数据接口信息和/或存储系统配置信息后,将其发送给配置中心模块,由配置中心模块基于上述的依赖数据接口信息和/或存储系统配置信息去获取相应的数据,然后反馈给运行引擎。
本公开上述实施例中,主要涉及到如何获取业务流程图,并基于业务流程图运行对应的业务。在有些情况下,业务运行完毕后,可以卸载运行中的业务。图4为本公开实施例提供的一种业务卸载流程的流程示意图,如图4所示,包括如下步骤:
步骤401、通过交互接口接收到用户发送的任务卸载请求,该交互接口是业务运行平台提供的对外交互接口,如同接收业务流程图的交互接口,其上述的交互接口可以包括但不限于界面交互接口、SDK接口或者API接口中的至少一种。
步骤402、卸载所述至少两个第一业务函数的函数运行信息,具体可以包括将上述至少两个第一业务函数的函数代码从运行引擎中卸载,以及删除第一业务函数的描述信息、初始化信息等,当上述的第一业务函数包括第一业务函数 本体,以及与该第一业务函数本体关联的子函数,该子函数包括条件子函数、前置子函数、后置子函数、超时子函数和容错子函数中的至少一个时,可以是卸载上述的第一业务函数本体,以及与该第一业务函数本体关联的子函数。
进一步的,对于上述实施例中的函数运行信息中包括销毁处理信息的情况下,该方法还可以进一步包括:
步骤403、基于销毁处理信息进行销毁处理。
在一些实施例中,该销毁处理过程可以包括清除至少两个第一业务函数运行过程中所生成的运行结果,包括最终的运行结果、中间运行结果等内容等。通过销毁处理步骤可以进一步清除上述第一业务函数运行过程中所产生的数据信息,一方面能够节约存储空间,二方面由于本公开的技术方案可以应用到云服务器等应用场景中,及时清除业务函数运行所产生的数据,也能够达到保护数据安全的作用。
在一些实施例中会存在更新业务流程图的情况出现,在此情况下,通常会基于更新后的业务流程图,先按照图1所示实施例中的步骤运行,运行完更新后的业务流程图中的第二业务函数后,再卸载之前运行的业务流程图中的第一业务函数。
在一些实施例中,图5为本公开实施例提供的一种更新业务流程图的流程示意图,如图5所示,包括如下步骤:
步骤501、通过交互接口接收流程图更新请求,以获取更新后的业务流程图;
在一些实施例中,可以是通过图1所示步骤101中的方式,通过各种类型的接口接收用户发送的流程图更新请求,该流程图更新请求中包括更新后的业务流程图。在此基础上可以继续按照图1所示的步骤102-步骤104执行如下的步骤502-步骤504,本实施例中对下述步骤502-步骤504不再详细描述;
步骤502、对更新后的业务流程图进行解析,以得到更新后的业务流程图中至少两个第二业务函数的运行顺序,以及至少两个第二业务函数的运行结果间的依赖关系;
步骤503、创建第二共享存储空间,该第二共享存储空间用于保存第二业务函数的运行结果;
步骤504、基于上述运行顺序和上述运行结果间的依赖关系运行至少两个第二业务函数,并将至少两个第二业务函数的运行结果存储到第二共享存储空间中;
步骤505、卸载在先加载到运行引擎中的与待运行业务关联的原业务流程图和/或至少两个第一业务函数的函数运行信息。
在步骤504中更新后的至少两个第二业务函数运行起来后,说明业务已经按照更新后的业务流程图正常运行了,在此即可以卸载之前的第一业务函数,在一些实施例中卸载方式可以参考图4所示的实施例,并且在卸载完成后,也可以进一步的基于销毁处理信息进行销毁处理,在一些实施例中销毁处理方式也可以参照上述图4所示的实施例。
本公开实施例中的业务运行平台,在上述实施例中是基于开发者开发的第一业务函数运行业务。上述的第一业务函数可以由不同的开发者进行开发。图6为本公开实施例提供的一种函数开发流程的流程示意图,具体可以包括:
步骤601、向用户下发函数开发工具包,以由用户基于函数开发工具包开发第一业务函数;
在一些实施例中,上述的第一业务函数可以是业务流程图中的一个或者多个函数。通常一个业务流程图能够完成一项完整的功能任务,而一个函数通常是完整功能任务的一部分,例如一项推荐服务,其可以按照业务流程图拆分为物料召回、模型排序和规则重排三个模块,则一个第一业务函数可以是其中一个模块对应的功能,在确定好第一业务函数对应的功能后,可以向开发者明确开发任务,用户可以基于上述的函数开发工具包进行开发,开发得到在一些实施例中函数代码,开发完成后可以通过编辑工具将函数代码打包。
而根据实际需要,开发者除提供函数代码外,还可以进一步的提供该第一业务函数的描述信息或初始化信息。
步骤602、接收用户开发的第一业务函数,并存储到函数库中。
本步骤是在步骤601的基础上,将第一业务函数的函数代码。或者是,还可以进一步的将第一业务函数的描述信息或初始化信息,发送到业务运行平台,以将上述信息存储到函数库中,上述的第一业务函数的函数代码、描述信息和初始化信息,可以统称为第一业务函数的运行信息,以在业务运行时使用。
在一些实施例中,上述步骤601中,还可以向用户下发开发第一业务函数所需的依赖数据接口信息和/或存储系统配置信息,此时负责开发第一业务函数的用户可以直接引用上述信息,将上述依赖数据接口信息和存储系统配置信息编辑到第一业务函数的函数代码中,从而无需关心最终第一业务函数最终在运行时在一些实施例中环境和集群配置等。
上述开发第一业务函数的函数代码所需的依赖数据接口信息和/或存储系统配置信息,其可以是和函数开发工具包同时下发的,在函数开发工具包中嵌入上述的信息,用户在开发第一业务函数时能够随时查看。
进一步的,图7为本公开实施例提供的另一种函数开发流程的流程示意图,其在图6所示的实施例的基础上,还可以进一步包括:
步骤603、向用户下发运行业务流程图中至少两个第一业务函数的虚拟运行环境,以由用户基于虚拟运行环境测试开发的第一业务函数。
本步骤中的虚拟运行环境可以模拟业务运行平台中的运行引擎,将用户开发的第一业务函数在虚拟运行环境中运行,以达到用户可以在本地进行函数开发和测试的目的,并可以降低测试成本。如上述实施例所示的,其中的第一业务函数是在一个业务流程图中执行的,因此,该虚拟运行环境中也可以按照业务流程图进行测试,此时若用户开发的是业务流程图中所有第一业务函数,则可以同时对上述所有第一业务函数进行测试,而用户仅需要开发业务流程图中一个第一业务函数时,则为了实现对用户开发的第一业务函数的测试,可以同 时将一次测试所需业务流程图中的其他第一业务函数也下发到虚拟运行环境中。
本公开实施例中,其中的虚拟运行环境可以集成到函数开发工具包中,并且在函数开发工具包添加测试按钮,实现对开发的第一业务函数的实时测试。
在一些实施例中,其中的函数开发工具包可以支持多种编程语言,以由用户基于不同的编程语言开发第一业务函数。
与上述业务运行方法对应的,本公开实施例还提供了一种业务运行平台,其可以用于执行上述的业务运行方法,其中在一些实施例中技术方案可以参考上述图1-图7所示的实施例,本业务运行平台实施例中不再进行详细描述。
图8为本公开实施例提供的一种业务运行平台的结构示意图,如图8所示,其包括:流程图获取模块11,被配置为获取与待运行业务关联的业务流程图;
解析模块12,被配置为对所述业务流程图进行解析,以得到所述业务流程图中至少两个第一业务函数的运行顺序,以及所述至少两个第一业务函数的运行结果间的依赖关系;
存储空间创建模块13,被配置为创建第一共享存储空间,所述第一共享存储空间用于保存所述第一业务函数的运行结果;
业务运行模块14,被配置为基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,并将所述至少两个第一业务函数的运行结果存储到所述第一共享存储空间中。
在一些实施例中,图9为本公开实施例提供的另一种业务运行平台的结构示意图,如图9所示,其除图8所示的结构外,还包括:
交互接口15,配置为通过所述交互接口接收用户发送的与待运行业务关联的业务流程图。
在一些实施例中,所述交互接口被配置为接收用户发送的业务运行指令;
所述存储空间创建模块13,被配置为基于所述业务运行指令,创建第一共享存储空间。
在一些实施例中,所述第一业务函数包括第一业务函数本体,以及与所述第一业务函数本体关联的子函数,所述子函数包括条件子函数、前置子函数、后置子函数、超时子函数和容错子函数中的至少一个。
在一些实施例中,还包括:
运行信息获取模块16,被配置为获取所述至少两个第一业务函数的函数运行信息,所述函数运行信息包括所述至少两个第一业务函数的函数代码;
所述业务运行模块14被配置为基于所述运行顺序、所述运行结果间的依赖关系和所述函数代码运行所述至少两个第一业务函数。
在一些实施例中,还包括:
配置信息获取模块17,被配置为获取所述至少两个第一业务函数的运行配置信息,所述运行配置信息包括所述至少两个第一业务函数运行所需的依赖数据接口信息和/或存储系统配置信息:基于所述依赖数据接口信息获取所述至少两个第一业务函数运行所需的依赖数据,和/或,基于所述存储系统配置信息获 取所述至少两个第一业务函数运行所需的存储系统数据;将所述至少两个第一业务函数运行所需的依赖数据和/或存储系统数据注入所述函数代码中。
在一些实施例中,所述函数运行信息还包括所述至少两个第一业务函数的描述信息。在一些实施例中,所述函数运行信息还包括初始化处理信息,所述方法还包括:初始化模块,用于基于所述初始化处理信息为运行所述第一业务函数进行初始化处理。
在一些实施例中,图10为本公开实施例提供的再一种业务运行平台的结构示意图,上述业务运行平台还包括运行引擎10和函数库20。
上述的流程图获取模块11、解析模块12、存储空间创建模块13、运行信息获取模块16和业务运行模块14均设置在运行引擎中,所述同一个业务流程图中的至少两个业务函数的函数运行信息被加载到同一个所述运行引擎10中;所述至少两个第一业务函数的函数运行信息存储在函数库20中获取。
另外,对于上述的配置信息获取模块,其也可以设置在运行引擎10中,并完成上述所有公开,但在有些情况下,还可以设置专门的配置中心模块30,其中配置信息获取模块17在获取到所述至少两个第一业务函数的运行配置信息,所述运行配置信息包括所述至少两个第一业务函数运行所需的依赖数据接口信息和/或存储系统配置信息;然后将上述的运行配置信息发送给配置中心模块30,由配置中心模块30基于依赖数据接口信息获取所述至少两个第一业务函数运行所需的依赖数据,和/或,基于所述存储系统配置信息获取所述至少两个第一业务函数运行所需的存储系统数据,然后将其反馈给配置信息获取模块17;以由配置信息获取模块17将所述至少两个第一业务函数运行所需的依赖数据和/或存储系统数据注入所述函数代码中。
在一些实施例中,所述交互接口15被配置为接收用户发送的任务卸载请求;所述运行引擎10还包括:卸载模块18,用于卸载所述至少两个第一业务函数的函数运行信息。
在一些实施例中,所述交互接口15被配置为接收流程图更新请求,所述流程图获取模块用于获取更新后的与所述待运行业务关联的业务流程图;
所述解析模块12,还被配置为对所述更新后的业务流程图进行解析,以得到更新后的所述业务流程图中至少两个第二业务函数的运行顺序,以及所述至少两个第二业务函数的运行结果间的依赖关系;
所述存储空间创建模块13,还被配置为创建第二共享存储空间,所述第二共享存储空间用于保存所述第二业务函数的运行结果;
所述业务运行模块14,还被配置为基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第二业务函数,并将所述至少两个第二业务函数的运行结果存储到所述第二共享存储空间中;所述运行引擎10还包括:
卸载模块18,被配置为卸载在先加载到所述执行引擎中的所述与待运行业务关联的原业务流程图和/或至少两个第一业务函数的函数运行信息。
在一些实施例中,图11为本公开实施例提供的又一种业务运行平台的结构 示意图,业务运行平台还包括:工具包下发模块21,被配置为向用户下发函数开发工具包,以由用户基于所述函数开发工具包开发所述第一业务函数;函数接收模块22,被配置为接收用户开发的第一业务函数,并存储到函数库20中。
在一些实施例中,还可以包括:信息下发模块23,被配置为向用户下发开发所述第一业务函数所需的依赖数据接口信息和/或存储系统配置信息,以由用户将所述依赖数据接口信息和所述存储系统配置信息编辑到所述第一业务函数的函数代码中。
在一些实施例中,所述信息下发模块23设置于所述工具包下发模块21中。
在一些实施例中,还可以包括:运行环境下发模块24,被配置为向用户下发运行业务流程图中至少两个第一业务函数的虚拟运行环境,以由用户基于所述虚拟运行环境测试开发的所述第一业务函数。在一些实施例中,所述虚拟运行环境集成在所述函数开发工具包中。在一些实施例中,所述交互接口包括界面交互接口、SDK接口或者API接口中的至少一种。
图12为本公开实施例提供的一种电子设备的结构示意图,对于本公开实施例中上述的AB测试算法的性能参数信息获取方案,其既可以在云服务器上实现,也可以在本地主机实现,因此该电子设备既可以是云服务器,也可以是本地主机,或者是上述实施例中的客户端设备。
下面具体参考,其示出了适于用来实现本公开实施例中的电子设备500的结构示意图。本公开实施例中的电子设备500可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和占用范围带来任何限制。
如图所示,电子设备500可以包括处理装置(例如中央处理器、图形处理器等)510,其可以根据存储在只读存储器(ROM)520中的程序或者从存储装置580加载到随机访问存储器(RAM)5030中的程序而执行各种适当的动作和处理。在RAM 530中,还存储有电子设备500操作所需的各种程序和数据。处理装置510、ROM 520以及RAM 530通过总线540彼此相连。输入/输出(I/O)接口550也连接至总线540。通常,以下装置可以连接至I/O接口550:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置560;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置570;包括例如磁带、硬盘等的存储装置580;以及通信装置590。通信装置590可以允许电子设备500与其他设备进行无线或有线通信以交换数据。虽然示出了具有各种装置的电子设备500,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程 图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置590从网络上被下载和安装,或者从存储装置580被安装,或者从ROM 520被安装。在该计算机程序被处理装置510执行时,执行本公开实施例的AB测试算法的性能信息获取方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务端可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:获取与待运行业务关联的业务流程图;对所述业务流程图进行解析,以得到所述业务流程图中至少两个第一业务函数的运行顺序,以及所述至少两个第一业务函数的运行结果间的依赖关系;创建第一共享存储空间,所述第一共享存储空间用于保存所述第一业务函数的运行结果;基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,并将所述至少两个第一业务函数的运行结果存储到所述第一共享存储空间中。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言— 诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务端上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,本公开提供了一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行如本公开提供的任一所述的业务运行方法。
根据本公开的一个或多个实施例,本公开提供了一种计算机程序,所述计算机程序用于执行如本公开提供的任一所述的业务运行方法。以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解, 本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。
工业实用性:
本公开实施例,提供一种业务运行方法,包括:获取与待运行业务关联的业务流程图;对所述业务流程图进行解析,以得到所述业务流程图中至少两个第一业务函数的运行顺序,以及所述至少两个第一业务函数的运行结果间的依赖关系;创建第一共享存储空间,所述第一共享存储空间用于保存所述第一业务函数的运行结果;基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,并将所述至少两个第一业务函数的运行结果存储到所述第一共享存储空间中。
本公开的技术方案,其中创建第一共享存储空间,该第一共享存储空间用于保存所述第一业务函数的运行结果,其是通过为同一个业务流程图中的至少两个第一业务函数创建第一共享存储空间,该第一共享存储空间中可以存储上述业务函数的运行结果,进而使得第一业务函数之间的调用或通信可以由在上述共享存储空间中存储和读取运行结果来解决,从而不需要带来额外的时间消耗,缩短业务整体的执行时间,提高业务运行效率。具有很强的工业实用性。

Claims (37)

  1. 一种业务运行方法,包括:
    获取与待运行业务关联的业务流程图;
    对所述业务流程图进行解析,以得到所述业务流程图中至少两个第一业务函数的运行顺序,以及所述至少两个第一业务函数的运行结果间的依赖关系;
    创建第一共享存储空间,所述第一共享存储空间用于保存所述第一业务函数的运行结果;
    基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,并将所述至少两个第一业务函数的运行结果存储到所述第一共享存储空间中。
  2. 根据权利要求1所述的方法,其中,所述获取与待运行业务关联的业务流程图,包括:
    通过交互接口接收用户发送的与待运行业务关联的业务流程图。
  3. 根据权利要求2所述的方法,其中,所述创建第一共享存储空间之前,还包括:
    通过交互接口接收用户发送的业务运行指令;
    所述创建第一共享存储空间包括:基于所述业务运行指令,创建第一共享存储空间。
  4. 根据权利要求1所述的方法,其中,所述第一业务函数包括第一业务函数本体,以及与所述第一业务函数本体关联的子函数,所述子函数包括条件子函数、前置子函数、后置子函数、超时子函数和容错子函数中的至少一个。
  5. 根据权利要求1所述的方法,其中,所述对业务流程图进行解析之后,运行所述至少两个第一业务函数之前,所述方法还包括:
    获取所述至少两个第一业务函数的函数运行信息,所述函数运行信息包括所述至少两个第一业务函数的函数代码;
    所述基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,包括:
    基于所述运行顺序、所述运行结果间的依赖关系和所述函数代码运行所述至少两个第一业务函数。
  6. 根据权利要求5所述的方法,其中,在运行所述至少两个第一业务函数之前,所述方法还包括:
    获取所述至少两个第一业务函数的运行配置信息,所述运行配置信息包括所述至少两个第一业务函数运行所需的依赖数据接口信息和/或存储系统配置 信息;
    基于所述依赖数据接口信息获取所述至少两个第一业务函数运行所需的依赖数据,和/或,基于所述存储系统配置信息获取所述至少两个第一业务函数运行所需的存储系统数据;
    将所述至少两个第一业务函数运行所需的依赖数据和/或存储系统数据注入所述函数代码中。
  7. 根据权利要求5所述的方法,其中,所述函数运行信息还包括所述至少两个第一业务函数的描述信息。
  8. 根据权利要求5所述的方法,其中,所述函数运行信息还包括初始化处理信息,所述方法还包括:
    基于所述初始化处理信息为运行所述第一业务函数进行初始化处理。
  9. 根据权利要求5所述的方法,其中,所述方法在运行引擎中运行,同一个业务流程图中的至少两个第一业务函数的函数运行信息被加载到同一个运行引擎中;
    所述至少两个第一业务函数的函数运行信息从函数库中获取。
  10. 根据权利要求9所述的方法,其中,还包括:
    通过交互接口接收到用户发送的任务卸载请求;
    卸载所述至少两个第一业务函数的函数运行信息。
  11. 根据权利要求9所述的方法,其中,还包括:
    通过交互接口接收流程图更新请求,以获取更新后的与所述待运行业务关联的业务流程图;
    对所述更新后的业务流程图进行解析,以得到更新后的所述业务流程图中至少两个第二业务函数的运行顺序,以及所述至少两个第二业务函数的运行结果间的依赖关系;
    创建第二共享存储空间,所述第二共享存储空间用于保存所述第二业务函数的运行结果;
    基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第二业务函数,并将所述至少两个第二业务函数的运行结果存储到所述第二共享存储空间中;
    卸载在先加载到所述运行引擎中的、所述与待运行业务关联的原业务流程图和/或至少两个第一业务函数的函数运行信息。
  12. 根据权利要求1所述的方法,其中,还包括:
    向用户下发函数开发工具包,以由用户基于所述函数开发工具包开发所述第一业务函数;
    接收用户开发的第一业务函数,并存储到函数库中。
  13. 根据权利要求12所述的方法,其中,还包括:
    向用户下发开发所述第一业务函数所需的依赖数据接口信息和/或存储系统配置信息,以由用户将所述依赖数据接口信息和所述存储系统配置信息编辑到所述第一业务函数的函数代码中。
  14. 根据权利要求13所述的方法,其中,通过所述函数开发工具包下发所述开发第一业务函数的函数代码所需的依赖数据接口信息和/或存储系统配置信息。
  15. 根据权利要求12所述的方法,其中,还包括:
    向用户下发运行业务流程图中至少两个第一业务函数的虚拟运行环境,以由用户基于所述虚拟运行环境测试开发的所述第一业务函数。
  16. 根据权利要求15所述的方法,其中,所述虚拟运行环境集成在所述函数开发工具包中。
  17. 根据权利要求2、3、10或11所述的方法,其中,所述交互接口包括界面交互接口、SDK接口或者API接口中的至少一种。
  18. 一种业务运行平台,包括:
    流程图获取模块,被配置为获取与待运行业务关联的业务流程图;
    解析模块,被配置为对所述业务流程图进行解析,以得到所述业务流程图中至少两个第一业务函数的运行顺序,以及所述至少两个第一业务函数的运行结果间的依赖关系;
    存储空间创建模块,创建第一共享存储空间,所述第一共享存储空间用于保存所述第一业务函数的运行结果;
    业务运行模块,被配置为基于所述运行顺序和所述运行结果间的依赖关系运行所述至少两个第一业务函数,并将所述至少两个第一业务函数的运行结果存储到所述第一共享存储空间中。
  19. 根据权利要求18所述的平台,其中,
    还包括交互接口,被配置为接收用户发送的与待运行业务关联的业务流程图。
  20. 根据权利要求19所述的平台,其中,所述交互接口还被配置为接收用户发送的业务运行指令;
    所述存储空间创建模块,被配置为基于所述业务运行指令,创建第一共享存储空间。
  21. 根据权利要求18所述的平台,其中,所述第一业务函数包括第一业务函数本体,以及与所述第一业务函数本体关联的子函数,所述子函数包括条件子函数、前置子函数、后置子函数、超时子函数和容错子函数中的至少一个。
  22. 根据权利要求18所述的平台,其中,还包括:
    运行信息获取模块,被配置为获取所述至少两个第一业务函数的函数运行 信息,所述函数运行信息包括所述至少两个第一业务函数的函数代码;
    所述业务运行模块具体被配置为基于所述运行顺序、所述运行结果间的依赖关系和所述函数代码运行所述至少两个第一业务函数。
  23. 根据权利要求22所述的平台,其中,还包括:
    配置信息获取模块,被配置为获取所述至少两个第一业务函数的运行配置信息,所述运行配置信息包括所述至少两个第一业务函数运行所需的依赖数据接口信息和/或存储系统配置信息:基于所述依赖数据接口信息获取所述至少两个第一业务函数运行所需的依赖数据,和/或,基于所述存储系统配置信息获取所述至少两个第一业务函数运行所需的存储系统数据;将所述至少两个第一业务函数运行所需的依赖数据和/或存储系统数据注入所述函数代码中。
  24. 根据权利要求22所述的平台,其中,所述函数运行信息还包括所述至少两个第一业务函数的描述信息。
  25. 根据权利要求22所述的平台,其中,所述函数运行信息还包括初始化处理信息,所述平台还包括:
    初始化模块,被配置为基于所述初始化处理信息为运行所述第一业务函数进行初始化处理。
  26. 根据权利要求22所述的平台,其中,还包括运行引擎和函数库:
    所述流程图获取模块、解析模块、存储空间创建模块、运行信息获取模块和业务运行模块均设置在运行引擎中,同一个业务流程图中的至少两个第一业务函数的函数运行信息被加载到同一个所述运行引擎中;所述至少两个第一业务函数的函数运行信息存储在函数库中获取。
  27. 根据权利要求26所述的平台,其中,所述运行引擎还包括:交互接口,被配置为接收用户发送的任务卸载请求;
    所述运行引擎还包括:卸载模块,被配置为卸载所述至少两个第一业务函数的函数运行信息。
  28. 根据权利要求26所述的平台,其中,所述运行引擎还包括:交互接口,被配置为接收流程图更新请求;
    所述流程图获取模块被配置为获取更新后的与所述待运行业务关联的业务流程图;
    所述解析模块,还被配置为对所述更新后的业务流程图进行解析,以得到更新后的所述业务流程图中至少两个第二业务函数的运行顺序,以及所述至少两个第二业务函数的运行结果间的依赖关系;
    所述存储空间创建模块,还被配置为创建第二共享存储空间,所述第二共享存储空间用于保存所述第二业务函数的运行结果;
    所述业务运行模块,还被配置为基于所述运行顺序和所述运行结果间的依 赖关系运行所述至少两个第二业务函数,并将所述至少两个第二业务函数的运行结果存储到所述第二共享存储空间中;
    所述运行引擎还包括:
    卸载模块,被配置为卸载在先加载到所述运行引擎中的所述与待运行业务关联的原业务流程图和/或至少两个第一业务函数的函数运行信息。
  29. 根据权利要求18所述的平台,其中,还包括:
    工具包下发模块,被配置为向用户下发函数开发工具包,以由用户基于所述函数开发工具包开发所述第一业务函数;
    函数接收模块,被配置为接收用户开发的第一业务函数,并存储到函数库中。
  30. 根据权利要求29所述的平台,其中,还包括:
    信息下发模块,被配置为向用户下发开发所述第一业务函数所需的依赖数据接口信息和/或存储系统配置信息,以由用户将所述依赖数据接口信息和所述存储系统配置信息编辑到所述第一业务函数的函数代码中。
  31. 根据权利要求30所述的平台,其中,所述信息下发模块设置于所述工具包下发模块中。
  32. 根据权利要求29所述的平台,其中,还包括:
    运行环境下发模块,被配置为向用户下发运行业务流程图中至少两个第一业务函数的虚拟运行环境,以由用户基于所述虚拟运行环境测试开发的所述第一业务函数。
  33. 根据权利要求32所述的平台,其中,所述虚拟运行环境集成在所述函数开发工具包中。
  34. 根据权利要求19、20、27或28所述的平台,其中,所述交互接口包括界面交互接口、SDK接口或者API接口中的至少一种。
  35. 一种电子设备,所述电子设备包括:
    处理器;
    被配置为存储所述处理器可执行指令的存储器;
    所述处理器,被配置为从所述存储器中读取所述可执行指令,并执行所述指令以实现权利要求1-17任一所述的业务运行方法。
  36. 一种计算机可读存储介质,所述存储介质存储有计算机程序,所述计算机程序用于执行权利要求1-17任一所述的业务运行方法。
  37. 一种计算机程序产品,所述计算机程序产品用于执行权利要求1-17任一所述的业务运行方法。
PCT/CN2021/140994 2020-12-25 2021-12-23 业务运行方法、装置、电子设备和计算机存储介质 WO2022135547A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011565743.5 2020-12-25
CN202011565743.5A CN112596720A (zh) 2020-12-25 2020-12-25 业务运行方法、装置、电子设备和计算机存储介质

Publications (1)

Publication Number Publication Date
WO2022135547A1 true WO2022135547A1 (zh) 2022-06-30

Family

ID=75202189

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/140994 WO2022135547A1 (zh) 2020-12-25 2021-12-23 业务运行方法、装置、电子设备和计算机存储介质

Country Status (2)

Country Link
CN (1) CN112596720A (zh)
WO (1) WO2022135547A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596720A (zh) * 2020-12-25 2021-04-02 第四范式(北京)技术有限公司 业务运行方法、装置、电子设备和计算机存储介质
CN115774663A (zh) * 2022-09-15 2023-03-10 江苏瑞蓝自动化设备集团有限公司 一种LabVIEW的测试系统的优化方法、装置、设备及存储介质
CN116257306A (zh) * 2023-04-20 2023-06-13 天津大学 一种基于Serverless技术的数值计算方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114546523A (zh) * 2022-01-29 2022-05-27 阿里巴巴(中国)有限公司 应用程序启动方法、装置、电子设备、介质及程序产品

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509284A (zh) * 2018-03-08 2018-09-07 华南理工大学 一种应用于函数式编程的树状模型任务管理系统
CN111176802A (zh) * 2019-07-26 2020-05-19 腾讯科技(深圳)有限公司 任务处理方法、装置、电子设备及存储介质
US10678522B1 (en) * 2018-12-14 2020-06-09 Mouri Tech Llc Compiler and method for compiling business rules for a serverless runtime environment
CN111414152A (zh) * 2020-03-25 2020-07-14 北京字节跳动网络技术有限公司 业务逻辑的实现方法、系统、可读介质和电子设备
CN111626602A (zh) * 2020-05-25 2020-09-04 泰康保险集团股份有限公司 业务处理方法、业务处理装置、存储介质与电子设备
CN112506681A (zh) * 2020-12-22 2021-03-16 深圳市优必选科技股份有限公司 参数调用方法、装置、电子设备及存储介质
CN112596720A (zh) * 2020-12-25 2021-04-02 第四范式(北京)技术有限公司 业务运行方法、装置、电子设备和计算机存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062647B (zh) * 2018-07-20 2021-11-09 武汉斗鱼网络科技有限公司 活动窗口的数据共享方法、装置、设备及存储介质
US11922220B2 (en) * 2018-11-08 2024-03-05 Intel Corporation Function as a service (FaaS) system enhancements
CN109710236B (zh) * 2018-12-30 2022-04-05 北京字节跳动网络技术有限公司 基于共享服务的业务开发和实现方法、装置、平台及介质
CN112035228B (zh) * 2020-08-28 2024-04-12 光大科技有限公司 一种资源调度方法及装置
CN112069205B (zh) * 2020-09-30 2024-05-10 北京百度网讯科技有限公司 用于业务应用的处理方法、装置、智能工作站和电子设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108509284A (zh) * 2018-03-08 2018-09-07 华南理工大学 一种应用于函数式编程的树状模型任务管理系统
US10678522B1 (en) * 2018-12-14 2020-06-09 Mouri Tech Llc Compiler and method for compiling business rules for a serverless runtime environment
CN111176802A (zh) * 2019-07-26 2020-05-19 腾讯科技(深圳)有限公司 任务处理方法、装置、电子设备及存储介质
CN111414152A (zh) * 2020-03-25 2020-07-14 北京字节跳动网络技术有限公司 业务逻辑的实现方法、系统、可读介质和电子设备
CN111626602A (zh) * 2020-05-25 2020-09-04 泰康保险集团股份有限公司 业务处理方法、业务处理装置、存储介质与电子设备
CN112506681A (zh) * 2020-12-22 2021-03-16 深圳市优必选科技股份有限公司 参数调用方法、装置、电子设备及存储介质
CN112596720A (zh) * 2020-12-25 2021-04-02 第四范式(北京)技术有限公司 业务运行方法、装置、电子设备和计算机存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596720A (zh) * 2020-12-25 2021-04-02 第四范式(北京)技术有限公司 业务运行方法、装置、电子设备和计算机存储介质
CN115774663A (zh) * 2022-09-15 2023-03-10 江苏瑞蓝自动化设备集团有限公司 一种LabVIEW的测试系统的优化方法、装置、设备及存储介质
CN116257306A (zh) * 2023-04-20 2023-06-13 天津大学 一种基于Serverless技术的数值计算方法

Also Published As

Publication number Publication date
CN112596720A (zh) 2021-04-02

Similar Documents

Publication Publication Date Title
WO2022135547A1 (zh) 业务运行方法、装置、电子设备和计算机存储介质
CN110502222B (zh) 外发依赖内部基础库的aar方法、装置、介质和设备
CN109582310B (zh) 数据处理方法、装置、电子设备及计算机可读存储介质
CN111581291A (zh) 数据处理方法、装置、电子设备及可读介质
CN111400061A (zh) 一种数据处理方法和系统
CN110704833A (zh) 数据权限配置方法、设备、电子设备及存储介质
CN111309304B (zh) 一种生成idl文件的方法、装置、介质和电子设备
CN111338944B (zh) 远程过程调用rpc接口测试方法、装置、介质及设备
CN110727566A (zh) 一种获取进程崩溃信息的方法、装置、介质和电子设备
CN113407165B (zh) Sdk的生成和自升级方法、装置、可读介质和设备
CN111881216A (zh) 一种基于共享模板的数据获取方法和装置
CN109697034B (zh) 一种数据写入方法、装置、电子设备及存储介质
CN116225886A (zh) 测试用例生成方法、装置、设备、存储介质及程序产品
CN111628938B (zh) 分支合并的方法、装置、电子设备及计算机存储介质
CN112416303A (zh) 软件开发工具包热修复方法、装置及电子设备
CN111752644A (zh) 接口模拟方法、装置、设备及存储介质
CN112422648B (zh) 数据同步方法和系统
CN111240738B (zh) 文件处理方法、装置、设备及介质
CN113761588A (zh) 一种数据校验方法、装置、终端设备及存储介质
CN112230986A (zh) 项目文件生成方法、装置、电子设备和计算机可读介质
CN111367590A (zh) 中断事件处理方法及其装置
CN112783903A (zh) 生成更新日志的方法和装置
CN113641966B (zh) 一种应用集成方法、系统、设备及介质
US20240095633A1 (en) Method for determining a project flow, electronic device, and storage medium
CN117112023A (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: 21909542

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909542

Country of ref document: EP

Kind code of ref document: A1