Robot data transmission method, robot and medium
By configuring a virtual local area network (VLAN) in the robot control system for network isolation and dynamically adjusting transmission priority and bandwidth based on load data, the problem of network chaos in the robot control system is solved, achieving efficient data transmission and secure network resource management.
Patent Information
- Application Number
- CN202610430322.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-02
- Publication Date
- 2026-05-29
AI Technical Summary
In robot control systems, using a single physical interface to configure multiple IP addresses leads to confusion in the MAC address table and ARP protocol entries of the switch, resulting in packet loss and forwarding errors. Furthermore, existing solutions increase hardware costs and system complexity.
Configure multiple virtual LANs for network isolation, adjust data transmission priority and bandwidth by acquiring load data, dynamically allocate network resources, and achieve flexible allocation of virtual LAN priority and bandwidth.
It effectively avoids network latency and packet loss, improves the real-time performance and reliability of robot control, reduces bandwidth waste, maintains network security and flexibility, and lowers hardware costs.
Smart Images

Figure CN122120222A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, specifically to robot data transmission methods, robots, and media. Background Technology
[0002] In robot control systems of related technologies, especially in multi-device systems that integrate chassis, robotic arms, host computers and central control systems, a scheme is adopted to configure multiple Internet Protocol (IP) addresses on a single physical interface to achieve communication between the central control system and devices in different subnets.
[0003] In robot control systems of related technologies, switches may learn the same hardware address (Media Access Control Address, or MAC address), which is the physical address of the central controller's network card, corresponding to multiple IP addresses. Furthermore, they may receive data frames originating from the same MAC address from different ports, causing confusion in the switch's MAC address table and Address Resolution Protocol (ARP) entries. This leads to incorrect forwarding decisions and packet loss. Summary of the Invention
[0004] This application provides a robot data transmission method, a robot, and a medium to solve the problem of communication anomalies when multiple IP addresses are configured using a single physical interface.
[0005] In a first aspect, this application provides a robot data transmission method, the method comprising: configuring multiple virtual local area networks (VLANs) and performing network isolation for robot data transmission based on the VLANs; acquiring load data of the VLANs; adjusting the data transmission priority of the VLANs based on a comparison result between the load data and a preset load threshold; adjusting the bandwidth of the VLANs based on the adjusted data transmission priority and the load data; and performing data transmission based on the adjusted data transmission priority and the adjusted bandwidth.
[0006] In one optional implementation, adjusting the data transmission priority of the virtual local area network (VLAN) based on the comparison result of the load data and a preset load threshold includes: if the first load data is greater than the first preset load threshold and continues for a first preset duration, increasing the transmission priority of the VLAN corresponding to the first load data; if the second load data is less than the second preset load threshold and continues for a second preset duration, decreasing the transmission priority of the VLAN corresponding to the second load data, wherein the first preset load threshold is greater than the second preset load threshold.
[0007] In one optional implementation, adjusting the bandwidth of the virtual local area network (VLAN) based on the adjusted data transmission priority and the load data includes: determining the call bandwidth of the target VLAN if the priority of the target VLAN is lower than a first priority threshold, the bandwidth utilization of the target VLAN is less than a first preset bandwidth threshold and continues for a third preset duration; determining the increased bandwidth of VLANs with a priority higher than or equal to a second priority threshold within the range of the call bandwidth values; and determining the reduced bandwidth of the target VLAN based on the increased bandwidth.
[0008] In one optional implementation, the plurality of virtual local area networks (VLANs) include a first VLAN, a second VLAN, and a third VLAN. The network isolation of robot data transmission based on the VLANs includes: data transmission between the robot's controller and the robot's chassis based on the first VLAN; data transmission between the controller and the robot's robotic arm based on the second VLAN; and data transmission between the controller and the host computer based on the third VLAN.
[0009] In one optional implementation, the data transmission between the controller and the robot's robotic arm based on the second virtual local area network (VLAN) includes: data transmission between the controller and the first robotic arm based on a first port of the second VLAN, and data transmission between the controller and the second robotic arm based on a second port of the second VLAN, wherein the robot's robotic arm includes the first robotic arm and the second robotic arm; acquiring detection data of the first robotic arm and the second robotic arm; if no response data is acquired for a preset number of consecutive times, determining that the robotic arm that has not acquired response data is offline, disabling the port corresponding to the offline robotic arm, and increasing the bandwidth corresponding to the offline robotic arm to the active robotic arm.
[0010] In an optional implementation, the method further includes: creating virtual bridge containers in the controller corresponding to the chassis, the robotic arm, and the host computer, respectively; and creating peer virtual bridge containers in the chassis, the robotic arm, and the host computer, respectively, corresponding to the virtual bridge containers, wherein the virtual bridge containers and the peer virtual bridge containers are connected through a virtual channel.
[0011] In one optional implementation, the method further includes: accessing the chassis and the robotic arm based on the controller; responding to the access request from the controller based on the chassis or the robotic arm; prohibiting the chassis or the robotic arm from accessing other virtual local area networks; accessing the controller based on the host computer; and prohibiting the host computer from accessing the ports of the chassis or the robotic arm.
[0012] In one optional implementation, a virtual interface corresponding to the virtual local area network is created in the controller, the switch port connected to the controller is configured as a trunk port, and the switch port connected to the chassis, the robotic arm, and the host computer is configured as an access port. The network isolation of robot data transmission based on the virtual local area network further includes: forwarding the data sent by the controller based on the virtual interface corresponding to the data sent by the controller, the trunk port, and the access port corresponding to the data sent by the controller.
[0013] Secondly, this application provides a robot, the robot comprising: a switch for configuring multiple virtual local area networks (VLANs) and transmitting robot data based on the VLANs; a controller for acquiring load data of the VLANs, adjusting the data transmission priority of the VLANs based on a comparison of the load data with a preset load threshold, and adjusting the bandwidth of the VLANs based on the adjusted data transmission priority and the load data; and a VLAN for transmitting data based on the adjusted data transmission priority and the adjusted bandwidth.
[0014] Thirdly, this application provides an electronic device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the robot data transmission method of the first aspect or any corresponding embodiment described above.
[0015] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the robot data transmission method of the first aspect or any corresponding embodiment described above.
[0016] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the robot data transmission method described in the first aspect or any corresponding embodiment thereof.
[0017] The robot data transmission method, robot, and medium provided in this embodiment, based on load perception of each virtual local area network (VLAN) in the robot, determine the network congestion status and prioritize the transmission of VLANs in a congested state, allowing them to be forwarded first. This effectively avoids delays and packet loss due to network congestion, ensuring the real-time performance of robot control responses and the reliability of action execution. Simultaneously, based on load and priority, bandwidth is dynamically allocated, reusing the bandwidth resources of idle VLANs to high-load VLANs. This breaks down the resource barriers of static VLAN bandwidth allocation, reduces bandwidth waste, and improves the overall utilization efficiency of physical bandwidth without increasing hardware costs. It also effectively reduces the probability of network congestion, lowers message transmission delay and packet loss rate, and improves the smoothness and stability of the robot's overall network communication. Furthermore, under the VLAN-isolated network architecture, dynamically adjusting priority and bandwidth allocation rules retains the security advantages of VLAN isolation, such as anti-interference and anti-unauthorized access, while also enabling adaptive scheduling of network resources, balancing network security and resource utilization flexibility. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This diagram illustrates a system in the related technology that uses a single physical interface to configure multiple Internet Protocol addresses. Figure 2 This diagram illustrates a system for adding a universal serial bus interface to a central controller in related technologies. Figure 3 A flowchart of a robot data transmission method according to an embodiment of this application is shown; Figure 4 A schematic diagram of the component modules of the robot provided in this application is shown; Figure 5 This application provides a schematic diagram illustrating the communication connection between the controller and the robotic arm. Figure 6 A schematic diagram of the component modules of the robot provided in this application is shown; Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] It is understood that before using the technical solutions disclosed in the various embodiments of this application, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this application in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0022] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0023] Figure 1 This diagram illustrates a system in related technologies that uses a single physical interface to configure multiple Internet Protocol (IP) addresses. For example... Figure 1 As shown, in related technologies, the central controller 11 uses a single physical interface 12 to configure multiple IP addresses from different network segments, including Internet Protocol address 13 (10.7.5.198) for the first network segment, Internet Protocol address 14 (192.168.2.100) for the second network segment, and Internet Protocol address 15 (192.168.112.60) for the third network segment. The switch 16 acts as a network aggregation node, connecting the central controller 11 to the chassis 17, the robotic arm 18, and the host computer 19 via the network, enabling the central controller 11 to simultaneously configure multiple IP addresses belonging to the chassis network, the robotic arm control network, and the host computer network using a single network interface card.
[0024] Figure 1Besides the problems of ARP protocol confusion and MAC address table flipping, the communication schemes in the related technologies also suffer from issues such as broadcast storm propagation, lack of quality of service guarantees, and source address selection ambiguity. Specifically, the ARP protocol is a network transmission protocol that finds data link layer addresses by resolving network layer addresses. Broadcast traffic (such as ARP requests) from all service subnets propagates in the same physical broadcast domain. Interference and competition between broadcast traffic from different services exacerbate network congestion and lead to broadcast storm propagation. High-real-time robotic arm control messages share the same channel with ordinary data traffic, lacking priority scheduling. This can cause control messages to be delayed or dropped, leading to serious safety issues such as robotic arm control failure and unexpected power-offs, and lacking quality of service guarantees. In multi-IP scenarios such as Linux, the kernel's source address selection algorithm may not be suitable for high-real-time control scenarios, causing messages to be sent from unexpected IPs, increasing communication uncertainty and leading to source address selection ambiguity.
[0025] To address the aforementioned issues, related technologies employ a solution of adding a Universal Serial Bus (USB) network card to the central controller for direct connection. Figure 2 This diagram illustrates a system schematic for adding a universal serial bus interface to a central controller, as shown in related technologies. Figure 2 As shown, a Universal Serial Bus (USB) interface 21 is added to the central controller 11. The physical interface 12 includes: an Internet Protocol (IP) address 13 for a first network segment used for communication with the chassis 17, and an IP address 14 for a second network segment used for communication with the robotic arm 18. The USB interface 21 includes an IP address 15 for a third network segment used for communication with the host computer 19. This solution is not a product-grade solution and will increase hardware costs and system complexity.
[0026] According to an embodiment of this application, a robot data transmission method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Also, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0027] This embodiment provides a robot data transmission method, which can be used in a robot control system. The robot control system includes: a controller, a switch, a robotic arm, a chassis, and a host computer. Figure 3 A flowchart of a robot data transmission method according to an embodiment of this application is shown, such as... Figure 3 As shown, the process includes the following steps: Step S301: Configure multiple virtual local area networks (VLANs) and perform network isolation for robot data transmission based on the VLANs.
[0028] A Virtual Local Area Network (VLAN) is a logical segmentation of network users connected to a Layer 2 switch port. It logically divides a physical local area network (LAN) into multiple broadcast domains, allowing devices to form independent logical networks based on function, department, or application requirements without being limited by physical location. A VLAN can be implemented on a single switch or across multiple switches. VLANs can group network users based on their location, role, department, or the applications and protocols they use. Multiple VLANs can be created based on robot services or components. For example, based on different service types of the robot control system, multiple independent VLANs can be created, including at least a first VLAN for communication between the controller and the chassis, a second VLAN for communication between the controller and the robotic arm, and a third VLAN for communication between the controller and the host computer. The controller can be a central controller.
[0029] In this step, the different components of the robot are divided into different virtual local area networks (VLANs), which isolates the network traffic of different components and achieves broadcast domain isolation, thus avoiding mutual interference.
[0030] Step S302: Obtain the load data of the virtual local area network (VLAN), adjust the data transmission priority of the VLAN based on the comparison result between the load data and the preset load threshold, and adjust the bandwidth of the VLAN based on the adjusted data transmission priority and the load data.
[0031] Load data serves as a quantitative indicator characterizing the busy and operational status of each VLAN, including but not limited to bandwidth utilization, data packet forwarding latency, and packet loss rate. Preset load thresholds can be pre-configured load limits used to determine whether a VLAN is under high load, normal load, or idle, serving as the basis for triggering priority and bandwidth adjustments. Data transmission priority can be the traffic forwarding level assigned to different VLANs. Higher priority VLAN packets are scheduled and forwarded more preferentially in the switch, ensuring the transmission sequence of critical services. In the switch or controller network configuration, the VLAN where the robotic arm resides can be configured with a higher priority to prioritize the forwarding of its control packets, reducing communication latency and jitter, and meeting the high real-time robot control requirements. Bandwidth can be the upper limit of the amount of data that each VLAN can transmit per unit of time.
[0032] In this step, the robot's controller can continuously collect real-time load data for each virtual local area network (VLAN). For example, port statistics for each VLAN can be obtained from the switch ports using Simple Network Management Protocol (SNMP) or Network Configuration Protocol (NETCONF).
[0033] The collected load data is compared with a preset threshold to determine the load status of the virtual local area network (VLAN). If the load data is greater than the preset threshold, the VLAN corresponding to that load data is considered to be under high load; if the load data is less than or equal to the preset threshold, the VLAN is considered to be under low load. High-load VLANs are given higher transmission priority, while idle or low-load VLANs are given lower priority to ensure the forwarding sequence of core services. As the number of robot components increases, the number of preset load thresholds can be configured to be multiple, and the values of the preset load thresholds can increase or decrease in a gradient, correspondingly dividing the data transmission priority into multiple levels.
[0034] Specifically, when the bandwidth utilization of the virtual local area network (VLAN) where the robotic arm is located consistently exceeds 80%, the data transmission or traffic priority of the VLAN can be temporarily increased through the Quality of Service (QoS) policy of the switch. QoS policy refers to a set of rules configured on a switch or network device to classify, label, prioritize, and allocate bandwidth for different types of network traffic, thereby prioritizing the transmission quality of critical services during network congestion.
[0035] Based on the comparison results between load data and preset load thresholds, virtual local area networks (VLANs) determined to be in a low-load or idle state can have their bandwidth reduced, and the reduced bandwidth can be added to VLANs in a high-load state. For example, if the bandwidth utilization of the VLAN containing the robotic arm consistently exceeds 80%, while the VLAN containing the host computer is idle or low-load, a portion of the bandwidth pool from the host computer's VLAN can be allocated to the VLAN containing the robotic arm via a switch. Once the load on the robotic arm's VLAN decreases, the original allocation scheme can be restored.
[0036] Step S303: Data transmission is performed based on the adjusted data transmission priority and adjusted bandwidth.
[0037] In this step, the switch forwards data from each component of the robot according to the dynamically updated transmission priority and bandwidth allocation strategy.
[0038] The robot data transmission method provided in this embodiment, based on load perception of each virtual local area network (VLAN) in the robot, determines the network congestion status and prioritizes the transmission of VLANs in a congested state, allowing them to be forwarded first. This effectively avoids delays and packet loss due to network congestion, ensuring the real-time performance of robot control responses and the reliability of action execution. Simultaneously, by dynamically allocating bandwidth based on load and priority, idle VLAN bandwidth resources are reused for high-load VLANs. This breaks down the resource barriers of static VLAN bandwidth allocation, reduces bandwidth waste, and improves the overall utilization efficiency of physical bandwidth without increasing hardware costs. It also effectively reduces the probability of network congestion, lowers message transmission delay and packet loss rate, and enhances the smoothness and stability of the robot's overall network communication. Furthermore, under the VLAN-isolated network architecture, dynamically adjusting priority and bandwidth allocation rules retains the security advantages of VLAN isolation, such as anti-interference and anti-unauthorized access, while enabling adaptive scheduling of network resources, balancing network security and resource utilization flexibility.
[0039] In some optional implementations, the data transmission priority of the virtual local area network (VLAN) is adjusted based on the comparison result of the load data and the preset load threshold, including: if the first load data is greater than the first preset load threshold and continues for a first preset duration, the transmission priority of the VLAN corresponding to the first load data is increased; if the second load data is less than the second preset load threshold and continues for a second preset duration, the transmission priority of the VLAN corresponding to the second load data is decreased, wherein the first preset load threshold is greater than the second preset load threshold.
[0040] The first load data and the second load data are quantitative data used to characterize the network busy level of a virtual LAN. The first preset load threshold can be a pre-set high load judgment threshold (e.g., bandwidth utilization of 80%), used to determine whether the virtual LAN is experiencing network congestion or resource shortages. The second preset load threshold can be a pre-set low load or idle judgment threshold (e.g., bandwidth utilization of 30%), used to determine whether a normal virtual LAN is in an idle state. The first preset duration is used to characterize the continuous judgment time window of the virtual LAN's high load state, and the second preset duration is used to characterize the continuous judgment time window of the virtual LAN's low load state. The first preset duration and the second preset duration can be set to the same value or different values; specifically, they can be configured to two to five seconds, etc.
[0041] In this embodiment, if a certain load data exceeds a first preset load threshold, and the duration of this state exceeds a first preset duration, the virtual local area network (VLAN) corresponding to the load data is determined to be in a high-load state. The data transmission priority of this VLAN is increased to ensure priority forwarding of its services. If a certain load data is less than a second preset load threshold, and the duration of this state exceeds a second preset duration, the VLAN corresponding to the load data is determined to be in a low-load state. The data transmission priority of this VLAN is reduced, freeing up scheduling resources for services that require it more.
[0042] In this way, priority adjustment must meet both the preset load threshold and the duration, and will not frequently increase or decrease priority due to a sudden increase or decrease in traffic at a certain moment. This can avoid frequent fluctuations in network scheduling strategy and ensure the stability of switch forwarding behavior and robot communication link.
[0043] In some optional implementations, the bandwidth of the virtual local area network (VLAN) is adjusted based on the adjusted data transmission priority and load data, including: determining the call bandwidth of the target VLAN if the priority of the target VLAN is lower than a first priority threshold, the bandwidth utilization of the target VLAN is less than a first preset bandwidth threshold and continues for a third preset duration; within the numerical range of the call bandwidth, determining the increased bandwidth of VLANs with a priority higher than or equal to a second priority threshold, and determining the reduced bandwidth of the target VLAN based on the increased bandwidth.
[0044] The target VLAN is used to represent VLANs with low priority and continuously idle bandwidth. The first priority threshold can be a pre-defined priority boundary to distinguish between low-priority VLANs that can offer bandwidth and high-priority VLANs that require guaranteed bandwidth. Bandwidth utilization represents the proportion of bandwidth currently used by the target VLAN to its total allocated bandwidth, reflecting the degree of bandwidth idleness. The first preset bandwidth threshold is used to determine the critical value for low-load or idle bandwidth utilization, for example, 30%. Below this value, it indicates that the VLAN has a large amount of idle bandwidth available for use. The third preset duration is configured in the same way as the first preset duration. The bandwidth that can be safely borrowed from the target VLAN is the upper limit of bandwidth, which can be the target VLAN's total bandwidth minus its minimum guaranteed bandwidth. The second priority threshold is used to filter high-priority VLANs that need bandwidth expansion. Increased bandwidth represents the amount of bandwidth allocated from the target VLAN to high-priority VLANs. The reduced bandwidth is used to characterize the bandwidth value lent by the target VLAN, which is equal to the increased bandwidth of the high-priority VLAN, thus enabling flexible bandwidth transfer between VLANs.
[0045] In this embodiment, if the target VLAN meets the following conditions: its priority is lower than the first priority threshold, its bandwidth utilization is less than the first preset bandwidth threshold, and this condition persists for a third preset duration, the maximum bandwidth that the target VLAN can safely lend out is calculated, without affecting its own basic services, to form a range of bandwidth values. Within this range, the lendable bandwidth is allocated to high-priority, high-load VLANs with a priority higher than or equal to the second priority threshold, as an increase in their bandwidth. Simultaneously, the bandwidth limit of the target VLAN is reduced, thus completing the elastic reallocation of bandwidth resources.
[0046] In this way, bandwidth is allocated from low-priority and idle target VLANs to high-priority VLANs, and the bandwidth flows in a closed loop within the system. This fully reuses idle bandwidth resources, avoids bandwidth waste, and significantly improves the overall network bandwidth utilization efficiency of the robot without increasing hardware bandwidth costs. At the same time, high-priority components can obtain additional bandwidth support, which can effectively alleviate congestion, reduce transmission latency and packet loss rate, and ensure the real-time performance and operational reliability of robot control commands.
[0047] In some optional implementations, multiple virtual local area networks (VLANs) include a first VLAN, a second VLAN, and a third VLAN. Network isolation for robot data transmission is performed based on these VLANs, including: data transmission between the robot's controller and the robot's chassis based on the first VLAN; data transmission between the controller and the robot's robotic arm based on the second VLAN; and data transmission between the controller and a host computer based on the third VLAN.
[0048] Figure 4 A schematic diagram of the component modules of the robot provided in this application is shown, such as... Figure 4 As shown, based on the different business types of the robot control system, multiple independent virtual local area networks are planned, including at least: a first virtual local area network 42, a second virtual local area network 43, and a third virtual local area network 44. Virtual network interfaces corresponding to the first virtual local area network 42, the second virtual local area network 43, and the third virtual local area network 44 can be created on a single physical interface of the controller 41, and the IP address of the corresponding business subnet can be configured for each virtual interface.
[0049] A first VLAN, a second VLAN, and a third VLAN can be created in the switch. The switch port connecting to controller 41, i.e., the first switch port 161, is configured as a trunk port, allowing all VLAN communication data frames to pass through. The switch ports connecting to chassis 17 (second switch port 162), connecting to robotic arm 18 (third switch port 163), and connecting to host computer 19 (fourth switch port 164) are configured as access ports. By assigning the second switch port to the first VLAN, the third switch port to the second VLAN, and the fourth switch port to the third VLAN, physical port-level service isolation can be achieved.
[0050] Specifically, data transmission between the controller and the chassis is conducted through the first virtual local area network (VLAN). After data is sent from the controller, it is forwarded to the chassis via the first and second switch ports of the switch. Data feedback from the chassis returns along the same path and does not enter the second or third VLANs. Similarly, data transmission between the controller and the robotic arm is conducted through the second VLAN. Data flows only between the controller and the robotic arm, completely isolated from the first and third VLANs. Data transmission between the controller and the host computer is conducted through the third VLAN. Data flows only between the controller and the host computer and does not touch the communication links between the chassis and the robotic arm.
[0051] In this way, by logically isolating different service traffic at Layer 2 through virtual LANs, the forwarding errors and packet loss caused by ARP obfuscation and MAC address table flipping are completely resolved. This improves network packet loss and enhances control stability. Tests show that after adopting this solution, the robotic arm control connection is stable, with no power-down anomalies during long-term testing, and the packet loss rate is significantly reduced. In addition, each virtual LAN constitutes an independent broadcast domain, effectively isolating broadcast traffic between the chassis, robotic arm, and host computer subnets, eliminating mutual interference, reducing network load, and suppressing broadcast storms. Furthermore, this solution involves a core software configuration change, with the main hardware cost being only the replacement of a consumer-grade switch that supports virtual LAN management. There is no need to add physical network cards or change the physical network cabling, making the transformation simple, cost-effective, suitable for product applications, and easy to implement.
[0052] In some optional implementations, data transmission between the controller and the robot's robotic arm is performed based on a second virtual local area network (VLAN), including: data transmission between the controller and the first robotic arm via a first port of the second VLAN, and data transmission between the controller and the second robotic arm via a second port of the second VLAN, wherein the robot's robotic arm includes a first robotic arm and a second robotic arm; acquiring detection data of the first and second robotic arms; if no response data is acquired for a preset number of consecutive times, determining that the robotic arm that has not acquired response data is offline, disabling the port corresponding to the offline robotic arm, and increasing the bandwidth corresponding to the offline robotic arm to the active robotic arm.
[0053] The detection data can be heartbeat frames or status query frames periodically sent by the controller to the robotic arm to determine whether the link and device are online. Response data represents the response frames returned by the first and second robotic arms after receiving the detection data, indicating that the components are functioning normally and the link is unobstructed. The preset number of consecutive heartbeat loss checks (e.g., three consecutive times) can be a pre-set number of heartbeat loss checks to avoid misjudgments due to momentary interruptions. Offline determination occurs when the controller fails to receive a response from a particular robotic arm for multiple consecutive frames, concluding that the robotic arm has a hardware failure, disconnection, or power failure. Disabling the port corresponding to the offline robotic arm can be achieved by the controller instructing the switch through the management interface to disable the port corresponding to the faulty arm, preventing data forwarding to it. Increasing the bandwidth corresponding to the offline robotic arm to the active robotic arm can be achieved by allocating all network resources originally allocated to the offline arm, such as bandwidth, queues, and priorities, to the normally functioning robotic arm, realizing fault recovery, resource reclamation, and reallocation.
[0054] In this embodiment, Figure 5 A schematic diagram illustrating the communication connection between the controller and the robotic arm provided in this application is shown, as follows: Figure 5 As shown, in the second virtual local area network, the switch is configured with port 51 to connect to the first robotic arm 181 and port 52 to connect to the second robotic arm 182. For multi-robotic arm robots, more ports can be configured to access the second virtual local area network.
[0055] Specifically, the controller continuously sends detection data to the first and second robotic arms and listens for response data to detect the online status of both arms. If a robotic arm fails to respond for a preset number of consecutive times, it is determined to be offline. The controller instructs the switch to close the port corresponding to the offline robotic arm, cutting off invalid traffic and reclaiming port resources. The bandwidth originally allocated to the offline arm is transferred to the online robotic arm that is working normally, improving its network resources and communication quality. The remaining robotic arms continue to operate under the enhanced network resources, ensuring that the robot system is not completely paralyzed.
[0056] In this way, once the robotic arm is determined to be offline, the corresponding port is immediately disabled, cutting off the network path of the faulty arm at the physical layer. The faulty robotic arm no longer occupies port and switch processing resources, preventing the faulty device from sending garbled frames, duplicate frames, and abnormal broadcasts that pollute the communication of the normal robotic arm. This ensures the stability of the control link between the controller and the online robotic arm, and the online robotic arm can obtain nearly double the network resource guarantee, which can improve its control response speed and reliability. At the same time, the bandwidth corresponding to the offline robotic arm is no longer used. The system reclaims it and centrally allocates it to the online arm, making full use of the previously wasted network resources. The overall bandwidth utilization rate is significantly improved, and the communication capability under single-arm operation can be improved without increasing hardware costs. In addition, the first and second robotic arms belong to the same second virtual LAN. While maintaining the virtual LAN-level security isolation between the robotic arm and the chassis and host computer, fine-grained port-level tuning can be achieved internally. This satisfies the overall network isolation requirements and supports local fault self-healing and resource optimization, thus balancing isolation and flexibility.
[0057] In some optional implementations, the aforementioned robot data transmission method further includes: creating virtual bridge containers in the controller corresponding to the chassis, robotic arm, and host computer respectively; and creating peer virtual bridge containers corresponding to the virtual bridge containers in the chassis, robotic arm, and host computer respectively, wherein the virtual bridge containers and the peer virtual bridge containers are connected through virtual channels.
[0058] The virtual bridge container, deployed inside the controller, is an independent virtual forwarding unit implemented based on network virtualization or lightweight container technology. It possesses independent packet reception, verification, and forwarding capabilities, corresponding one-to-one with the chassis, robotic arm, and host computer. The peer virtual bridge container, deployed inside the chassis, robotic arm, and host computer, pairs with the virtual bridge container on the controller side, forming a two-end point-to-point communication structure. The virtual channel, established between the controller and each component, is a logically dedicated communication path created by a pair of virtual bridge containers. It can be based on tunnel encapsulation, such as Virtual Extensible Local Area Network (VXLAN) or Generic Network Virtualization Encapsulation (Geneve), without relying on traditional routing and forwarding, and without intruding on the global network.
[0059] In this embodiment, a lightweight network virtualization layer can be created in a switch that supports containerization or within the controller. A first virtual bridge container corresponding to the chassis is created and bound to a virtual interface in the controller corresponding to the first virtual LAN. A first peer virtual bridge container corresponding to the first virtual bridge container is created on the chassis. A second virtual bridge container corresponding to the robotic arm is created and bound to a virtual interface in the controller corresponding to the second virtual LAN. A second peer virtual bridge container corresponding to the second virtual bridge container is created on the robotic arm. A third virtual bridge container corresponding to the host computer is created and bound to a virtual interface in the controller corresponding to the third virtual LAN. A third peer virtual bridge container corresponding to the third virtual bridge container is created on the host computer. A point-to-point virtual channel is established between the controller-side virtual bridge container and the peer virtual bridge container of the corresponding peripheral.
[0060] Specifically, when the controller needs to send non-real-time configuration commands to the robotic arm, the data originates from the controller's application, enters the second virtual bridge container, and is directly forwarded to the second peer virtual bridge container via an encrypted virtual tunnel. The second peer virtual bridge container then sends the data to the virtual local area network (VLAN) where the robotic arm is located. The entire process bypasses the ordinary forwarding logic of a switch and is physically completed within the switch or controller.
[0061] This approach addresses the necessary data interaction requirements between robot components and enhances security. While maintaining the advantages of virtual LAN isolation, it designs a secure cross-VLAN communication channel, achieving low-latency, secure logical direct connection while preserving broadcast domain isolation.
[0062] In some alternative implementations, the aforementioned robot data transmission method further includes: accessing the chassis and robotic arm based on the controller, responding to the controller's access request based on the chassis or robotic arm; and prohibiting the chassis or robotic arm from accessing other virtual local area networks.
[0063] In this implementation, a communication matrix can be defined in the switch's Access Control List (ACL) or the controller's firewall as follows: The controller has the highest access privileges: allowing the controller (all its virtual interfaces) to actively access all necessary ports (for control commands and status reading) of the first virtual LAN where the chassis is located and the second virtual LAN where the robotic arm is located. Conversely, the chassis and robotic arm can passively respond to the controller's requests, but are prohibited from actively initiating connections to the controller or other virtual LANs.
[0064] In this way, by blocking cross-VLAN access by the execution components through rules, we can prevent unauthorized packet sending, accidental triggering, and misconnection. The chassis and robotic arm will not send packets to other VLANs due to program abnormalities or firmware errors, and will not interfere with the normal operation of the host computer, debugging port, and external devices, thus improving the overall network stability. At the same time, the dual constraints of underlying VLAN isolation and upper-layer access direction control mean that even if there are oversights in the VLAN configuration, the access rules can still block unauthorized behavior, which can improve the robustness of the overall network architecture and meet the functional safety network design requirements.
[0065] In some alternative implementations, the aforementioned robot data transmission method further includes: accessing the controller via a host computer; and prohibiting the host computer from accessing the ports of the chassis or robotic arm.
[0066] In this implementation, communication is only permitted between the third VLAN where the host computer resides and specific service ports (such as data interfaces and command receiving ports) of the third VLAN virtual interface in the controller. Communication between the host computer and its VLAN is prohibited, as is direct access to any address on the first VLAN where the chassis resides and the second VLAN where the robotic arm resides. If the host computer needs to obtain chassis or robotic arm data, it must request it from the controller, which acts as a proxy to retrieve the data across VLANs and then returns it.
[0067] This can be achieved through VLAN ACLs on the switch or port-based ACLs. For example, an ACL can be applied to the inbound direction of the access port (the fourth switch port) connecting to the host computer, allowing only traffic with a destination IP of the controller IP and a destination port within a specific range (such as 3000-3005) to pass through, while denying any traffic heading to the chassis and robotic arm subnets.
[0068] In this way, by using containerized bridges and hierarchical access control, a secure and low-latency dedicated channel is provided for necessary internal system communication while maintaining critical isolation, thereby more comprehensively meeting the complex requirements of robot control systems for network stability, real-time performance and security.
[0069] In some optional implementations, a virtual interface corresponding to the virtual local area network is created in the controller, the switch port connected to the controller is configured as a trunk port, and the switch port connected to the chassis, robotic arm and host computer is configured as an access port. Network isolation for robot data transmission is performed based on the virtual local area network. The implementation also includes forwarding the data sent by the controller based on the virtual network interface, trunk port and access port corresponding to the data sent by the controller.
[0070] In this embodiment, such as Figure 4As shown, the data sent by the controller 41 to the chassis 17 is sent through the virtual interface bound to the first virtual LAN 42, enters the switch through the trunk port (first switch port 161) of the switch 16, and is forwarded to the chassis 17 only from the access port (i.e. the second switch port 162) assigned to the first virtual LAN according to the virtual LAN tag of the data frame.
[0071] The control commands sent by the controller 41 to the robotic arm 18 are sent through the virtual interface bound to the second virtual local area network 43, enter the switch through the trunk port (first switch port 161) of the switch 16, and are forwarded to the robotic arm 18 only from the access port (i.e. the third switch port 163) allocated to the second virtual local area network according to the virtual local area network label of the data frame.
[0072] Data between controller 41 and host computer 19 is sent through the virtual interface bound to the third virtual LAN 44, enters the switch through the trunk port (first switch port 161) of switch 16, and is forwarded by the access port (i.e. fourth switch port 164) of the third virtual LAN assigned by switch 16.
[0073] In this way, each virtual LAN forms an independent broadcast domain, and broadcast traffic is strictly limited within its own virtual LAN. The switch maintains an independent MAC address table for each virtual LAN, completely avoiding incorrect mapping of MAC addresses to ports.
[0074] This embodiment also provides a robot for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0075] This embodiment provides a robot, such as Figure 6 As shown, Figure 6 A schematic diagram of the component modules of the robot provided in this application is shown, such as... Figure 6 As shown, it includes: Switch 16 is used to configure multiple virtual local area networks (VLANs) and to transmit robot data based on the VLANs; controller 41 is used to acquire the load data of the VLANs, adjust the data transmission priority of the VLANs based on the comparison result of the load data and the preset load threshold, and adjust the bandwidth of the VLANs based on the adjusted data transmission priority and the load data; VLAN 61 is used to transmit data based on the adjusted data transmission priority and the adjusted bandwidth.
[0076] In some optional implementations, the controller includes: a controller first unit, configured to increase the transmission priority of the virtual local area network corresponding to the first load data if the first load data is greater than a first preset load threshold and continues for a first preset duration; and to decrease the transmission priority of the virtual local area network corresponding to the second load data if the second load data is less than a second preset load threshold and continues for a second preset duration, wherein the first preset load threshold is greater than the second preset load threshold.
[0077] In some optional implementations, the controller further includes: a second controller unit, configured to determine the call bandwidth of the target virtual local area network (VLAN) if the priority of the target VLAN is lower than a first priority threshold, the bandwidth utilization of the target VLAN is less than a first preset bandwidth threshold and this continues for a third preset duration; within the range of call bandwidth values, determine the increased bandwidth of VLANs with a priority higher than or equal to a second priority threshold, and determine the reduced bandwidth of the target VLAN based on the increased bandwidth.
[0078] In some alternative implementations, the switch includes a first switch unit for data transmission between the robot's controller and the robot's chassis based on a first virtual local area network (VLAN); for data transmission between the controller and the robot's robotic arm based on a second VLAN; and for data transmission between the controller and a host computer based on a third VLAN.
[0079] In some optional implementations, the first unit of the switch includes: a first subunit of the switch, used for data transmission between the controller and the first robotic arm via a first port of the second virtual local area network, and for data transmission between the controller and the second robotic arm via a second port of the second virtual local area network, wherein the robotic arm of the robot includes a first robotic arm and a second robotic arm; acquiring detection data of the first robotic arm and the second robotic arm; if no response data is acquired for a preset number of consecutive times, determining that the robotic arm that has not acquired response data is offline, disabling the port corresponding to the offline robotic arm, and increasing the bandwidth corresponding to the offline robotic arm to the active robotic arm.
[0080] In some optional implementations, the aforementioned robot further includes: a cross-virtual local area network communication module, used to create virtual bridge containers corresponding to the chassis, robotic arm, and host computer in the controller respectively; and to create peer virtual bridge containers corresponding to the virtual bridge containers in the chassis, robotic arm, and host computer respectively, wherein the virtual bridge containers and peer virtual bridge containers are connected through virtual channels.
[0081] In some alternative implementations, the aforementioned robot further includes: a first communication control module, configured to access the chassis and robotic arm based on the controller, and to respond to access requests from the controller based on the chassis or robotic arm; and to prohibit the chassis or robotic arm from accessing other virtual local area networks.
[0082] In some alternative implementations, the aforementioned robot further includes: a second communication control module for accessing the controller via a host computer; and prohibiting the host computer from accessing ports of the chassis or robotic arm.
[0083] In some alternative implementations, the switch includes a second switch unit for forwarding data sent by the controller based on a virtual interface, a trunk port, and an access port corresponding to the data sent by the controller.
[0084] The robot provided in this application embodiment can execute the robot data transmission method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the execution method. Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0085] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0086] The following is a detailed reference. Figure 7 The diagram illustrates a structural schematic suitable for implementing the electronic device described in the embodiments of this application. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 702 or a program loaded from memory 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device. The processor 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0087] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 7 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0088] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from memory 708, or installed from ROM 702. When the computer program is executed by processor 701, it performs the functions defined in the robot data transmission method of embodiments of this application.
[0089] Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0090] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the robot data transmission method shown in the above embodiments is implemented.
[0091] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0092] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A robot data transmission method, characterized in that, The method includes: Configure multiple virtual local area networks (VLANs) and perform network isolation for robot data transmission based on these VLANs; The load data of the virtual local area network is obtained; based on the comparison result of the load data and the preset load threshold, the data transmission priority of the virtual local area network is adjusted; and based on the adjusted data transmission priority and the load data, the bandwidth of the virtual local area network is adjusted. Data transmission is performed based on the adjusted data transmission priority and adjusted bandwidth.
2. The robot data transmission method according to claim 1, characterized in that, The step of adjusting the data transmission priority of the virtual local area network based on the comparison result of the load data and the preset load threshold includes: If the first load data is greater than the first preset load threshold and continues for a first preset duration, the transmission priority of the virtual local area network corresponding to the first load data is increased. If the second load data is less than the second preset load threshold and continues for a second preset duration, the transmission priority of the virtual local area network corresponding to the second load data is reduced, wherein the first preset load threshold is greater than the second preset load threshold.
3. The robot data transmission method according to claim 1, characterized in that, Adjusting the bandwidth of the virtual local area network based on the adjusted data transmission priority and the load data includes: If the priority of the target virtual local area network is lower than the first priority threshold, the bandwidth utilization of the target virtual local area network is less than the first preset bandwidth threshold and continues for a third preset duration, the calling bandwidth of the target virtual local area network is determined. Within the range of the called bandwidth, the increased bandwidth of virtual local area networks (VLANs) with a priority higher than or equal to the second priority threshold is determined, and the reduced bandwidth of the target VLAN is determined based on the increased bandwidth.
4. The robot data transmission method according to claim 1, characterized in that, The plurality of virtual local area networks (VLANs) include a first VLAN, a second VLAN, and a third VLAN. The network isolation for robot data transmission based on the VLANs includes: Data transmission between the robot's controller and the robot's chassis is performed based on the first virtual local area network; Data transmission between the controller and the robot's robotic arm is performed based on the second virtual local area network; Data transmission between the controller and the host computer is performed based on the third virtual local area network.
5. The robot data transmission method according to claim 4, characterized in that, The data transmission between the controller and the robot's robotic arm based on the second virtual local area network includes: Data transmission between the controller and the first robotic arm is performed based on the first port of the second virtual local area network, and data transmission between the controller and the second robotic arm is performed based on the second port of the second virtual local area network, wherein the robotic arm of the robot includes the first robotic arm and the second robotic arm; The detection data of the first robotic arm and the second robotic arm are acquired. If no response data is acquired for a preset number of consecutive times, the robotic arm that has not acquired response data is determined to be offline. The port corresponding to the offline robotic arm is disabled, and the bandwidth corresponding to the offline robotic arm is increased to the active robotic arm.
6. The robot data transmission method according to claim 4, characterized in that, The method further includes: Virtual bridge containers corresponding to the chassis, the robotic arm, and the host computer are created in the controller respectively; In the chassis, the robotic arm, and the host computer, a peer virtual bridge container corresponding to the virtual bridge container is created, wherein the virtual bridge container and the peer virtual bridge container are connected through a virtual channel.
7. The robot data transmission method according to claim 6, characterized in that, The method further includes: The controller accesses the chassis and the robotic arm, and the chassis or the robotic arm responds to the access request from the controller. The chassis or the robotic arm is prohibited from accessing other virtual local area networks; Accessing the controller via the host computer; The host computer is prohibited from accessing the ports of the chassis or the robotic arm.
8. The robot data transmission method according to claim 4, characterized in that, A virtual interface corresponding to the virtual local area network (VLAN) is created in the controller. The switch port connected to the controller is configured as a trunk port, and the switch port connected to the chassis, the robotic arm, and the host computer is configured as an access port. The network isolation for robot data transmission based on the VLAN also includes: Based on the virtual interface corresponding to the data sent by the controller, the trunk port, and the access port corresponding to the data sent by the controller, the data sent by the controller is forwarded.
9. A robot, characterized in that, The robot includes: A switch is used to configure multiple virtual local area networks (VLANs) for robot data transmission based on these VLANs. The controller is configured to acquire load data of the virtual local area network (VLAN), adjust the data transmission priority of the VLAN based on the comparison result of the load data and a preset load threshold, and adjust the bandwidth of the VLAN based on the adjusted data transmission priority and the load data. Virtual LAN is used for data transmission based on adjusted data transmission priorities and adjusted bandwidth.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the steps of the robot data transmission method according to any one of claims 1 to 8.
