Cross-device algorithm coordinated scheduling operation method and device, equipment and storage medium

Through cross-device algorithm coordination and scheduling methods, and by utilizing algorithm metadata and Kubernetes scheduling, automated algorithm orchestration and data storage are achieved, solving the problems of low orchestration efficiency and manual scheduling in existing technologies, and improving orchestration efficiency and data consistency.

CN120762828APending Publication Date: 2025-10-10PENG CHENG LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510577905.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

In existing technologies, the algorithm orchestration process requires manual creation and optimization of data storage structures, resulting in low orchestration efficiency and prone to errors. It is unable to adapt to changes in business scenarios, and the scheduling of cross-device and multi-architecture computing chips relies on manual processing, making automated deployment and scheduling impossible.

Method used

By obtaining the configuration information of the target algorithm, using the algorithm metadata for mapping and generating configuration files, scheduling the algorithm agent in Kubernetes, and subscribing to the memory message queue through the result aggregation algorithm, the data storage structure is automatically created to achieve automated orchestration and data processing of cross-device algorithms.

Benefits of technology

It improves the efficiency of algorithm orchestration, reduces manual intervention, ensures data integrity and consistency, adapts to different hardware environments, expands the application scope of algorithm orchestration, and improves flexibility and resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120762828A_ABST
    Figure CN120762828A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a cross-device algorithm coordinated scheduling operation method and device, equipment and a storage medium, and relates to the technical field of data processing. Configuration information of each arranged target algorithm is obtained, algorithm relation mapping is carried out on the target algorithms according to algorithm metadata, a configuration file is generated at least according to equipment architecture parameters of the target algorithms, and each target algorithm is scheduled to a corresponding equipment architecture based on the configuration file in Kubernetes. And performing data processing according to the initial data by using the input algorithm agent and the processing algorithm agent, subscribing output data of each algorithm theme in the memory message queue by using a result aggregation algorithm in the data processing process, and creating a storage structure of all output data in real time by using the query template. Scheduling of heterogeneous algorithms in an arrangement scene is realized in combination with Kubernetes, and a storage structure corresponding to output data is automatically created in a query template through subscription of a result aggregation algorithm, so that arrangement efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, apparatus, device and storage medium for coordinating and scheduling operations of cross-device algorithms. Background Art

[0002] As AI application scenarios become increasingly complex and diverse, a single algorithm module can no longer meet the needs. Therefore, it is necessary to connect independent algorithm modules through algorithm orchestration and complete complex business applications through intelligent scheduling and coordination.

[0003] In related technologies, algorithm orchestration requires manual creation and optimization of data storage structures for different algorithm modules based on business execution logic, as each algorithm module has different requirements for data formats and structures. Whenever the business scenario changes, the corresponding data storage structure must be manually recreated. This manual optimization approach is not only error-prone but also inefficient. Summary of the Invention

[0004] The main purpose of the embodiments of the present application is to propose a method, apparatus, device and storage medium for coordinating and scheduling operations of cross-device algorithms, thereby improving the efficiency of the algorithm orchestration process and reducing orchestration errors.

[0005] To achieve the above objectives, a first aspect of an embodiment of the present application proposes a cross-device algorithm coordinated scheduling operation method, comprising:

[0006] Obtaining multiple target algorithms from the algorithm arrangement input information, and obtaining configuration information of each of the target algorithms, wherein the target algorithms are, in arrangement order, an input algorithm, at least one processing algorithm, and a result aggregation algorithm, and the configuration information includes at least device architecture parameters and algorithm metadata;

[0007] Performing algorithm relationship mapping on the target algorithms in turn according to the algorithm metadata;

[0008] Generate a configuration file based on at least the device architecture parameters of the target algorithm, generate an algorithm proxy for the target algorithm other than the result aggregation algorithm in Kubernetes, schedule each target algorithm to a corresponding device architecture based on the configuration file, and sequentially generate corresponding algorithm topics in a memory message queue for the algorithm proxy according to the metadata relationship mapping;

[0009] The acquired application data is used as the starting data, and the input algorithm agent and the processing algorithm agent are used to perform data processing according to the starting data. During the data processing process, the result aggregation algorithm is used to subscribe to the output data of each algorithm topic in the memory message queue, and the query template is used to create a storage structure of all the output data in the database in real time to obtain the algorithm execution result.

[0010] In some embodiments, using the result aggregation algorithm to subscribe to the output data of each algorithm topic in the memory message queue, and using a query template to create a storage structure of all the output data in a database in real time, includes:

[0011] Generate an initial query template in SQL format;

[0012] When the result aggregation algorithm obtains at least one output field corresponding to the output data according to the subscription result, for the output data, a data column corresponding to each output field is generated in the initial query template in real time, and the data information corresponding to the output field is mapped with the corresponding data column until all the output data are mapped in the database to obtain the query template.

[0013] In some embodiments, mapping the target algorithms to algorithm relationships in sequence according to the algorithm metadata includes:

[0014] Obtaining the input structure, output structure, and input-output mapping relationship of each target algorithm from the corresponding algorithm metadata;

[0015] Two target algorithms are selected one by one according to the arrangement order, and the output structure of the previous target algorithm is mapped to the input structure of the next target algorithm according to the input-output mapping relationship.

[0016] In some embodiments, generating a configuration file based at least on the device architecture parameters of the target algorithm includes:

[0017] Obtaining computing chip parameters of the target algorithm from the configuration information;

[0018] Generate an initial YAML template, add the computing chip parameters to the resource requirement field of the initial YAML template, and add the device architecture parameters to the hardware architecture field of the initial YAML template to obtain a YAML configuration file, and obtain the configuration file based on the YAML configuration file.

[0019] In some embodiments, scheduling each target algorithm to a corresponding device architecture based on the configuration file in Kubernetes includes:

[0020] determining a first node label from the hardware architecture field, and selecting at least one candidate node according to the first node label;

[0021] determining a second node label from the resource requirement field, and selecting a target node from the candidate nodes according to the second node label, and scheduling the target algorithm to the target node.

[0022] In some embodiments, the application data obtained is used as starting data, and data processing is performed on the starting data by using an input algorithm agent and a processing algorithm agent, including:

[0023] The input algorithm is called by using the input algorithm agent to process the starting data to obtain first output data, and the first output data is encapsulated and published to the algorithm topic corresponding to the input algorithm agent in the memory message queue;

[0024] The processing algorithm agent is selected one by one as a current algorithm agent, the corresponding processing algorithm is called by using the current algorithm agent, the current input data is obtained from the previous algorithm topic, the current input data is processed to obtain second output data, and the second output data is encapsulated and published to the algorithm topic corresponding to the current algorithm agent in the memory message queue, and the second output data is used as the current input data of the next current algorithm agent, and the initial value of the current input data is the first output data.

[0025] In some embodiments, before the plurality of target algorithms are obtained from the algorithm arrangement input information, the method further includes:

[0026] The algorithm model of the plurality of target algorithms is published to a mirror warehouse as a mirror package;

[0027] Configuration information is generated for the mirror package in the mirror warehouse, and the input structure and the output structure are persistently stored, and when the target algorithm is a third-party algorithm, the configuration information further includes service address information.

[0028] To achieve the above object, a second aspect of the embodiment of the application proposes a cross-device algorithm coordination scheduling and running device, including:

[0029] The arrangement module is configured to obtain a plurality of target algorithms from algorithm arrangement input information, and obtain configuration information of each target algorithm, the target algorithms are an input algorithm, at least one processing algorithm and a result aggregation algorithm in turn according to an arrangement order, and the configuration information at least includes device architecture parameters and algorithm metadata;

