Robot serial number writing method, device, system and equipment and storage medium

By using data link layer protocols (such as LDCP) for batch allocation and parallel writing of robot serial numbers, the problem of low efficiency in traditional writing methods is solved, enabling efficient and non-duplicate batch writing of robot equipment serial numbers and improving production efficiency.

CN121940476APending Publication Date: 2026-04-28CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
Filing Date
2026-01-14
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

The traditional method of writing serial numbers one by one for each piece of equipment on a production line is inefficient and makes it difficult to control whether serial numbers are duplicated, which affects the production efficiency of robot equipment production lines.

Method used

The batch allocation and parallel writing of robot serial numbers are carried out using data link layer protocols (such as LDCP protocol). By encapsulating the serial numbers in LDCPDU and generating messages using MAC addresses, the batch parallel writing of serial numbers of multiple robot devices can be achieved.

Benefits of technology

It improves the efficiency of serial number writing in robot production lines, ensures that the written serial numbers are not duplicated, and enhances the production efficiency of robot equipment production lines. It can achieve batch writing of serial numbers without relying on device IP addresses and additional ports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121940476A_ABST
    Figure CN121940476A_ABST
Patent Text Reader

Abstract

The invention provides a robot serial number writing method, device, system and equipment and a storage medium, and the method comprises the steps: responding to serial number distribution operation for a plurality of first robots, and distributing respective corresponding serial numbers for the first robots; the first robot is a robot which supports a data link layer protocol and needs to write a serial number; for each first robot, packaging the serial number corresponding to the first robot based on a format specified by a data link layer protocol, and generating a first message to be sent to the first robot; a first message to be sent to each first robot is sent to each first robot; the first message is used for indicating the first robot to write a serial number corresponding to the first robot. According to the invention, the robot serial number is written based on the data link layer protocol without depending on network IP communication; through batch distribution and parallel writing-in of the serial numbers of the multiple robots, the serial number writing-in efficiency of the multiple robots of the production line is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, system, device, and storage medium for writing robot serial numbers. Background Technology

[0002] Before robots are shipped from the production line, they typically need to have their serial numbers written to them. However, the traditional method of writing serial numbers one by one for each robot on a production line is inefficient and makes it difficult to control whether the serial numbers are duplicated.

[0003] Therefore, how to improve the writing efficiency of robot serial numbers while ensuring that the written serial numbers are not duplicated, so as to improve the production efficiency of robot equipment production lines, is an urgent problem to be solved. Summary of the Invention

[0004] This invention provides a robot serial number writing method, apparatus, system, device, and storage medium to solve the problems of low efficiency and difficulty in controlling serial number duplication in the traditional pipeline-style single-device serial number writing method in the prior art. It realizes batch allocation and batch parallel writing of multiple robot serial numbers, thereby improving the writing efficiency of robot serial numbers.

[0005] This invention provides a method for writing robot serial numbers, including: In response to a serial number allocation operation for multiple first robots, a corresponding serial number is assigned to each first robot; the first robot refers to a robot that supports the data link layer protocol and requires a serial number to be written. For each first robot, the serial number corresponding to the first robot is encapsulated according to the format specified by the data link layer protocol to generate a first message to be sent to the first robot; The first message to be sent to each first robot is sent to each first robot respectively; the first message is used to instruct the first robot to write the serial number corresponding to the first robot.

[0006] According to the present invention, a method for writing a robot serial number is provided, wherein the data link layer protocol is the Distributed Collaboration Protocol for Link Layers (LDCP); the method for encapsulating the serial number corresponding to the first robot based on the format specified by the data link layer protocol to generate a first message to be sent to the first robot includes: The serial number corresponding to the first robot is encapsulated in the Link Layer Distributed Collaboration Protocol Data Unit (LDCPDU) to obtain the encapsulated data; Based on the target MAC address, the source MAC address, and the encapsulated data, a first message to be sent to the first robot is generated; wherein, the target MAC address is the MAC address of the first robot's network port, and the source MAC address is the MAC address of the robot's own network port.

