Weld joint tracking program operation resource allocation method, device and equipment and storage medium

By allocating containers and optimizing resources for the process nodes of the weld seam tracking program, the problems of insufficient isolation of the operating environment and rigid resource allocation were solved, achieving stable and efficient multi-instance operation and improving welding accuracy and production efficiency.

CN121636166APending Publication Date: 2026-03-10TANGSHAN COLLEGE +3
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

The weld seam tracking program suffers from problems such as insufficient resource isolation, rigid resource allocation, poor environmental consistency, and low scheduling and management efficiency in the operating environment, resulting in unstable experimental results and high deployment costs.

Method used

By acquiring multiple process nodes, arranging them into a process table according to data dependencies, and allocating containers for each process node, including runtime resources and data channel resources, the allocation of container resources is optimized, enabling independent operation and dynamic resource management between containers.

Benefits of technology

The weld seam tracking program was able to run stably in multiple instances and scenarios, improving resource utilization and operational efficiency, ensuring that experimental results were consistent with actual application environments, and enhancing the reliability and robustness of the algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121636166A_ABST
    Figure CN121636166A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of welding seam tracking program operation environment optimization, in particular to a welding seam tracking program operation resource allocation method and device, equipment and a storage medium. Arranging the plurality of flow nodes into a flow table according to a dependency relationship of the flow nodes on input data and / or output data; distributing a container for each flow node according to the flow table; and finally, optimizing the resources of the containers according to the running states of the plurality of containers. According to the resource allocation method, the containers are mutually independent, resources are strictly isolated, running of other containers is not affected by collapse of a certain container or overflow of a memory, stable running of a welding seam tracking algorithm under multiple instances and multiple scenes is achieved, the resource utilization rate and running efficiency are remarkably improved, and it is ensured that an experimental result is consistent with an actual application environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of weld tracking program running environment optimization, and in particular to a weld tracking program running resource allocation method and device, equipment and a storage medium. BACKGROUND

[0002] The weld tracking program is the core component of the welding automation system, and its core function is to detect the weld position deviation in real time, dynamically adjust the welding torch path, and ensure the welding precision and quality.

[0003] In the research and development and deployment process based on the weld tracking program, there are significant shortcomings in algorithm running environment and resource management: Insufficient running environment isolation: existing weld tracking program experiments are mostly run on shared physical machines or virtual machines, and memory conflicts and CPU resource contention often occur between different algorithm instances, resulting in unstable experimental results and difficulty in ensuring the independence of each experiment.

[0004] Resource allocation is rigid: in the traditional environment, resource allocation is usually a fixed value (such as a specified number of CPU cores and memory size), which cannot be dynamically adjusted according to the real-time computing load and data size of the algorithm nodes, resulting in insufficient resources and performance degradation for some nodes, and idle resources and waste for some nodes.

[0005] Poor environment consistency: the running environment for algorithm development, experiments and actual deployment is quite different (the operating system version and dependent library version are inconsistent), which often leads to difficulty in reproducing experimental results in the production environment, increasing the debugging and deployment cost.

[0006] Low scheduling and management efficiency: different algorithm experiments lack a unified containerized running platform, and the data interaction and scheduling logic between nodes need to be manually configured, making it difficult to achieve automated scheduling and fault isolation, affecting the overall running efficiency and stability.

[0007] Therefore, it is necessary to develop and design a weld tracking program running resource allocation method. SUMMARY

[0008] The present application provides a weld tracking program running resource allocation method, device, equipment and storage medium, which solves the problem of large differences in the running environment of the weld tracking program in the prior art, increasing the debugging and deployment cost.

[0009] In a first aspect, the present application provides a weld tracking program running resource allocation method, comprising: Obtaining a plurality of process nodes, wherein the weld tracking program tracks the weld state according to the plurality of process nodes; According to a dependency relationship of input data and / or output data of the flow nodes, the plurality of flow nodes are arranged into a flow table; According to the flow table, a container is allocated for each flow node, wherein the container comprises at least one of the following: a running resource and a data channel resource; According to a running state of the plurality of containers, the resources of the containers are optimized.