[0030] Algorithm mapping module: used to map the target algorithm to the algorithm metadata in turn;

[0031] Scheduling module: used to generate a configuration file based on at least the device architecture parameters of the target algorithm, generate algorithm proxies for the target algorithms other than the result aggregation algorithm in Kubernetes, schedule each target algorithm to a corresponding device architecture based on the configuration file, and sequentially generate corresponding algorithm topics for the algorithm proxies in a memory message queue according to the metadata relationship mapping;

[0032] Result aggregation module: used to use the acquired application data as the starting data, use the input algorithm agent and the processing algorithm agent to perform data processing based on the starting data, and during the data processing process, use the result aggregation algorithm to subscribe to the output data of each algorithm topic in the memory message queue, and use the query template to create a storage structure of all the output data in the database in real time to obtain the algorithm execution result.

[0033] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.

[0034] To achieve the above-mentioned purpose, the fourth aspect of the embodiment of the present application proposes a storage medium, which is a storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0035] The cross-device algorithm coordination scheduling operation method, device, equipment and storage medium proposed in the embodiment of the present application obtains multiple target algorithms from the algorithm arrangement input information, and obtains the configuration information of each target algorithm, maps the target algorithms to the algorithm metadata in turn, generates a configuration file based on at least the device architecture parameters of the target algorithm, schedules each target algorithm to the corresponding device architecture in Kubernetes based on the configuration file, and generates an algorithm agent for each target algorithm, generates corresponding algorithm topics in the memory message queue in turn for the algorithm agent other than the result aggregation algorithm according to the metadata relationship mapping, uses the obtained application data as the starting data, uses the input algorithm agent and the processing algorithm agent to perform data processing according to the starting data, and in the data processing process, uses the result aggregation algorithm to subscribe to the output data of each algorithm topic in the memory message queue, and uses the query template to create the storage structure of all output data in the database in real time to obtain the algorithm execution result. In the embodiment of the present application, the relationship between the algorithm modules is first clarified through the algorithm metadata, the data interaction and processing flow between the algorithms are simplified, manual intervention is reduced, and automated orchestration is achieved, thereby improving orchestration efficiency. Secondly, there is no need to limit whether the device architecture of the algorithm module is consistent. The heterogeneity of the device architecture can be reflected in the configuration file according to actual needs, and combined with the scheduling capabilities of Kubernetes, it can adapt to different hardware environments and expand the application scope of algorithm orchestration so that it can meet the needs of different fields. Finally, the embodiment of the present application does not need to manually maintain the output data of each algorithm module. Instead, it subscribes to the output data of each algorithm topic in the memory message queue through the result aggregation algorithm, and automatically creates a storage structure corresponding to the output data in the query template. This automated processing method not only reduces the cost of manual maintenance, but also ensures the integrity and consistency of the data while improving the efficiency of orchestration. In addition, the automatic generation of data storage structure enables the system to adapt to different data formats and storage requirements, which not only improves the intuitiveness and efficiency of data processing, but also adapts to the scenarios of complex data streams and interactions between multiple algorithm models, further improving the flexibility of algorithm orchestration. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a flowchart of the cross-device algorithm coordination scheduling operation method provided in an embodiment of the present application.

[0037] Figure 2 This is a flowchart of the target algorithm preprocessing provided in the embodiment of the present application.

[0038] Figure 3 This is a flowchart provided by an embodiment of the present application for mapping the algorithm relationships of the target algorithms in accordance with the algorithm metadata.

[0039] Figure 4 This is a schematic diagram of the algorithm arrangement process provided in an embodiment of the present application.

[0040] Figure 5 is a flowchart provided by an embodiment of the present application for generating a configuration file according to a device architecture parameter of a target algorithm.

[0041] Figure 6 is a flowchart provided by an embodiment of the present application for scheduling each target algorithm to a corresponding device architecture based on a configuration file in Kubernetes.

[0042] Figure 7 is a flowchart provided by an embodiment of the present application for taking acquired application data as starting data, and using an input algorithm agent and a processing algorithm agent to perform data processing according to the starting data.

[0043] Figure 8 is a flowchart provided by an embodiment of the present application for subscribing to output data of each algorithm topic in a memory message queue using a result aggregation algorithm, and creating a storage structure of all output data in a database in real time using a query template.

[0044] Figure 9 is a schematic diagram of an algorithm execution process provided by an embodiment of the present application.

[0045] Figure 10 is a schematic diagram of an algorithm execution process provided by an embodiment of the present application.

[0046] Figure 11 is a flowchart of a cross-device algorithm coordination scheduling running method provided by an embodiment of the present application.

[0047] Figure 12 is a structure block diagram of a cross-device algorithm coordination scheduling running device provided by another embodiment of the present application.

[0048] Figure 13 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.

[0050] It should be noted that although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a manner different from the module division in the device or the order in the flowchart.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0052] First, let’s analyze some of the terms used in this application:

[0053] Artificial Intelligence (AI) is a new technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. A branch of computer science, AI seeks to understand the essence of intelligence and create new intelligent machines that can respond in a manner similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thinking. It also encompasses theories, methods, technologies, and application systems that use digital computers or digital computer-controlled machines to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results.

[0054] As AI application scenarios become increasingly complex and diverse, single algorithm modules are no longer sufficient. Therefore, algorithm orchestration is needed to connect independent algorithm modules and implement complex business applications through intelligent scheduling and coordination. Algorithm orchestration involves combining multiple algorithms in a specific sequence or logic to form an orderly process or graph to achieve specific computational or business goals. Defining the dependencies between algorithms and the execution order is crucial in algorithm orchestration to ensure the effectiveness and correctness of the entire process.

[0055] In related technologies, because each algorithm module has different requirements for data formats and structures, the algorithm orchestration process requires manual creation and optimization of data storage structures for different algorithm modules based on the business execution logic. Whenever the business scenario changes, the corresponding data storage structure needs to be manually recreated. This manual optimization method is not only error-prone but also has low orchestration efficiency. Furthermore, in related technologies, for the combined application of algorithm models across multiple devices and multi-architecture computing chips, the scheduling process mostly relies on manual processing, making automated deployment and scheduling impossible, resulting in inability to maximize resource utilization and deployment efficiency.

[0056] Based on this, the embodiments of the present application provide a cross-device algorithm coordinated scheduling operation method, device, equipment and storage medium. First, the relationship between algorithm modules is clarified through algorithm metadata, manual intervention is reduced, and automatic orchestration is achieved, thereby improving orchestration efficiency. Secondly, there is no need to limit whether the device architecture of the algorithm module is consistent. The heterogeneity of the device architecture can be reflected in the configuration file according to actual needs, and combined with the scheduling capabilities of Kubernetes, it can adapt to different hardware environments and expand the application scope of algorithm orchestration so that it can meet the needs of different fields. Finally, the embodiments of the present application do not need to manually maintain the output data of each algorithm module, but subscribe to the output data of each algorithm topic in the memory message queue through the result aggregation algorithm, and automatically create a storage structure corresponding to the output data in the query template. This automated processing method not only reduces the manual maintenance cost, but also ensures the integrity and consistency of the data while improving orchestration efficiency. In addition, the automatic generation of data storage structure enables the system to adapt to different data formats and storage requirements, further improving the flexibility of algorithm orchestration.

[0057] The embodiments of the present application provide a cross-device algorithm coordinated scheduling operation method, apparatus, device and storage medium, which are specifically illustrated by the following embodiments. First, the cross-device algorithm coordinated scheduling operation method in the embodiments of the present application is described.