[0007] According to a robot serial number writing method provided by the present invention, before assigning a corresponding serial number to each of the multiple first robots in response to a serial number allocation operation, the method further includes: In response to the device information collection operation, a broadcast message is encapsulated and generated based on the format specified by the data link layer protocol; the destination MAC address of the broadcast message is the broadcast MAC address within the local area network, and the source MAC address of the broadcast message is the local network port MAC address; The broadcast message is sent to all robots within the current local area network; the broadcast message is used to obtain the device information of the first robot. Receive device information of each first robot returned by each first robot; the device information of the first robot includes at least one of the following: the MAC address of the first robot's network port, whether the serial number is empty, and the robot manufacturer and model.

[0008] According to a robot serial number writing method provided by the present invention, after sending the first message to each first robot to each first robot respectively, the method further includes: Receive write response messages returned by each first robot; the write response message is generated by the first robot after writing the corresponding sequence number, and is encapsulated in the format specified by the data link layer protocol.

[0009] According to a robot serial number writing method provided by the present invention, the method further includes: In response to the serial number reallocation operation for multiple second robots, a new serial number is assigned to each second robot; the second robot refers to a robot with an existing serial number that supports the data link layer protocol; For each second robot, based on the format specified by the data link layer protocol, the device information of the second robot and the new serial number corresponding to the second robot are encapsulated to generate a second message to be sent to the second robot; The second message to be sent to each second robot is sent to each second robot respectively; the second message is used to instruct the second robot to write the new sequence number corresponding to the second robot.

[0010] The present invention also provides a robot serial number writing device, comprising: The allocation module is used to respond to the serial number allocation operation for multiple first robots and allocate a corresponding serial number to each first robot; the first robot refers to a robot that supports the data link layer protocol and needs to have a serial number written to it. The encapsulation module is used to encapsulate the serial number corresponding to each first robot according to the format specified by the data link layer protocol, and generate a first message to be sent to the first robot. The writing module is used to send the first message to each first robot to each first robot respectively; the first message is used to instruct the first robot to write the sequence number corresponding to the first robot.

[0011] The present invention also provides a robot serial number writing system, comprising: an electronic device and multiple robots that communicate and interact with the electronic device based on a data link layer protocol; The electronic device is configured to respond to a serial number allocation operation for multiple robots by assigning a corresponding serial number to each robot; for each robot, encapsulating the serial number corresponding to the robot according to the format specified by the data link layer protocol to generate a first message to be sent to the robot; and sending the first message to be sent to each robot to each robot respectively. The robot is configured to receive the first message and write the serial number corresponding to the robot carried in the first message.