[0010] In a possible implementation, the step of arranging the plurality of flow nodes into a flow table according to a dependency relationship of input data and / or output data of the flow nodes comprises: For each flow node, the following steps are performed respectively: obtaining a post-flow node, a target flow node and a target data index, wherein the post-flow node is later than the current flow node in the execution timing, the target data index is a data index when the current flow node is started, and the target flow node is a node for updating data when the current flow node is started; linking a start index of the current flow node with the target data index and the target flow node; extracting a minimum running parameter of the post-flow node, wherein the minimum running parameter is minimum data required for starting the post-flow node; according to the minimum running parameter, finding an index of corresponding output data from an output data table of the current flow node as a minimum running index; taking the minimum running index as a next connection point.

[0011] In a possible implementation, if there are a plurality of post-flow nodes, it is analyzed whether there is a dependency between the plurality of post-flow nodes; For a node that depends on other post-flow nodes, an execution order is added for the post-flow node according to the dependency relationship; For a node that does not depend on other post-flow nodes, a parallel running identifier is set.

[0012] In a possible implementation, the flow table comprises a plurality of links, and each link comprises a start index, a plurality of target flow nodes and a plurality of target data indexes. The step of allocating a container for each flow node according to the flow table comprises: for each link, extracting the plurality of target flow nodes as a plurality of reference nodes and extracting a flow node corresponding to the start index as a start node; for each start node, selecting a flow node with the lowest level from the plurality of reference nodes as a dependent node of the start node; adding start nodes corresponding to the same dependent node into a parallel running node array; For each parallel running node array, containers are allocated to multiple nodes in the parallel running node array according to the total resource amount.

[0013] In a possible implementation, the allocating containers to multiple nodes in the parallel running node array according to the total resource amount includes: allocating memory to each node according to input data and / or output data of the node; allocating virtual core number to each node according to the total CPU core number.

[0014] In a possible implementation, each container corresponds to a process node, and multiple process nodes are divided into multiple parallel running node arrays according to a running time sequence, and the optimizing resources of the containers according to running states of the multiple containers includes: For each parallel running node array, the following steps are performed respectively: extracting, for each process node, a number of context switches in a running process as a switching number; increasing resource input amount of a container of a first process node, wherein the first process node is a process node with the largest switching number in the parallel running node array; decreasing resource input amount of a container of a second process node, wherein the second process node is a process node with the smallest switching number in the parallel running node array.

[0015] In a possible implementation, if a ratio of the switching number of the first process node to the switching number of the second process node is greater than a switching ratio, the first process node is bound to a physical core.

[0016] In a second aspect, an embodiment of the present application provides a welding seam tracking program running resource allocation apparatus for implementing the welding seam tracking program running resource allocation method in the first aspect or any possible implementation of the first aspect, and the welding seam tracking program running resource allocation apparatus includes: a process node acquisition module configured to acquire multiple process nodes, wherein a welding seam tracking program tracks a welding seam state according to the multiple process nodes; a process table arrangement module configured to arrange the multiple process nodes into a process table according to a dependency relationship of input data and / or output data of the process nodes; a container allocation module configured to allocate containers to each process node according to the process table, wherein each container includes at least one of the following: a running resource and a data channel resource; and, a running optimization module configured to optimize resources of the containers according to running states of the multiple containers.

[0017] In a third aspect, an electronic device is provided, which includes a memory and a processor, wherein the memory stores a computer program capable of running on the processor, and the processor implements the steps of the method according to the first aspect or any possible implementation of the first aspect when executing the computer program.

[0018] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program implements the steps of the method according to the first aspect or any possible implementation of the first aspect when executed by a processor.

[0019] Compared with the prior art, the embodiments of the present application have the following beneficial effects: The embodiments of the present application disclose a weld tracking program running resource allocation method, and the weld tracking program running resource allocation method embodiment thereof first acquires a plurality of flow nodes, wherein the weld tracking program tracks the weld state according to the plurality of flow nodes; then, according to the dependency relationship of the input data and / or the output data of the flow nodes, the plurality of flow nodes are arranged into a flow table; then, according to the flow table, a container is allocated for each flow node, wherein each container includes at least one of the following: running resources and data channel resources; finally, the resources of the container are optimized according to the running state of the plurality of containers. The resource allocation method of the present application, the containers are independent of each other, the resources are strictly isolated, and the collapse or memory overflow of a certain container will not affect the running of other containers. The present application realizes the stable running of the weld tracking algorithm in multiple instances and multiple scenes, significantly improves the resource utilization and running efficiency, and ensures that the experimental results are consistent with the actual application environment. Through the dynamic resource allocation and environment isolation mechanism, the reliability and robustness of the algorithm running are improved, thereby supporting faster algorithm iteration and optimization, and finally improving the welding precision and production efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0021] Figure 1 is a flow chart of the weld tracking program running resource allocation method provided by the embodiments of the present application; Figure 2 is a flow node topology graph provided by the embodiments of the present application; Figure 3 is a functional block diagram of the weld tracking program running resource allocation device provided by the embodiments of the present application; Figure 4 is a functional block diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0022] In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular sequences of steps, techniques, etc., in order to provide a thorough understanding of the present embodiments. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, and apparatus are omitted so as not to obscure the description of the present application with unnecessary detail.