[0058] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0059] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0060] The cross-device algorithm coordination and scheduling operation method provided in the embodiment of the present application relates to the field of data processing technology. The cross-device algorithm coordination and scheduling operation method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be a computer program running in a terminal or a server side. For example, a computer program can be a native program or software module in an operating system; it can be a local (Native) application (Application, APP), that is, a program that needs to be installed in the operating system to run, such as a client that supports cross-device algorithm coordination and scheduling operation, that is, a program that can be run only by downloading it to a browser environment; it can also be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plug-in. Among them, the terminal communicates with the server through a network. The cross-device algorithm coordination and scheduling operation method can be executed by a terminal or a server, or by a terminal and a server in collaboration.

[0061] In some embodiments, the terminal can be a smartphone, tablet computer, laptop computer, desktop computer, or smartwatch. The server can be an independent server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. It can also be a service node in a blockchain system, where each service node in the blockchain system forms a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP). The terminal and the server can be connected via a communication connection method such as Bluetooth, Universal Serial Bus (USB), or a network, which is not limited in this embodiment.

[0062] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0063] The following describes the cross-device algorithm coordination scheduling operation method in an embodiment of the present application.

[0064] Figure 1 This is an optional flowchart of the cross-device algorithm coordination scheduling operation method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps 110 to 130. It is also understood that this embodiment is for Figure 1 The order of step 110 to step 130 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.

[0065] Step 110: Obtain multiple target algorithms from the algorithm arrangement input information, and obtain configuration information of each target algorithm.

[0066] In one embodiment, each algorithm module is considered a target algorithm. When algorithm orchestration is required, multiple target algorithms are selected based on the actual business logic for orchestration, resulting in a target algorithm sequence as the orchestration result. For example, in image processing, an edge detection algorithm can be used to extract edges, followed by a contour extraction algorithm to generate contours. In natural language processing, a word segmentation algorithm can be used first, followed by a part-of-speech tagging algorithm.

[0067] In one embodiment, the target algorithms are defined in the following order: an input algorithm, at least one processing algorithm, and a result aggregation algorithm. The input algorithm serves as the data entry point for the entire business logic, responsible for receiving the corresponding input data. Only one algorithm is allowed. The processing algorithms are set sequentially based on actual business processing requirements, and multiple algorithms can be configured. An output algorithm is also set as the endpoint of the entire business logic, responsible for outputting the final processing results. Only one algorithm is allowed.

[0068] Suppose that in an autonomous driving business process, target detection, path planning, control algorithms, etc. need to be implemented in sequence. In this case, the arrangement order can be: input algorithm, target detection algorithm, path planning algorithm, control algorithm and result aggregation algorithm. Among them, target detection algorithm, path planning algorithm, and control algorithm are all processing algorithms.

[0069] In one embodiment, a visual interface can be set up for algorithm orchestration. The user connects different target algorithms according to business logic by dragging and dropping on the visual interface to obtain an orchestration result. At this time, the orchestration result serves as the algorithm orchestration input information, and multiple corresponding target algorithms can be obtained based on the orchestration result.

[0070] In one embodiment, all target algorithms are deployed in the image repository to facilitate subsequent call processes. Figure 2 , Figure 2 This is a flowchart of the target algorithm preprocessing provided by the embodiment of the present application, which specifically includes the following steps:

[0071] Step 210: Publish the image packages of the algorithm models of multiple target algorithms to the image repository.

[0072] In one embodiment, the algorithm model of each target algorithm is encapsulated to generate an image package. This image package ensures that different target algorithms can run in the same environment. Specifically, the image package contains basic information about the target algorithm, such as the model algorithm name, functional description, version number, technical parameters, and application scenarios. The image package also specifies the device architecture type and computing chip parameters that the corresponding target algorithm relies on for execution. The computing chip parameters may include the computing chip type, computing resources, and video memory value.

[0073] In one embodiment, the device architecture type of the target algorithm can be x86, ARM, or other hardware platforms required for the target algorithm to run. The computing chip parameters are used to clarify the actual chip requirements of the target algorithm. For example, the computing chip type can be Intel Xeon, NVIDIA A100, etc., the computing resources can be CPU, GPU, or NPU, etc., and the video memory value is the amount of video memory required for operation. By calculating the chip parameters and device architecture type, different target algorithms can be quickly matched with hardware resources to ensure efficient operation of the target algorithm.

[0074] In one embodiment, the target algorithm also includes algorithm metadata. This algorithm metadata is used to define at least information such as the dependencies between target algorithms, input and output interfaces, and execution order. This algorithm metadata allows for automatic identification of the dependencies and execution logic of different target algorithms when orchestrating them.

[0075] The input and output interfaces are used to define the target algorithm's input parameters, output results, and the corresponding data types, such as JSON, images, and text. Dependencies are used to describe the dependencies between different target algorithms. For example, the output of target algorithm A is the input of target algorithm B, and target algorithms C and D can be executed in parallel. The execution order is used to define the execution order of the target algorithms. For example, execute target algorithm A first, then target algorithm B; if condition X holds, execute target algorithm C, otherwise execute target algorithm D, etc. Algorithm metadata clearly describes the relationships and execution logic between target algorithms, enabling efficient orchestration and automated execution of different target algorithms.

[0076] In one embodiment, each target algorithm also needs to be described in JSON Schema format, so as to use the specification to describe the input structure and output structure of the target algorithm in JSON format.

[0077] The following example illustrates the input structure of the target algorithm.

