Workflow creation method and apparatus, electronic device, and storage medium
By acquiring the configuration information and common logic call relationships of the target workflow, an initial workflow is created, which solves the problem of low efficiency in creating training data workflows and realizes an efficient training data acquisition process.
Patent Information
- Application Number
- CN202111571047.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2041-12-21
AI Technical Summary
In existing technologies, the workflow for creating training data is inefficient and requires writing a lot of code manually, which is time-consuming and labor-intensive.
By obtaining the configuration information and pre-determined common logic of the target workflow, the calling relationship is determined, the initial workflow is created, and the configuration information is obtained at runtime, reducing repetitive code development and supporting flexible customization.
It improved workflow creation efficiency, reduced code development workload, and enabled an efficient training data acquisition process.
Smart Images

Figure CN114219452B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of computers, and particularly relates to a workflow creation method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the increasing popularity of model applications, in order to improve the accuracy of model prediction, a large amount of training data containing different features can be used for model training. Different models use different training data, and a corresponding workflow is developed for the model to efficiently obtain training data of a specified type based on the workflow.
[0003] In related technologies, when a new type of training data is needed for model training, a staff member often rewrites code based on a new workflow to develop a new sample acquisition process. However, this approach is time-consuming and labor-intensive, and the efficiency of creating a workflow for training data is low. SUMMARY
[0004] The present disclosure provides a workflow creation method, device, electronic equipment and storage medium to at least solve the problem of low efficiency of creating a workflow for training data in related technologies. The technical solutions of the present disclosure are as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a workflow creation method is provided, comprising:
[0006] In response to a workflow creation request, configuration information corresponding to a target workflow to be created is obtained; the target workflow is a workflow for obtaining training data;
[0007] A predetermined common logic is obtained, and a calling relationship of the common logic to the configuration information is determined; the common logic is used to record the same common processing link in different workflows;
[0008] Based on the common logic and the calling relationship, an initial workflow is created; when the initial workflow is running, the configuration information is obtained based on the calling relationship to obtain the target workflow.
[0009] In an exemplary embodiment, the creating of the initial workflow based on the common logic and the calling relationship comprises:
[0010] The custom logic corresponding to the target workflow is obtained; the custom logic is a custom training data processing link in the target workflow;
[0011] The initial workflow is created based on the custom logic, the common logic and the calling relationship.
[0012] In an exemplary embodiment, further comprising:
[0013] In response to the workflow update request, configuration update information corresponding to the target workflow is acquired, and based on the configuration update information, the stored configuration information corresponding to the target workflow is updated to obtain updated configuration information.
[0014] The initial workflow is re-run, and based on the calling relationship, the updated configuration information is acquired to obtain an updated target workflow.
[0015] In an example embodiment, before the configuration information corresponding to the target workflow to be created is acquired in response to the workflow creation request, the method further includes:
[0016] A common processing link corresponding to a plurality of historical workflows is determined, and based on the common processing link, the common logic is obtained; the historical workflows are created workflows for acquiring training data.
[0017] In an example embodiment, after the common logic is obtained based on the common processing link, the method further includes:
[0018] An abstract class for implementing the common logic is generated, and the abstract class is saved.
[0019] The initial workflow is created based on the common logic and the calling relationship, including:
[0020] The abstract class corresponding to the common logic is acquired.
[0021] Based on the abstract class and the pre-acquired custom logic corresponding to the target workflow, a corresponding inherited class is generated; the inherited class inherits from the abstract class and defines the custom logic.
[0022] The initial workflow is created based on the inherited class and the calling relationship.
[0023] In an example embodiment, before the configuration information corresponding to the target workflow to be created is acquired in response to the workflow creation request, the method further includes:
[0024] Change data content corresponding to each common processing link in the common logic is acquired.
[0025] Based on data items corresponding to each change data content, a plurality of configuration items of the common logic are determined; the configuration items are used to configure the configuration information corresponding to the target workflow to be created.
[0026] In an example embodiment, the configuration information includes configuration information corresponding to each configuration item, and the target workflow is obtained by acquiring the configuration information based on the calling relationship when the initial workflow is running, including:
[0027] During running of the initial workflow, a plurality of configuration information is acquired based on the calling relationship, and the plurality of configuration information is encapsulated to obtain a corresponding configuration class;
[0028] The configuration class is sent to the initial workflow as a workflow parameter, and the initial workflow is configured with parameters to obtain the target workflow.
[0029] In an example embodiment, the initial workflow is configured with parameters to obtain the target workflow, including:
[0030] The initial workflow corresponding inheritance class is configured with parameters to obtain a configured inheritance class, and the target workflow is acquired based on the configured inheritance class.
[0031] According to a second aspect of the embodiments of the present disclosure, a workflow creation apparatus is provided, including:
[0032] A configuration information acquisition unit configured to acquire configuration information corresponding to a target workflow to be created in response to a workflow creation request; the target workflow is a workflow for acquiring training data;
[0033] A calling relationship determination unit configured to acquire a pre-determined common logic and determine a calling relationship of the common logic to the configuration information; the common logic is used to record the same common processing link in different workflows;
[0034] A workflow creation unit configured to create an initial workflow based on the common logic and the calling relationship; during running of the initial workflow, the configuration information is acquired based on the calling relationship to obtain the target workflow.
[0035] In an example embodiment, the workflow creation unit includes:
[0036] A custom logic acquisition module configured to acquire a custom logic corresponding to the target workflow; the custom logic is a custom training data processing link in the target workflow;
[0037] A first creation module configured to create an initial workflow based on the custom logic, the common logic, and the calling relationship.
[0038] In an example embodiment, further including:
[0039] The configuration update information receiving unit is configured to, in response to the workflow update request, acquire configuration update information corresponding to the target workflow, and update the stored configuration information corresponding to the target workflow based on the configuration update information to obtain updated configuration information.
[0040] The workflow updating unit is configured to re-run the initial workflow, and acquire the updated configuration information based on the calling relationship to obtain an updated target workflow.
[0041] In an example embodiment, the apparatus further includes:
[0042] The common logic acquiring unit is configured to determine common processing links corresponding to a plurality of historical workflows, and acquire the common logic based on the common processing links; the historical workflows are workflows for acquiring training data that have been created.
[0043] In an example embodiment, the apparatus further includes:
[0044] The abstract class generating unit is configured to generate an abstract class for implementing the common logic, and save the abstract class.
[0045] The workflow creating unit is configured to:
[0046] acquire the abstract class corresponding to the common logic;
[0047] generate a corresponding inherited class based on the abstract class and pre-acquired custom logic corresponding to the target workflow; the inherited class inherits from the abstract class and is defined with the custom logic;
[0048] create an initial workflow based on the inherited class and the calling relationship.
[0049] In an example embodiment, the apparatus further includes:
[0050] The change determining unit is configured to acquire change data content corresponding to each common processing link in the common logic.
[0051] The configuration item acquiring unit is configured to determine a plurality of configuration items of the common logic based on data items corresponding to each change data content; the configuration items are used to configure configuration information corresponding to a target workflow to be created.
[0052] In an example embodiment, the configuration information includes configuration information corresponding to each configuration item, and the workflow creating unit includes:
[0053] A configuration class obtaining module configured to obtain a plurality of configuration information based on the call relationship during the initial workflow running, and encapsulate the plurality of configuration information to obtain a corresponding configuration class;
[0054] An initial workflow configuration module configured to send the configuration class as a workflow parameter to the initial workflow, and perform parameter configuration on the initial workflow to obtain the target workflow.
[0055] In an example embodiment, the initial workflow configuration module is configured to perform:
[0056] perform parameter configuration on the inheritance class corresponding to the initial workflow to obtain a configured inheritance class, and obtain the target workflow based on the configured inheritance class.
[0057] According to a third aspect of the embodiments of the present disclosure, an electronic device is provided, comprising:
[0058] a processor;
[0059] a memory for storing instructions executable by the processor;
[0060] The processor is configured to execute the instructions to implement the workflow creation method according to any one of the preceding embodiments.
[0061] According to a fourth aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, when instructions in the computer readable storage medium are executed by a processor of an electronic device, the electronic device can execute the workflow creation method according to any one of the preceding embodiments.
[0062] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, the computer program product comprises instructions, when the instructions are executed by a processor of an electronic device, the electronic device can execute the workflow creation method according to any one of the preceding embodiments.
[0063] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0064] In the workflow creation method, the device, the electronic device, and the storage medium, in response to the workflow creation request, configuration information corresponding to a target workflow for obtaining training data to be created can be obtained, and a predetermined common logic is obtained, and a calling relationship of the common logic to the configuration information is determined, wherein the common logic is used to record the same common processing link in different workflows, and then the initial workflow can be created based on the common logic and the calling relationship, and when the initial workflow is running, the configuration information is obtained based on the calling relationship, and the target workflow is obtained. In the scheme of the present disclosure, by pre-determining the common logic of different workflows, the repeated code development work can be reduced when creating the target workflow, and at the same time, the target workflow is flexibly customized through the configuration information, avoiding writing a large amount of code, and effectively improving the workflow creation efficiency.
[0065] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS
[0066] The accompanying drawings incorporated in the specification and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure without imposing undue limitations on the disclosure.
[0067] Figure 1 is an application environment diagram of a workflow creation method according to an exemplary embodiment.
[0068] Figure 2 is a flowchart of a workflow creation method according to an exemplary embodiment.
[0069] Figure 3 is a flowchart of another workflow creation method according to an exemplary embodiment.
[0070] Figure 4 is a flowchart of another workflow creation method according to an exemplary embodiment.
[0071] Figure 5 is a schematic diagram of a workflow running process according to an exemplary embodiment.
[0072] Figure 6 is a block diagram of a workflow creation device according to an exemplary embodiment.
[0073] Figure 7 is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0074] In order for those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings.
[0075] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects and do not necessarily indicate a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present disclosure. Rather, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0076] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present disclosure are all information and data authorized by the user or authorized by all parties.
[0077] The workflow creation method provided by the present disclosure can be applied to an application environment as shown in Figure 1 The terminal 110 interacts with the configuration server 120 through the network.
[0078] The terminal 110 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The configuration server 120, which can also be referred to as a configuration center, can be implemented by an independent server or a server cluster composed of multiple servers. It can be understood that the method can also be independently applied to the terminal 110 or the configuration server 120.
[0079] Figure 2 is a flowchart of a workflow creation method according to an exemplary embodiment, as shown in Figure 2 The method is used as an example for the configuration server 120, and includes the following steps.
[0080] In step S210, in response to a workflow creation request, configuration information corresponding to a target workflow to be created is obtained.
[0081] The target workflow can be a workflow for obtaining training data. It can be understood that the target workflow can be a processing process composed of multiple processing links or businesses for obtaining training data. In an example, all the workflows mentioned in the present disclosure can be workflows for obtaining training data.
[0082] Specifically, the workflow for obtaining training data can also be referred to as a training data construction flow or a material construction flow, and the training data, also referred to as material data, can refer to data used for training a model or assisting model training in a data mining process, for example, can include training samples or labels corresponding to the training samples. In the present disclosure, obtaining training data can refer to obtaining training data from a data source; of course, it can also refer to that the training data user obtains the training data, for example, can include obtaining the training data from the data source, to providing the training data to the training data user.
[0083] The workflow creation request can be a request for creating a workflow for obtaining training data.
[0084] The configuration information can be information used to define variable factors in the target workflow. There are differences between different workflows, and the staff can adjust the workflow according to the actual situation and set the corresponding configuration information.
[0085] In actual application, the terminal 110 can send a workflow creation request to the configuration server 120. In response to the received workflow creation request, the configuration server 120 can obtain the configuration information corresponding to the target workflow to be created.
[0086] Specifically, the staff can pre-set the corresponding configuration information for the target workflow to be created through the terminal 110, and when the terminal 110 detects a trigger operation, a workflow creation request carrying the target workflow configuration information can be generated and sent to the configuration server 120. After receiving the workflow creation request, the configuration server 120 can obtain the configuration information corresponding to the target workflow by reading the request.
[0087] In step S220, the pre-determined common logic is obtained, and the calling relationship of the common logic to the configuration information is determined.
[0088] The common logic can be used to record the same common processing link in different workflows.
[0089] In specific implementation, different workflows have differences, but also have the same common processing link, for example, workflow A and workflow B are different workflows, but can both include the same common processing link a.
[0090] Based on this, the common logic can be pre-determined, which can record the same common processing link in different workflows, and then after receiving the workflow creation request, the common logic can be obtained, and the calling relationship of the common logic to the target workflow configuration information can be determined.
[0091] Specifically, the configuration information can be information defined for variable factors in a common processing link. Different workflows can include the same common processing link, but the specific processing manner in the common processing link is different. For example, workflow A and workflow B both include transmitting the currently obtained training data to a training data user. If workflow A and workflow B are respectively used to obtain different types of training data, the corresponding training data users can also be different. At this time, the variable factors of the common processing link in the common logic can be configured through the configuration information. When the workflow creation request is received, the calling relationship of the configuration information to the common logic can be determined.
[0092] In step 230, based on the common logic and the calling relationship, an initial workflow is created; when the initial workflow runs, the configuration information is obtained based on the calling relationship, and a target workflow is obtained.
[0093] As an example, the initial workflow can be a workflow configured on the configuration server 120.
[0094] After obtaining the common logic and the calling relationship, the initial workflow can be created based on the common logic and the calling relationship. Specifically, after obtaining the calling relationship, the configuration manner for the variable factors of the common processing link in the common logic can be determined, and then the initial workflow can be created according to the common logic of different workflows and the calling relationship corresponding to the configuration information of the target workflow.
[0095] When the initial workflow runs, the configuration server can obtain the configuration information corresponding to the current common logic based on the calling relationship, configure the initial workflow, and obtain the target workflow.
[0096] In the above workflow creation method, the configuration server 120 can obtain the configuration information corresponding to the target workflow to be created for obtaining training data in response to a workflow creation request, and obtain a pre-determined common logic and determine the calling relationship of the common logic to the configuration information, wherein the common logic is used to record the same common processing link in different workflows, and then an initial workflow can be created based on the common logic and the calling relationship. When the initial workflow runs, the configuration information is obtained based on the calling relationship, and the target workflow is obtained. In the scheme of the present disclosure, by pre-determining the common logic of different workflows, the repeated code development work can be reduced when creating the target workflow, and at the same time, the target workflow is flexibly customized through the configuration information, avoiding writing a large amount of code, and effectively improving the workflow creation efficiency.
[0097] In an example embodiment, as shown in FIG. 2, the method 200 includes the following steps. Figure 3 The step 230 of creating an initial workflow based on the common logic and the calling relationship includes:
[0098] In step 231, the custom logic corresponding to the target workflow is obtained.
[0099] The custom logic can be specifically custom training data construction logic, and specifically, the custom logic can be a custom training data processing link in the target workflow.
[0100] In actual application, the common logic of the workflow can be a common processing link included in different workflows. In the creation process of the workflow, although the common logic is determined in advance, due to the differences in the training data to be finally obtained, the differences in the training data users or the differences in the use mode, the processing flow of different training data is different, therefore, the user can customize the construction logic of the training data for the target workflow to be created, generate the custom logic, and send it to the configuration server 120, so that the configuration server 120 can obtain the custom logic corresponding to the target workflow.
[0101] In step 232, an initial workflow is created based on the custom logic, the common logic and the calling relationship.
[0102] After obtaining the custom logic, the configuration server 120 can create an initial workflow based on the custom logic, the common logic and the calling relationship. Specifically, based on the custom logic and the common logic, the overall flow of obtaining the training data can be determined, and the calling relationship can further determine the configuration information corresponding to the common logic, and then the initial workflow can be created according to the custom logic, the common logic and the calling relationship.
[0103] In the present disclosure, by obtaining the custom logic corresponding to the target workflow, and creating an initial workflow based on the custom logic, the common logic and the calling relationship, the repeated development work for the common logic can be reduced in the construction process of the target workflow, while the flexibility of the target workflow creation can be taken into account, and efficient and simple training data construction is realized.
[0104] In an exemplary embodiment, before obtaining the configuration information corresponding to the target workflow to be created in response to the workflow creation request, it can further include:
[0105] Determine the common processing links corresponding to a plurality of historical workflows, and obtain the common logic based on the common processing links.
[0106] The historical workflow is a created workflow for obtaining training data. The common processing link can be a processing link set for obtaining training data and shared by multiple historical workflows. In an example, the common processing link can be a processing link generally involved for obtaining training data. For example, the common processing link can include at least two processing links: determining a training data type or a training data source, updating a version number, calling custom logic, verifying feature information of the training data, monitoring training data acquisition, and sending the training data.
[0107] The determining of the training data type or the training data source can refer to determining which type of data is obtained as training data. For example, if different training data corresponding data identifiers (IDs) are to be obtained in the process of obtaining training data, it can be determined in advance that the data identifier is a data identifier of what kind of data. Based on different training data types, in an example, the data identifier can be at least one of the following: a video identifier, an account identifier, a picture identifier, a business identifier, and a multimedia content identifier.
[0108] In a specific implementation, multiple historical workflows can be obtained. By analyzing the multiple historical workflows, the common processing links corresponding to the multiple historical workflows can be obtained. After the service end 120 determines the common processing links corresponding to the multiple historical workflows, the common logic of the multiple historical workflows can be obtained based on the common processing links.
[0109] For example, if the common processing link is multiple common processing links, the order of the multiple common processing links can be determined, and the common logic can be generated according to the multiple common processing links and the corresponding order.
[0110] In the present disclosure, by determining the common processing links corresponding to the multiple historical workflows and obtaining the common logic based on the common processing links, the common points of different workflows can be obtained, which provides a basis for reducing repeated development work in the workflow construction process and effectively saves human cost.
[0111] In an example embodiment, after obtaining the common logic based on the common processing links, the method further includes:
[0112] generating an abstract class for implementing the common logic, and saving the abstract class.
[0113] In a specific implementation, after the common logic of different workflows is determined, an abstract class for implementing the common logic can be generated in advance, and the abstract class is saved.
[0114] In step 230, based on the common logic and the calling relationship, an initial workflow is created, which can include:
[0115] An abstract class corresponding to the common logic is acquired; based on the abstract class and the custom logic corresponding to the target workflow acquired in advance, an inherited class is generated; and based on the inherited class and the calling relationship, an initial workflow is created.
[0116] The inherited class is inherited from the abstract class and has the custom logic defined.
[0117] In a specific implementation, a staff member can create the custom logic corresponding to the target workflow and send it to the configuration server 120. After receiving the workflow creation request and determining the calling relationship, the configuration server 120 can acquire the abstract class corresponding to the common logic, and based on the abstract class, generate the corresponding inherited class, which is a class inherited from the abstract class, and at the same time, the custom logic acquired in advance can be defined in the inherited class. After obtaining the inherited class, the initial workflow can be created based on the inherited class and the calling relationship. In an example, the staff member can customize the name of the target workflow, and save the customized name in the inherited class to determine that the inherited class is the inherited class associated with the target workflow to be created.
[0118] In the present disclosure, by pre-generating and saving the abstract class for implementing the common logic, and when creating the target workflow, inheriting the abstract class and defining the custom logic corresponding to the target workflow in the obtained inherited class, the common logic code can be avoided from being repeatedly written, while the flexible construction of the workflow is implemented, and the creation efficiency and flexibility of the workflow are taken into account.
[0119] In an example embodiment, before acquiring the configuration information corresponding to the target workflow to be created in response to the workflow creation request, the following can also be included:
[0120] The change data content corresponding to each public processing link in the common logic is acquired; and based on the data items corresponding to each change data content, a plurality of configuration items of the common logic are determined.
[0121] The configuration items can be used to configure the configuration information corresponding to the target workflow to be created.
[0122] The change data content can be the data content of the same public processing link of different workflows that has changed.
[0123] In actual application, although the public processing link in the common logic has been determined, in a specific implementation, different processing methods can be used in the same public processing link for different workflows. For example, if the public processing link includes transmitting training data to the corresponding training data user, different workflows can have different training data users.
[0124] After obtaining the public logic based on the public processing links corresponding to the historical workflow, the change data content corresponding to each public processing link in the public logic can be obtained, and the data item corresponding to the change data content is determined. For example, the data item corresponding to the change data content can include at least one of the following: storage address of training data, trigger condition for obtaining training data, time interval for obtaining training data, feature dimension of training data.
[0125] After determining the data item corresponding to the change data content, the plurality of configuration items corresponding to the public logic can be determined based on the data item corresponding to each change data content. The configuration item can be used to set the configuration information corresponding to the target workflow to be created. Therefore, when creating the target workflow, the worker can set the configuration item to generate the corresponding configuration information. For example, when creating the target workflow, the terminal 110 can display the plurality of configuration items obtained in advance, and the worker can customize the information of each configuration item to generate the configuration information. Alternatively, in another example, for each configuration item, the corresponding option can also be provided in advance, so that the configuration information can be obtained based on the selected option.
[0126] In the present disclosure, by obtaining the change data content corresponding to each public processing link in the public logic, and determining the plurality of configuration items of the public logic based on the data item corresponding to each change data content, the change data content of the public processing link involved in the workflow creation process can be abstracted into a configuration, so that the definition and subsequent management of the change factors of the public processing link in the public logic can be realized in the form of configuration. At the same time, it can provide a basis for the rapid configuration of the implementation of each public processing link in the subsequent public logic.
[0127] In an exemplary embodiment, after receiving the workflow creation request, the configuration information obtained by the configuration server 120 can be the configuration information corresponding to each of the plurality of configuration items. In step 230, when the initial workflow is running, the configuration information is obtained based on the calling relationship to obtain the target workflow, which can include:
[0128] When the initial workflow is running, the plurality of configuration information is obtained based on the calling relationship, and the plurality of configuration information is encapsulated to obtain the corresponding configuration class. The configuration class is sent to the initial workflow as a workflow parameter, and the initial workflow is parameter configured to obtain the target workflow.
[0129] In actual application, after creating the initial workflow, if the initial workflow is running, for example, when the initial workflow is online, the plurality of configuration information can be obtained based on the calling relationship, and the plurality of configuration information is encapsulated to determine the encapsulation result as the corresponding configuration class.
[0130] After obtaining the configuration class, the configuration class can be sent as a working parameter to the initial workflow to perform parameter configuration on the initial workflow, so as to obtain the target workflow.
[0131] In the present disclosure, when there are multiple configuration information, the multiple configuration information can be encapsulated as a configuration class and sent to the initial workflow in a parameter manner to perform parameter configuration, so that the configuration information can be sent in multiple times can be avoided, the speed of obtaining the workflow parameter by the initial workflow can be improved, and the creation efficiency of the target workflow can be improved.
[0132] In an example embodiment, the initial workflow is parameter configured to obtain the target workflow, including:
[0133] The initial workflow corresponding inheritance class is parameter configured to obtain the configured inheritance class, and the target workflow is obtained based on the configured inheritance class.
[0134] In a specific implementation, after obtaining the configuration class corresponding to the multiple configuration information, the configuration class can be sent as a workflow parameter to the initial workflow, and then the initial workflow corresponding inheritance class can be parameter configured by the sent configuration class to obtain the configured inheritance class, and then the target workflow can be obtained based on the configured inheritance class.
[0135] In actual application, when the inheritance class is configured, the abstract class inherited by the inheritance class can be parameter configured based on the configuration information in the configuration class, so that the configuration of the variable factor in the public logic can be realized by parameter configuring the abstract class.
[0136] In the present disclosure, the inheritance class can be parameter configured in a configuration parameter manner to obtain the target workflow, avoiding directly deploying the call of the configuration information of the public logic online, and providing a basis for rapid update of the target workflow.
[0137] In an example embodiment, as shown in Figure 4 The method can further include the following steps:
[0138] In step 240, in response to the workflow update request, configuration update information corresponding to the target workflow is obtained, and the stored configuration information corresponding to the target workflow is updated based on the configuration update information to obtain updated configuration information.
[0139] As an example, the configuration update information can include a configuration item to be updated and configuration information corresponding to the configuration item.
[0140] In actual application, the terminal 110 can send a workflow update request to the configuration service end 120 to request updating the configuration information corresponding to the target workflow. The terminal 110 can add configuration update information in the workflow update request, and the configuration service end 120 can obtain the configuration update information corresponding to the target workflow from the workflow update request and update the stored configuration information corresponding to the target workflow based on the configuration update information to obtain updated configuration information in response to the received workflow update request.
[0141] In specific implementation, the configuration information corresponding to the target workflow can include configuration information corresponding to one or more configuration items. After obtaining the configuration update information, the configuration item to be updated of the target workflow can be obtained from the configuration update information, and the configuration information corresponding to the configuration item is used to update the current configuration information of the target workflow to obtain updated configuration information.
[0142] In step 250, the initial workflow is re-run, the updated configuration information is obtained based on the calling relationship, and the updated target workflow is obtained.
[0143] After updating the configuration information, the initial workflow can be re-run, and the updated configuration information can be obtained based on the calling relationship of the configuration information corresponding to the target workflow in the initial workflow. Then, the parameter configuration of the common processing link involved in the common logic can be performed based on the configuration information, and the updated target workflow is obtained.
[0144] In related technologies, if the workflow needs to be modified, the code corresponding to the workflow often needs to be modified, and the updated workflow can be used only after re-deployment and online. This leads to low efficiency of updating the workflow. In the present disclosure, the variable data content in the common logic is set to be set through the configuration item. When the workflow needs to be modified, the configuration information can be directly modified. When the target workflow is re-run, the configuration service end 120 can obtain the updated configuration information through the calling relationship, and obtain the updated target workflow based on the updated configuration information.
[0145] For example, if the common logic includes training and sending training data to a corresponding training data user, the training data user is a configuration item, and the staff can determine the sending object of the training data by adjusting the configuration information corresponding to the configuration item. When the sending object is changed from the original object X to object Y, the corresponding configuration information can be modified to generate updated configuration information. When the initial workflow is re-run, the updated configuration information "object Y" can be obtained based on the calling relationship, and the updated target workflow can be obtained. When the target workflow is run, the training data is sent to object Y.
[0146] In this disclosure, in response to a workflow update request, configuration update information corresponding to the target workflow is obtained, and based on the configuration update information, the stored configuration information corresponding to the target workflow is updated to obtain the updated configuration information. Thus, when the initial workflow is rerun, the updated configuration information can be obtained based on the call relationship to obtain the updated target workflow without modifying the code, avoiding redeployment of the workflow after modifying the configuration information, and realizing hot updating of the workflow.
[0147] To enable those skilled in the art to better understand the above steps, the following example illustrates the embodiments of this disclosure, but it should be understood that the embodiments of this disclosure are not limited thereto.
[0148] In practical applications, multiple historical workflows can be obtained, and the common processing steps corresponding to these workflows can be identified. Then, based on each common processing step, common logic (also known as abstract flow) corresponding to the multiple historical workflows can be proposed, and an abstract class can be created to implement the common logic.
[0149] After determining the common logic, the factors that cause changes within it can be further identified. Specifically, the changing data content corresponding to each common processing step in the common logic can be obtained, and the factors causing changes in the common logic can be determined based on the data items corresponding to the changing data content. After obtaining the data items corresponding to the changing data content, one or more data items can be used as configuration items. When a user creates a target workflow, they can view multiple configuration items on the terminal, set the configuration information corresponding to each configuration item, and send it to the configuration server 120 as the configuration information for the target workflow. Simultaneously, custom logic corresponding to the target workflow can also be sent to the configuration server 120.
[0150] After obtaining the configuration information and custom logic, the configuration server 120 can store the received configuration information, determine the calling relationship of the public logic for the received configuration information, and create a subclass that inherits from the abstract class. The subclass can define the custom logic corresponding to the target workflow, and then create the initial workflow based on the calling relationship and the subclass.
[0151] like Figure 5 As shown, during the initial workflow execution, the workflow identifier corresponding to the initial workflow can be read, such as the custom name corresponding to the workflow. Then, based on the common processing steps initialized by parameters in the common logic, the corresponding configuration information can be obtained from multiple stored configuration information.
[0152] Specifically, when the parameter initialization is performed, the configuration server can obtain the associated configuration information from the stored plurality of configuration information according to the custom name corresponding to the initial workflow, for example, obtain a plurality of configuration information such as "Name: {…}". After obtaining the configuration information, the plurality of configuration information can be encapsulated as a configuration class, and sent to the initial workflow as a parameter for parameter initialization.
[0153] After the parameter initialization, the target workflow can be obtained, and the training data can be constructed according to the unified construction framework in the workflow, and the custom logic is called, and finally the training data constructed by the target workflow can be output. The unified construction framework refers to the calling of each process method completed by the abstract class after abstraction.
[0154] It should be understood that, although Figures 2-5 The steps in the flowchart of the method are displayed in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, Figures 2-5 At least part of the steps in the method can include a plurality of steps or a plurality of stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with at least part of other steps or steps or stages in other steps.
[0155] It can be understood that the same / similar parts of each embodiment of the above method in the specification can be mutually referred to, and each embodiment focuses on the differences from other embodiments, and the related parts can be referred to the description of other method embodiments.
[0156] Figure 6 is a block diagram of a workflow creation apparatus 600 according to an exemplary embodiment. Referring to Figure 6 The apparatus includes a configuration information obtaining unit 601, a calling relationship determining unit 602, and a workflow creation unit 603.
[0157] The configuration information obtaining unit 601 is configured to obtain configuration information corresponding to a target workflow to be created in response to a workflow creation request; the target workflow is a workflow for obtaining training data;
[0158] The calling relationship determining unit 602 is configured to obtain a predetermined common logic, and determine a calling relationship of the common logic to the configuration information; the common logic is used to record the same common processing link in different workflows;
[0159] The workflow creating unit 603 is configured to create an initial workflow based on the common logic and the calling relationship; and obtain the configuration information based on the calling relationship when the initial workflow is running, to obtain the target workflow.
[0160] In an example embodiment, the workflow creating unit comprises:
[0161] The custom logic obtaining module is configured to obtain custom logic corresponding to the target workflow; the custom logic is a custom training data processing link in the target workflow.
[0162] The first creating module is configured to create an initial workflow based on the custom logic, the common logic and the calling relationship.
[0163] In an example embodiment, the apparatus further comprises:
[0164] The configuration update information receiving unit is configured to obtain configuration update information corresponding to the target workflow in response to a workflow update request, and update the stored configuration information corresponding to the target workflow based on the configuration update information, to obtain updated configuration information.
[0165] The workflow updating unit is configured to re-run the initial workflow, obtain the updated configuration information based on the calling relationship, and obtain an updated target workflow.
[0166] In an example embodiment, the apparatus further comprises:
[0167] The common logic obtaining unit is configured to determine common processing links corresponding to a plurality of historical workflows, and obtain the common logic based on the common processing links; the historical workflows are workflows for obtaining training data that have been created.
[0168] In an example embodiment, the apparatus further comprises:
[0169] The abstract class generating unit is configured to generate an abstract class for implementing the common logic, and save the abstract class.
[0170] The workflow creating unit is configured to:
[0171] Obtain the abstract class corresponding to the common logic;
[0172] Generate a corresponding inherited class based on the abstract class and the custom logic corresponding to the target workflow obtained in advance; the inherited class inherits from the abstract class and defines the custom logic;
[0173] Based on the inheritance class and the calling relationship, an initial workflow is created.
[0174] In an example embodiment, the apparatus further includes:
[0175] A change determining unit, configured to perform obtaining change data content corresponding to each public processing link in the public logic;
[0176] A configuration item obtaining unit, configured to perform determining a plurality of configuration items of the public logic based on data items corresponding to each change data content; the configuration items are used to configure configuration information corresponding to the target workflow to be created.
[0177] In an example embodiment, the configuration information includes configuration information corresponding to each of the plurality of configuration items, and the workflow creating unit includes:
[0178] A configuration class obtaining module, configured to perform obtaining a plurality of configuration information based on the calling relationship when the initial workflow is running, and encapsulating the plurality of configuration information to obtain a corresponding configuration class;
[0179] An initial workflow configuration module, configured to perform sending the configuration class as a workflow parameter to the initial workflow, and performing parameter configuration on the initial workflow to obtain the target workflow.
[0180] In an example embodiment, the initial workflow configuration module is configured to perform:
[0181] Performing parameter configuration on the inheritance class corresponding to the initial workflow to obtain a configured inheritance class, and obtaining the target workflow based on the configured inheritance class.
[0182] As to the apparatus in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments of the method, and will not be described in detail here.
[0183] Figure 7 is a block diagram of an electronic device 700 for implementing any of the above workflow creating methods according to an example embodiment. For example, the electronic device 700 can be a server. Referring to Figure 7 , the electronic device 700 includes a processing component 720, which further includes one or more processors, and memory resources represented by a memory 722, for storing instructions executable by the processing component 720, such as an application program. The application program stored in the memory 722 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 720 is configured to execute the instructions to perform the above method.
[0184] The electronic device 700 can further include a power supply component 724 configured to perform power management of the electronic device 700, a wired or wireless network interface 726 configured to connect the electronic device 700 to a network, and an input / output (I / O) interface 728. The electronic device 700 can operate based on an operating system stored in the memory 722, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, or the like.
[0185] In an exemplary embodiment, a computer readable storage medium including instructions, such as the memory 722 including instructions, is also provided, which can be executed by the processor of the electronic device 700 to complete the above method. The storage medium can be a computer readable storage medium, such as a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0186] In an exemplary embodiment, a computer program product including instructions, which can be executed by the processor of the electronic device 700 to complete the above method, is also provided.
[0187] It should be noted that the above-described apparatus, electronic device, computer readable storage medium, computer program product, etc. according to the description of the method embodiments can also include other implementations, and the specific implementation can be referred to the description of the related method embodiments, which will not be described here.
[0188] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features of the present disclosure disclosed herein. It is intended that the present disclosure cover any and all variations of the present disclosure including those variations that can be incorporated into other forms of the present disclosure. It is intended that the present disclosure be considered as exemplary and illustrative, the true scope of the present disclosure being indicated by the following claims.
[0189] It should be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is indicated by the appended claims.
Claims
1. A workflow creation method characterized by, The method comprises the following steps: In response to a workflow creation request, obtaining configuration information corresponding to a target workflow to be created; The target workflow is a workflow for obtaining training data; The configuration information is information defined for variable factors in a common processing link; Obtaining a predetermined common logic and determining a calling relationship of the common logic to the configuration information; the common logic is used to record the same common processing link in different workflows; and the calling relationship is used to determine a configuration mode of a variable factor in the common processing link in the common logic; Obtaining an abstract class corresponding to the common logic; Based on the abstract class and the pre-obtained custom logic corresponding to the target workflow, generating a corresponding inherited class; the inherited class inherits from the abstract class and is defined with the custom logic; the custom logic is a custom training data processing link in the target workflow; Based on the inherited class and the calling relationship, creating an initial workflow; When the initial workflow is running, obtaining the configuration information based on the calling relationship to obtain the target workflow; In response to a workflow update request, obtaining configuration update information corresponding to the target workflow, and updating the stored configuration information corresponding to the target workflow based on the configuration update information to obtain updated configuration information; Re-running the initial workflow, obtaining the updated configuration information based on the calling relationship to obtain an updated target workflow.
2. The method of claim 1, wherein, Before the step of obtaining the configuration information corresponding to the target workflow to be created in response to the workflow creation request, the method further comprises the following steps: Determining a common processing link corresponding to a plurality of historical workflows, and obtaining the common logic based on the common processing link; the historical workflows are workflows for obtaining training data and have been created.
3. The method of claim 2, wherein, After the step of obtaining the common logic based on the common processing link, the method further comprises the following steps: Generating an abstract class for implementing the common logic, and saving the abstract class.
4. The method of claim 1, wherein, Before the step of obtaining the configuration information corresponding to the target workflow to be created in response to the workflow creation request, the method further comprises the following steps: Obtaining change data content corresponding to each common processing link in the common logic; Based on data items corresponding to each change data content, determining a plurality of configuration items of the common logic; the configuration items are used to configure the configuration information corresponding to the target workflow to be created.
5. The method of claim 1, wherein, The configuration information comprises configuration information corresponding to each configuration item; and the step of obtaining the target workflow based on the configuration information when the initial workflow is running comprises the following steps: When the initial workflow is running, obtaining a plurality of configuration information based on the calling relationship, and encapsulating the plurality of configuration information to obtain a corresponding configuration class; Sending the configuration class as a workflow parameter to the initial workflow, performing parameter configuration on the initial workflow, and obtaining the target workflow.
6. The method of claim 5, wherein, The step of performing parameter configuration on the initial workflow to obtain the target workflow comprises the following steps: Performing parameter configuration on the inherited class corresponding to the initial workflow to obtain a configured inherited class, and obtaining the target workflow based on the configured inherited class.
7. A workflow creation apparatus characterized by comprising: The method comprises the following steps: The configuration information acquisition unit is configured to acquire configuration information corresponding to a target workflow to be created in response to a workflow creation request; The target workflow is a workflow for acquiring training data; and the configuration information is information defined for variable factors in a common processing link; The calling relationship determination unit is configured to acquire a pre-determined common logic and determine a calling relationship of the common logic to the configuration information; the common logic is used to record the same common processing link in different workflows; and the calling relationship is used to determine a configuration mode of a variable factor in the common processing link in the common logic; The workflow creation unit is configured to acquire an abstract class corresponding to the common logic; generate a corresponding inherited class based on the abstract class and a pre-acquired custom logic corresponding to the target workflow; the inherited class is inherited from the abstract class and is defined with the custom logic; An initial workflow is created based on the inherited class and the calling relationship; When the initial workflow is running, the configuration information is acquired based on the calling relationship to obtain the target workflow; The custom logic is a custom training data processing link in the target workflow; The configuration update information receiving unit is configured to acquire configuration update information corresponding to the target workflow in response to a workflow update request, and update the stored configuration information corresponding to the target workflow based on the configuration update information to obtain updated configuration information; The workflow update unit is configured to re-run the initial workflow, acquire the updated configuration information based on the calling relationship, and obtain an updated target workflow.
8. The apparatus of claim 7, wherein, The device further comprises: The common logic acquisition unit is configured to determine common processing links corresponding to a plurality of historical workflows, and obtain the common logic based on the common processing links; the historical workflows are workflows for acquiring training data and have been created.
9. The apparatus of claim 8, wherein, The device further comprises: The abstract class generation unit is configured to generate an abstract class for implementing the common logic and save the abstract class.
10. The apparatus of claim 7, wherein, The device further comprises: The change determination unit is configured to acquire change data content corresponding to each common processing link in the common logic; The configuration item acquisition unit is configured to determine a plurality of configuration items of the common logic based on data items corresponding to each change data content; and the configuration item is used to configure configuration information corresponding to the target workflow to be created.
11. The apparatus of claim 7, wherein, The configuration information comprises configuration information corresponding to each configuration item; and the workflow creation unit comprises: The configuration class acquisition module is configured to acquire a plurality of configuration information based on the calling relationship when the initial workflow is running, encapsulate the plurality of configuration information, and obtain a corresponding configuration class; The initial workflow configuration module is configured to send the configuration class as a workflow parameter to the initial workflow, perform parameter configuration on the initial workflow, and obtain the target workflow.
12. The apparatus of claim 11, wherein, The initial workflow configuration module is configured to The initial workflow corresponds to an inheritance class, and the inheritance class is configured to obtain a configured inheritance class; and the target workflow is obtained based on the configured inheritance class.
13. An electronic device, comprising: Comprise: A processor; A memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the workflow creation method of any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that, When the instructions in the computer readable storage medium are executed by the processor of the electronic device, the electronic device can execute the workflow creation method of any one of claims 1 to 6.
15. A computer program product, comprising instructions therein, characterised in that, The instructions are executed by the processor of the electronic device, so that the electronic device can execute the workflow creation method of any one of claims 1 to 6.
Citation Information
Patent Citations
Online model training method and device
CN111126621A