[0023] In order to make the objects, technical solutions and advantages of the present application clearer, the following will be described in conjunction with the accompanying drawings and specific embodiments.

[0024] The following will be described in detail for the embodiments of the present application, which are implemented on the premise of the technical solutions of the present application, and detailed implementation manners and specific operation processes are given, but the protection scope of the present application is not limited to the following embodiments.

[0025] Figure 1 A flowchart of a resource allocation method for a weld tracking program provided by an embodiment of the present application is shown in FIG. 1.

[0026] As shown in FIG. 1, a flowchart of an implementation of a resource allocation method for a weld tracking program provided by an embodiment of the present application is shown, and the following will be described in detail: Figure 1 In step 101, a plurality of flow nodes are acquired, wherein the weld tracking program tracks the weld state according to the plurality of flow nodes. In step 102, the plurality of flow nodes are arranged into a flow table according to the dependency relationship of the flow nodes on input data and / or output data.

[0027] In some embodiments, the arranging of the plurality of flow nodes into a flow table according to the dependency relationship of the flow nodes on input data and / or output data comprises:

[0028] For each flow node, the following steps are respectively performed: Acquiring a post-flow node, a target flow node, and a target data index, wherein the post-flow node is respectively later than the current flow node in execution timing, the target data index is a data index when the current flow node is started, and the target flow node is a node for updating the data when the current flow node is started; Linking the start index of the current flow node with the target data index and the target flow node; ​extracting a minimum running parameter of the post-process node, wherein the minimum running parameter is a minimum data required for starting the post-process node; finding an index of corresponding output data from an output data table of the current process node as a minimum running index according to the minimum running parameter; setting the minimum running index as a next connection point.

[0029] In some embodiments, if there are multiple post-process nodes, it is analyzed whether there is a dependency between the multiple post-process nodes; For a node that depends on other post-process nodes, an execution order is added to the post-process node according to the dependency relationship; For a node that does not depend on other post-process nodes, a parallel running identifier is set.

[0030] Exemplarily, the application proposes a containerized isolated running and dynamic resource allocation method for a weld tracking program, and the key technical point is an automatic mapping mechanism of a program flow and a logical container, that is, each program flow constructed by a user corresponds to an independent logical execution container. The container not only has the ability of running environment isolation, but also can realize dynamic allocation of resources such as CPU, memory, bandwidth, to ensure the stability and efficiency of multiple experiment parallel running.

[0031] In order to achieve the above purpose, the application divides the program into multiple process nodes according to the execution process of the program. In one scenario, these process nodes are arranged into directed acyclic graphs. Actually, these directed acyclic graphs not only express the execution order of the process nodes, but also express the data dependency relationship between the process nodes.

[0032] The application allocates container resources based on process nodes. In order to reasonably allocate container resources, the application arranges process nodes into a process table. Actually, the process table is composed of multiple links. The link includes a starting index of the current process node, a target data index of the current process node, and a process node that the current process node depends on: a target process node. Actually, the target process node is a process node that executes before the current process node.

[0033] In arranging the process table, the application obtains the data index of the current process node when starting: the target data index, and the process node to which the updated data index points: the target process node, in other words, the target process node is the process node that updates the starting data of the current process node. Then the starting index of the current process node and the target data index and the target process node are constructed into a link.

[0034] The usage mode of the link is that when the target flow node starts to execute and reaches the target data index, the flow node pointed by the start index is sent a command and the target data index is passed, indicating that the data pointed by the target data index has been updated.

[0035] The advantage is that the two flow nodes are closely connected, and the flow node pointed by the start index can be started without waiting for the target flow node to finish execution. Moreover, since the start data is passed through the index, the amount of index data is smaller than the amount of data itself, reducing the data replication process and making the data transmission faster. In addition, the size and location of the data space pointed by the index are variable, providing the necessary conditions for the flexible configuration of the target flow node.