[0078] "input":{

[0079] "type":"object",

[0080] "minProperties":2,

[0081] "maxProperties":2,

[0082] "title":"Algorithm input information",

[0083] "required":[

[0084] "sensitive",

[0085] "textFilter"],

[0086] "properties":{

[0087] "sensitive":{

[0088] "description":"Threshold",

[0089] "title":"Threshold", "type":"integer",

[0090] "minimum":0,

[0091] "maximum":100,

[0092] "default": 0},

[0093] "textFilter": {

[0094] "description": "Text filter",

[0095] "title": "Text keyword", "type": "string",

[0096] "minLength": 0,

[0097] "maxLength": 1024,

[0098] "default": "Civil travel"}

[0099] The output structure of the target algorithm is illustrated with an example as follows.

[0100] "output": {

[0101] "type": "object",

[0102] "title": "Algorithm output information",

[0103] "minProperties": 2,

[0104] "maxProperties": 2,

[0105] "required": [

[0106] "code",

[0107] "msg"],

[0108] "properties": {

[0109] "code": {

[0110] "description": "Error code",

[0111] "type": "integer",

[0112] "title": "Analysis result error code", "minimum": 0,

[0113] "maximum": 100,

[0114] "default": 0},

[0115] "msg": {

[0116] "description":"Error description",

[0117] "type":"string",

[0118] "title":"Error message", "minLength":0,

[0119] "maxLength":1024,

[0120] "default": "Success"}}}

[0121] As can be seen from the above examples, in the embodiments of the present application, by rewriting the input structure and output structure of the target algorithm, the input and output processes of each target algorithm are performed according to the same specification, which facilitates improving the data processing efficiency of the orchestration process.

[0122] Step 220: Generate configuration information for the image package in the image repository, and persistently store the input structure and output structure. When the target algorithm is a third-party algorithm, the configuration information also includes service address information.

[0123] In one embodiment, configuration information is generated for each image package in the image repository. This configuration information includes at least device architecture parameters, computing chip parameters, and algorithm metadata. Furthermore, a database is used to persistently store the input and output structures of each target algorithm, thereby structuring the corresponding input and output data, ensuring data integrity and traceability, and supporting the reuse of the target algorithm's execution results and subsequent query and analysis processes.

[0124] In one embodiment, if the target algorithm is a third-party algorithm, service address information for calling the target algorithm also needs to be added to the configuration information.

[0125] Step 120: Perform algorithm relationship mapping on the target algorithms in turn according to the algorithm metadata.

[0126] In one embodiment, algorithm orchestration input information can be obtained by a user selecting target algorithms one by one on a visual interface. During the selection process, the target algorithms are obtained one by one and then automatically orchestrated. For example, a visual panel based on the Vue3 web front-end framework, the Element Plus component library, and the AntV X6 orchestration canvas can be implemented for users to operate through a web interface. Users can drag and drop the stored target algorithms into the orchestration process and adjust the order in which the target algorithms are executed. At the same time, the target algorithms also support multi-threaded concurrent data processing.

[0127] In one embodiment, referring to Figure 3 ,Figure 3 This is a flowchart of mapping the algorithm relationships of the target algorithm according to the algorithm metadata provided by the embodiment of the present application, which specifically includes the following steps:

[0128] Step 310: Obtain the input structure, output structure, and input-output mapping relationship of each target algorithm from the corresponding algorithm metadata.

[0129] In one embodiment, for any target algorithm, the required input data format and content, as well as the output data format, must be clearly defined. Therefore, the input structure and output structure are obtained from the algorithm metadata. For example, for an image processing algorithm, the input structure includes the name, data type, and data source of the input parameters, from which information such as the image file path and image format can be obtained. The output structure includes information such as the output content and the storage path of the output content.

[0130] In addition, it is also necessary to obtain the input-output mapping relationship based on the dependency and execution order information in the algorithm metadata. Among them, the input-output mapping relationship is used to describe how the output structure of the previous target algorithm is mapped to the input structure of the next target algorithm, and is used to clarify the correspondence between the input fields and output fields corresponding to the two target algorithms to ensure that the data can be correctly transmitted between the two target algorithms to avoid data loss or format errors. For example, the output field of the previous target algorithm is processed_data, and the input field of the next target algorithm is input_data, so the corresponding input-output mapping relationship is input_data = processed_data.

[0131] Step 320: Select two target algorithms one by one according to the arrangement order, and map the output structure of the previous target algorithm to the input structure of the next target algorithm according to the input-output mapping relationship.

[0132] In one embodiment, the arrangement order is: one input algorithm, at least one processing algorithm and one result aggregation algorithm, and the number of processing algorithms here is set according to the actual application requirements. Among them, the input algorithm is used to obtain data from an external source (such as a file, a database, an API), and convert the obtained data into a format that can be processed by the subsequent algorithm, and use the processed data as the input of the first processing algorithm. The processing algorithm extracts data from the output structure of the previous target algorithm (input algorithm or the previous processing algorithm), maps the output of the previous target algorithm to the input of the current processing algorithm according to the input-output mapping relationship, processes the input data, generates an intermediate result, and uses the intermediate result as the input of the next processing algorithm or the result aggregation algorithm. The result aggregation algorithm obtains the intermediate results from all the processing algorithms, summarizes and stores them, and performs the analysis actually required.

[0133] Among them, after the result aggregation algorithm is added to the orchestration, an input-output mapping relationship is established between the output structures of all processing algorithms and the input structure of the result aggregation algorithm to ensure that a storage structure is created in the result aggregation algorithm according to the output structure of the processing algorithm, so that the fields in the result aggregation algorithm can correspond to the actual data structure to achieve accurate data query.

[0134] In one embodiment, referring to Figure 4 , Figure 4 This is a schematic diagram of the algorithm arrangement process provided by the embodiment of this application. Figure 4 During the operation, two target algorithms are selected one by one from the algorithm arrangement input information according to the arrangement order, and the output structure of the previous target algorithm is mapped to the input structure of the next target algorithm according to the input-output mapping relationship.

[0135] First, obtain the input algorithm from the algorithm orchestration input information and add the input algorithm to the orchestration process. Then, obtain the processing algorithm selected according to actual needs as the intermediate process algorithm, set the input-output mapping relationship between the input algorithm and the first processing algorithm, and then determine whether there are other intermediate process algorithms to join the orchestration. If so, continue to obtain the intermediate process algorithms and set the input-output mapping relationship between the two intermediate process algorithms until all the intermediate process algorithms are added to the orchestration process. Obtain the result aggregation algorithm as the output algorithm and add it to the orchestration. Set the input-output mapping relationship between all intermediate process algorithms and the result aggregation algorithm to complete the orchestration process.

[0136] Step 130: Generate a configuration file based on at least the device architecture parameters of the target algorithm, generate an algorithm agent for the target algorithm other than the result aggregation algorithm in Kubernetes, schedule each target algorithm to the corresponding device architecture based on the configuration file, and generate corresponding algorithm topics in the memory message queue in sequence for the algorithm agent according to the metadata relationship mapping.

[0137] In one embodiment, after the orchestration is completed, the target algorithm can be deployed and run in Kubernetes according to the orchestration results. Figure 5 , Figure 5 This is a flowchart of generating a configuration file based on at least the device architecture parameters of a target algorithm provided by an embodiment of the present application, specifically including the following steps:

[0138] Step 510: Obtain computing chip parameters of the target algorithm from the configuration information.

[0139] In one embodiment, the configuration information includes at least computing chip parameters and device architecture parameters. It is understandable that the cross-device target algorithm in the embodiments of the present application needs to run in Kubernetes. Therefore, the configuration information includes not only the aforementioned computing chip parameters, device architecture parameters, and algorithm metadata, but also other relevant configuration parameters applicable to Kubernetes, such as resource limits, environment variables, and persistent storage volumes. The configuration information is not specifically limited here.

[0140] Step 520: Generate an initial YAML template, add computing chip parameters to the resource requirement field of the initial YAML template, and add device architecture parameters to the hardware architecture field of the initial YAML template to obtain a YAML configuration file, and obtain a configuration file based on the YAML configuration file.

[0141] In one embodiment, first, an initial YAML template is generated for each target algorithm in the algorithm orchestration input information. The initial YAML template contains multiple fields with empty content, which need to be filled in according to the actual configuration information of the target algorithm. Next, for each target algorithm, the computing chip parameters in the configuration information are added to the resource requirement field of the corresponding initial YAML template, and the device architecture parameters in the configuration information are added to the hardware architecture field of the initial YAML template, and the YAML configuration file of each target algorithm is obtained according to the filling result. Among them, the YAML configuration file can be a configuration file of the job resource in Kubernetes, in which the hardware architecture field and the resource requirement field are used to define the configuration template of the pod. After having the configuration template, the configuration file of the pod can be created, and the corresponding pod can be created according to the configuration file of the pod.

[0142] The following is an example YAML configuration file.

[0143]

[0144]

[0145]

[0146] As can be seen from the above example, resource requirement fields in the YAML configuration file used for Kubernetes deployment can include fields such as containers or initContainers, while hardware device fields can include fields such as nodeSelector. The above is merely illustrative of the specific content of the YAML configuration file and does not limit it.

[0147] In one embodiment, once a YAML configuration file is available, a pod configuration template can be created based on the hardware architecture and resource requirement fields of the pod. A corresponding pod can then be created based on the pod configuration file for algorithm scheduling. A pod here can be understood as a container or a node.

[0148] The following is an example configuration file:

[0149]

[0150] In the above example, the pod is created with the arm architecture, and the hardware device can be the default value.

[0151] In one embodiment, Kubernetes generates algorithm proxies for target algorithms other than the result aggregation algorithm based on the configuration file settings. The algorithm proxies select corresponding nodes for scheduling based on the resource requirements and hardware architecture fields in the configuration file. The algorithm proxies include an input algorithm proxy for the input algorithm and a processing algorithm proxy for each processing algorithm.

[0152] In one embodiment, pods are nodes in Kubernetes, and each node's configuration file contains a node label corresponding to the node. The node label is used to indicate the hardware architecture that the pod can support and the resource requirements that it can meet. Therefore, the scheduling process can be implemented by specifying the node label of the pod in the configuration file. Figure 6 , Figure 6 This is a flowchart of scheduling each target algorithm to the corresponding device architecture based on the configuration file in Kubernetes provided by an embodiment of the present application, which specifically includes the following steps:

[0153] Step 610: Determine a first node label from the hardware architecture field, and select at least one candidate node according to the first node label.

[0154] In one embodiment, the first node label is used to represent different hardware architectures, so the node corresponding to the first node label that meets the hardware architecture parameters can be selected as the candidate node.

[0155] For example, the following configuration file example.

[0156] apiVersion:v1

[0157] kind:pod

[0158] metadata:

[0159] name:example-pod

[0160] spec:

[0161] containers:

[0162] -name:example-container

[0163] image:example-image

[0164] nodeSelector:

[0165] architecture:arm

[0166] From the above configuration file, it can be concluded that the label of the node of ARM architecture is the first node label.

[0167] Step 620: Determine the second node label from the resource requirement field, select a target node from the candidate nodes according to the second node label, and schedule the target algorithm to the target node.

[0168] In one embodiment, after satisfying the hardware architecture, resource requirements must also be met. Therefore, the resource requirements corresponding to the nodes are classified according to the second node label. Then, among the candidate nodes, those that meet the resource requirements are selected based on the second node label as target nodes for scheduling. In this way, each algorithm agent is scheduled to a target node that meets both its hardware architecture and resource requirements.

[0169] The embodiment of the present application ensures that each algorithm agent can be scheduled to the corresponding node through node labels, thereby realizing the algorithm scheduling process across devices. Regardless of the hardware architecture and computing resources required by the target algorithm, it can be scheduled to the appropriate resources in Kubernetes through configuration files, thereby ensuring that the target algorithm runs in the best environment. In the actual application field of executing the target algorithm, the same type of algorithms are usually executed on the same device, which cannot fully utilize the resources of each machine. Therefore, the embodiment of the present application realizes the heterogeneous scheduling process in combination with Kubernetes by pre-configuring relevant information.

[0170] In one embodiment, once a pod is scheduled to a suitable node, Kubernetes pulls and launches the image package corresponding to the target algorithm on that node. This process is automated and requires no user intervention. Because the image package contains the runtime environment and code for the target algorithm, it is guaranteed to run identically on any scheduled node. This container-based runtime mechanism ensures portability and consistency of the target algorithm.

[0171] Step 140: Use the acquired application data as the starting data, and use the input algorithm agent and the processing algorithm agent to process the data according to the starting data. During the data processing, use the result aggregation algorithm to subscribe to the output data of each algorithm topic in the memory message queue, and use the query template to create the storage structure of all output data in the database in real time to obtain the algorithm execution result.

[0172] In one embodiment, each algorithm agent acts as an independent process, and Kubernetes creates a designated algorithm topic for it in the memory message queue, and uses the algorithm topic to publish messages. The memory message queue can be Kafka, thereby implementing a stream processing framework. Figure 7 , Figure 7 This is a flowchart provided by an embodiment of the present application, which uses the acquired application data as the starting data and uses the input algorithm agent and the processing algorithm agent to perform data processing based on the starting data, specifically including the following steps:

[0173] Step 710: Use the input algorithm proxy to call the input algorithm to process the initial data to obtain first output data, encapsulate the first output data and publish it to the algorithm topic corresponding to the input algorithm proxy in the memory message queue.

[0174] In one embodiment, when the target algorithm is executed, each specific business application has corresponding application data to be processed, which serves as the starting data for the overall algorithm flow. This starting data is fed into the input algorithm agent, which converts the data into the format required by the first processing algorithm agent's input data to obtain first output data. The first output data is then packaged and published to the algorithm topic corresponding to the input algorithm in the in-memory message queue.

[0175] Step 720: Select the processing algorithm agents one by one as the current algorithm agent, use the current algorithm agent to call the corresponding processing algorithm, obtain the current input data from the previous algorithm topic, process the current input data to obtain the second output data, and encapsulate the second output data and publish it to the algorithm topic corresponding to the current algorithm agent in the memory message queue, use the second output data as the current input data of the next current algorithm agent, and the initial value of the current input data is the first output data.

[0176] In one embodiment, processing algorithm agents are selected one by one as the current algorithm agent in the order of arrangement. Each processing algorithm agent subscribes to the algorithm topic corresponding to the previous target algorithm and obtains the output data of the previous target algorithm as its own current input data. The current algorithm agent calls the corresponding processing algorithm, processes the current input data according to the algorithm itself, and obtains the second output data. The second output data is then packaged and published to the algorithm topic corresponding to the current algorithm agent in the memory message queue. The second output data is used as the current input data of the next current algorithm agent.

[0177] Taking the first processing algorithm agent as an example, it subscribes to the algorithm topic corresponding to the input algorithm and obtains the first output data as the current input data. That is, the initial value of the current input data is the first output data.

[0178] In one embodiment, during the data processing process, it is necessary to use the result aggregation algorithm to summarize and analyze the output data of each algorithm theme. In this process, automatic output structure generation is achieved. Figure 8 , Figure 8 This is a flowchart of using a result aggregation algorithm to subscribe to the output data of each algorithm topic in the memory message queue, and using a query template to create a storage structure of all output data in a database in real time, provided by an embodiment of the present application. Specifically, the flowchart includes the following steps:

[0179] Step 810: Generate an initial query template in SQL format.

[0180] In one embodiment, the initial query template is used to define the query logic for obtaining data from other target algorithms. The initial query template is in SQL format and can extract relevant data from a database or other data source that supports SQL through SQL statements.

[0181] The following is an example of an initial query template.

[0182] CREATE TABLE

[0183] IF NOT EXISTS mo_ff8d719e53354159(

[0184] `data_id`String comment'Data ID',

[0185] `datatype`String comment'data type',

[0186] `enter_time`DateTime DEFAULT now()comment'entry time',

[0187] `datatime`DateTime comment'data time',

[0188] `_import_task_id`Nullable(String) comment'Data import batch number'

[0189] )ENGINE=ReplacingMergeTree()PRIMARY KEY data_id

[0190] From the above, we can see that the table name of the initial query template is mo_ff8d719e53354159, which contains the fields data_idString, datatype, enter_time, datatime, and _import_task_id as basic fields.

[0191] Step 820: When the result aggregation algorithm obtains at least one output field corresponding to the output data based on the subscription result, for the output data, a data column corresponding to each output field is generated in the initial query template in real time, and the data information corresponding to the output field is mapped with the corresponding data column until all the output data is mapped in the database to obtain the query template.

[0192] In one embodiment, during the processing, the result aggregation algorithm subscribes to the output data of each algorithm topic in real time, and expands the initial query template in real time based on the output data. When there is output data, a data column corresponding to each output field is generated in the initial query template.

[0193] Taking the above initial query template as an example, add the following content in sequence:

[0194]

[0195]

[0196] Among them, through the ALTER TABLE statement, you can add multiple other fields to the table. These fields are mainly used to store the output data subscribed from the algorithm topics corresponding to processing algorithms a0, a1, and a2. These processing algorithms can implement tasks such as image processing, model reasoning, and task tracking.

[0197] Different processing algorithms have corresponding output fields. For example, the a0_feature field represents the vector features generated by the model. Fields such as a1_top, a1_left, a1_height, and a1_width describe the location and size of a region in the image. Fields such as a2_height, a2_width, and a2_image_size describe the overall properties of the image. Fields such as a1_image_file and a2_image_file store the image file path or content.

[0198] It is understandable that with ALTER TABLE and ADD COLUMN, corresponding output fields can be adaptively added to the initial query template, thereby generating them in real time according to actual needs without manual settings, thereby improving overall orchestration efficiency.

[0199] Next, the data corresponding to the output fields is mapped to the corresponding data columns until all output data is mapped in the database, resulting in a query template. With the query template, the output information of each target algorithm can be obtained throughout the entire processing process, allowing analysis based on actual needs.

[0200] As in the above example, the resulting query template can be:

[0201]

[0202]

[0203] a0.track_id,

[0204] FROM_UNIXTIME(CAST(a0.datatime AS INTEGER))

[0205] FROM

[0206] a0

[0207] LEFT JOINa1 ONa1.data_id=a0.pre_data_id

[0208] LEFT JOINa2 ONa2.data_id=a1.pre_data_id

[0209] Taking processing algorithm a1 as an example, the corresponding output fields in the initial query template are represented as: a0_feature, a1_image_file, a1_label, a1_score, a1_left, a1_top, a1_width, and a1_height. In this case, the initial query template is used as the target table, and the storage table containing the output data of processing algorithm a1 is used as the query result. The corresponding query result is inserted into the target table using the INSERT INTO...SELECT statement and joined using LEFT JOIN.

[0210] The data sources for the query results include storage table a0 for processing algorithm a0, storage table a1 for processing algorithm a1, and storage table a2 for processing algorithm a2. Storage table a0 provides the feature, data_id, track_id, and datatime fields. Storage table a1 provides the image_file, label, score, left, top, width, and height fields. Storage table a2 provides the frametime, height, width, image_file, image_size, monitortime, and input_source_id fields.

[0211] Assuming that, according to the order of arrangement, algorithm a0 processes before algorithm a1, it can perform a LEFT JOIN between storage table a1 and storage table a0 using a1.data_id = a0.pre_data_id. If a record in storage table a0 does not have a matching record in storage table a1, the relevant fields in storage table a1 are set to NULL. Alternatively, a LEFT JOIN can be performed between storage table a1 and storage table a2 using a2.data_id = a1.pre_data_id. If a record in storage table a1 does not have a matching record in storage table a2, the relevant fields in storage table a2 are set to NULL. The LEFT JOIN ensures that even if there are no matching records in storage table a1 or storage table a2, the records in storage table a0 will still be inserted into the target table, and the relevant fields will be set to NULL.

[0212] It is understandable that the embodiment of the present application sends SQL query instructions to the stream processing framework through the result aggregation algorithm, and the stream processing framework interacts the SQL-style query with the input data and output data published by each algorithm agent to the memory message queue, thereby realizing the association and conversion of the output data of the SQL-style query. In addition, through the query template, the output data of multiple target algorithms are used as the algorithm execution result and mapped into a tabular structure. Users can use the SQL query language to perform advanced data operations, including but not limited to association, aggregation and conversion. This processing mechanism realizes efficient data processing, can make full use of the powerful query capabilities of SQL, and perform fine control over the output data.

[0213] In one embodiment, referring to Figure 9 , Figure 9 This is a schematic diagram of the algorithm execution flow provided in the embodiment of the present application. Figure 9 Each algorithm agent is an independent process that reads relevant data from the memory message queue, interacts with the corresponding algorithm service running outside the application, and publishes the algorithm processing results back to the memory message queue.

[0214] Among them, the input algorithm agent serves as the starting point of the entire data processing flow. The initial data generated by the external data source (such as video stream, sensor data, etc.) first enters the input algorithm agent, and then the input algorithm agent requests to call the input algorithm service. After the input algorithm service responds to the request, it uses the input algorithm to process the obtained initial data, and obtains the corresponding first output data and returns it to the input algorithm agent. After the input algorithm agent encapsulates the first output data, it publishes it to the algorithm topic corresponding to the input algorithm so that it can be consumed by subsequent processing algorithm agents.

[0215] Next, the processing algorithm agent subscribes to the designated algorithm topic and waits for data published by the input algorithm agent or other processing algorithm agents. When the data arrives, the processing algorithm agent requests the processing algorithm service to perform computational tasks, such as image recognition, data conversion, statistical analysis, etc. After processing is complete, the algorithm agent encapsulates the results into a new message and publishes it to the designated message topic for subsequent processing. Taking the first processing algorithm as an example, its corresponding processing algorithm agent subscribes to the first output data from the first algorithm topic, and follows the same process to request a response from the processing algorithm service. The obtained second output data is encapsulated and published in the corresponding algorithm topic, which is then subscribed to by the next processing algorithm agent.

[0216] Executed sequentially, the result aggregation algorithm then subscribes to each algorithm topic, obtains the corresponding output data, and generates a query template based on the initial query template. The result aggregation algorithm is the final point in the data processing process. It subscribes to the in-memory message queue to process the results published by other algorithm agents and outputs these results to external systems or storage, completing the entire data processing chain. Throughout this interactive process, the in-memory message queue acts as an efficient middleware, supporting high-throughput and low-latency messaging, ensuring smooth communication between algorithm agents and real-time data processing.

[0217] In one embodiment, once the preceding algorithm agent publishes processed data to the in-memory message queue, the corresponding subsequent algorithm agent initiates the processing. This mechanism triggers the execution of algorithm services based on the presence or absence of data. Each algorithm agent responds only when new data appears in the algorithm topic of its subscribed message queue, automatically determining the order of execution based on the flow of data in the queue.

[0218] If an algorithm times out during a particular execution, the corresponding output data will not be published to the algorithm topic in the queue. Since subsequent algorithm services rely on receiving input data from the specific algorithm topic, the output results of subsequent algorithms in this processing chain will not be recorded. The current timed-out algorithm discards the current request and continues to process subsequent input data.

[0219] In one embodiment, referring to Figure 10 , Figure 10 This is another schematic diagram of the algorithm execution process provided by the embodiment of this application. Figure 10 A stream processing framework uses a result aggregation algorithm to aggregate and store the results of algorithm-orchestrated applications. Using a stream processing framework to perform real-time SQL queries on data in an in-memory message queue allows processing streaming data using SQL statements similar to database queries, rather than writing complex stream processing programs. This greatly simplifies data processing and analysis. Once the algorithm agent publishes the algorithm's processing results to the designated algorithm topic in the message queue, the result aggregation algorithm can immediately execute SQL queries on this output data based on the stream processing framework, enabling real-time data analysis.

[0220] In addition, after applying the algorithm model in the internal algorithm orchestration and performing input-output mapping based on the algorithm metadata, the overall data storage structure is determined. The result aggregation algorithm can then automatically create a storage structure that matches the output of various target algorithms based on the output data of each target algorithm. This adaptive capability simplifies the complexity of manually configuring the storage structure and greatly improves the system's flexibility in handling the outputs of different target algorithm combinations, ensuring that the storage structure can flexibly adapt to various situations. Regardless of how the algorithm combination changes, relevant data can be effectively stored and retrieved.

[0221] In an embodiment, referring to Figure 11 , Figure 11 is a flowchart of a method for coordinating and scheduling running of cross-device algorithms provided by an embodiment of the present application. Referring to Figure 11 , after a user completes algorithm arrangement using a visual interface generated by a Web front-end and a back-end, the user interacts with a database for business data and creates an application task. After Kubernetes obtains input information of algorithm arrangement, it extracts an input algorithm, at least one processing algorithm and a result aggregation algorithm therefrom, and pulls corresponding image packages from an image warehouse. Subsequently, Kubernetes generates an algorithm agent for each target algorithm except the result aggregation algorithm through a scheduling service, and creates an algorithm topic corresponding to the algorithm agent in a memory message queue for message publishing. In the scheduling process, the scheduling service schedules based on a YAML configuration file of each target algorithm, and selects different pods for the target algorithm according to a computing chip parameter of the target algorithm. For example, a target algorithm running in an NPU is scheduled to a node running in an NPU, and a target algorithm running in a GPU is scheduled to a node running in a GPU. Meanwhile, the scheduling service can call a target algorithm running in a third party through an algorithm calling request according to external service address information. In the scheduling process, the scheduling service updates task information and a state to the database.

[0222] In the execution of a specific application service, an algorithm agent calls a corresponding target algorithm for data processing through an algorithm calling request, and outputs algorithm processing results to a memory message queue. A result aggregation algorithm calculates output data of each target algorithm in real time through a SQL query, and stores structured data and a feature vector in the output data in a structured library and a feature library through a feature aggregation service, while storing image data in a file form. A user queries and displays task results from the structured library or the feature library, and displays picture data in a visual interface according to actual analysis requirements.

[0223] In the embodiment of the present application, the target algorithms are firstly managed in a standardized input and output manner, and then all the target algorithms are put into the image warehouse. After being put into the warehouse, the execution order of each target algorithm is arranged through a visual page, and the target algorithms are mapped to the algorithm relationship according to the algorithm metadata. In the actual operation process of the algorithm orchestration application, the scheduling service completes the algorithm splitting, and Kubernetes is used to enable each target algorithm to run on a suitable device architecture, so that the target algorithm can be deployed and executed in the most suitable computing environment according to the resource characteristics. Through precise resource matching and scheduling strategies, the utilization efficiency and application performance of computing resources are effectively improved, and efficient management of heterogeneous resources is achieved, reducing implementation costs. In addition, the interaction between the algorithm agent and the memory message queue adopts a publish-subscribe mode, which can ensure that each target algorithm is executed in the order of arrangement. Finally, the result aggregation algorithm performs an SQL-style combined query on the output data of each target algorithm based on the stream processing framework, and automatically creates a storage structure corresponding to the output data in the query template to meet the functions of complex business scenarios.

[0224] The technical solution provided by the embodiment of the present application obtains multiple target algorithms from the algorithm orchestration input information, and obtains the configuration information of each target algorithm, maps the target algorithms to the algorithm relationship in accordance with the algorithm metadata in turn, generates a configuration file based on at least the device architecture parameters of the target algorithm, schedules each target algorithm to the corresponding device architecture in Kubernetes based on the configuration file, and generates an algorithm agent for each target algorithm. For the algorithm agents other than the result aggregation algorithm, the corresponding algorithm topics are generated in the memory message queue in turn according to the metadata relationship mapping, the obtained application data is used as the starting data, and the input algorithm agent and the processing algorithm agent are used to perform data processing according to the starting data. During the data processing process, the result aggregation algorithm is used to subscribe to the output data of each algorithm topic in the memory message queue, and the query template is used to create the storage structure of all output data in real time in the database to obtain the algorithm execution result. In the embodiment of the present application, the relationship between the algorithm modules is first clarified through the algorithm metadata, the data interaction and processing flow between the algorithms are simplified, manual intervention is reduced, and automated orchestration is achieved, thereby improving orchestration efficiency. Secondly, there is no need to limit whether the device architecture of the algorithm module is consistent. The heterogeneity of the device architecture can be reflected in the configuration file according to actual needs, and combined with the scheduling capabilities of Kubernetes, it can adapt to different hardware environments and expand the application scope of algorithm orchestration so that it can meet the needs of different fields. Finally, the embodiment of the present application does not need to manually maintain the output data of each algorithm module. Instead, it subscribes to the output data of each algorithm topic in the memory message queue through the result aggregation algorithm, and automatically creates a storage structure corresponding to the output data in the query template. This automated processing method not only reduces the cost of manual maintenance, but also ensures the integrity and consistency of the data while improving the efficiency of orchestration. In addition, the automatic generation of data storage structure enables the system to adapt to different data formats and storage requirements, which not only improves the intuitiveness and efficiency of data processing, but also adapts to the scenarios of complex data streams and interactions between multiple algorithm models, further improving the flexibility of algorithm orchestration.

[0225] The embodiment of the present application also provides a cross-device algorithm coordination scheduling operation device, which can implement the above-mentioned cross-device algorithm coordination scheduling operation method, referring to Figure 12 , the device comprises:

[0226] Orchestration module 1210: used to obtain multiple target algorithms from the algorithm orchestration input information and obtain the configuration information of each target algorithm. The target algorithms are, in the order of orchestration, an input algorithm, at least one processing algorithm, and a result aggregation algorithm. The configuration information includes at least device architecture parameters and algorithm metadata.

[0227] Algorithm mapping module 1220: used to perform algorithm relationship mapping on target algorithms in sequence according to algorithm metadata.

[0228] The scheduling module 1230 is configured to generate a configuration file according to at least the device architecture parameter of the target algorithm, generate an algorithm agent of the target algorithm other than the Kubernetes result aggregation algorithm, schedule each target algorithm to a corresponding device architecture based on the configuration file, and generate a corresponding algorithm topic in the memory message queue in sequence according to the metadata relationship mapping for the algorithm agent.

[0229] The result aggregation module 1240 is configured to use the acquired application data as starting data, perform data processing according to the starting data by using the input algorithm agent and the processing algorithm agent, subscribe to output data of each algorithm topic in the memory message queue by using the result aggregation algorithm during the data processing, create a storage structure of all output data in the database in real time by using the query template, and obtain an algorithm execution result.

[0230] The specific implementation of the cross-device algorithm coordination scheduling and running apparatus of the embodiment is basically the same as the specific implementation of the cross-device algorithm coordination scheduling and running method, and will not be repeated here.

[0231] The embodiment of the present application further provides an electronic device, which comprises:

[0232] at least one memory;

[0233] at least one processor;

[0234] at least one program;

[0235] The program is stored in the memory, and the processor executes the at least one program to implement the cross-device algorithm coordination scheduling and running method provided by the embodiment of the present application. The electronic device can be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a vehicle-mounted computer, etc.

[0236] Please refer to Figure 13 , Figure 13 The hardware structure of the electronic device of another embodiment is illustrated, and the electronic device comprises:

[0237] The processor 1301 can be implemented in a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is configured to execute a related program to implement the technical solutions provided by the embodiments of the present application.

[0238] The memory 1302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1302 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1302, and the processor 1301 calls and executes the cross-device algorithm coordination scheduling operation method of the embodiments of this application;

[0239] Input / output interface 1303, used to implement information input and output;

[0240] Communication interface 1304, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);

[0241] Bus 1305 , which transmits information between various components of the device (e.g., processor 1301 , memory 1302 , input / output interface 1303 , and communication interface 1304 );

[0242] The processor 1301 , the memory 1302 , the input / output interface 1303 and the communication interface 1304 are connected to each other in communication within the device via a bus 1305 .

[0243] An embodiment of the present application also provides a storage medium, which is a storage medium that stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned cross-device algorithm coordinated scheduling operation method.

[0244] The memory, as a non-transient storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0245] The cross-device algorithm coordination scheduling running method, device, equipment and storage medium provided by the embodiments of the present application obtain a plurality of target algorithms from algorithm arrangement input information, obtain configuration information of each target algorithm, sequentially map the target algorithms according to algorithm metadata, generate a configuration file according to at least the device architecture parameters of the target algorithm, schedule each target algorithm to the corresponding device architecture based on the configuration file in Kubernetes, and generate an algorithm agent of each target algorithm. According to the metadata relationship, the algorithm agent outside the result aggregation algorithm generates a corresponding algorithm topic in the memory message queue in turn, uses the input algorithm agent and the processing algorithm agent to perform data processing according to the starting data, subscribes to the output data of each algorithm topic in the memory message queue using the result aggregation algorithm during the data processing process, and uses the query template to create a storage structure of all output data in the database in real time to obtain the algorithm execution result. In the embodiments of the present application, the relationship between algorithm modules is first determined through algorithm metadata, the data interaction and processing process between algorithms are simplified, manual intervention is reduced, and automatic arrangement is realized, thereby improving the arrangement efficiency. Secondly, without limiting whether the device architecture of the algorithm module is consistent, the heterogeneity of the device architecture can be reflected in the configuration file according to actual needs, and the scheduling capability of Kubernetes is combined to adapt to different hardware environments, expand the application range of algorithm arrangement, and meet the needs of different fields. Finally, the output data of each algorithm module does not need to be manually maintained, but the output data of each algorithm topic in the memory message queue is subscribed by the result aggregation algorithm, and the storage structure corresponding to the output data is automatically created in the query template. This automatic processing method not only reduces the manual maintenance cost, improves the arrangement efficiency, but also ensures the integrity and consistency of the data. In addition, the automatic generation of the data storage structure enables the system to adapt to different data formats and storage needs, not only improves the intuitiveness and efficiency of data processing, but also adapts to complex data flow and multi-algorithm model interaction scenarios, and further improves the flexibility of algorithm arrangement.

