File transfer method, device and storage medium of collaborative robot control system
Patent Information
- Application Number
- CN202510154016.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2026-08-21
AI Technical Summary
[0003]然而,目前的协作机器人的控制系统的文件传输存在传输效率低的问题
[0041]The aforementioned file transfer method, apparatus, computer equipment, computer-readable storage medium, and computer program product of the collaborative robot control system acquire the control script used to plan the motion path of the collaborative robot, segment the control script to obtain multiple data fragments, identify critical path segments in the motion path, and determine the transmission order of data fragments based on the critical path segments. This facilitates the priority transmission of critical path segments to ensure that critical tasks are processed first, thereby improving the response speed and reliability of the collaborative robot system. Simultaneously, it enhances the overall flexibility and adaptability of the production line. Communicating with the target collaborative robot through a long-connection communication protocol reduces the resources and time spent establishing and releasing connections. This allows for the transmission of control script data fragments to the target collaborative robot via long connections. On the one hand, it improves the transmission efficiency and response speed of the control script and reduces latency; on the other hand, it enhances the reliability and flexibility of the system, reduces the possibility of control script data loss or erroneous transmission, and improves the security of data transmission. This improves the adaptability of the collaborative robot system to scenarios with high real-time and high stability requirements, ultimately contributing to increased production efficiency.
Smart Images