[0036] In addition, the current flow node also extracts the post-flow node, that is, the flow node dependent on the current flow node, extracts its minimum running parameter, and then finds the corresponding data index from the output data table of the current flow node according to the minimum running parameter. This data index may be part of the link generated according to the post-flow node.

[0037] Through the above steps, we get a flow table constructed by multiple links.

[0038] In some scenarios, there are multiple post-flow nodes. If these multiple post-flow nodes do not depend on other post-flow nodes, these flow nodes are set with parallel running identifiers. If they depend on other post-flow nodes, the execution order is added to indicate that they do not have the condition to run in parallel with other post-flow nodes.

[0039] In step 103, containers are allocated for each flow node according to the flow table, wherein each container includes at least one of the following: running resources and data channel resources.

[0040] In some embodiments, the flow table includes multiple links, and each link includes a start index, multiple target flow nodes, and multiple target data indexes. The containers are allocated for each flow node according to the flow table, including: For each link, extract multiple target flow nodes as multiple reference nodes, and extract the flow node corresponding to the start index as a start node; For each start node, select the flow node with the lowest level from the multiple reference nodes as the dependent node of the start node; Add the start nodes corresponding to the same dependent node to the parallel running node array; For each parallel running node array, allocate containers for the multiple nodes in the parallel running node array according to the total amount of resources.

[0041] In some embodiments, the allocating containers for the plurality of nodes in the parallel running node array according to the total resource amount comprises: allocating memory for each node according to input data and / or output data of the node; allocating virtual core number for each node according to total CPU core number.

[0042] Exemplarily, the application allocates containers for each process node by link.

[0043] As we know, a part of process nodes can run in parallel to improve the execution efficiency and achieve better real-time indicators. Based on this, we analyze the process nodes that can be executed in parallel in the aspect of container allocation, allocate containers for the parallel process nodes according to the total resource allocation (weld tracking program running resource allocation), and accelerate the efficiency of process execution.

[0044] Therefore, in the aspect of container allocation, the application extracts dependent target process nodes from each link, which are taken as reference nodes, and takes the process node corresponding to the start index as a start node.

[0045] In fact, the plurality of reference nodes are nodes that the start node depends on, and we find the process node with the lowest level from the plurality of reference nodes as the dependent node of the start node.

[0046] We add the start nodes corresponding to the same dependent node to the running node array, and finally allocate containers for the nodes in the running node array according to the total resource amount.

[0047] As Figure 2 shown, the figure shows a process node topology diagram, and a plurality of process nodes 201 are connected to each other. The arrow source process node 201 is the dependent node of the arrow pointing process node 201. For the fourth process node 201 in the figure, the sources are the second process node 201 and the third process node 201. Although the fourth process node 201 and the third process node 201 commonly depend on the second process node 201, the fourth process node 201 needs to depend on the third process node 201 at the same time, and therefore, the lowest dependent level process node of the fourth process node 201 is the third process node 201. Therefore, the fourth process node 201 and the fifth process node 201 are taken as parallel process nodes and added to the running node array.

[0048] In the aspect of container allocation for parallel running nodes, the application allocates memory according to the input and output data of the node, and allocates virtual core number for each process node according to the total CPU core number. For example, a node is set to have a quota of 200 ms and a period of 100 ms, which means that the container can use at most 2 logical cores.

[0049] In step 104, the resources of the containers are optimized according to the running states of the containers.

[0050] In some embodiments, each container corresponds to a process node, and the process nodes are divided into a plurality of parallel running node arrays according to the timing of running. The optimization of the resources of the containers according to the running states of the containers comprises: For each parallel running node array, the following steps are performed respectively: For each process node, the number of context switches during running is extracted as the number of switches; The resource input of the containers of the first process node is increased, wherein the first process node is the process node with the largest number of switches in the parallel running node array; The resource input of the containers of the second process node is reduced, wherein the second process node is the process node with the smallest number of switches in the parallel running node array.

[0051] In some embodiments, if the ratio of the number of switches of the first process node to the number of switches of the second process node is greater than a switch ratio, the physical core is bound to the first process node.

[0052] Exemplarily, in terms of container optimization, the application reallocates resources according to the running results. Specifically, for the parallel process nodes, the best running effect can be achieved only when they are executed simultaneously.