[0246] The embodiments described in the embodiments of the present application are used to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0247] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and can include more or fewer steps than the figures shown, or combine certain steps or different steps.

[0248] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.

[0249] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0250] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0251] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0252] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0253] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0254] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0255] If the integrated unit is implemented in the form of 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0256] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.

Claims

1. A cross-device algorithm coordination scheduling operation method, characterized in that: include: Obtaining multiple target algorithms from the algorithm arrangement input information, and obtaining configuration information of each of the target algorithms, wherein the target algorithms are, in arrangement order, an input algorithm, at least one processing algorithm, and a result aggregation algorithm, and the configuration information includes at least device architecture parameters and algorithm metadata; Performing algorithm relationship mapping on the target algorithms in turn according to the algorithm metadata; Generate a configuration file based on at least the device architecture parameters of the target algorithm, generate an algorithm proxy for the target algorithm other than the result aggregation algorithm in Kubernetes, schedule each target algorithm to a corresponding device architecture based on the configuration file, and sequentially generate corresponding algorithm topics in a memory message queue for the algorithm proxy according to the metadata relationship mapping; The acquired application data is used as the starting data, and the input algorithm agent and the processing algorithm agent are used to perform data processing according to the starting data. During the data processing process, the result aggregation algorithm is used to subscribe to the output data of each algorithm topic in the memory message queue, and the query template is used to create a storage structure of all the output data in the database in real time to obtain the algorithm execution result.