[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the robot serial number writing method as described above.

[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the robot serial number writing method as described above.

[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the robot serial number writing method as described above.

[0015] The robot serial number writing method, apparatus, system, device, and storage medium provided by this invention can improve the serial number writing efficiency of multiple robot devices on a robot production line by batch allocating serial numbers to multiple first robots that support the data link layer protocol and simultaneously writing serial numbers to multiple first robots in batch parallel. This can improve the production efficiency of robot equipment production lines while ensuring that the written serial numbers are not duplicated. By writing robot serial numbers based on the data link layer protocol, the serial number writing operation can be realized as long as the robot device can be connected to a local area network. It can realize batch serial number writing without relying on the robot device IP address and additional ports, that is, it does not rely on network IP communication. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the robot serial number writing method provided in this embodiment of the invention. Figure 2 This is a schematic diagram of the LDCP format provided in an embodiment of the present invention.

[0018] Figure 3 This is a schematic diagram of the robot serial number writing interaction process provided in an embodiment of the present invention.

[0019] Figure 4 This is a schematic diagram of the robot serial number writing device provided in an embodiment of the present invention.

[0020] Figure 5 This is a schematic diagram of the robot serial number writing system provided in an embodiment of the present invention.

[0021] Figure 6 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0023] In the description of embodiments of the present invention, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Those skilled in the art will understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0024] Existing serial number writing methods can include the following two: (1) A scheme based on IP (Internet Protocol) communication and using the telnet protocol to write product serial numbers. However, when the product's factory IP address is a fixed IP address, IP conflicts will occur. Therefore, the device connected by telnet is random. After telnet connection, the device IP address needs to be modified first, and then the serial number can be written. This scheme can only realize batch writing in a pipeline manner and cannot realize the simultaneous writing of serial numbers of multiple devices.

[0025] (2) A solution to write the serial number to the device via a serial cable. However, this solution requires the device to have a reserved serial port in advance, which has certain limitations for devices without a serial port.

[0026] To address the aforementioned issues, this invention addresses these problems by batch-allocating serial numbers to multiple first robots that support the data link layer protocol and require serial number writing, while simultaneously performing batch parallel writing of serial numbers to these robots. This improves the efficiency of serial number writing for multiple robot devices on a robot production line, ensuring that the written serial numbers are not duplicated, thereby increasing the production efficiency of the robot production line. Furthermore, by writing robot serial numbers based on the data link layer protocol, only a local area network connection is required for the robot device to perform the serial number writing operation; batch serial number writing can be achieved without relying on the robot device's IP address or additional ports, i.e., without relying on network IP communication.

[0027] Figure 1 This is a flowchart illustrating the robot serial number writing method provided in an embodiment of the present invention. (Refer to...) Figure 1 This invention provides a method for writing robot serial numbers, which may specifically include the following steps: Step 101: In response to the serial number allocation operation for multiple first robots, assign a corresponding serial number to each first robot; the first robot refers to a robot that supports the data link layer protocol and needs to have a serial number written to it.

[0028] It should be noted that the execution subject of the robot serial number writing method provided in this embodiment of the invention can be an electronic device, a component in the electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. For example, a mobile electronic device can be a mobile phone, tablet computer, laptop computer, PDA, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., while a non-mobile electronic device can be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This embodiment of the invention does not specifically limit these. The following embodiments of the invention describe the execution subject using an electronic device.

[0029] The robot serial number writing method provided in this embodiment of the invention can be applied to communication and interaction scenarios between electronic devices and multiple robot devices. It should be noted that the electronic device in this embodiment of the invention can be equipped with a serial number writing tool, which can initiate a process of batch allocation and parallel writing of serial numbers to multiple robot devices simultaneously.

[0030] In some embodiments, the UI (User Interface) provided by the serial number writing tool can display robot information for multiple robots that support the data link layer protocol. Users can select multiple first robots from which serial numbers need to be written, and then click the "Assign" button to initiate a serial number assignment operation. The electronic device can respond to the user's serial number assignment operation for multiple first robots by automatically assigning unused serial numbers to each first robot in batches.

[0031] In some embodiments, the electronic device may record unused serial numbers and used serial numbers. After automatically batch-assigning unused serial numbers to multiple first robots, these assigned serial numbers can be marked as used serial numbers, thereby avoiding subsequent reuse of used serial numbers.

[0032] It should be noted that since unused serial numbers are usually unique, batch allocation and writing of serial numbers for multiple robots can ensure that the serial numbers written to each robot are not duplicated.

[0033] In some embodiments, after the electronic device assigns serial numbers to each first robot in batches, it can further check whether these batch-assigned serial numbers are duplicated, thereby helping to further ensure that the serial numbers written to the robots in subsequent batches are not duplicated.

[0034] Step 102: For each first robot, based on the format specified by the data link layer protocol, encapsulate the serial number corresponding to the first robot to generate a first message to be sent to the first robot.

[0035] In this embodiment of the invention, after assigning serial numbers to each first robot in batches, the electronic device can encapsulate a first message individually for each first robot.

[0036] In some embodiments, for each first robot, a first message to be sent to the first robot can be encapsulated and generated according to the format specified by the data link layer protocol, based on the destination MAC (Media Access Control Address), the source MAC address, and the serial number corresponding to the first robot. The destination MAC address can be the MAC address of each robot's network port, and the source MAC address can be the MAC address of the robot's own network port.

[0037] Step 103: Send the first message to each first robot to each first robot respectively; the first message is used to instruct the first robot to write the serial number corresponding to the first robot.

[0038] In some embodiments, the first message to be sent to each first robot can be sent to each first robot simultaneously. After receiving the first message, each first robot can call the backend write interface to write the sequence number carried in the first message and send the writing result to the electronic device.

[0039] This invention improves the production efficiency of robot production lines by batch-allocating serial numbers to multiple first robots that support data link layer protocols and require serial number writing, while simultaneously writing serial numbers to multiple first robots in parallel. This ensures that the written serial numbers are not duplicated. Furthermore, by writing robot serial numbers based on data link layer protocols, the serial number writing operation can be achieved as long as the robot devices can be connected to a local area network. It does not require robot device IP addresses or additional ports to achieve batch serial number writing, i.e., it does not rely on network IP communication.

[0040] Based on any of the above embodiments, the data link layer protocol is the Distributed Collaboration Protocol for Link Layers (LDCP); the process of encapsulating the sequence number corresponding to the first robot according to the format specified by the data link layer protocol to generate a first message to be sent to the first robot may specifically include: Step S11: Encapsulate the serial number corresponding to the first robot in the Link Layer Distributed Collaboration Protocol Data Unit (LDCPDU) to obtain the encapsulated data; Step S12: Based on the target MAC address, the source MAC address, and the encapsulated data, generate a first message to be sent to the first robot; wherein the target MAC address is the MAC address of the first robot's network port, and the source MAC address is the MAC address of the local machine's network port.

[0041] This invention enables the simultaneous batch writing of robot serial numbers on a robot production line by using a data link layer protocol. The following embodiments use a custom data link layer protocol, LDCP (Link-Layer Distributed Collaboration Protocol), as an example. It should be noted that other custom data link layer protocols besides LDCP can achieve the same effect.

[0042] LDCP is a custom protocol used internally, providing a standard link-layer collaboration method. It encapsulates communication commands and data between devices in TLV (Type / Length / Value) format, then encapsulates them in LDCPDU (Link-Layer Distributed Collaboration Protocol Data Unit) and publishes them to other devices in the network. In this embodiment of the invention, electronic devices can communicate and interact with multiple robotic devices that support the LDCP protocol based on the LDCP protocol.

[0043] Figure 2 This is a schematic diagram of the LDCP format provided in an embodiment of the present invention. (Refer to...) Figure 2 The destination MAC address can be the MAC address of the receiving device port; the source MAC address can be the MAC address of the sending device port; the type can refer to the data frame type, which is fixed at DC00; the data can be LDCP protocol data units, i.e., LDCPDU; FCS (Frame Check Sequence) can be a frame check sequence used to verify the message. For a detailed explanation of data encapsulation using LDCP protocol data units, please refer to Table 1:

[0044] Table 1 In some embodiments, the serial number corresponding to the first robot can be written into a custom data field of the LDCPDU.

[0045] In some embodiments, the opcodes and message descriptions involved in this application can be as shown in Table 2:

[0046] Table 2 In this embodiment of the invention, encapsulation data is obtained by encapsulating the serial number corresponding to the first robot in an LDCPDU; based on the target MAC address (set as the MAC address of the first robot's network port), the source MAC address (set as the MAC address of the local network port), and the encapsulation data, a first message to be sent to the first robot is generated, thereby encapsulating the robot serial number based on the data link layer protocol and obtaining a unicast message to be sent to the first robot device, thereby batch writing the robot serial number through the data link layer protocol.

[0047] Based on any of the above embodiments, before assigning a corresponding serial number to each of the multiple first robots in response to the serial number assignment operation for the multiple first robots, the method may further include: Step S21: In response to the device information collection operation, a broadcast message is encapsulated and generated based on the format specified by the data link layer protocol; the target MAC address of the broadcast message is the broadcast MAC address within the local area network, and the source MAC address of the broadcast message is the local network port MAC address. Step S22: Send the broadcast message to all robots in the current local area network; the broadcast message is used to obtain the device information of the first robot; Step S23: Receive device information of each first robot returned by each first robot; the device information of the first robot includes at least one of the following: the MAC address of the first robot's network port, whether the serial number is empty, and the robot manufacturer and model.

[0048] In some embodiments, users can trigger robot device information collection operations through the UI (User Interface) provided by the serial number writing tool. The electronic device can respond to the device information collection operation by encapsulating and generating a broadcast message based on the format specified by the data link layer protocol, and sending the broadcast message to all robots within the current local area network. The destination MAC address can be the broadcast MAC address within the local area network (FFFF-FFFF-FFFF), and the source MAC address can be the local network port MAC address.

[0049] In some embodiments, after receiving a broadcast message from an electronic device, all robots supporting data link layer protocols in the current network environment can encapsulate unicast messages and individually return the robot's device information to the robot serial number writing tool. The device information returned by the robot may include information such as the robot manufacturer, model, MAC address, and whether the serial number is empty.

[0050] This invention can pre-collect device information of multiple robots supporting the data link layer within the current local area network by broadcasting messages, thereby facilitating subsequent writing of robot serial numbers based on the data link layer protocol. The serial number writing operation can be achieved as long as the robot device can be connected to the local area network, without relying on the robot device IP address and additional ports, that is, without relying on network IP communication.

[0051] Based on any of the above embodiments, after the first message to be sent to each first robot is sent to each first robot respectively, the method may further include: Receive write response messages returned by each first robot; the write response message is generated by the first robot after writing the corresponding sequence number, and is encapsulated in the format specified by the data link layer protocol.

[0052] In this embodiment of the invention, the electronic device sends the first message to each first robot to each first robot. Each robot can call the background writing interface to write the sequence number carried in the first message it received, and encapsulate the writing response message to unicast the writing result to the electronic device.

[0053] In this embodiment of the invention, a first robot sends a write response message back to the electronic device, enabling the electronic device to know whether the serial number has been successfully written.

[0054] Based on any of the above embodiments, the method may further include: Step S31: In response to the serial number reallocation operation for multiple second robots, assign a new serial number to each second robot; the second robot refers to a robot with an existing serial number that supports the data link layer protocol. Step S32: For each second robot, based on the format specified by the data link layer protocol, encapsulate the device information of the second robot and the new serial number corresponding to the second robot to generate a second message to be sent to the second robot; Step S33: The second message to be sent to each second robot is sent to each second robot respectively; the second message is used to instruct the second robot to write the new sequence number corresponding to the second robot.

[0055] It should be noted that the first robot and the second robot can be the same robot. After writing the serial number to the robot that needs to be written (in this case, the first robot), if it is necessary to reset the serial number of the robot, then the serial number of the robot that needs to be reset (in this case, the second robot) can be reset.

[0056] In some embodiments, the UI (User Interface) provided by the serial number writing tool can display robot information for multiple robots that support the data link layer protocol. Users can select multiple second robots from which to reset their serial numbers and then click the "Reassign" button to initiate a serial number reassignment operation. The electronic device can respond to the user's serial number reassignment operation for multiple second robots by automatically and in batches reassigning unused new serial numbers to each second robot.

[0057] In some embodiments, the electronic device may record unused serial numbers and used serial numbers. In response to a serial number reallocation operation for multiple second robots, the electronic device may also mark the old serial numbers corresponding to each of the multiple second robots as used serial numbers, and then assign each second robot its own corresponding new serial number, thereby avoiding the subsequent reuse of used serial numbers.

[0058] In some embodiments, for each second robot, a second message to be sent to the second robot can be generated by encapsulating the target MAC address, source MAC address, and new serial number corresponding to the second robot according to the format specified by the data link layer protocol. The target MAC address can be the MAC address of each robot's network port, and the source MAC address can be the MAC address of the local machine's network port.

[0059] In some embodiments, the second message to be sent to each second robot can be sent to each second robot simultaneously. After receiving the second message, each second robot can call the background write interface to write the new sequence number carried in the second message, and send the writing result to the electronic device.

[0060] This invention improves the efficiency of serial number rewriting for multiple robot devices on a robot production line by batch reallocating serial numbers for multiple second robots that support data link layer protocols and require serial number reset, and simultaneously batch parallel writing serial numbers for multiple second robots. This ensures that the reset serial numbers are not duplicated, thereby improving the production efficiency of the robot production line.

[0061] Figure 3 This is a schematic diagram of the robot serial number writing interaction process provided in an embodiment of the present invention. (Refer to...) Figure 3 In one specific embodiment, taking the LDCP custom data link layer protocol as an example, device information collection can be triggered in the robot serial number writing tool interface. The tool's backend encapsulates an RB_DEV_LIST_REQ broadcast message with a target MAC address of FFFF-FFFF-FFFF and a source MAC address of the local network interface. Upon receiving the RB_DEV_LIST_REQ broadcast message, all robots supporting the LDCP protocol in the current network environment encapsulate an RB_DEV_LIST_RESP unicast message to individually respond to the robot serial number writing tool with their current robot information. This response information may include the robot manufacturer, model, MAC address, and whether the serial number is empty.

[0062] After receiving the response information, the robot serial number writing tool can display the collected robot information on the interface. Users can select the device to be written to and click the "Assign" button. The tool can automatically assign unused serial numbers to the robots, and then click the "Write" button. The tool's backend can individually encapsulate an RB_SN_REQ message (the first message) for each robot. The destination MAC address of the message is the robot's network port MAC address, and the source MAC address is the local machine's network port MAC address. This message is then unicast to each robot device. Upon receiving the serial number writing request message (the first message), the robot can call the backend writing interface to perform the writing and encapsulate an RB_SN_RESP response message to unicast the writing result to the serial number writing tool.

[0063] For robots with existing serial numbers, the serial number writing tool can reset the robot's serial number. Users can select the device to be reset and click the "Reassign" button. The tool can reclaim the serial number of the selected device and reassign a new, unused serial number, then click the "Write" button. The tool's backend can encapsulate an RB_SN_REQ message (i.e., a second message) for each robot. The destination MAC address of the message is the robot's network port MAC address, and the source MAC address is the robot's own network port MAC address. This message is then unicast to each robot. Upon receiving the serial number writing request message, the robot can call the backend writing interface to perform the writing and encapsulate an RB_SN_RESP response message to unicast the writing result to the serial number writing tool.

[0064] Therefore, compared with the prior art, the embodiments of the present invention have the following technical advantages: (1) Batch writing of multiple robot serial numbers based on data link layer protocol does not depend on device IP address and additional port, and can simultaneously write serial numbers of multiple robot devices in parallel; by collecting production line robot information through data link layer protocol, the efficiency of writing serial numbers of multiple robot devices in robot production line is improved, thereby improving the production efficiency of robot device production line. (2) The serial number is written using the data link layer network protocol. The serial number writing operation can be realized as long as the robot device can be connected to the local area network. Batch writing can be realized without reserving a serial port on the robot device. It is applicable to robot devices that can be connected to the network and has a wider range of application scenarios.

[0065] The robot serial number writing device provided by the present invention is described below. The robot serial number writing device described below can be referred to in correspondence with the robot serial number writing method described above.

[0066] Figure 4 This is a schematic diagram of the robot serial number writing device provided in an embodiment of the present invention. (Refer to...) Figure 4 This invention provides a robot serial number writing device, which may specifically include the following modules: The allocation module 410 is used to allocate a corresponding serial number to each of the multiple first robots in response to a serial number allocation operation for multiple first robots; the first robot refers to a robot that supports the data link layer protocol and needs to have a serial number written to it. The encapsulation module 420 is used to encapsulate the serial number corresponding to each first robot according to the format specified by the data link layer protocol, and generate a first message to be sent to the first robot. The writing module 430 is used to send the first message to each first robot to each first robot respectively; the first message is used to instruct the first robot to write the serial number corresponding to the first robot.

[0067] Based on any of the above embodiments, the data link layer protocol is the Link Layer Distributed Collaboration Protocol (LDCP); the encapsulation module includes: The serial number encapsulation unit is used to encapsulate the serial number corresponding to the first robot in the link layer distributed collaboration protocol data unit (LDCPDU) to obtain encapsulated data. The message generation unit is used to generate a first message to be sent to the first robot based on the target MAC address, the source MAC address and the encapsulated data; wherein the target MAC address is the MAC address of the first robot's network port and the source MAC address is the MAC address of the robot's own network port.

[0068] Based on any of the above embodiments, before assigning a corresponding serial number to each of the multiple first robots in response to the serial number assignment operation for the multiple first robots, the method further includes: The device information acquisition module is used to respond to device information acquisition operations and encapsulate and generate broadcast messages based on the format specified by the data link layer protocol; the destination MAC address of the broadcast message is the broadcast MAC address within the local area network, and the source MAC address of the broadcast message is the local network port MAC address; The broadcast message sending module is used to send the broadcast message to all robots in the current local area network; the broadcast message is used to obtain the device information of the first robot. The device information receiving module is used to receive device information of each first robot returned by each first robot; the device information of the first robot includes at least one of the following: the MAC address of the first robot's network port, whether the serial number is empty, and the robot manufacturer and model.

[0069] Based on any of the above embodiments, after the first message to be sent to each first robot is sent to each first robot respectively, the method further includes: The response message receiving module is used to receive the write response messages returned by each first robot; the write response message is generated by the first robot after writing the corresponding sequence number, and is encapsulated in the format specified by the data link layer protocol.

[0070] Based on any of the above embodiments, the method further includes: A reallocation module is used to assign a new serial number to each of the multiple second robots in response to a serial number reallocation operation; the second robot refers to a robot with an existing serial number that supports the data link layer protocol. The re-encapsulation module is used to encapsulate the device information and the new serial number of the second robot for each second robot according to the format specified by the data link layer protocol, and generate a second message to be sent to the second robot. The new serial number writing module is used to send the second message to each second robot to each second robot respectively; the second message is used to instruct the second robot to write the new serial number corresponding to the second robot.

[0071] This invention improves the production efficiency of robot production lines by batch-allocating serial numbers to multiple first robots that support data link layer protocols and require serial number writing, while simultaneously writing serial numbers to multiple first robots in parallel. This ensures that the written serial numbers are not duplicated. Furthermore, by writing robot serial numbers based on data link layer protocols, the serial number writing operation can be achieved as long as the robot devices can be connected to a local area network. It does not require robot device IP addresses or additional ports to achieve batch serial number writing, i.e., it does not rely on network IP communication.

[0072] Figure 5 This is a schematic diagram of the robot serial number writing system provided in an embodiment of the present invention. (Refer to...) Figure 5 This invention provides a robot serial number writing system, including: an electronic device 510 and multiple robots 520 that communicate and interact with the electronic device based on a data link layer protocol; The electronic device 510 is configured to respond to a serial number allocation operation for multiple robots by assigning a corresponding serial number to each robot; for each robot, encapsulating the serial number corresponding to the robot according to the format specified by the data link layer protocol to generate a first message to be sent to the robot; and sending the first message to be sent to each robot to each robot respectively. The robot 520 is used to receive the first message and write the serial number corresponding to the robot carried in the first message.

[0073] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute a robot serial number writing method. This method includes: in response to a serial number allocation operation for multiple first robots, assigning a corresponding serial number to each first robot; the first robot refers to a robot that supports a data link layer protocol and requires a serial number to be written; for each first robot, encapsulating the serial number corresponding to the first robot according to the format specified by the data link layer protocol to generate a first message to be sent to the first robot; sending the first message to each first robot to each first robot respectively; the first message is used to instruct the first robot to write the serial number corresponding to the first robot.

[0074] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0075] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the robot serial number writing method provided by the above methods. The method includes: in response to a serial number allocation operation for a plurality of first robots, allocating a corresponding serial number to each first robot; the first robot refers to a robot that supports a data link layer protocol and needs to have a serial number written; for each first robot, encapsulating the serial number corresponding to the first robot according to the format specified by the data link layer protocol to generate a first message to be sent to the first robot; sending the first message to be sent to each first robot to each first robot respectively; the first message is used to instruct the first robot to write the serial number corresponding to the first robot.

[0076] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a robot serial number writing method provided by the above methods. The method includes: in response to a serial number allocation operation for a plurality of first robots, allocating a corresponding serial number to each first robot; the first robot refers to a robot that supports a data link layer protocol and requires a serial number to be written; for each first robot, encapsulating the serial number corresponding to the first robot according to a format specified by the data link layer protocol to generate a first message to be sent to the first robot; and sending the first message to each first robot to each first robot respectively; the first message is used to instruct the first robot to write the serial number corresponding to the first robot.

[0077] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0078] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for writing robot serial numbers, characterized in that, include: In response to a serial number allocation operation for multiple first robots, a corresponding serial number is assigned to each first robot; the first robot refers to a robot that supports the data link layer protocol and requires a serial number to be written. For each first robot, the serial number corresponding to the first robot is encapsulated according to the format specified by the data link layer protocol to generate a first message to be sent to the first robot; The first message to be sent to each first robot is sent to each first robot respectively; the first message is used to instruct the first robot to write the serial number corresponding to the first robot.