[0053] However, in practice, due to the different characteristics of the parallel process nodes, a part of the process nodes are executed first, which can be seen from the number of context switches during running. For the process nodes executed first, the number of context switches is usually less. For the process nodes executed last, the number of context switches is more. Therefore, the application reduces the resource allocation amount, such as the number of allocated logical cores, for the nodes with less number of switches. For the nodes with more number of switches, the resource allocation amount, such as the number of allocated logical cores, is increased.

[0054] In addition, there are more extreme cases where the number of switches of a part of the process nodes is significantly greater than that of other nodes. At this time, the physical core is bound to such nodes to reduce the overhead of cross-core migration and context switch and improve the execution efficiency.

[0055] The embodiment of the weld tracking program running resource allocation method provided by the application first acquires a plurality of process nodes, wherein the weld tracking program tracks the weld state according to the plurality of process nodes; then arranges the plurality of process nodes into a process table according to the dependency relationship of the process nodes on input data and / or output data; then allocates a container for each process node according to the process table, wherein each container includes at least one of the following: running resources and data channel resources; and finally optimizes the resources of the container according to the running state of the plurality of containers. The resource allocation method provided by the application is independent between containers, the resources are strictly isolated, and the collapse or memory overflow of a certain container will not affect the running of other containers. The application realizes the stable running of the weld tracking algorithm in multiple instances and multiple scenarios, significantly improves the resource utilization and running efficiency, and ensures that the experimental results are consistent with the actual application environment. Through the dynamic resource allocation and environment isolation mechanism, the reliability and robustness of the algorithm running are improved, thereby supporting faster algorithm iteration and optimization, and finally improving the welding precision and production efficiency.

[0056] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the application.

[0057] The following is the device embodiment of the application. For details not described in detail, please refer to the corresponding method embodiments described above.

[0058] Figure 3 is the functional block diagram of the weld tracking program running resource allocation device provided by the embodiment of the application, referring to Figure 3 The weld tracking program running resource allocation device includes a process node acquisition module 301, a process table arrangement module 302, a container allocation module 303, and a running optimization module 304, wherein: The process node acquisition module 301 is used to acquire a plurality of process nodes, wherein the weld tracking program tracks the weld state according to the plurality of process nodes; The process table arrangement module 302 is used to arrange the plurality of process nodes into a process table according to the dependency relationship of the process nodes on input data and / or output data; The container allocation module 303 is used to allocate a container for each process node according to the process table, wherein each container includes at least one of the following: running resources and data channel resources; The running optimization module 304 is used to optimize the resources of the container according to the running state of the plurality of containers.

[0059] Figure 4 is the functional block diagram of the electronic device provided by the embodiment of the application. As Figure 4As shown, the electronic device 4 of the embodiment includes a processor 400 and a memory 401, and the memory 401 stores a computer program 402 which can be run on the processor 400. The processor 400 implements the steps in the above-described various weld tracking program running resource allocation methods and embodiments when the computer program 402 is executed, for example Figure 1 The steps 101 to 104 are shown.

[0060] For example, the computer program 402 can be divided into one or more modules / units, which are stored in the memory 401 and executed by the processor 400 to complete the present application.

[0061] The electronic device 4 can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The electronic device 4 can include, but is not limited to, the processor 400 and the memory 401. Those skilled in the art can understand that Figure 4 The electronic device 4 is only an example and does not constitute a limitation on the electronic device 4, which can include more or fewer components than shown, or combine certain components, or different components, for example, the electronic device 4 can also include an input / output device, a network access device, a bus, etc.

[0062] The processor 400 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0063] The memory 401 can be an internal storage unit of the electronic device 4, for example, a hard disk or a memory of the electronic device 4. The memory 401 can also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the electronic device 4. Further, the memory 401 can also include both the internal storage unit and the external storage device of the electronic device 4. The memory 401 is used to store the computer program 402 and other programs and data required by the electronic device 4. The memory 401 can also be used to temporarily store data that has been output or is to be output.

[0064] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit, and the integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0065] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can refer to the relevant description of other embodiments.

[0066] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0067] In the embodiments of the present application, it should be understood that the disclosed apparatus / equipment and method can be implemented in other manners. For example, the described apparatus / equipment embodiments are merely schematic. For example, the division of the modules or units is merely logical function division. There can be another division manner for the actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0068] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

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