2. The cross-device algorithm coordination scheduling operation method according to claim 1, characterized in that: The method of using the result aggregation algorithm to subscribe to the output data of each algorithm topic in the memory message queue and using a query template to create a storage structure of all the output data in a database in real time includes: Generate an initial query template in SQL format; When the result aggregation algorithm obtains at least one output field corresponding to the output data according to the subscription result, for the output data, a data column corresponding to each output field is generated in the initial query template in real time, and the data information corresponding to the output field is mapped with the corresponding data column until all the output data are mapped in the database to obtain the query template.

3. The cross-device algorithm coordination scheduling operation method according to claim 1, characterized in that: The step of sequentially mapping the target algorithms to algorithm relationships according to the algorithm metadata includes: Obtaining the input structure, output structure, and input-output mapping relationship of each target algorithm from the corresponding algorithm metadata; Two target algorithms are selected one by one according to the arrangement order, and the output structure of the previous target algorithm is mapped to the input structure of the next target algorithm according to the input-output mapping relationship.

4. The cross-device algorithm coordination scheduling operation method according to claim 1, characterized in that: Generating a configuration file at least according to the device architecture parameters of the target algorithm includes: Obtaining computing chip parameters of the target algorithm from the configuration information; Generate an initial YAML template, add the computing chip parameters to the resource requirement field of the initial YAML template, and add the device architecture parameters to the hardware architecture field of the initial YAML template to obtain a YAML configuration file, and obtain the configuration file based on the YAML configuration file.