Figure CN122621628A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a file transfer method, apparatus, computer equipment, computer-readable storage medium, and computer program product for a collaborative robot control system. Background Technology
[0002] Collaborative robots (Cobots) have gained widespread application in the current industrial context due to their flexibility, safety, and ease of use. Their typical control system employs a client-server (CS) architecture, where users interact with control scripts through a front-end browser, while a web server (such as Node.js) transmits control commands or scripts to the robot controller in the back-end.
[0003] However, current collaborative robot control systems suffer from low file transfer efficiency. Summary of the Invention
[0004] Therefore, it is necessary to provide a file transfer method, apparatus, computer equipment, computer-readable storage medium, and computer program product for a collaborative robot control system that can improve the transmission efficiency of collaborative robot control script files, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a file transfer method for a collaborative robot control system, comprising:
[0006] Obtain the control script, which is used to plan the motion path of the collaborative robot;
[0007] The control script is fragmented to obtain multiple data fragments;
[0008] Identify critical path segments in the motion path and determine the transmission order of multiple data fragments based on the critical path segments;
[0009] Based on the transmission order, multiple data fragments are transmitted to the target collaborative robot via a long-connection communication protocol.
[0010] In one embodiment, identifying key path segments in the motion path includes:
[0011] Divide the motion path into multiple path segments;
[0012] Obtain the task dependencies and time constraints for each path segment;
[0013] Based on the task dependencies and time constraints among multiple path segments, the importance of each path segment is evaluated, and an importance score for each path segment is obtained.
[0014] Path segments with important scores higher than a preset score threshold are identified as critical path segments.
[0015] In one embodiment, identifying key path segments in the motion path includes:
[0016] For each path segment, the priority of the path segment is determined based on whether there are obstacles in the path segment and the distance between the path segment and the target point.
[0017] Path segments with a priority higher than the preset priority level are identified as critical path segments.
[0018] In one embodiment, identifying key path segments in the motion path includes:
[0019] Taking multiple path segments as input, the trained critical path segment identification model is called to obtain the critical path segment identification result. The critical path segment identification model is trained based on path segments in historical control scripts carrying critical path segment labels.
[0020] The critical path segments are determined based on the critical path segment identification results.
[0021] In one embodiment, determining the transmission order of multiple data fragments based on critical path segments includes:
[0022] Mark the transmission priority of the data fragments corresponding to the critical path segment as high priority;
[0023] The transmission priority of data fragments corresponding to non-critical path segments is marked as low priority.
[0024] In one embodiment, the method further includes:
[0025] When multiple collaborative robots need to update their control scripts, the target collaborative robot will upload the received data fragments to a distributed cache to share the data fragments.
[0026] In one embodiment, the method further includes:
[0027] In the event of a file transfer interruption, determine the location where the file transfer was interrupted;
[0028] Starting from the point where file transfer was interrupted, the remaining untransmitted data is transferred in segments to the target collaborative robot.
[0029] In one embodiment, the method further includes, before transmitting multiple data fragments to the target collaborative robot:
[0030] Multiple data fragments are compressed.
[0031] In one embodiment, the method further includes:
[0032] Lightweighting of long-connection communication protocols includes at least one of the following: reducing the number of handshakes, reducing message frame data, compressing header data, and reducing metadata data transmission.
[0033] Secondly, this application also provides a file transfer device for a collaborative robot control system, comprising:
[0034] The script acquisition module is used to acquire control scripts, which are used to plan the motion path of the collaborative robot.
[0035] The data fragmentation module is used to fragment the control script to obtain multiple data fragments.
[0036] The transmission order determination module is used to identify critical path segments in the motion path and determine the transmission order of multiple data fragments based on the critical path segments.
[0037] The data transmission module is used to transmit multiple data fragments to the target collaborative robot based on the transmission order and through a long-connection communication protocol.
[0038] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in any of the above embodiments of the file transfer method for the collaborative robot control system.
[0039] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in any of the above embodiments of the file transfer method for the collaborative robot control system.
[0040] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above-described embodiments of the file transfer method for a collaborative robot control system.
[0041] The aforementioned file transfer method, apparatus, computer equipment, computer-readable storage medium, and computer program product of the collaborative robot control system acquire the control script used to plan the motion path of the collaborative robot, segment the control script to obtain multiple data fragments, identify critical path segments in the motion path, and determine the transmission order of data fragments based on the critical path segments. This facilitates the priority transmission of critical path segments to ensure that critical tasks are processed first, thereby improving the response speed and reliability of the collaborative robot system. Simultaneously, it enhances the overall flexibility and adaptability of the production line. Communicating with the target collaborative robot through a long-connection communication protocol reduces the resources and time spent establishing and releasing connections. This allows for the transmission of control script data fragments to the target collaborative robot via long connections. On the one hand, it improves the transmission efficiency and response speed of the control script and reduces latency; on the other hand, it enhances the reliability and flexibility of the system, reduces the possibility of control script data loss or erroneous transmission, and improves the security of data transmission. This improves the adaptability of the collaborative robot system to scenarios with high real-time and high stability requirements, ultimately contributing to increased production efficiency. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating a file transfer method for a collaborative robot control system in one embodiment.
[0044] Figure 2 This is a flowchart illustrating a file transfer method for a collaborative robot control system in another embodiment;
[0045] Figure 3 This is a flowchart illustrating the file transfer method of the collaborative robot control system in yet another embodiment;
[0046] Figure 4 This is a flowchart illustrating the file transfer method of the collaborative robot control system in another embodiment;
[0047] Figure 5 This is a schematic diagram of a distributed caching mechanism in one embodiment;
[0048] Figure 6 This is a schematic diagram illustrating the control script compression and decompression in one embodiment;
[0049] Figure 7This is a structural block diagram of the file transfer device of a collaborative robot control system in one embodiment;
[0050] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] In one exemplary embodiment, such as Figure 1 As shown, a file transfer method for a collaborative robot control system is provided, including the following steps S100 to S400. Wherein:
[0053] S100, Obtain the control script. The control script is used to plan the motion path of the collaborative robot.
[0054] The control script can include motion paths, motion parameters, and task logic.
[0055] In practical applications, operators can upload control scripts through a browser interface on a terminal.
[0056] S200 performs fragmentation processing on the control script to obtain multiple data fragments.
[0057] In practical applications, control scripts can be fragmented into fixed-size data blocks (e.g., 1MB each) to accommodate network transmission requirements. Each fragment is then assigned a unique identifier to ensure proper file reassembly at the receiving end.
[0058] S300 identifies critical path segments in the motion path and determines the transmission order of multiple data fragments based on the critical path segments.
[0059] Among them, the critical path segment can be the path segment that has a significant impact on the task completion time of the collaborative robot or the stability of the system.
[0060] In practical applications, identifying critical path segments in a motion path can be achieved by first dividing the dynamic path planning script into multiple path segments, i.e., multiple independent sub-tasks. The path segments that have the greatest impact on task completion events are identified as critical path segments, such as the positions or key points the robot needs to reach first. Alternatively, path segments with numerous dependencies can be identified as critical path segments. For example, in a dynamic path planning script, the execution of tasks corresponding to other path segments depends on the completion of tasks corresponding to that path segment; examples include initial poses, important intermediate poses, or paths. The transmission order of multiple data slices is determined based on the critical path segments. This can involve prioritizing the transmission of data slices corresponding to critical path segments, ensuring that critical path segment data slices are transmitted to the target collaborative robot first, thereby prioritizing the completion of critical tasks.
[0061] The S400, based on transmission sequence, transmits multiple data fragments to the target collaborative robot via a long-connection communication protocol.
[0062] In this context, a long-lived connection is a connection established between a client and a server that is not immediately closed after a single communication but is maintained for a period of time, allowing multiple requests / responses to occur on the same connection. The connection remains active after the request ends until it is explicitly closed or times out. The target collaborative robot can be arbitrarily specified according to actual needs; for example, the target collaborative robot could be the first collaborative robot on the production line, or it could be a collaborative robot with good data processing performance.
[0063] In practical applications, to improve file transfer efficiency and reduce latency, a long-connection communication protocol can be used to establish a communication connection between the front-end and the collaborative robot controller. Long-connection communication protocols can include WebSocket and HTTP / 2 (Hypertext Transfer Protocol version 2). Encrypted long-connection protocols, such as SSL-encrypted WebSocket connections, can also be used to ensure data is transmitted directly from the browser to the robot controller. After establishing the long connection, multiple data fragments are transmitted to the target robot on the flexible production line according to the transmission order of the data fragments. This allows the control script to be transmitted directly to the target collaborative robot controller, reducing the possibility of latency caused by data relay via a server.
[0064] In the file transfer method of the aforementioned collaborative robot control system, the control script used to plan the motion path of the collaborative robot is obtained, and the control script is fragmented to obtain multiple data fragments. Critical path segments in the motion path are identified, and the transmission order of the data fragments is determined based on these critical path segments. This prioritizes the transmission of critical path segments, allowing critical tasks to be processed first, thereby improving the response speed and reliability of the collaborative robot system. Simultaneously, it enhances the overall flexibility and adaptability of the production line. Communicating with the target collaborative robot via a long-connection communication protocol reduces the resources and time spent establishing and releasing connections. This allows for the transmission of control script data fragments to the target collaborative robot via a long connection. On one hand, it improves the transmission efficiency and response speed of the control script and reduces latency; on the other hand, it enhances the reliability and flexibility of the system, reduces the possibility of control script data loss or erroneous transmission, and improves the security of data transmission. This enhances the adaptability of the collaborative robot system to scenarios with high real-time and high stability requirements, ultimately improving production efficiency.
[0065] To improve transmission efficiency, critical path segments are identified based on task decomposition using control scripts. In one exemplary embodiment, such as... Figure 2 As shown, the key path segments identified in the motion path include S312 to S318. Wherein:
[0066] S312 divides the motion path into multiple path segments.
[0067] In practical applications, the motion path can be divided into multiple independent path segments (subtasks) based on the functional modules or task flow of the control script. Each path segment represents a set of related operation instructions. Alternatively, path segments can be divided based on parameters such as the distance to the target point and the distribution of obstacles, such as from the starting point to the obstacle avoidance point -> through obstacles -> reaching the target point.
[0068] S314, obtain the task dependency and time constraint information for each path segment.
[0069] Task dependencies can include the order and dependencies between subtasks, ensuring the robot executes tasks in the correct sequence. For example, subtask B can only be executed after subtask A is completed, or subtask A and subtask C must be performed simultaneously. Time constraints can include time limits for subtask execution, ensuring the robot completes specific tasks within a specified time.
[0070] In practical applications, the order and dependencies of path segments, as well as the constraints between executions, can be obtained from the control script.
[0071] S316. Based on the task dependencies and time constraints between multiple path segments, assess the importance of each path segment and obtain an importance score for each path segment.
[0072] In practical applications, a Directed Acyclic Graph (DAG) or a task dependency tree can be constructed based on the task dependencies between path segments. Each path segment is considered a node, and directed edges are created between nodes according to the task dependencies. The task dependency score of the path segment corresponding to a node is determined based on the out-degree and in-degree of the node; generally, higher out-degree and in-degree values result in a higher task dependency score. A time sensitivity score is determined based on the time constraints of the path segments; for example, the ratio of the expected shortest completion time of the path segment to the task execution time limit is used as the time sensitivity score. Weights are assigned to the task dependency score and the time sensitivity score, and a weighted sum is used to obtain the importance score of the path segment.
[0073] S318, identify path segments with important scores higher than the preset score threshold as critical path segments.
[0074] In practical applications, a scoring threshold can be set based on prior knowledge to filter critical path segments, such as setting the scoring threshold to 80 points. The importance score of each path segment is compared with the preset scoring threshold, and path segments with importance scores higher than 80 points are identified as critical path segments.
[0075] In this embodiment, based on the task decomposition of the control script, the importance of path segments is evaluated through task dependencies and time constraint information, and critical path segments are identified, which helps to optimize the fragment transmission order and improve the production line operating efficiency.
[0076] To improve transmission efficiency, critical path segments are identified based on path planning algorithms. In one exemplary embodiment, such as... Figure 3 As shown, the key path segments identified in the motion path include S322 to S324. Wherein:
[0077] S322, For each path segment, determine the priority of the path segment based on whether there are obstacles in the path segment and the distance between the path segment and the target point.
[0078] The priority of a path segment indicates its importance. The target point can be the endpoint of a series of tasks in a control script.
[0079] In practical applications, heuristic rules can be defined, employing search algorithms such as A* or Dijkstra's algorithm to determine the priority of path segments. Specifically, defining heuristic rules can include obstacle presence assessment and distance assessment. Obstacle presence assessment can classify path segments as having no obstacles or having obstacles; the presence of obstacles increases path complexity, thus assigning higher scores to path segments with obstacles. Distance assessment includes the distance of each path segment from the target point, determining the straight-line distance from the endpoint of each path segment to the target point; the closer the path segment is to the target point, the higher its score. The weights of obstacle presence assessment and distance assessment are determined based on the actual application scenario, and the priority of the path segments is determined by a weighted summation.
[0080] S324, identify path segments with a priority higher than the preset priority level as critical path segments.
[0081] In practical applications, priority levels are pre-set based on experience (e.g., 0.7), and road segments with higher priority levels are identified as critical path segments.
[0082] In this embodiment, the importance of each path segment is systematically evaluated based on whether there are obstacles in the path segment and the distance between the path segment and the target point, and critical path segments are identified, which helps to optimize the fragmentation transmission order and reduce potential conflicts and delays.
[0083] To improve transmission efficiency, critical path segments are identified using a data-driven approach. In one exemplary embodiment, such as... Figure 4 As shown, the key path segments identified in the motion path include S332 to S334. Wherein:
[0084] S332 takes multiple path segments as input, calls the trained critical path segment recognition model, and obtains the critical path segment recognition result. The critical path segment recognition model is trained based on path segments in historical control scripts carrying critical path segment labels.
[0085] S334, Determine the critical path segment based on the critical path segment identification results.
[0086] The critical path identification results can include critical path segments and non-critical path segments.
[0087] In practical applications, an initial critical path recognition model can be constructed based on a neural network (such as a convolutional neural network or a recurrent neural network). Historical control scripts are obtained, and path features such as speed requirements, obstacle information, and path length are extracted from the historical control scripts. The path segments in the historical control scripts are labeled, indicating which are critical (marked as "critical path segments") and which are not (marked as "non-critical path segments"). The initial critical path recognition model is iteratively trained using the path segments from the historical control scripts labeled as critical path segments until a preset training termination condition is met. This preset termination condition could be that the loss function value continuously falls below a preset loss threshold within a preset number of iterations, at which point training of the initial critical path recognition model stops, resulting in a trained critical path recognition model. Multiple path segments are then input into the trained critical path recognition model to obtain the critical path recognition results.
[0088] Critical path segments are selected from the critical path segment identification results.
[0089] In this embodiment, the key path segments in the motion path are identified by data-driven training models, which improves the efficiency of identifying key path segments and is beneficial to improving the transmission efficiency of control scripts.
[0090] In an exemplary embodiment, the transmission order of multiple data fragments is determined based on the critical path segment, including steps S342 to S344. Wherein:
[0091] S342 marks the transmission priority of the data fragments corresponding to the critical path segment as high priority.
[0092] S344 marks the transmission priority of data fragments corresponding to non-critical path segments as low priority.
[0093] In practical applications, different transmission priorities are assigned to data fragments based on whether the path segment to which the data fragment belongs is a critical path segment. Specifically, the transmission priority of data fragments corresponding to critical path segments is marked as high priority, and the transmission priority of data fragments corresponding to non-critical path segments is marked as low priority, and corresponding priority labels are assigned to the data fragments.
[0094] In this embodiment, by identifying the critical path segments, the transmission priority of data fragments is determined, which is beneficial to prioritize the transmission of data fragments corresponding to the critical path segments so that critical tasks can be processed first. This helps to improve data transmission efficiency, reduce data latency, and improve the production efficiency of collaborative robots.
[0095] In other embodiments, multiple data fragments are transmitted to the target collaborative robot via a long-connection communication protocol based on the transmission order. This can be achieved by controlling the execution order of the data fragment transmission threads using condition variables. For example, on a flexible production line, for control scripts used for dynamic path planning, data fragments marked with high transmission priority are transmitted to the target collaborative robot first, while data fragments with low transmission priority can be transmitted asynchronously in the background. The priority scheduling process for data fragment transmission is as follows: high-priority tasks are scheduled first, and low-priority tasks can be delayed. If two data fragments have the same priority, the fragment requested earlier is processed first. For fragments with the same priority and similar request times, the smaller fragment is processed first. That is, the scheduling strategy from high to low is: priority -> transmission request time -> fragment size, to reduce transmission latency.
[0096] To meet the need for transferring large files between multiple collaborative robots, in an exemplary embodiment, the file transfer method of the collaborative robot control system further includes S500. Wherein:
[0097] In the S500, when multiple collaborative robots need to update their control scripts, the target collaborative robot uploads the received data fragments to a distributed cache to share the data fragments.
[0098] In practical applications, a distributed caching mechanism is designed. Local Redis instances of collaborative robots form a Redis cluster, allowing data replication and sharding across multiple nodes. Data shards of the control script are transmitted to the target collaborative robot via a long-connection protocol. Once the target collaborative robot successfully receives the complete control script, it uploads the received control script data shards to its cache. Other robots that need the same file to update their control scripts directly access the cached copy of the robot through the internal network, thereby reducing the impact of repeated transmissions on transmission efficiency. For example, as shown... Figure 5 As shown, on a flexible production line, five collaborative robots need to simultaneously update a 500MB (megabyte) control script. The script is uploaded directly to the Redis cache of the target collaborative robot (Robot A) via WebSocket. Other robots read the file from the cache system to complete the update, improving transmission efficiency by 300%. This achieves high efficiency, reliability, and support for simultaneous access by multiple machines, while optimizing the cache lifecycle and strategy.
[0099] In this embodiment, by designing a distributed caching mechanism for the collaborative robot system, the efficiency of updating scripts for multiple collaborative robots can be improved.
[0100] To improve the reliability of data transmission, in an exemplary embodiment, the file transfer method of the collaborative robot control system further includes steps S620 to S640:
[0101] S620 determines the location where file transfer was interrupted in the event of an interruption.
[0102] S640, starting from the point where file transfer was interrupted, transmits the remaining untransmitted data in segments to the target collaborative robot.
[0103] In practical applications, when file transfer is interrupted due to network problems or other reasons, the target collaborative robot detects the connection loss or timeout and sends a resume request to the front-end server. The front-end server then uses the data fragments that the target collaborative robot has already received and their corresponding offsets (positions in the control script) in the resume request to determine the file transfer interruption position, verify whether the offset is correct, and, after successful verification, continue to transfer the remaining untransmitted data fragments to the target collaborative robot in the order of transmission, starting from the file transfer interruption position.
[0104] In this embodiment, the reliability of file transfer is improved by resuming interrupted downloads, which helps to improve the integrity of data transmission.
[0105] To improve data transmission efficiency, in an exemplary embodiment, the file transfer method of the collaborative robot control system further includes S700 before transmitting multiple data fragments to the target collaborative robot:
[0106] The S700 performs compression processing on multiple data fragments.
[0107] In this embodiment, the data fragments can be compressed according to either the Zstandard (ZSTD compression algorithm) or the Snappy compression algorithm. For example... Figure 6 As shown, during the transmission of the control script, the script content is compressed, reducing its size to 40% of its original size. After the target collaborative robot receives the data fragments from the control script, the target collaborative robot controller uses a lightweight decompression module to perform real-time decoding and load the data into the task queue.
[0108] In this embodiment, by compressing the data fragments before data fragmentation in the transmission control script, the amount of data can be significantly reduced, the data transmission time can be shortened, and the data transmission efficiency can be improved.
[0109] In one exemplary embodiment, the file transfer method of the collaborative robot control system further includes S800:
[0110] S800 performs lightweight processing on long-connection communication protocols. Lightweight processing includes at least one of the following: reducing the number of handshakes, reducing the data in message frames, compressing header data, and reducing metadata data transmission.
[0111] Among them, long-connection communication protocols can include the WebSocket protocol and the HTTP / 2 (Hypertext Transfer Protocol version 2) protocol.
[0112] In practical applications, lightweight measures to reduce the number of handshakes can be implemented as follows: If the persistent connection communication protocol used is HTTP / 2, reducing the number of handshakes can be achieved by using TLS 1.3 (Transport Layer Security version 1.3), thus reducing the number of round trips during the handshake process. Compared to TLS 1.2, the TLS 1.3 handshake process is reduced from two round trips (2-RTT) to one round trip (1-RTT), significantly reducing latency. If the persistent connection communication protocol used is WebSocket, reducing the number of handshakes can be achieved by setting longer heartbeat intervals and timeouts to maintain connection activity, reduce unnecessary reconnections due to network issues, and decrease the frequency of re-handshakes caused by connection interruptions.
[0113] To reduce the data weight of message frames, the following approach can be taken: simplify the fields in the long-connection communication protocol based on the specific data communication needs of the collaborative robot (such as real-time performance and state control). Specifically, if the long-connection communication protocol used is HTTP / 2, reducing the data weight of message frames can involve removing unnecessary fields from the standard HTTP header, such as User-Agent and Accept, while retaining only the necessary state control-related fields. If the long-connection communication protocol used is WebSocket, reducing the data weight of message frames can involve customizing the message frame format, retaining only the necessary fields related to the collaborative robot's state control, such as action commands and sensor data.
[0114] For lightweight processing of compressed header data, if the persistent connection communication protocol used is HTTP / 2, lightweight processing of compressed header data can be achieved by using the HPACK (HTTP / 2 Header Compression for HTTP) algorithm to dynamically compress the header data, avoiding the repeated transmission of the same header fields. If the persistent connection communication protocol used is WebSocket, unnecessary header fields can be removed by customizing a lightweight frame structure, such as completely eliminating the need for standard HTTP headers.
[0115] Lightweight processing that reduces metadata data transmission can be achieved by using fixed data or field lengths to avoid transmitting metadata such as field names, thereby reducing protocol overhead.
[0116] In other implementations, lightweight processing of long-connection communication protocols may also include lightweight session recovery processing, which utilizes Session Resumption or TLS Tickets features to quickly rebuild the TLS session upon reconnection after a disconnection without requiring a full handshake process.
[0117] In this embodiment, considering the problem of low efficiency in large file transmission in the collaborative robot control system, a long-connection communication protocol is adopted for file transmission. Lightweight modifications are made according to the characteristics of the collaborative robot control system to reduce unnecessary handshake operations and header information during transmission, thereby reducing protocol overhead and improving the file transmission efficiency of the collaborative robot control system.
[0118] In other embodiments, the data transmission method of the collaborative robot control system also includes optimizing the transmission of content via long-lived connection protocols: using WebSocket or HTTP / 2 binary frames instead of traditional text transmission (such as JSON, XML) to reduce data volume. For data with frequent state updates, incremental data (DeltaUpdates) is transmitted instead of complete data to reduce bandwidth consumption. For example, only the change values of sensor data are transmitted.
[0119] To provide a clearer explanation of the file transfer method for the collaborative robot control system provided in this application, a specific embodiment is described below, which includes the following steps:
[0120] S1 performs lightweight processing on the long-connection communication protocol. Lightweight processing includes at least one of the following: reducing the number of handshakes, reducing the data in message frames, compressing header data, and reducing the amount of metadata transmitted.
[0121] S2, Obtain the control script. The control script is used to plan the motion path of the collaborative robot.
[0122] S3 performs fragmentation on the control script to obtain multiple data fragments, and then compresses these multiple data fragments.
[0123] S4 divides the motion path into multiple path segments.
[0124] S5. Obtain the task dependency and time constraint information of each path segment. Based on the task dependency and time constraint information between multiple path segments, evaluate the importance of each path segment, obtain the importance score of each path segment, and identify the path segments with importance scores higher than the preset score threshold as critical path segments.
[0125] S6 marks the transmission priority of data fragments corresponding to critical path segments as high priority and the transmission priority of data fragments corresponding to non-critical path segments as low priority.
[0126] S7, based on the transmission order, transmits multiple data fragments to the target collaborative robot via a long-connection communication protocol.
[0127] S8: When multiple collaborative robots need to update their control scripts, the target collaborative robot will upload the received data fragments to a distributed cache to share the data fragments.
[0128] S9: In the event of a file transfer interruption, determine the location of the interruption and, starting from that location, transfer the remaining untransmitted data in segments to the target collaborative robot.
[0129] On the one hand, the communication protocol design is optimized based on the characteristics of collaborative robots, enabling the adjustment of long-connection communication protocols to meet real-time and security requirements and achieve efficient data transmission. On the other hand, a distributed caching mechanism is designed to allow multiple collaborative robots to share cached data, reducing network load and improving the efficiency of multi-robot collaboration. Furthermore, the transmission priority of control scripts is dynamically adjusted through critical path segments, which is conducive to the priority completion of critical tasks. Moreover, by combining compression and decompression, files are compressed before transmission and decompressed in real time after transmission, significantly reducing the amount of data and transmission time. Finally, a direct transmission architecture between the front end and the robot controller is constructed to avoid multiple hops and improve real-time performance.
[0130] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0131] In one exemplary embodiment, such as Figure 7 As shown, a file transfer device 600 for a collaborative robot control system is provided, comprising: a script acquisition module 610, a fragment processing module 620, a transmission order determination module 630, and a data transmission module 640, wherein:
[0132] The script acquisition module 610 is used to acquire the control script, which is used to plan the motion path of the collaborative robot.
[0133] The fragmentation processing module 620 is used to fragment the control script to obtain multiple data fragments;
[0134] The transmission order determination module 630 is used to identify critical path segments in the motion path and determine the transmission order of multiple data fragments based on the critical path segments.
[0135] The data transmission module 640 is used to transmit multiple data fragments to the target collaborative robot based on the transmission order and through a long connection communication protocol.
[0136] In one exemplary embodiment, the transmission order determination module 630 is further configured to divide the motion path into multiple path segments;
[0137] Obtain the task dependency and time constraint information for each path segment; assess the importance of each path segment based on the task dependency and time constraint information between multiple path segments, and obtain the importance score for each path segment; identify path segments with importance scores higher than the preset score threshold as critical path segments.
[0138] In an exemplary embodiment, the transmission order determination module 630 is further configured to determine the priority of each path segment based on whether there are obstacles in the path segment and the distance between the path segment and the target point.
[0139] Path segments with a priority higher than the preset priority level are identified as critical path segments.
[0140] In an exemplary embodiment, the transmission order determination module 630 is further configured to take multiple path segments as input, call a trained critical path segment identification model to obtain critical path segment identification results, wherein the critical path segment identification model is trained based on path segments in historical control scripts carrying critical path segment labels; and determine critical path segments based on the critical path segment identification results.
[0141] In an exemplary embodiment, the transmission order determination module 630 is further configured to mark the transmission priority of the data fragments corresponding to the critical path segment as high priority; and mark the transmission priority of the data fragments corresponding to the non-critical path segment as low priority.
[0142] In an exemplary embodiment, the data transmission device 600 of the collaborative robot system also includes a data sharing module 650, which is used to control the target collaborative robot to upload the received data fragments to a distributed cache to share the data fragments when multiple collaborative robots need to update their control scripts.
[0143] In an exemplary embodiment, the file transfer device 600 of the collaborative robot control system further includes a data transfer module 640, which is also used to determine the file transfer interruption location in the event of a file transfer interruption; and to transfer the remaining untransmitted data in segments to the target collaborative robot starting from the file transfer interruption location.
[0144] In one exemplary embodiment, the file transfer device 600 of the collaborative robot control system further includes a data compression module 660 for compressing multiple data fragments.
[0145] In one exemplary embodiment, the file transfer device 600 of the collaborative robot control system further includes a communication protocol optimization module 670 for lightweighting the long-connection communication protocol. The lightweighting process includes at least one of reducing the number of handshakes, reducing the data in message frames, compressing header data, and reducing the amount of metadata transmitted.
[0146] Each module in the file transfer device 600 of the aforementioned collaborative robot control system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0147] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When executed by the processor, the computer program implements a file transfer method for a collaborative robot control system.
[0148] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0149] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in any of the above embodiments of the file transfer method for a collaborative robot control system.
[0150] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps in any of the above embodiments of the file transfer method for the collaborative robot control system.
[0151] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the file transfer method for a collaborative robot control system.
[0152] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0153] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0154] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0155] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A file transfer method for a collaborative robot control system, characterized in that, The method includes: Obtain the control script, which is used to plan the motion path of the collaborative robot; The control script is fragmented to obtain multiple data fragments; Identify key path segments in the motion path, and determine the transmission order of multiple data fragments based on the key path segments; Based on the transmission order, multiple data fragments are transmitted to the target collaborative robot via a long-connection communication protocol.
2. The method according to claim 1, characterized in that, The identification of key path segments in the motion path includes: The motion path is divided into multiple path segments; Obtain the task dependency and time constraint information for each of the aforementioned path segments; Based on the task dependencies and time constraints among the multiple path segments, the importance of each path segment is evaluated to obtain an importance score for each path segment. Path segments with important scores higher than a preset score threshold are identified as critical path segments.
3. The method according to claim 2, characterized in that, The identification of key path segments in the motion path includes: For each path segment, the priority of the path segment is determined based on whether there are obstacles in the path segment and the distance between the path segment and the target point; Path segments with a priority higher than the preset priority level are identified as critical path segments.
4. The method according to claim 2, characterized in that, The identification of key path segments in the motion path includes: Using multiple path segments as input, a trained critical path segment identification model is invoked to obtain critical path segment identification results. The critical path segment identification model is trained based on path segments in historical control scripts carrying critical path segment labels. The critical path segments are determined based on the critical path segment identification results.
5. The method according to any one of claims 1 to 4, characterized in that, Determining the transmission order of the multiple data fragments based on the critical path segment includes: The transmission priority of the data fragments corresponding to the critical path segment is marked as high priority; The transmission priority of data fragments corresponding to non-critical path segments is marked as low priority.
6. The method according to claim 2, characterized in that, The method further includes: When multiple collaborative robots need to update the control script, the target collaborative robot is controlled to upload the received data fragments to a distributed cache to share the data fragments.
7. The method according to claim 6, characterized in that, The method further includes: In the event of a file transfer interruption, determine the location where the file transfer was interrupted; Starting from the point where the file transfer was interrupted, the remaining untransmitted data is transmitted in segments to the target collaborative robot.
8. The method according to claim 7, characterized in that, Before transmitting the multiple data fragments to the target collaborative robot, the method further includes: The data fragments are compressed.
9. The method according to claim 8, characterized in that, The method further includes: The long-connection communication protocol is lightweighted, and the lightweighting process includes at least one of reducing the number of handshakes, reducing the data in message frames, compressing header data, and reducing the amount of metadata transmitted.
10. A file transfer device for a collaborative robot control system, characterized in that, The device includes: The script acquisition module is used to acquire the control script, which is used to plan the motion path of the collaborative robot. The data sharding module is used to shard the control script to obtain multiple data shards. A transmission order determination module is used to identify key path segments in the motion path and determine the transmission order of multiple data fragments based on the key path segments; The data transmission module is used to transmit multiple data fragments to the target collaborative robot based on the transmission order via a long-connection communication protocol.