[0070] If the integrated module / 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, all or part of the flow of the above-mentioned embodiment methods can be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the processor executes the computer program, the steps of the above-mentioned various method and device embodiments can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable file or some intermediate form. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.

[0071] The above-described embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalent replacements; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A method for allocating resources to a weld tracking program run, characterized by, The method comprises the following steps: acquiring a plurality of process nodes, wherein a weld tracking program tracks a weld state according to the plurality of process nodes; arranging the plurality of process nodes into a process table according to a dependency relationship of input data and / or output data of the process nodes; allocating a container for each process node according to the process table, wherein each container comprises at least one of the following: a running resource and a data channel resource; optimizing the resources of the containers according to running states of the plurality of containers.

2. The weld-trace program execution resource allocation method according to claim 1, characterized by, The step of arranging the plurality of process nodes into a process table according to a dependency relationship of input data and / or output data of the process nodes comprises: for each process node, the following steps are performed respectively: acquiring a post-process node, a target process node and a target data index, wherein the post-process node is later than the current process node in the execution timing, the target data index is a data index when the current process node is started, and the target process node is a process node for updating the data when the current process node is started; linking a start index of the current process node with the target data index and the target process node; extracting minimum running parameters of the post-process node, wherein the minimum running parameters are minimum data required for starting the post-process node; finding an index of corresponding output data from an output data table of the current process node as minimum running index according to the minimum running parameters; taking the minimum running index as a next connection point.

3. The weld-trace program execution resource allocation method of claim 2, wherein, If there are a plurality of post-process nodes, it is analyzed whether there is a dependency between the plurality of post-process nodes; for a node that depends on other post-process nodes, an execution order is added for the post-process node according to the dependency relationship; for a node that does not depend on other post-process nodes, a parallel running identifier is set.

4. The weld-trace program execution resource allocation method of claim 1, wherein, The process table comprises a plurality of links, and each link comprises a start index, a plurality of target process nodes and a plurality of target data indexes. The step of allocating a container for each process node according to the process table comprises: for each link, a plurality of target process nodes are extracted as a plurality of reference nodes, and a process node corresponding to the start index is extracted as a start node; for each start node, a process node with the lowest level is selected from the plurality of reference nodes as a dependent node of the start node; start nodes corresponding to the same dependent node are added to a parallel running node array; for each parallel running node array, containers are allocated for a plurality of nodes in the parallel running node array according to a total resource amount.

5. The weld-trace program execution resource allocation method according to claim 4, characterized by, The step of allocating containers for a plurality of nodes in each parallel running node array according to a total resource amount comprises: allocating memory for each node according to input data and / or output data of the node; allocating a virtual core number for each node according to a total CPU core number.

6. The weld-trace program execution resource allocation method according to any one of claims 1 to 5, characterized by, Each container corresponds to a process node, and a plurality of process nodes are divided into a plurality of parallel running node arrays according to running timing. The step of optimizing the resources of the containers according to running states of the plurality of containers comprises: for each parallel running node array, the following steps are performed respectively: for each process node, the number of context switches in a running process is extracted as a switching number; adding resource input of a container of a first flow node, wherein the first flow node is a flow node with the most switching times in the array of parallel running nodes; decreasing resource input of a container of a second flow node, wherein the second flow node is a flow node with the least switching times in the array of parallel running nodes.

7. The weld-trace program execution resource allocation method according to claim 6, wherein, binding a physical core to the first flow node if a ratio of the switching times of the first flow node to the switching times of the second flow node is greater than a switching ratio.

8. A weld trace program run resource allocation apparatus characterized by, The apparatus for implementing the method for allocating resources of a weld tracking program running according to any one of claims 1-7, the apparatus comprising: a flow node obtaining module, configured to obtain a plurality of flow nodes, wherein a weld tracking program tracks a weld state according to the plurality of flow nodes; a flow table compiling module, configured to compile the plurality of flow nodes into a flow table according to a dependency relationship of the flow nodes on input data and / or output data; a container allocating module, configured to allocate a container to each flow node according to the flow table, wherein each container comprises at least one of a running resource and a data channel resource; and a running optimizing module, configured to optimize resources of the containers according to running states of the containers. The processor executes the computer program to implement the steps of the method according to any one of claims 1-7.

9. An electronic device comprising a memory and a processor, said memory having stored therein a computer program operable on said processor, characterized in that, The computer program is executed by the processor to implement the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. ​