5. The cross-device algorithm coordination scheduling operation method according to claim 4 is characterized in that: Scheduling each target algorithm to a corresponding device architecture based on the configuration file in Kubernetes includes: Determining a first node label from the hardware architecture field, and selecting at least one candidate node according to the first node label; A second node label is determined from the resource requirement field, a target node is selected from the candidate nodes according to the second node label, and the target algorithm is scheduled to the target node.

6. The cross-device algorithm coordination scheduling operation method according to claim 1, characterized in that: The method of using the acquired application data as starting data and performing data processing based on the starting data using an input algorithm agent and a processing algorithm agent includes: Using the input algorithm agent to call the input algorithm to process the initial data to obtain first output data, encapsulating the first output data and publishing it to the algorithm topic corresponding to the input algorithm agent in the memory message queue; Select the processing algorithm agent one by one as the current algorithm agent, use the current algorithm agent to call the corresponding processing algorithm, obtain the current input data from the previous algorithm topic, process the current input data to obtain the second output data, and encapsulate the second output data and publish it to the algorithm topic corresponding to the current algorithm agent in the memory message queue, use the second output data as the current input data of the next current algorithm agent, and the initial value of the current input data is the first output data.

7. The cross-device algorithm coordination scheduling operation method according to claim 3, characterized in that: Before obtaining the plurality of target algorithms from the algorithm arrangement input information, the method further includes: Publishing the mirror packages of the algorithm models of the target algorithms to the mirror repository; Configuration information is generated for the mirror package in the mirror repository, and the input structure and the output structure are persistently stored. When the target algorithm is a third-party algorithm, the configuration information also includes service address information.