2. The robot serial number writing method according to claim 1, characterized in that, The data link layer protocol is the Distributed Collaboration Protocol for Link Layers (LDCP); the process of encapsulating the sequence number corresponding to the first robot based on the format specified by the data link layer protocol to generate a first message to be sent to the first robot includes: The serial number corresponding to the first robot is encapsulated in the Link Layer Distributed Collaboration Protocol Data Unit (LDCPDU) to obtain the encapsulated data; Based on the target MAC address, the source MAC address, and the encapsulated data, a first message to be sent to the first robot is generated; wherein, the target MAC address is the MAC address of the first robot's network port, and the source MAC address is the MAC address of the robot's own network port.

3. The robot serial number writing method according to claim 1, characterized in that, Before assigning a corresponding serial number to each of the multiple first robots in response to the serial number assignment operation, the method further includes: In response to the device information collection operation, a broadcast message is encapsulated and generated based on the format specified by the data link layer protocol; the destination MAC address of the broadcast message is the broadcast MAC address within the local area network, and the source MAC address of the broadcast message is the local network port MAC address; The broadcast message is sent to all robots within the current local area network; the broadcast message is used to obtain the device information of the first robot. Receive device information of each first robot returned by each first robot; the device information of the first robot includes at least one of the following: the MAC address of the first robot's network port, whether the serial number is empty, and the robot manufacturer and model.

