Multi-channel burning method and device based on serial port ring network and storage medium
By constructing a multi-channel programmer through a serial port ring network, the problems of complex circuitry, poor synchronization, and high hardware cost of traditional multi-channel programmers are solved, achieving efficient and reliable batch programming control and improving the flexibility of device expansion.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-24
AI Technical Summary
Existing multi-channel programming technology suffers from problems such as complex circuitry, difficult maintenance, poor synchronization, limited scalability, and high hardware costs. In particular, it is difficult to achieve efficient and reliable parallel programming in mass production.
A multi-channel programming method based on a serial port ring network is adopted. A closed-loop topology is constructed through the master control unit and the slave programming module to realize data fragmentation and directional caching and broadcast command synchronization. Combined with the time-division multiplexing mechanism, status feedback is performed, and hot-plug management and exception handling are supported.
It achieves high-speed parallel programming control under low-speed serial networks, ensuring consistency and high reliability of batch programming, reducing hardware wiring costs and improving device expansion flexibility.
Smart Images

Figure CN121722406A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic device program burning, in particular to a multi-channel burning method, device and storage medium based on a serial port ring network. BACKGROUND
[0002] In the batch production scene, when burning programs for devices such as chips and embedded modules, a multi-channel burner is a key device to improve efficiency. In order to meet the needs of large-scale production, the traditional single-channel burning method has been unable to meet the requirements due to its low efficiency, and therefore, a multi-channel burner supporting programming for multiple target devices at the same time has become a standard configuration device on the production line.
[0003] The existing multi-channel burning technology usually adopts a star topology to solve the batch burning problem. In this scheme, the master control unit serves as the center node and is equipped with multiple independent parallel communication interfaces. The master control unit connects to each slave or target chip to be burned through multiple independent physical lines in a point-to-point manner. In order to increase the number of channels, the existing scheme often relies on the rich peripheral resources of the master control chip or increases the number of physical ports through expansion of FPGA, USB Hub, etc., thereby realizing data transmission and control of multiple target devices.
[0004] However, this traditional solution based on star topology still has many technical defects that are difficult to overcome in actual application: Firstly, the line is complex and difficult to maintain. With the increase in the number of burning channels, the number of signal lines required increases linearly, resulting in extremely complex wiring, a large wire harness, and easy occurrence of poor contact or signal crosstalk failure, making wiring extremely difficult; secondly, synchronization and consistency are poor. Since each channel relies on an independent physical interface for communication, the master control unit cannot achieve absolute synchronization control of all channels on a microsecond time scale, often leading to a deviation in the start time of parallel burning, affecting the consistency of batch production; thirdly, the expansion capability is limited. The number of channels is strictly limited by the number of physical interfaces of the master control unit. If the number of burning channels needs to be increased, the hardware often needs to be redesigned or expensive expansion boards need to be added, with extremely low flexibility; finally, the hardware cost is high. Each independent channel needs to be equipped with a corresponding level conversion chip and electrostatic protection circuit, resulting in a significant increase in the overall hardware cost of the system with the increase in the number of channels.
[0005] Therefore, the present application provides a multi-channel burning method, device and storage medium based on a serial port ring network. SUMMARY
[0006] The purpose of this invention is to provide a multi-channel programming method, device, and storage medium based on a serial port ring network to solve the existing problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a multi-channel programming method based on a serial port ring network, comprising the following steps: S1. Network Initialization: The main control unit sends an address allocation command through the serial port ring network to assign a unique node address to each slave programming module in the network and establish a node address list. S2. Data Distribution: The main control unit divides the image data to be burned into multiple data fragments, marks the target slave address for each data fragment, and then sends the data fragments to the serial port ring network in sequence. S3, Cascading Forwarding: Each slave programming module receives data fragments, parses the target slave address, and if the target slave address matches the local address, the data fragment is stored in the local cache; if they do not match, the data fragment is forwarded to the next node via the serial port. S4. Parallel programming: The main control unit sends a broadcast start command to the serial port ring network. Each slave programming module responds to the broadcast start command and simultaneously calls the locally cached data fragments to perform programming operations on the device to be programmed. S5. Status Feedback: During the burning operation, each slave burning module feeds back the real-time burning status to the main control unit through the serial port ring network.
[0008] A further improvement of this invention is that the status feedback in step S5 adopts a time-division multiplexing mechanism, including the master control unit allocating a fixed communication time slot to each slave programming module according to the number of connected slave programming modules; each slave programming module only sends the real-time programming status to the serial port ring network within the allocated communication time slot, thereby avoiding data transmission conflicts.
[0009] A further improvement of this invention is that the communication frame format used for data distribution in step S2 includes: a frame header, a target address segment, a data type segment, a valid data segment, a check segment, and a frame trailer; wherein, the target address segment is used to indicate the receiving object of the data fragment; when the target address segment is a broadcast address, all slave programming modules parse and process the valid data segment; when the target address segment is a unicast address, only the corresponding slave programming module parses it, and the other modules perform forwarding operations.
[0010] A further improvement of this invention is that it also includes an exception handling strategy, including the master control unit summarizing the feedback status of each slave programming module, and when an exception is detected in a specific slave programming module, generating a unicast retry instruction for that specific slave programming module; after receiving the unicast retry instruction, the specific slave programming module re-executes the programming operation, while other slave programming modules in the serial port ring network maintain their current state.
[0011] A further improvement of the present invention is that step S5 also includes a hot-swap management strategy. When the access or removal signal of the slave programming module is detected in the serial ring network, the master control unit receives a topology change signal. In response to the topology change signal, the master control unit re-executes the network initialization, updates the node address list, and reallocates communication time slots.
[0012] On the other hand, the present invention provides a multi-channel programmer based on a serial port ring network, the programmer comprising: The main control unit execution module is configured to generate burning instructions, manage image data fragments, and coordinate network communication. The slave programming module is configured to configure a serial communication unit, a local cache unit, and a programming execution unit for each slave programming module. A serial port ring network module is configured to connect the transmitting end of the master control unit to the receiving end of the first slave programming module, with each slave programming module connected sequentially end-to-end, and the transmitting end of the last slave programming module connected to the receiving end of the master control unit to form a closed loop. The slave programming module is configured to receive data packets from the previous node via the serial communication unit, parse them, and determine whether to store the data in the local cache unit or forward it to the next node based on the address matching result. The programming execution unit is configured to call the data in the local cache unit to perform parallel programming of the device to be programmed.
[0013] A further improvement of the present invention is that the local cache unit in the slave programming module is an SRAM memory with a capacity configured to be greater than or equal to the data capacity for storing complete image data fragments, so as to support programming operations independent of network transmission speed in the parallel programming step.
[0014] A further improvement of the present invention is that the main control unit execution module further includes a conflict detection submodule, which is configured to monitor the data transmission status of the serial port ring network, and when a data conflict is detected, control each node to retransmit the data according to a preset priority.
[0015] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described multi-channel programming method based on a serial port ring network.
[0016] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described multi-channel programming method based on a serial port ring network.
[0017] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention first solves the technical problems of complex parallel communication lines, limited hardware interface resources, and difficult expansion in traditional star-shaped multi-channel programmers by constructing a serial port ring network topology structure in which the master control unit and multiple slave programming modules are connected end to end. It achieves the technical effect of cascading and expanding multiple programming nodes by only occupying one set of transmit and receive pins of the master control unit, thereby reducing hardware wiring costs and improving the flexibility of production line equipment expansion.
[0018] 2. By using a mirror-segmented directional buffer-broadcast instruction synchronous triggering control mechanism and a time-division multiplexing status feedback strategy, the problems of data transmission congestion caused by limited serial bus bandwidth, poor synchronization of multi-node concurrent control, and feedback data conflicts are solved. This enables high-speed parallel programming control under low-speed serial networks, ensuring millisecond-level precise synchronization at the start of all channels, and guaranteeing the consistency and high reliability of batch programming. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the hardware topology of the multi-channel programmer of the present invention; Figure 2 This is a flowchart of a multi-channel programming method based on a serial port ring network according to the present invention. Detailed Implementation
[0020] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0021] The term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone.
[0022] Example 1 The main control unit execution module is configured to generate burning instructions, manage image data fragments, and coordinate network communication. The slave programming module is configured to configure a serial communication unit, a local cache unit, and a programming execution unit for each slave programming module. This embodiment describes in detail an 8-channel parallel programmer that utilizes a single serial port to achieve multi-node cascading, supports dynamic hot-plugging, and conflict detection.
[0023] As shown in Figure 1, Figure 1 This embodiment illustrates a hardware topology diagram of a multi-channel programmer disclosed herein. The system employs a closed-loop serial topology and primarily consists of one master control unit and eight slave programming modules. It includes a master control unit execution module, slave programming modules, and a serial port ring network module.
[0024] The core controller of the main control unit execution module is the high-performance microprocessor STM32H743. This chip has a high clock frequency and large RAM, and is responsible for global network coordination, image data sharding operation and programming instruction generation.
[0025] The main control unit execution module also includes a collision detection submodule. The main control unit is internally configured with collision detection logic to monitor the data transmission status in the serial port ring network in real time. Its principle is to listen to the loopback data at the RX end; if a level transition or parity error is detected outside the receive time slot, it is determined to be a bus collision. When a data collision is detected, each node is controlled to retransmit data according to a preset priority.
[0026] The main control unit execution module is configured with a set of USART interfaces, which serve as the start (TX) and end (RX) of the ring network.
[0027] The slave programming module is configured to configure a serial communication unit, a local cache unit, and a programming execution unit for each slave programming module; The serial communication unit uses an STM32F103 microprocessor as the protocol processing core for each module.
[0028] The serial communication unit integrates a dual serial port chip MAX3232, which is used to realize TTL and RS232 level conversion and supports stable transmission of RS232 standard level within 10 meters.
[0029] The programming execution unit integrates a dedicated programming chip CH341, which supports interfaces such as SPI and I2C and can be directly connected to the target device to be programmed (such as a Flash chip).
[0030] Each module in the local cache unit is configured with 128KB SRAM. This is the key to achieving "asynchronous transmission and synchronous programming": since the serial port transmission rate (such as 115200bps) is usually lower than the Flash write speed, the data must be temporarily stored completely first, and then written at high speed by the local MCU.
[0031] It also includes a hot-swap detection unit: a status pin detection circuit is provided at the module interface, which triggers a network topology change signal when the physical connection is broken or a new module is connected.
[0032] A serial port ring network module is configured to connect the transmitting end of the master control unit to the receiving end of the first slave programming module, with each slave programming module connected sequentially end-to-end, and the transmitting end of the last slave programming module connected to the receiving end of the master control unit to form a closed loop. The slave programming module is configured to receive data packets from the previous node via the serial communication unit, parse them, and determine whether to store the data in the local cache unit or forward it to the next node based on the address matching result. The programming execution unit is configured to call the data in the local cache unit to perform parallel programming of the device to be programmed.
[0033] The physical connection topology of each programming module is as follows: Master TX to Slave 1 RX; Slave 1 TX to Slave 2 RX; ...; Slave 8 TX to Master RX. The communication rate is configured to 9600-115200bps and supports adaptive negotiation.
[0034] This application uses a custom high-efficiency frame format and supports both unicast and broadcast modes.
[0035] The frame structure is as follows: Address definitions are as follows: Broadcast address (0xFF): Received and parsed by all slave devices, used for synchronization commands (such as "Start burning"). Unicast address (0x01-0xFE): Parsed only by the target node; other nodes perform hardware-level transparent forwarding.
[0036] Example 2 Figure 2 This embodiment illustrates a flowchart of a multi-channel programming method based on a serial port ring network. Based on the same inventive concept as Embodiment 1, this invention provides a multi-channel programming method based on a serial port ring network, comprising the following steps: Step S1: Network Initialization and Dynamic Topology Construction: The master control unit sends address allocation instructions through the serial port ring network to assign unique node addresses to each slave programming module in the network and establish a node address list; specifically, it is represented as follows: Step S11, Power-on Enumeration: The master control unit sends a "token frame" carrying a counter. The first slave device intercepts it, assigns itself an address of 0x01, increments the counter by 1, and forwards the message. This process continues until the token returns to the master control unit. The master control unit then confirms the number of online nodes (8 in this example) based on the final count value.
[0037] Step S12, Hot-plug response: If the system detects the addition or removal of a slave module during operation, the master control unit will automatically reset the network and re-execute the enumeration process after receiving the topology change signal.
[0038] Step S2: The control unit divides the image data to be burned into multiple data fragments and marks each data fragment with a target slave address. Then, it sequentially sends the data fragments to the serial port ring network. The communication frame format used for data distribution includes: frame header, target address segment, data type segment, valid data segment, check segment, and frame trailer. The target address segment indicates the receiving object of the data fragment. When the target address segment is a broadcast address, all slave burning modules parse and process the valid data segment. When the target address segment is a unicast address, only the corresponding slave burning module parses it, and the other modules perform forwarding operations. The master control unit divides the 1MB image into eight 128KB data fragments, marking them with target addresses 0x01 to 0x08 respectively.
[0039] S3. Assume the image size to be burned is 1MB. Due to the limited bandwidth of the ring network, to maximize efficiency, the master control unit performs cascade forwarding: each slave burning module receives data fragments, parses the target slave address, and if the target slave address matches the local address, the data fragment is stored in the local cache; if it does not match, the data fragment is forwarded to the next node via the serial port. In this embodiment, the master control sends fragmented data marked Target=0x08. The data flows through slaves 0x01 to 0x07. These nodes parse the frame header address and find a mismatch, only regenerating the signal and forwarding it to the next node. Slave 0x08 receives the data, the address matches, and it stores it in the local SRAM cache. This process is repeated until the caches of all 8 nodes are full.
[0040] Step S4: Parallel programming and conflict avoidance: The master control unit sends a broadcast start command to the serial port ring network, and each slave programming module responds to the broadcast start command and simultaneously calls the locally cached data fragments to perform programming operations on the device to be programmed; In this embodiment, the main control unit sends a very short broadcast start command ( ).
[0041] Upon receiving the instruction simultaneously (with a microsecond error), all eight slave devices sever their data dependency with the ring network and instead access data from their local SRAM to drive the CH341 to program the target device. At this point, the programming speed is not limited by the serial port baud rate, but only by the Flash write speed.
[0042] Step S5: Status Feedback: During the programming operation, each slave programming module feeds back its real-time programming status to the master control unit through the serial port ring network. The status feedback employs a time-division multiplexing mechanism, including the master control unit allocating a fixed communication time slot to each slave programming module based on the number of connected slave modules; each slave programming module only sends its real-time programming status to the serial port ring network within its allocated communication time slot, avoiding data transmission conflicts.
[0043] In this embodiment, to avoid bus conflicts caused by 8 slave devices simultaneously sending progress data back to the master controller during the programming process, the system adopts a time-division multiplexing mechanism.
[0044] The communication timeline is divided into several fixed-length time slots. Let the feedback period for each slave device be... (e.g., 80ms), the total number of nodes is The duration of the sending window allocated to each node is .
[0045] Then the first Slave device (address) The start time of transmission Relative to the start of the cycle The relationship is: In this embodiment, it is set T=0~10ms: Slave 0x01 transmission status; T=10~20ms: Slave 0x02 transmission status; ...; T=70~80ms: Slave 0x08 transmission status.
[0046] The main control unit can refresh the progress of all channels across the entire network every 80ms.
[0047] Step S5 also includes a hot-swap management strategy. When the access or removal signal of the slave programming module is detected in the serial ring network, the master control unit receives a topology change signal. In response to the topology change signal, the master control unit re-executes the network initialization, updates the node address list, and reallocates communication time slots.
[0048] Step S6: Independent retry of abnormal nodes, including the master control unit summarizing the feedback status of each slave programming module, and when an abnormality is detected in a specific slave programming module, generating a unicast retry command for that specific slave programming module; after receiving the unicast retry command, the specific slave programming module re-executes the programming operation, and other slave programming modules in the serial port ring network maintain their current state.
[0049] If the master control unit receives a "verification failure" status within a certain time slot, or fails to receive feedback from a node (such as 0x03) within a timeout, it indicates that: the master control unit determines that the node is abnormal and generates a separate unicast retry instruction for address 0x03; the slave 0x03 re-executes the flashing after receiving the instruction; other normal nodes in the network (0x01, 0x02...) maintain their current state and are unaffected.
[0050] This embodiment achieves parallel programming of 8 channels through a ring serial network, saving 7 serial lines compared to the traditional star structure. When expanded to 16 channels, only 8 slave modules need to be added, with zero hardware modifications.
[0051] Example 3 This embodiment provides an electronic device, including: a processor and a memory, wherein the memory stores a computer program that can be called by the processor; The processor executes the aforementioned multi-channel programming method based on a serial port ring network by calling the computer program stored in memory.
[0052] This electronic device can vary considerably depending on its configuration or performance. It may include one or more Central Processing Units (CPUs) and one or more memories, wherein the memory stores at least one computer program, which is loaded and executed by the processor to implement the multi-channel programming method based on a serial port ring network provided in the above-described embodiment. The electronic device may also include other components for implementing device functions; for example, it may have wired or wireless network interfaces and input / output interfaces for data input and output. Details will not be elaborated upon in this embodiment.
[0053] Example 4 This embodiment proposes a computer-readable storage medium on which an erasable and rewritable computer program is stored. When the computer program runs on the computer device, it causes the computer device to execute the above-mentioned multi-channel programming method based on a serial port ring network.
[0054] For example, computer-readable storage media can be read-only memory (ROM), random access memory (RAM), compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage devices.
[0055] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0056] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0057] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0058] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0059] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A multi-channel programming method based on a serial port ring network, characterized in that: Includes the following steps: S1. Network Initialization: The main control unit sends an address allocation command through the serial port ring network to assign a unique node address to each slave programming module in the network and establish a node address list. S2. Data Distribution: The main control unit divides the image data to be burned into multiple data fragments, marks the target slave address for each data fragment, and then sends the data fragments to the serial port ring network in sequence. S3, Cascading Forwarding: Each slave programming module receives data fragments, parses the target slave address, and if the target slave address matches the local address, the data fragment is stored in the local cache; if they do not match, the data fragment is forwarded to the next node via the serial port. S4. Parallel programming: The main control unit sends a broadcast start command to the serial port ring network. Each slave programming module responds to the broadcast start command and simultaneously calls the locally cached data fragments to perform programming operations on the device to be programmed. S5. Status Feedback: During the burning operation, each slave burning module feeds back the real-time burning status to the main control unit through the serial port ring network.
2. The multi-channel programming method based on a serial port ring network according to claim 1, characterized in that: The status feedback in step S5 adopts a time-division multiplexing mechanism, including the master control unit allocating a fixed communication time slot to each slave programming module according to the number of connected slave programming modules; each slave programming module only sends the real-time programming status to the serial port ring network within the allocated communication time slot to avoid data transmission conflicts.
3. The multi-channel programming method based on a serial port ring network according to claim 1, characterized in that: The communication frame format used for data distribution in step S2 includes: frame header, destination address segment, data type segment, valid data segment, check segment, and frame trailer; wherein, the destination address segment is used to indicate the receiving object of the data fragment. When the destination address segment is a broadcast address, all slave programming modules parse and process the valid data segment; when the destination address segment is a unicast address, only the corresponding slave programming module parses it, and the other modules perform forwarding operations.
4. The multi-channel programming method based on a serial port ring network according to claim 1, characterized in that: It also includes an exception handling strategy, in which the master control unit summarizes the feedback status of each slave programming module, and when an exception is detected in a specific slave programming module, it generates a unicast retry instruction for that specific slave programming module; after receiving the unicast retry instruction, the specific slave programming module re-executes the programming operation, while other slave programming modules in the serial port ring network maintain their current state.
5. The multi-channel programming method based on a serial port ring network according to claim 2, characterized in that: Step S5 also includes a hot-swap management strategy. When the access or removal signal of the slave programming module is detected in the serial ring network, the master control unit receives a topology change signal. In response to the topology change signal, the master control unit re-executes the network initialization, updates the node address list, and reallocates communication time slots.
6. A multi-channel programmer based on a serial port ring network, used to execute the multi-channel programming method based on a serial port ring network as described in any one of claims 1-5, characterized in that, The programmer includes: The main control unit execution module is configured to generate burning instructions, manage image data fragments, and coordinate network communication. The slave programming module is configured to configure a serial communication unit, a local cache unit, and a programming execution unit for each slave programming module. A serial port ring network module is configured to connect the transmitting end of the master control unit to the receiving end of the first slave programming module, with each slave programming module connected sequentially end-to-end, and the transmitting end of the last slave programming module connected to the receiving end of the master control unit to form a closed loop. The slave programming module is configured to receive data packets from the previous node via the serial communication unit, parse them, and determine whether to store the data in the local cache unit or forward it to the next node based on the address matching result. The programming execution unit is configured to call the data in the local cache unit to perform parallel programming of the device to be programmed.
7. The multi-channel programmer based on a serial port ring network according to claim 6, characterized in that: The local cache unit in the slave programming module is an SRAM memory with a capacity configured to be greater than or equal to the data capacity for storing complete image data fragments, so as to support programming operations independent of network transmission speed in the parallel programming step.
8. The multi-channel programmer based on a serial port ring network according to claim 6, characterized in that: The main control unit execution module also includes a conflict detection submodule, which is configured to monitor the data transmission status of the serial port ring network. When a data conflict is detected, it controls each node to retransmit the data according to a preset priority.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the multi-channel programming method based on a serial port ring network according to any one of claims 1-5.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the multi-channel programming method based on a serial port ring network according to any one of claims 1-5.