8. A cross-device algorithm coordination scheduling operation device, characterized in that: include: An orchestration module is configured to obtain multiple target algorithms from the algorithm orchestration input information and obtain configuration information for each target algorithm. The target algorithms are, in the order of orchestration, an input algorithm, at least one processing algorithm, and a result aggregation algorithm. The configuration information includes at least device architecture parameters and algorithm metadata. Algorithm mapping module: used to map the target algorithm to the algorithm metadata in turn; Scheduling module: used to generate a configuration file based on at least the device architecture parameters of the target algorithm, generate algorithm proxies for the target algorithms other than the result aggregation algorithm in Kubernetes, schedule each target algorithm to a corresponding device architecture based on the configuration file, and sequentially generate corresponding algorithm topics for the algorithm proxies in a memory message queue according to the metadata relationship mapping; Result aggregation module: used to use the acquired application data as the starting data, use the input algorithm agent and the processing algorithm agent to perform data processing based on the starting data, and during the data processing process, use the result aggregation algorithm to subscribe to the output data of each algorithm topic in the memory message queue, and use the query template to create a storage structure of all the output data in the database in real time to obtain the algorithm execution result.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the cross-device algorithm coordinated scheduling operation method described in any one of claims 1 to 7 when executing the computer program.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the cross-device algorithm coordination scheduling operation method according to any one of claims 1 to 7 is implemented.