4. The robot serial number writing method according to claim 1, characterized in that, After the first message to be sent to each first robot is sent to each first robot respectively, the method further includes: Receive write response messages returned by each first robot; the write response message is generated by the first robot after writing the corresponding sequence number, and is encapsulated in the format specified by the data link layer protocol.

5. The robot serial number writing method according to claim 1, characterized in that, The method further includes: In response to the serial number reallocation operation for multiple second robots, a new serial number is assigned to each second robot; the second robot refers to a robot with an existing serial number that supports the data link layer protocol; For each second robot, based on the format specified by the data link layer protocol, the device information of the second robot and the new serial number corresponding to the second robot are encapsulated to generate a second message to be sent to the second robot; The second message to be sent to each second robot is sent to each second robot respectively; the second message is used to instruct the second robot to write the new sequence number corresponding to the second robot.

6. A robot serial number writing device, characterized in that, include: The allocation module is used to respond to the serial number allocation operation for multiple first robots and allocate a corresponding serial number to each first robot; the first robot refers to a robot that supports the data link layer protocol and needs to have a serial number written to it. The encapsulation module is used to encapsulate the serial number corresponding to each first robot according to the format specified by the data link layer protocol, and generate a first message to be sent to the first robot. The writing module is used to send the first message to each first robot to each first robot respectively; the first message is used to instruct the first robot to write the sequence number corresponding to the first robot.

7. A robot serial number writing system, characterized in that, include: Electronic devices and multiple robots that communicate and interact with the electronic devices based on data link layer protocols; The electronic device is configured to respond to a serial number allocation operation for multiple robots by assigning a corresponding serial number to each robot; for each robot, encapsulating the serial number corresponding to the robot according to the format specified by the data link layer protocol to generate a first message to be sent to the robot; and sending the first message to be sent to each robot to each robot respectively. The robot is configured to receive the first message and write the serial number corresponding to the robot carried in the first message.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the robot serial number writing method as described in any one of claims 1 to 5.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the robot serial number writing method as described in any one of claims 1 to 5.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the robot serial number writing method as described in any one of claims 1 to 5.