Algorithm orchestration method and related apparatus
By introducing scenario adaptation nodes during the algorithm orchestration process to correct the classification results of general algorithm nodes, the problem of insufficient adaptability between composite algorithms and actual application scenarios is solved, improving data classification performance and reducing development costs and time.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-06-19
AI Technical Summary
The composite algorithms obtained by existing algorithm orchestration methods are not well adapted to actual application scenarios, resulting in poor data classification performance.
Scene adaptation nodes are introduced during the algorithm orchestration process. Multiple nodes are selected and combined by the user to form the target algorithm. Scene adaptation nodes are used to correct the classification results of general algorithm nodes to improve the adaptation.
It improves the adaptability of the target algorithm to the target scenario, enhances data classification performance, and reduces development costs and time.
Smart Images

Figure CN121580143B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to an algorithm orchestration method and related apparatus. Background Technology
[0002] A single data classification algorithm can only perform single-dimensional data classification. To achieve multi-dimensional data classification, composite data classification algorithms need to be constructed. One way to construct complex data classification algorithms is through algorithm orchestration.
[0003] The algorithm orchestration method in related technologies can be roughly described as follows: a node library is pre-built, which provides reusable algorithm nodes; the user selects several algorithm nodes from the node library, and the user sets the node order for the selected algorithm nodes is received; the selected algorithm nodes are combined according to the node order to obtain a composite data classification algorithm.
[0004] However, the composite algorithms obtained by the algorithm orchestration methods in related technologies are not well adapted to actual application scenarios, resulting in poor data classification performance (recall rate, accuracy, etc.) when applied to real-world applications. Summary of the Invention
[0005] This application provides an algorithm orchestration method and related apparatus, which can solve the problem that the composite algorithm obtained by the algorithm orchestration method in related technologies does not perform well in data classification in practical application scenarios.
[0006] This application provides an algorithm orchestration method, comprising: receiving multiple nodes selected by a user from a node library, and receiving the node order set by the user for the multiple nodes, wherein the multiple nodes include several general algorithm nodes and several scene adaptation nodes, and a scene adaptation node is associated with at least one general algorithm node; combining the multiple nodes according to the node order to form a target algorithm, the target algorithm being used for data classification of a target scene, wherein in the data classification process, the general algorithm nodes are used to classify the data to be classified to obtain a first classification result, and the scene adaptation nodes are used to correct the first classification result obtained by their associated general algorithm nodes to obtain a second classification result.
[0007] This application provides an algorithm orchestration device, including a receiving module and a combination module. The receiving module receives multiple nodes selected by a user from a node library and the node order set by the user for the multiple nodes. The multiple nodes include several general algorithm nodes and several scene adaptation nodes, with each scene adaptation node associated with at least one general algorithm node. The combination module combines the multiple nodes according to the node order to form a target algorithm. The target algorithm is used for data classification in a target scene. During the data classification process, the general algorithm nodes are used to classify the data to be classified, obtaining a first classification result. The scene adaptation nodes are used to correct the first classification result obtained by their associated general algorithm nodes, obtaining a second classification result.
[0008] This application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-described method.
[0009] This application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the above-described method.
[0010] This application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0011] The above solution adds selectable scene-adaptive nodes to the node library. During algorithm orchestration, it receives multiple nodes selected by the user from the node library, including several general algorithm nodes and at least one scene-adaptive node associated with a general algorithm node. It also receives the node order of these nodes and combines them to form the target algorithm. The scene-adaptive node is adapted to the target scene and, during data classification in the target scene, corrects the first classification result of its associated general algorithm node to obtain a second classification result. Thus, on the one hand, it can quickly generate the target algorithm for the target scene. On the other hand, by using the scene-adaptive node with higher adaptability to the target scene to correct the first classification result, it can avoid the negative impact of poor data classification performance of the general algorithm node in the target scene on the overall data classification effect, thereby improving the adaptability of the target algorithm to the target scene and thus improving the overall data classification effect. Furthermore, the solution only requires the manufacturer to add scene-adaptive nodes with simple processing logic to the node library. Therefore, compared to redeveloping algorithm nodes specifically for data classification in the target scene, the development cost is lower, the development cycle is shorter, and the difficulty is lower than optimizing general algorithm nodes.
[0012] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0013] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0014] Figure 1 This is a flowchart illustrating an embodiment of the algorithm orchestration method provided in this application;
[0015] Figure 2 This is a flowchart illustrating another embodiment of the algorithm orchestration method provided in this application;
[0016] Figure 3 This is a flowchart illustrating a specific example of the algorithm orchestration method of this application;
[0017] Figure 4 This is a schematic diagram of the structure of the algorithm orchestration system provided in this application;
[0018] Figure 5 This is a schematic diagram of an embodiment of the algorithm orchestration device provided in this application;
[0019] Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device of this application;
[0020] Figure 7 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0021] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0022] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0023] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. The term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. Finally, the term "several" in this document means any integer greater than 0, such as 1, 2, 3, 4, 5, ...
[0024] A single data classification algorithm can only perform single-dimensional data classification. To achieve multi-dimensional data classification, composite data classification algorithms need to be constructed. One way to construct complex data classification algorithms is through algorithm orchestration.
[0025] Algorithm orchestration refers to the process of pre-building a node library, which provides reusable algorithm nodes. These algorithm nodes can be regarded as algorithm atoms. Users select several algorithm nodes from the node library and set the node order of each selected algorithm node. The selected algorithm nodes are then combined according to the node order to obtain a composite algorithm.
[0026] Through long-term research, the inventors of this application have found that the composite algorithms obtained by the algorithm arrangement methods in related technologies are not well adapted to actual application scenarios. Therefore, the data classification effect (recall rate, accuracy, etc.) when applied to actual application scenarios is not good and it is difficult to meet the requirements of actual application scenarios.
[0027] Further research by the inventors of this application revealed that the reason for the insufficient adaptability of the composite algorithm to actual application scenarios is that the algorithm nodes in the node library provided by the manufacturer are general algorithm nodes trained using a general dataset. The training sample data in the general dataset is not the training sample data obtained in the actual application scenario. Therefore, the composite algorithm composed of general algorithm nodes is not well adapted to the actual application scenario.
[0028] To improve the adaptability of composite algorithms to real-world application scenarios, one solution is for manufacturers to optimize general-purpose algorithm nodes for specific scenarios. However, optimizing these nodes requires fine-tuning them using training sample data obtained from real-world applications. This is challenging because such training sample data is often inaccessible to manufacturers due to security and privacy concerns. Another solution is for manufacturers to custom-develop algorithm nodes from scratch to suit specific application scenarios. This approach is time-consuming and costly.
[0029] Therefore, this application proposes a novel algorithm arrangement method. An embodiment of this method is described below:
[0030] Figure 1 This is a flowchart illustrating an embodiment of the algorithm orchestration method provided in this application. Figure 1 As shown, in this embodiment, the algorithm orchestration method may include the following steps:
[0031] S110: Receives multiple nodes selected by the user from the node library, and receives the node order set by the user for the multiple nodes.
[0032] The multiple nodes include several general algorithm nodes and several scene adaptation nodes, and each scene adaptation node is associated with at least one general algorithm node.
[0033] The execution entity in this embodiment is an algorithm orchestration device, which can be any electronic device with algorithm orchestration capabilities.
[0034] Several general algorithm nodes can be a single general algorithm node or multiple general algorithm nodes. Different general algorithm nodes can implement data classification functions of different dimensions. For example, general algorithm node 1 is used to classify data based on whether actions are standardized, while general algorithm node 2 is used to classify data based on whether clothing is standardized.
[0035] A scene adaptation node can be associated with one or more general algorithm nodes. A general algorithm node is associated with one scene adaptation node.
[0036] In some embodiments, users can select nodes and set the node order on the visual canvas by clicking, dragging, or other means.
[0037] S120: Combine multiple nodes in the order of nodes to form the target algorithm.
[0038] The target algorithm is used for data classification in the target scene. During the data classification process, the general algorithm node is used to classify the data to be classified and obtain the first classification result. The scene adaptation node is used to correct the first classification result obtained by the associated general algorithm node and obtain the second classification result.
[0039] The data to be classified can be images, videos, text, etc. The target scene is the actual application scenario. Compared to general algorithm nodes, the associated scene adaptation nodes have a higher degree of fit with the target scene. General algorithm nodes are used to classify the data to be classified, while scene adaptation nodes are used to correct the first classification result of their associated general algorithm nodes to obtain a second classification result with a higher degree of fit with the target scene. Since scene adaptation nodes correct the first classification result rather than classify the data, their processing logic is simpler than that of their associated general algorithm nodes.
[0040] The above solution adds selectable scene-adaptive nodes to the node library. During algorithm orchestration, it receives multiple nodes selected by the user from the node library, including several general algorithm nodes and at least one scene-adaptive node associated with a general algorithm node. It also receives the node order of these nodes and combines them to form the target algorithm. The scene-adaptive node is adapted to the target scene and, during data classification in the target scene, corrects the first classification result of its associated general algorithm node to obtain a second classification result. Thus, on the one hand, it can quickly generate the target algorithm for the target scene. On the other hand, by using the scene-adaptive node with higher adaptability to the target scene to correct the first classification result, it can avoid the negative impact of poor data classification performance of the general algorithm node in the target scene on the overall data classification effect, thereby improving the adaptability of the target algorithm to the target scene and thus improving the overall data classification effect. Furthermore, the solution only requires the manufacturer to add scene-adaptive nodes with simple processing logic to the node library. Therefore, compared to redeveloping algorithm nodes specifically for data classification in the target scene, the development cost is lower, the development cycle is shorter, and the difficulty is lower than optimizing general algorithm nodes.
[0041] In some embodiments, the general algorithm node is a large neural network model. The scene adaptation node is a lightweight neural network micro-model for the target scene. Compared to the large neural network model, the neural network micro-model has a lighter structure, requires less training sample data, and has a shorter training time.
[0042] In some embodiments, for scene adaptation nodes, the node library, in addition to supporting users to select scene adaptation nodes to form the target algorithm, also supports users to upload training sample data of the target scene. This enables at least one of the following: training and fine-tuning of the scene adaptation nodes. The goal is to achieve the expected adaptation degree between the scene adaptation nodes and the target scene, further improve the adaptation degree, and enable the scene adaptation nodes to correct the first classification result, etc. The training of scene adaptation nodes can be performed before they are selected to form the target algorithm. Fine-tuning of scene adaptation nodes can be performed before they are selected to form the target algorithm, or it can be performed after they are selected to form the target algorithm, but if the data classification effect does not meet preset conditions (such as the first preset condition and the second preset condition mentioned later) when trying the target algorithm.
[0043] In some embodiments, for scene adaptation nodes, the node library also supports users to upload trial sample data, training sample data, etc., and supports users to annotate the training sample data. For example, in the training / fine-tuning stage of the scene adaptation node, users can annotate the true second classification result; in the fine-tuning stage of the general algorithm, users can annotate the true first classification result. For a detailed description of the training stage and the fine-tuning stage, please refer to the following embodiments.
[0044] In some embodiments, for the scene adaptation stage, the node library also supports users to delete existing scene adaptation nodes, add custom scene adaptation nodes, and modify the structure of the scene adaptation nodes.
[0045] In some embodiments, the input to the scene adaptation node includes a first classification result and correction reference information. The correction reference information includes at least one of the data to be classified, features of the data to be classified, and classification-related regions in the data to be classified. The features of the data to be classified and the classification-related regions in the data to be classified are obtained by the general algorithm node during the process of obtaining the first classification result.
[0046] For example, the data to be classified is a traffic scene image, the general algorithm node is an object classification model, and the associated scene adaptation node is a traffic scene classification correction model. After inputting the traffic scene image into the object classification model, the process of the object classification model obtaining the first classification result is as follows: feature extraction is performed on the traffic scene image to obtain its features, and based on the features of the traffic scene image, the classification-related regions in the traffic scene image and the first classification result corresponding to the classification-related regions are obtained. Then, the classification-related regions in the traffic scene image and the first classification result are input into the classification correction model to obtain the second classification result.
[0047] For example, the data to be classified is a biological scene image, the general algorithm node is the object classification model, and the associated scene adaptation node is the biological scene classification correction model. After inputting the biological scene image into the object classification model, the process by which the object classification model obtains the first classification result is as follows: feature extraction is performed on the biological scene image to obtain its features, and the first classification result is obtained based on these features. Then, the features of the biological scene image and the first classification result are input into the classification correction model to obtain the second classification result.
[0048] In some embodiments, the process of the scene adaptation node obtaining the second classification result is as follows: combining the correction reference information to determine whether the first classification result is correct; in response to the first classification result being correct, the first classification result being correct is used as the second classification result; in response to the first classification result being incorrect, the first classification result being incorrect is used as the second classification result.
[0049] For example, the first classification result might indicate that the relevant region in the traffic scene image belongs to the abnormal traffic behavior category. If the scene adaptation node determines the first classification result is correct, the second classification result will also indicate that the first classification result is correct, meaning that the relevant region in the traffic scene image belongs to the abnormal traffic behavior category. Conversely, if the scene adaptation node determines the first classification result is incorrect, the second classification result will also indicate that the first classification result is incorrect, meaning that the relevant region in the traffic scene image does not belong to the abnormal traffic behavior category.
[0050] For example, the first classification result indicates that the biological scene image belongs to the cat category. If the scene adaptation node determines that the first classification result is correct, the second classification result will also indicate that the first classification result is correct, meaning the biological scene image belongs to the cat category. If the scene adaptation node determines that the first classification result is incorrect, the second classification result will also indicate that the first classification result is incorrect, meaning the biological scene image does not belong to the cat category.
[0051] In some embodiments, the process of the scene adaptation node obtaining the second classification result is as follows: combining the correction reference information to determine whether the first classification result is correct; in response to the first classification result being correct, the first classification result is used as the second classification result; in response to the first classification result being incorrect, the opposite result of the first classification result is used as the second classification result.
[0052] For example, the first classification result is that the relevant region in the traffic scene image belongs to the abnormal traffic behavior category. If the scene adaptation node determines that the first classification result is correct, the second classification result is that the relevant region in the traffic scene image belongs to the abnormal traffic behavior category. If the scene adaptation node determines that the first classification result is incorrect, the second classification result is that the relevant region in the traffic scene image does not belong to the abnormal traffic behavior category.
[0053] For example, the first classification result is that the biological scene image belongs to the abnormal traffic behavior category. If the scene adaptation node determines that the first classification result is correct, the second classification result is that the biological scene image belongs to the cat category. If the scene adaptation node determines that the first classification result is incorrect, the second classification result is that the biological scene image does not belong to the cat category.
[0054] In some embodiments, the training process for the scene adaptation node during the training phase is as follows: A training sample dataset is obtained, comprising several training sample data points, including the training first classification result and its corresponding training correction reference information. The training first classification result is obtained from the classification of a general algorithm node, and the training sample data is labeled with the true second classification result. The training sample data is then input into the scene adaptation node, enabling the scene adaptation node to obtain a predicted second classification result. A loss function is constructed based on the difference between the true second classification result and the predicted second classification result. The parameters of the scene adaptation node are adjusted based on the loss function. The aforementioned process is repeated until the expected training result is achieved.
[0055] In some embodiments, the training sample dataset during the training phase includes training sample data of the target scene that is at least partially uploaded by the user.
[0056] In some embodiments, prior to S110, the method further includes: receiving training sample data of the target scene uploaded by a user; and training the scene adaptation node using the training sample data of the target scene. This grants the user the authority to train the scene adaptation node, allowing the user to upload training sample data of the target scene to the training node and train the scene adaptation node using the user-uploaded training sample data. This not only ensures that the adaptation degree between the scene adaptation node and the target scene meets expectations but also eliminates data security and privacy issues.
[0057] Figure 2 This is a flowchart illustrating another embodiment of the algorithm orchestration method provided in this application. Figure 2 As shown, in this embodiment, after S120, the following steps may also be included:
[0058] S130: Use user-uploaded trial sample data of the target scenario to test the data classification effect of the target algorithm.
[0059] The trial sample data is trial classification data for the target scenario. The trial classification data is similar to the data to be classified.
[0060] In some embodiments, the effectiveness of data classification can be measured by metrics such as accuracy and recall.
[0061] S140: In response to the data classification effect not meeting the first preset condition, optimize the target algorithm.
[0062] In some embodiments, the first preset condition includes an accuracy greater than a first accuracy threshold and a recall greater than a first recall threshold. For example, the first accuracy threshold is 80%, and the first recall threshold is 90%.
[0063] The above solution grants users trial access to the target algorithm. This allows users to test the algorithm's data classification performance using user-uploaded trial sample data from the target scenario before applying it to data classification in that scenario. This enables optimization if the first preset condition is not met. Therefore, it not only allows for performance testing for the target scenario but also eliminates data security and privacy concerns.
[0064] In some embodiments, S140 includes S141. S141: Optimize the target algorithm using a first optimization method. The first optimization method is to fine-tune the scene adaptation nodes using training sample data of the target scene uploaded by the user.
[0065] The fine-tuning phase of the scene adaptation stage is performed based on the training phase. Fine-tuning allows for further optimization of the trained scene adaptation nodes. The processing of scene adaptation nodes in the fine-tuning phase is similar to that in the training phase, and will not be elaborated upon here.
[0066] The above solution grants users the authority to fine-tune the scene adaptation nodes, allowing them to upload training sample data for the target scene during the fine-tuning phase. This enables users to fine-tune the scene adaptation nodes using this training sample data, thereby improving the adaptability of the scene adaptation nodes to the target scene and optimizing the target algorithm, while also eliminating data security and privacy issues. Furthermore, compared to general algorithm nodes, fine-tuning scene adaptation nodes requires less training sample data, has lower complexity, and a shorter timeframe.
[0067] In some embodiments, S140 includes S142. S142: Optimize the target algorithm using a second optimization method, the second optimization method including at least one of modifying the nodes of the target algorithm and modifying the classification prompt words of the general algorithm nodes.
[0068] Modifying nodes in the target algorithm can involve adding new nodes or replacing existing nodes. Adding or replacing nodes can be done on all types of nodes in the target algorithm, such as general algorithm nodes, scene adaptation nodes, and logic transformation nodes. For details on logic transformation nodes, please refer to the following examples; they will not be elaborated upon here.
[0069] Replacing a general algorithm node can mean either replacing it with a scene algorithm node or replacing it with another general algorithm node that can perform the same data classification function. A scene algorithm node is an algorithm node adapted to the target scene. For example, a general algorithm node can classify any target object, and the target scene is vehicle classification. First, determine if there is a scene algorithm node for vehicle classification. If so, replace the general algorithm node with a scene algorithm node for vehicle classification; otherwise, replace the general algorithm node with another general algorithm node.
[0070] Among them, classification prompt words are used to provide general algorithm nodes with prior knowledge related to data classification, clarify data classification objectives, data classification boundaries, etc., to help general algorithm nodes obtain better first classification results.
[0071] The above solution can improve the data classification performance of general algorithm nodes.
[0072] In some embodiments, S142 includes: replacing at least one node in the target algorithm in response to a user's node modification operation.
[0073] In some embodiments, S142 includes: modifying the classification prompts of at least one general algorithm node in response to a user's prompt modification operation.
[0074] In some embodiments, the step of optimizing the target algorithm using the first optimization method is performed when it is confirmed that the user has training sample data, and the step of optimizing the target algorithm using the second optimization method is performed when it is confirmed that the user does not have training sample data.
[0075] Understandably, the first optimization method is more effective than the second optimization method. The above solution adopts a two-layer optimization strategy, that is, the first optimization method is used first, and the second optimization method is used only when the user does not have training sample data and therefore cannot use the first optimization method. In this way, the effectiveness of optimization can be maximized while ensuring normal optimization.
[0076] In some embodiments, S140 includes: optimizing the target algorithm using a third optimization method, wherein the third optimization method is to fine-tune the general algorithm nodes using training sample data of the target scene uploaded by the user.
[0077] During the fine-tuning phase of the general algorithm node, the training sample data is similar to the data to be classified, and is labeled with the true first classification result. The fine-tuning process of the general algorithm node includes: extracting features from the training sample data using the general algorithm node; obtaining the predicted first classification result based on the features of the training sample data using the general algorithm node; constructing a loss function based on the difference between the predicted first classification result and the true first classification result; adjusting the parameters of the general algorithm node based on the loss function; and repeating the above process until the desired fine-tuning is achieved.
[0078] In some embodiments, after S140, the method further includes: re-examining the data classification effect of the target algorithm using trial sample data of the target scenario uploaded by the user. Furthermore, in response to the re-examination of the data classification effect failing to meet the first preset condition, the target algorithm may continue to be optimized until the data classification effect meets the first preset condition.
[0079] In some embodiments, S140 is followed by S150-S160.
[0080] S150: Apply the optimized target algorithm to the data classification of the target scene.
[0081] S160: In response to the fact that the data classification effect of the optimized target algorithm does not meet the second preset condition, the optimized target algorithm is optimized again.
[0082] The method for further optimizing the target algorithm during the application phase is similar to that used during the trial phase. For example, the further optimization methods could be as follows: if it is confirmed that the user has new training sample data, the first optimization method can be used to optimize the target algorithm again based on the new training sample data; or, if it is confirmed that the user does not have new training sample data, the second optimization method can be used to optimize the target algorithm again.
[0083] The second preset condition is more stringent than the first preset condition. In some embodiments, the first preset condition includes an accuracy greater than a second accuracy threshold and a recall greater than a second recall threshold. The second accuracy threshold is greater than the first accuracy threshold, and the second recall threshold is greater than the first recall threshold. For example, the second accuracy threshold is 90%, and the second recall threshold is 95%.
[0084] In the application of the optimized target algorithm, if the user wants better data classification results, the first or second optimization method can be used to further optimize the optimized target algorithm.
[0085] In some embodiments, prior to S110, the method further includes: displaying an algorithm node creation interface to the user in response to the user's algorithm node creation request; receiving a custom general algorithm node created by the user in the algorithm node creation interface; and saving the custom general algorithm node in a node library.
[0086] The above solution allows users to create custom general algorithm nodes to suit their specific needs.
[0087] In some embodiments, the multiple nodes further include several logical transformation nodes. During the data classification process, the logical transformation nodes are used to perform logical transformation on at least one first classification result and / or at least one second classification result to obtain a third classification result.
[0088] A logical transition node can be an AND logical transition node, an OR logical transition node, a non-logical transition node, or a combination of at least two of the AND logical transition node, OR logical transition node, and non-logical transition node.
[0089] The logical transformation of a logical transformation node involves performing an AND operation on multiple first / second classification results. The third classification result is a specific category if and only if multiple first / second classification results satisfy the corresponding category conditions. For example, if a logical transformation node performs a logical transformation on two first classification results, where one first classification result is "target detected" and the other is "target exhibits abnormal behavior," then the third classification result is "abnormal event has occurred." Similarly, if both first classification results indicate "abnormal action exists in the data to be classified," then the third classification result is "abnormal action exists in the data to be classified." And if both first classification results are in the "cat" category, then the third classification result is in the "cat" category.
[0090] The logical transformation of an OR logical transformation node is to perform an OR operation on multiple first / second classification results. As long as at least one of the multiple first / second classification results is a specific category, the third classification result is also a specific category. For example, if an OR logical transformation node performs a logical transformation on a first classification result and a second classification result, and the first classification result is "existence of a first abnormal behavior" and / or the second classification result is "existence of a second abnormal behavior", then the third classification result is "existence of abnormal behavior".
[0091] Logical transformations of non-logical transformation nodes involve inverting one or more first / second category results, with the third category result being the inverted version of the corresponding first / second category result. For example, if the first category result indicates the presence of an action anomaly, the corresponding third category result would be the absence of an action anomaly.
[0092] In some embodiments, prior to S110, the method further includes: displaying a node extension interface to the user in response to a user's node extension request; receiving an existing logical transformation node selected by the user in the node extension interface; receiving a node extension file uploaded by the user; and extending the functionality of the existing logical transformation node using the node extension file.
[0093] The node extension file can be a logic transformation script or other executable file. The node extension file follows the standard extension format specification.
[0094] The above solution allows users to extend the functionality of existing logical transformation nodes with visualization capabilities to adapt to their actual needs.
[0095] In some embodiments, prior to S110, the method further includes: displaying a logical node creation interface to the user in response to the user's logical node creation request; receiving a custom logical transformation node created by the user in the logical node creation interface; and saving the custom logical transformation node in a node library.
[0096] This system can receive descriptions of user-created custom logical transformation nodes and their corresponding logical transformation function files, storing both in the node library. The logical transformation function files can be logical transformation scripts or other executable files. These files must conform to standard creation format specifications.
[0097] The above solution allows users to visually create custom logical transformation nodes in the node library, enabling the expansion of logical transformation nodes in the node library to meet users' actual needs.
[0098] To facilitate understanding, the algorithm orchestration method provided in this application will be explained below with a specific example.
[0099] Figure 3 This is a flowchart illustrating a specific example of the algorithm orchestration method of this application. For example... Figure 3 As shown, the algorithm orchestration methods include:
[0100] I. Arrange the algorithm to obtain the target algorithm.
[0101] 1. In response to an algorithm orchestration request, display the node library on the algorithm orchestration interface.
[0102] 2. Receive multiple nodes selected by the user from the node library, and receive the node order set by the user for the multiple nodes.
[0103] The multiple nodes include several general algorithm nodes, several scenario adaptation nodes, and several logic transformation nodes.
[0104] Among them, a general algorithm node is used to perform data classification in one dimension to obtain a first classification result. The scene adaptation node is used to correct the first classification result obtained by one or more associated general algorithm nodes to obtain a second classification result. The logical transformation node can be an AND logical transformation node, OR logical transformation node, or non-logical transformation node, etc., and is used to perform logical transformation on at least one first classification result and / or at least one second classification result.
[0105] When the node library does not provide the general algorithm nodes or logic transformation nodes required by the user, user customization is supported.
[0106] 3. Combine multiple nodes in the order of nodes to form the target algorithm.
[0107] II. Try using the target algorithm.
[0108] The target algorithm's data classification performance is tested using user-uploaded trial sample data from the target scenario. A trial report on the data classification performance is generated and displayed to the user, allowing them to determine whether the data classification results meet the first preset condition.
[0109] If the data classification result does not meet the first preset condition, the target algorithm is optimized. If the first preset condition is met, the target algorithm can be directly applied to data classification in the target scenario.
[0110] III. Optimize the target algorithm.
[0111] The algorithm checks whether training sample data for the target scenario exists. If training sample data for the target scenario exists, the algorithm is optimized using a first optimization method. If training sample data for the target scenario does not exist, the algorithm is optimized using a second optimization method. Furthermore, the optimized algorithm can be tested again until it meets the first preset condition.
[0112] IV. Application of the target algorithm.
[0113] The target algorithm is applied to data classification in the target scenario. After application, if the user wants better algorithm performance, they can determine whether the data classification effect meets the second preset condition; if the data classification effect meets the second preset condition, the target algorithm is continued to be applied; if the data classification effect does not meet the second preset condition, the target algorithm is optimized again.
[0114] V. Further optimize the target algorithm.
[0115] The algorithm checks whether new training sample data for the target scenario exists. If new training sample data for the target scenario exists, the first optimization method is used to optimize the target algorithm again. If no new training sample data for the target scenario exists, the second optimization method is used to optimize the target algorithm again. Furthermore, the optimized target algorithm can be tested again until it meets the second preset condition.
[0116] The algorithm orchestration method provided in this application can be applied to algorithm orchestration systems.
[0117] Figure 4 This is a schematic diagram of the algorithm orchestration system provided in this application. For example... Figure 4 As shown, the algorithm orchestration system includes an algorithm application module, an algorithm management module, and an algorithm training module. These modules can be software or hardware modules. If they are software modules, different software modules can run on one physical machine or multiple physical machines. If they are hardware modules, different hardware modules can belong to one physical machine or different physical machines. Wherein:
[0118] The algorithm application module can be used to: obtain target algorithms from the algorithm management module; apply target algorithms; receive trial sample data and training sample data uploaded by users and pass them to the algorithm training module, etc.
[0119] The algorithm management module can be used to: create custom general algorithm nodes and custom logic transformation nodes; receive user operations to orchestrate target algorithms, modify nodes in target algorithms, and modify the classification prompts of general algorithm nodes; and obtain optimized scene adaptation nodes from the algorithm training module.
[0120] The algorithm training module can be used to: obtain trial sample data and training sample data uploaded by users from the algorithm application module; test the data classification effect of the target algorithm based on the trial sample data uploaded by users; and optimize the scene adaptation nodes based on the training sample data uploaded by users.
[0121] Figure 5 This is a schematic diagram of an embodiment of the algorithm orchestration device provided in this application. Figure 5 As shown, the algorithm orchestration device includes a receiving module and a combining module. Wherein:
[0122] The receiving module is used to receive multiple nodes selected by the user from the node library and to receive the node order set by the user for the multiple nodes. The multiple nodes include several general algorithm nodes and several scene adaptation nodes, and a scene adaptation node is associated with at least one general algorithm node.
[0123] The combination module is used to combine multiple nodes in the order of nodes to form a target algorithm. The target algorithm is used for data classification in the target scene. During the data classification process, the general algorithm node is used to classify the data to be classified and obtain the first classification result. The scene adaptation node is used to correct the first classification result obtained by the associated general algorithm node and obtain the second classification result.
[0124] For further detailed descriptions of this embodiment, please refer to the preceding embodiments, which will not be repeated here.
[0125] Figure 6 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. Figure 6 As shown, the electronic device 50 includes a memory 51 and a processor 52. The processor 52 is used to execute program instructions stored in the memory 51 to implement the steps in any of the above method embodiments. In a specific implementation scenario, the electronic device 50 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 50 may also include a laptop computer, a tablet computer, or other carrier device, which is not limited here.
[0126] Specifically, processor 52 controls itself and memory 51 to implement the steps in any of the above method embodiments. Processor 52 may also be referred to as a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip with signal processing capabilities. Processor 52 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 52 may be implemented using integrated circuit chips.
[0127] Please see Figure 7 , Figure 7 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 60 stores program instructions 601 thereon, which, when executed by a processor, implement the steps in any of the above method embodiments.
[0128] This application also provides a computer program product comprising a computer program that, when executed by a processor, can implement the steps of the methods described in any of the foregoing embodiments. Specifically, the computer program product can be a software or program product containing a computer program, capable of running on a computing device or stored on any available medium.
[0129] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0130] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0131] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. In another image location, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0132] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. An algorithm orchestration method, characterized in that, include: The system receives multiple nodes selected by a user from a node library and receives the node order set by the user for the multiple nodes, wherein the multiple nodes include several general algorithm nodes and several scene adaptation nodes, and one of the scene adaptation nodes is associated with at least one of the general algorithm nodes. According to the node order, the multiple nodes are combined to form a target algorithm. The target algorithm is used for data classification in a target scene. During the data classification process, the general algorithm node is used to classify the data to be classified to obtain a first classification result. The scene adaptation node is used to correct the first classification result obtained by the associated general algorithm node to obtain a second classification result. The data to be classified is one of image, video, and text. The input of the scene adaptation node includes the first classification result and correction reference information. The correction reference information includes at least one of the data to be classified, the features of the data to be classified, and the classification-related regions in the data to be classified. The features of the data to be classified and the classification-related regions in the data to be classified are obtained by the general algorithm node in the process of obtaining the first classification result. The process by which the scene adaptation node obtains the second classification result is to determine whether the first classification result is correct by combining the correction reference information.
2. The method according to claim 1, characterized in that, After combining the multiple nodes according to the node order to form the target algorithm, the algorithm further includes: The data classification effect of the target algorithm is tested using the trial sample data of the target scenario uploaded by the user. In response to the data classification effect not meeting the first preset condition, the target algorithm is optimized.
3. The method of claim 2, wherein, The optimization of the target algorithm includes: The target algorithm is optimized using a first optimization method, which involves fine-tuning the scene adaptation nodes using training sample data of the target scene uploaded by the user; or... The target algorithm is optimized using a second optimization method, which includes at least one of modifying the nodes of the target algorithm or modifying the classification prompt words of the general algorithm nodes.
4. The method of claim 3, wherein, The step of optimizing the target algorithm using the first optimization method is performed when it is confirmed that the user has the training sample data; the step of optimizing the target algorithm using the second optimization method is performed when it is confirmed that the user does not have the training sample data. And / or, the plurality of nodes further includes several logical transformation nodes, and the optimization of the target algorithm using the second optimization method includes at least one of the following steps: In response to the user's node modification operation, at least one of the nodes in the target algorithm is replaced; In response to the user's prompt word modification operation, the classification prompt words of at least one of the general algorithm nodes are modified.
5. The method of claim 2, wherein, After optimizing the target algorithm, the method further includes: The optimized target algorithm is applied to the data classification of the target scenario; If the data classification effect of the optimized target algorithm does not meet the second preset condition, the optimized target algorithm is optimized again.
6. The method of claim 1, wherein, Before receiving the multiple nodes selected by the user from the node library and receiving the node order set by the user for the multiple nodes, the method further includes: In response to the user's algorithm node creation request, an algorithm node creation interface is displayed to the user; Receive custom generic algorithm nodes created by users in the algorithm node creation interface; The custom general algorithm node is stored in the node library.
7. The method of claim 1, wherein, The plurality of nodes also includes several logical transformation nodes. During the data classification process, the logical transformation nodes are used to perform logical transformation on at least one of the first classification results and / or at least one of the second classification results to obtain a third classification result.
8. The method of claim 7, wherein, Before receiving the multiple nodes selected by the user from the node library and receiving the node order set by the user for the multiple nodes, the method further includes: In response to the user's node expansion request, a node expansion interface is displayed to the user. Receive the existing logical transformation node selected by the user in the node extension interface; Receive the node extension file uploaded by the user; The existing logical transformation nodes are extended using the node extension file; And / or, In response to the user's logical node creation request, a logical node creation interface is displayed to the user. Receive custom logical transformation nodes created by the user in the logical node creation interface; The custom logic transformation node is stored in the node library.
9. An electronic device, characterized in that, It includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the method of any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, It stores program instructions that, when executed by a processor, implement the method of any one of claims 1-8.
11. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-8.