Method and apparatus for industrial serial bus device ad hoc networking based on dynamic time slot mapping

CN122420282BActive Publication Date: 2026-09-25SOUTHERN POWER GRID DIGITAL GRID RESEARCH INSTITUTE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202610846215.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-09-25
Estimated Expiration
2046-06-12

AI Technical Summary

Technical Problem

目前对电力系统中的工业串行总线设备进行组网的方式,通常是通过主控节点发送扫描报文,并按节点跳数递增的规则进行地址分配,实现点对点的报文交互,然而,在面对海量光伏逆变器等采用标准RS485总线并联的场景时,点对点报文的交互过于繁琐,且对下层节点的响应时间缺乏微观层面的冲突规避机制,导致组网的效率降低

Benefits of technology

[0028]上述基于动态时隙映射的工业串行总线设备自组网方法、装置、计算机设备、计算机可读存储介质和计算机程序产品,通过主站响应组网扫描任务,生成包含时域资源参数和时序约束参数的组网报文,向总线中的各个从站广播组网报文,从站基于时域资源参数和时序约束参数,确定满足发送延时时间时,将从站的硬件标识信息发送至主站,主站基于硬件标识信息确定未组网时,分配对应的逻辑地址,并令从站设置逻辑地址后返回确认信息,主站基于确认信息完成从站的组网。相较于传统的通过点对点报文的交互进行组网,本方案通过向总线中的各个从站广播组网报文,由各个从站基于组网报文确定发送硬件标识信息的时间,由主站对各个硬件标识信息进行是否分配逻辑地址的判定,并基于分配的逻辑地址完成从站的组网,实现了提高工业串行总线设备的组网效率的技术效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122420282B_ABST
    Figure CN122420282B_ABST
Patent Text Reader

Abstract

The application relates to an industrial serial bus device self-organizing network method and device based on dynamic time slot mapping. A host station generates a network message in response to a network scanning task, and sends hardware identification information to each slave station in the bus in a corresponding time slot based on time domain resource parameters and timing constraint parameters in the broadcast, and the host station determines whether to allocate a corresponding logical address to the slave station based on the hardware identification information, so as to complete the network of the slave station. Compared with the traditional network formed through the interaction of point-to-point messages, the scheme broadcasts the network message to each slave station in the bus, each slave station determines the time of sending the hardware identification information based on the network message, the host station determines whether to allocate the logical address to each hardware identification information, and the network of the slave station is completed based on the allocated logical address, so that the technical effect of improving the network efficiency of the industrial serial bus device is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power equipment technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for self-organizing industrial serial bus devices based on dynamic time slot mapping. Background Technology

[0002] With the development of power technology, industrial serial bus devices such as photovoltaic power plant string inverter clusters, smart meter data acquisition, energy storage system battery management systems, and various field-level sensors support the operation of power systems. To improve the operating efficiency of power systems, it is necessary to connect various industrial serial bus devices to the network in a timely manner. Currently, the method for networking industrial serial bus devices in power systems is usually to send scanning messages by the master node and allocate addresses according to the rule of increasing node hop count to achieve point-to-point message interaction. However, when facing scenarios such as massive photovoltaic inverters connected in parallel using standard RS485 buses, point-to-point message interaction is too cumbersome, and there is a lack of micro-level conflict avoidance mechanisms for the response time of lower-level nodes, resulting in reduced networking efficiency.

[0003] Therefore, the current networking methods for industrial serial bus devices suffer from low efficiency. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for industrial serial bus device self-organizing networking based on dynamic time slot mapping that can improve efficiency in addressing the above-mentioned technical problems.

[0005] In a first aspect, this application provides a method for self-organizing industrial serial bus devices based on dynamic time slot mapping, including:

[0006] In response to the network scanning task, a network formation message is broadcast to each slave station in the bus; the network formation message includes time domain resource parameters and timing constraint parameters; the slave station is used to determine the transmission delay time according to the time domain resource parameters and the timing constraint parameters, and when the transmission delay time is met, the slave station's hardware identification information is sent to the master station;

[0007] If it is determined based on the hardware identification information that the slave station is not networked, then a corresponding logical address is allocated according to the hardware identification information;

[0008] An address setting request is generated based on the logical address and sent to the slave station; the slave station is used to set the logical address based on the address setting request and return confirmation information to the master station.

[0009] Based on the confirmation information, it is determined that the slave station has completed the network setup.

[0010] Secondly, this application provides a method for self-organizing industrial serial bus devices based on dynamic time slot mapping, including:

[0011] Obtain the network topology message broadcast by the master station; the network topology message includes time-domain resource parameters and timing constraint parameters;

[0012] The transmission delay time is determined based on the time-domain resource parameters and timing constraint parameters in the network packet.

[0013] When the transmission delay time is met, the hardware identification information of the slave station is sent to the master station; the master station is used to allocate a corresponding logical address based on the hardware identification information if it is determined that the slave station is not networked based on the hardware identification information; and to generate an address setting request based on the logical address and send it to the slave station.

[0014] The master station sets the logical address according to the address setting request and returns confirmation information to the master station; the master station is used to determine that the slave station has completed the network formation based on the confirmation information.

[0015] Thirdly, this application also provides an industrial serial bus device self-organizing network device based on dynamic time slot mapping, comprising:

[0016] The response module is used to respond to the network scanning task by broadcasting a network message to each slave station in the bus; the network message includes time domain resource parameters and timing constraint parameters; the slave station is used to determine the transmission delay time according to the time domain resource parameters and the timing constraint parameters, and when the transmission delay time is met, the slave station's hardware identification information is sent to the master station;

[0017] The allocation module is used to allocate a corresponding logical address based on the hardware identification information if it is determined that the slave station is not networked.

[0018] The first sending module is used to generate an address setting request based on the logical address and send it to the slave station; the slave station is used to set the logical address based on the address setting request and return confirmation information to the master station.

[0019] The networking module is used to determine, based on the confirmation information, that the slave station has completed networking.

[0020] Fourthly, this application also provides an industrial serial bus device self-organizing network device based on dynamic time slot mapping, comprising:

[0021] The acquisition module is used to acquire the network topology messages broadcast by the master station; the network topology messages include time-domain resource parameters and timing constraint parameters;

[0022] The first determining module is used to determine the transmission delay time based on the time domain resource parameters and the timing constraint parameters in the network packet;

[0023] The second sending module is used to send the hardware identification information of the slave station to the master station when the sending delay time is met; the master station is used to allocate a corresponding logical address according to the hardware identification information if it is determined based on the hardware identification information that the slave station is not networked; and to generate an address setting request according to the logical address and send it to the slave station.

[0024] The second determining module is used to set a logical address according to the address setting request and return confirmation information to the master station; the master station is used to determine that the slave station has completed the network formation according to the confirmation information.

[0025] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.

[0026] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0027] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.

[0028] The aforementioned method, apparatus, computer equipment, computer-readable storage medium, and computer program product for self-organizing industrial serial bus devices based on dynamic time slot mapping, through a master station responding to a network scanning task, generates a network formation message containing time-domain resource parameters and timing constraint parameters, and broadcasts the network formation message to each slave station on the bus. Based on the time-domain resource parameters and timing constraint parameters, the slave station determines that the transmission delay time is met and sends its hardware identification information to the master station. If the master station determines that no network has been formed based on the hardware identification information, it allocates the corresponding logical address, instructs the slave station to set the logical address, and returns an acknowledgment message. The master station completes the network formation of the slave station based on the acknowledgment message. Compared to traditional networking through point-to-point message interaction, this solution improves the networking efficiency of industrial serial bus devices by broadcasting a network formation message to each slave station on the bus, allowing each slave station to determine the time to send its hardware identification information based on the network formation message, and the master station determining whether to allocate a logical address based on the allocated logical address. Attached Figure Description

[0029] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0030] Figure 1 This is an application environment diagram of an industrial serial bus device self-organizing network method based on dynamic time slot mapping in one embodiment;

[0031] Figure 2 This is a flowchart illustrating an industrial serial bus device self-organizing network method based on dynamic time slot mapping in one embodiment.

[0032] Figure 3 This is a flowchart illustrating an industrial serial bus device self-organizing network method based on dynamic time slot mapping in another embodiment.

[0033] Figure 4 This is a flowchart illustrating an industrial serial bus device self-organizing network method based on dynamic time slot mapping in yet another embodiment;

[0034] Figure 5 This is a structural block diagram of an industrial serial bus device self-organizing network device based on dynamic time slot mapping in one embodiment;

[0035] Figure 6 This is a structural block diagram of an industrial serial bus device self-organizing network device based on dynamic time slot mapping in another embodiment;

[0036] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0038] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0039] In related technologies, with the development of power technology, industrial serial bus devices such as photovoltaic power plant string inverter clusters, smart meter data acquisition, energy storage system battery management systems, and various field-level sensors support the operation of power systems. To improve the operating efficiency of power systems, it is necessary to connect various industrial serial bus devices to the grid in a timely manner.

[0040] For example, a master node sends scanning messages and assigns addresses according to an increasing number of hops. This technology focuses on hierarchical tree or cascaded networks. However, in scenarios with a large number of photovoltaic inverters connected in parallel using a standard RS485 bus, point-to-point message interaction is too cumbersome, and there is a lack of micro-level conflict avoidance mechanisms for lower-level node response times. Alternatively, a master broadcasts a preemption command, and slaves use random number generators to generate delays and select addresses to respond. This type of technology relies on a purely probabilistic random backoff mechanism. When a large number of unassigned devices power on and connect to the network simultaneously, if the random number range is too small, multiple slaves are prone to driving the bus to respond at similar times, causing physical layer differential level conflicts (i.e., broadcast storms). If the random number range is too large, network convergence time deteriorates exponentially, significantly reducing the efficiency and reliability of system initialization.

[0041] This also includes using an electronic lock mechanism within the slave nodes to lock all slave nodes except the first node during the initial allocation phase, and then sending unlocking information to the next level sequentially after the previous node has completed its allocation, thus achieving pipelined allocation. While this technology avoids bus conflicts, it is highly dependent on the cascading unlocking order between nodes. If any node on the link experiences a communication failure or an electronic lock logic malfunction, all subsequent nodes will be unable to unlock and join the network, resulting in a very high risk of single-point failure. Furthermore, the pipelined, one-by-one unlocking allocation is still time-consuming when connecting a large number of devices.

[0042] Based on this, this application takes the conventional standard RS485 half-duplex parallel bus as the research object and proposes a method and system for self-organizing industrial serial bus devices based on dynamic time-slot hash mapping. It utilizes a mechanism combining computational power-downloaded spatial mapping and micro-temporal physical compensation to reduce concurrent data frame conflicts, achieving efficient and conflict-free discovery of massive numbers of devices. Simultaneously, it fully leverages the inherent unique identifier (Universally Unique Identifier, UUID) of each device to establish a persistent state machine mapping table, adaptively achieving secure distribution of conflict-free logical addresses. This enables conflict-free automatic scanning of slave devices, dynamic logical addressing (self-organizing network) based on dynamic time-slot hash mapping, and a method and system for persistent discovery of network topology. This technology is widely applied in photovoltaic power plant string inverter clusters, smart meter data acquisition, energy storage system battery management systems, and plug-and-play networking scenarios for various field-level sensors.

[0043] The self-organizing network method for industrial serial bus devices based on dynamic time slot mapping provided in this application can be applied to, for example... Figure 1 The application environment shown depicts a scenario where the master station and each slave station communicate via a bus. During network setup, the master station broadcasts network setup messages via the bus. Each slave station sends its hardware identification information to the master station based on these messages. The master station then uses this hardware identification information to establish the network connection between the slave stations. The master station and each slave station can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0044] In one exemplary embodiment, such as Figure 2 As shown, a self-organizing network method for industrial serial bus devices based on dynamic time slot mapping is provided, which is then applied to... Figure 1 Taking the main station as an example, the explanation includes the following steps S202 to S208. Wherein:

[0045] In step S202, in response to the network scanning task, a network message is broadcast to each slave station in the bus; the network message includes time domain resource parameters and timing constraint parameters; the slave station is used to determine the transmission delay time according to the time domain resource parameters and the timing constraint parameters, and when the transmission delay time is met, the slave station's hardware identification information is sent to the master station.

[0046] Both the master station and slave stations can be devices within the power system. They are connected via a bus. The network topology between the master station and each slave station adopts a standard two-wire RS485 half-duplex parallel architecture, primarily consisting of one master station (scanning end) and multiple slave stations (responding ends, such as photovoltaic inverters) connected to the bus. To ensure compatibility with the standard Modbus Remote Terminal Unit (Modbus RTU) protocol, the master station has established an independent instruction set within a user-defined function code range (e.g., 0x41 to 0x44) for automatic device discovery and logical addressing. The master station can initiate network scanning tasks to detect slave stations not yet connected to the network and can also update the status of already connected slave stations.

[0047] When a network scanning task is triggered, the master station can respond by generating a network packet. The master station can determine the time-domain resource parameters and timing constraint parameters, and combine these parameters to generate the network packet. The time-domain resource parameters represent the time resources provided to slave stations for sending network entry messages (such as sending the slave's hardware identification message). The master station can determine the transmission time of the hardware identification message for each slave station based on these parameters. The timing constraint parameters represent parameters that constrain the latency and other parameters of the signals sent by slave stations to reduce collisions when they send signals to the master station. After receiving the network packet, the master station can broadcast the network packet to all slave stations on the bus.

[0048] The slave station can continuously listen for broadcast networking messages. Upon detecting a networking message on the bus, the slave station can obtain the stiffness time-domain resource parameters and timing constraint parameters from the message. Based on these parameters, the slave station can determine the transmission delay time. This delay time represents the time required for the slave station to send its hardware identification information to the master station, avoiding signal conflicts with other slave stations. When the slave station detects that the transmission delay time is met, it indicates that the current time has reached the corresponding time window for that slave station. At this time, the slave station can send its hardware identification information (such as its unique device identifier) ​​to the master station. The master station can then determine whether the slave station needs to form a network based on this information. The transmission delay time can be different for each slave station.

[0049] Step S204: If it is determined that the slave station is not networked based on the hardware identification information, then allocate the corresponding logical address according to the hardware identification information.

[0050] The slave stations that send the aforementioned hardware identification information may include slave stations that have already joined the network or slave stations that have not yet joined the network. For slave stations that have already joined the network, when the master station receives the aforementioned hardware identification information, it can refresh the active timestamp corresponding to the slave station while keeping its logical address unchanged.

[0051] If the master station receives the aforementioned hardware identification information and detects that the corresponding slave station is not networked, the master station can allocate a corresponding logical address based on the hardware identification information of the slave station. For example, the master station can select one of the available logical addresses and map it to the hardware identification information, thus associating the hardware identification information with the logical address.

[0052] Step S206: Generate an address setting request based on the above logical address and send it to the above slave station; the above slave station is used to set the above logical address based on the above address setting request and return confirmation information to the above master station.

[0053] The master station assigns and maps logical addresses to the hardware identifiers of unnetworked slave stations. Based on these assigned logical addresses, it can generate corresponding address setting requests. The master station can then send these address setting requests to the unnetworked slave stations. Upon receiving the address setting request, the slave station sets its own logical address based on the logical address in the request and returns a confirmation message to the master station after completion. This confirmation message indicates to the master station that the address setting is complete.

[0054] Step S208: Based on the above confirmation information, confirm that the above slave station has completed the network formation.

[0055] The master station can receive confirmation messages from the slave station. Upon receiving these confirmation messages, the master station can determine that the slave station has completed the logical address configuration, thus confirming that the slave station has successfully joined the network. When the slave station successfully joins the network, the master station can update its network status; for example, updating it to an active status indicates that the slave station has successfully joined the network.

[0056] In the aforementioned self-organizing network method for industrial serial bus devices based on dynamic time slot mapping, the master station responds to the network scanning task, generates a network formation message containing time-domain resource parameters and timing constraint parameters, and broadcasts the network formation message to each slave station on the bus. Based on the time-domain resource parameters and timing constraint parameters, the slave station determines that the transmission delay time is met and sends its hardware identification information to the master station. If the master station determines that no network has been formed based on the hardware identification information, it allocates the corresponding logical address and instructs the slave station to set the logical address before returning an acknowledgment message. The master station completes the network formation of the slave station based on the acknowledgment message. Compared to traditional network formation through point-to-point message interaction, this scheme improves the networking efficiency of industrial serial bus devices by broadcasting a network formation message to each slave station on the bus. Each slave station determines the time to send its hardware identification information based on the network formation message, and the master station determines whether to allocate a logical address based on the allocated logical address.

[0057] In one embodiment, the time-domain resource parameters include the total number of time slots and the physical width of a single slot; the timing constraint parameters include a protection delay and a random jitter window threshold; the total number of time slots represents the number of time windows for receiving the hardware identification information of the slave station; the physical width of a single slot represents the size of the time window; the protection delay represents the delay between adjacent time windows; and the random jitter window threshold represents the threshold for allowing random jitter time generated by the slave station.

[0058] In this embodiment, the aforementioned time-domain resource parameters and timing constraint parameters can include various types. For example, the time-domain resource parameters can include the total number of time slots and the physical width of a single slot. The total number of time slots represents the number of time windows for receiving the hardware identification information of the slave station; the physical width of a single slot represents the size of the time window; the timing constraint parameters include a protection delay and a random jitter window threshold. The protection delay represents the delay between adjacent time windows; the random jitter window threshold represents a threshold for allowing random jitter time generated by the slave station.

[0059] Specifically, before broadcasting the network topology message, the master station can first generate the network topology message. The master station can trigger network probing and dynamic parameter distribution based on a network topology scan task. Internally, the master station initiates a network topology scan task, initializing dynamic scan parameters (such as time-domain resource parameters and timing constraint parameters). The master station assembles a global broadcast message (network topology message) with a target address of 0x00, and the function code is defined as a custom 0x41 (scan broadcast frame). The master station encapsulates key dynamic parameters in the message's data payload area, including: the total number of time slots N. count (Usually powers of 2, such as 64 or 128), single slot physical width T slot (Must be greater than the sum of single-frame transmission time and protection interval), basic protection delay (protection delay) T base and the maximum allowed random jitter window T jitter_max (That is, the aforementioned random jitter window threshold, such as 800 microseconds). After the message is subjected to a Cyclic Redundancy Check (CRC) verification, it is broadcast via the RS485 bus.

[0060] Through this embodiment, the master station can determine time-domain resource parameters and timing constraint parameters based on various types of parameters, and then generate networking messages based on the above parameters for slave stations to join the network, thereby improving the networking efficiency of industrial serial bus devices.

[0061] In one embodiment, after broadcasting a network message to each slave station in the bus in response to a network scanning task, the method further includes: listening for hardware identification information sent by the slave stations within a target listening duration; the target listening duration is determined based on the sum of the protection delay, the random jitter window threshold, and the total duration of the time slots; the total duration of the time slots is determined based on the total number of time slots and the physical width of a single slot.

[0062] In this embodiment, after the master station broadcasts the network configuration message, it can perform a corresponding listening process. This listening process can involve listening to the hardware identification information sent by each slave station. Specifically, the master station can determine the target listening duration based on the aforementioned protection delay, the aforementioned random jitter window threshold, and the sum of the total time slot duration. Within the target listening duration, it listens to the hardware identification information sent by the slave stations. The total time slot duration can be determined based on the total number of time slots and the physical width of each slot.

[0063] Specifically, the master station can determine the target listening duration, which can be expressed as: T window =T base +N count ×T slot +T jitter_max Among them, T window N represents the target monitoring duration in milliseconds. count ×T slot This indicates the total duration of the time slot. After broadcasting the network configuration message, the master station can initiate a silent listening period of up to the specified target listening duration without interference.

[0064] Through this embodiment, the master station can listen for the target listening time after broadcasting the networking message, and fully receive the hardware identification information returned by each slave station, thereby improving the networking efficiency of industrial serial bus devices.

[0065] In one embodiment, allocating a corresponding logical address based on the aforementioned hardware identification information includes: obtaining the current minimum available address from the logical address pool; generating a mapping relationship between the aforementioned hardware identification information and the aforementioned current minimum available address; and determining that the aforementioned current minimum available address is used as the logical address corresponding to the aforementioned hardware identification information.

[0066] In this embodiment, for slave stations that are not networked, after receiving the corresponding hardware identification information, the master station can assign a corresponding logical address to it. The master station can maintain a logical address pool containing multiple logical addresses. These logical addresses have a specific size order. The master station can obtain the currently available minimum address from the logical address pool and generate a mapping relationship between the aforementioned hardware identification information and the currently available minimum address. Based on this mapping relationship, the master station determines to use the currently available minimum address as the logical address corresponding to the aforementioned hardware identification information, that is, it assigns the currently available minimum address to the logical address corresponding to the aforementioned hardware identification information.

[0067] Specifically, the master station can perform persistent state machine decisions and address pool management based on the device's unique identifier (hardware identification information). Internally, the master station maintains a persistent device mapping table, with fields including: device unique identifier (UUID), logical address (logicAddr, 1 to 247), status code (active / pending / conflict / offline), and last discovered timestamp (lastSeenTs). The master station iterates through the cached set collected in this round (the cached set contains hardware identification information sent by each slave station) and executes the following decision algorithm: For debouncing of already bound devices: If the current hardware identification information already exists in the mapping table, the master station directly refreshes its active timestamp, maintaining its original logic unchanged. For new devices joining the network, if the master station detects that the hardware identification information is a completely new device unique identifier, the master station selects the smallest available logical address from the available logical address pool (excluding broadcast address 0 and specific reserved addresses), generates a mapping record, and marks its status as pending distribution. The main station can also issue conflict alerts. If it detects a risk of overlapping logical address pools, it will mark it as a conflict alert.

[0068] The master station can also perform targeted address assignment, successful node removal, and conflict-based iterative rescanning. In the first phase (prioritizing clearly acquired nodes): for new devices in the pending assignment state, the master station serially sends downlink messages via function code 0x43 (address setting request), with the payload containing [uuid (device unique identifier)][newAddr (new logical address)][applyMode (application mode)]. Upon receiving this, the target slave device solidifies the new logical address and returns an acknowledgment (return confirmation information) with 0x44. After receiving the acknowledgment, the master station changes the status in the mapping table to active, at which point the slave device officially joins the steady-state polling. Crucially, once a slave device obtains a non-zero valid logical address, it will automatically mask and refuse to respond to any subsequent 0x41 broadcast scan frames (network broadcast) for devices without addresses in its underlying logic.

[0069] Through this embodiment, the master station can allocate corresponding logical addresses to slave stations that are not yet networked based on the logical address pool, thereby improving the networking efficiency of industrial serial bus devices.

[0070] In one embodiment, in response to a network scanning task, after broadcasting a network message to each slave station in the bus, the method further includes: if a target network anomaly is detected in the slave station, expanding the time-domain resource parameters, and generating a new network message based on the expanded time-domain resource parameters and the timing constraint parameters; the target network anomaly indicates that the transmission delay time of the slave station coincides with the transmission delay time of other slave stations; and broadcasting the new network message to each of the non-networked slave stations in the bus.

[0071] In this embodiment, network anomalies may occur during the networking process of the aforementioned slave stations. The types of network anomalies can include various types, including target network anomalies. A target network anomaly indicates that the transmission delay time of the aforementioned slave station overlaps with the transmission delay time of other slave stations, meaning that at least two different slave stations are sending hardware identification information to the master station at the same time, resulting in a signal overlap conflict. The broadcasting of the aforementioned network packets can include multiple rounds. If the master station detects a target network anomaly among the slave stations, it can expand the aforementioned time-domain resource parameters and generate a new network packet based on the expanded time-domain resource parameters and the aforementioned timing constraint parameters. The master station then performs the next round of broadcasting based on the new network packet. The next round of broadcasting can be a broadcast performed after allocating logical addresses to all slave stations in the pending state in the current round. Therefore, the next round of broadcasting can be a broadcast to slave stations that are not yet networked. The master station broadcasts the new network packet to each of the aforementioned slave stations that are not yet networked on the bus, thereby providing more time slot resources for slave stations experiencing target network anomalies and reducing the probability of the anomaly occurring.

[0072] Specifically, the master station can iteratively process residual conflicting nodes. Once all online slave devices in this round have completed address assignment and been muted (networking messages blocked), the master station assesses the conflict situation based on the recorded number of error frames (the number of times the target network anomaly occurred). No conflict (or zero error frames) indicates that all nodes scanned in this round have been clearly resolved and assigned, and the self-organizing process ends. Conflicts exist (error frame count greater than zero), indicating that there are still slave devices on the bus that have not been identified due to signal overlap. The master station will adaptively expand the time slot parameter N for the next round based on the error frame rate. count (That is, expanding the time-domain resource parameters, for example, doubling the number of slots to 128 or 256), and initiating the next round of 0x41 scan broadcast (networking message). Since the nodes that were successfully allocated in the previous round have been removed from the answer pool, only a very small number of nodes that collided in the previous round (slave stations with target network anomalies) participate in the new round of competition. In the new round with a more spacious time slot space, the probability of them colliding again decreases exponentially. The closed loop of the above detection, priority allocation, removal of successful participants, expansion and re-detection will be iterated until no error frames appear in a certain scan window, thus ensuring that all devices are connected to the network without being missed.

[0073] Through this embodiment, the master station can enable slave stations that experience networking anomalies to rejoin the network by expanding resources and rebroadcasting networking messages, thereby improving the networking efficiency of industrial serial bus devices.

[0074] In one embodiment, after broadcasting a network formation message to each slave station in the bus in response to a network scanning task, the method further includes: if it is determined that the slave station has formed a network based on the hardware identification information, then refreshing the corresponding active timestamp according to the hardware identification information to update the network status of the slave station corresponding to the hardware identification information.

[0075] In this embodiment, the slave station receiving the network broadcast may also include slave stations that have already formed a network. When the master station receives hardware identification information sent by a slave station that has formed a network, it can refresh the corresponding active timestamp based on the hardware identification information to update the network status of the slave station corresponding to the hardware identification information, while keeping the logical address of the slave station that has formed a network unchanged.

[0076] Specifically, the master station iterates through the cache set collected in this round (the cache set contains hardware identification information sent by each slave station) and executes the following decision algorithm: For debouncing of bound devices: if the current hardware identification information already exists in the mapping table, the master station directly refreshes its active timestamp, keeping its original logic unchanged.

[0077] Through this embodiment, the master station can determine the corresponding processing strategy based on the network status of the slave stations, thereby improving the networking efficiency of industrial serial bus devices.

[0078] In one exemplary embodiment, such as Figure 3 As shown, a self-organizing network method for industrial serial bus devices based on dynamic time slot mapping is provided, which is then applied to... Figure 1 Taking the slave station as an example, the explanation includes the following steps S302 to S308. Wherein:

[0079] Step S302: Obtain the network topology message broadcast by the master station; the network topology message includes time domain resource parameters and timing constraint parameters.

[0080] Both the master station and the slave station can be devices in the power system. The master station and the slave stations can be connected via a bus. The network topology between the master station and each slave station adopts a standard two-wire RS485 half-duplex parallel architecture, mainly consisting of one master station (scanning end) and multiple slave stations (response ends, such as photovoltaic inverters) connected to the bus.

[0081] When a network scanning task is triggered, the master station can respond by generating a network message. The slave station can continuously listen for the broadcast network messages. After detecting a network message on the bus, the slave station can obtain the stiffness time-domain resource parameters and timing constraint parameters based on the network message.

[0082] Step S304: Determine the transmission delay time based on the time domain resource parameters and timing constraint parameters in the above network message.

[0083] The slave station can determine the transmission delay time based on time-domain resource parameters and timing constraint parameters. The transmission delay time represents the time required for the slave station to send its hardware identification information to the master station, in order to avoid signal conflicts with other slave stations.

[0084] Step S306: When the above-mentioned transmission delay time is met, the hardware identification information of the slave station is sent to the master station; the master station is used to allocate a corresponding logical address based on the hardware identification information if it is determined that the slave station is not networked based on the hardware identification information; and to generate an address setting request based on the logical address and send it to the slave station.

[0085] When a slave station detects that the aforementioned transmission delay time has been met, it indicates that the current time has reached the time window corresponding to that slave station. At this time, the slave station can send its hardware identification information (such as the slave station's unique device identifier) ​​to the master station. The master station can then determine whether the slave station needs to form a network based on the hardware identification information sent by the slave station. The transmission delay time can be different for each slave station.

[0086] If the master station receives the aforementioned hardware identification information and detects that the corresponding slave station is not networked, the master station can allocate a corresponding logical address based on the hardware identification information of the slave station. For example, the master station can select one of the available logical addresses and map it to the hardware identification information, thus associating the hardware identification information with the logical address.

[0087] Step S308: Set the logical address according to the address setting request and return confirmation information to the master station; the master station is used to determine that the slave station has completed the network formation based on the confirmation information.

[0088] The master station, after assigning and mapping logical addresses to the hardware identifiers of unnetworked slave stations, can generate corresponding address setting requests based on the assigned logical addresses. The master station can then send these address setting requests to the unnetworked slave station. Upon receiving the address setting request, the slave station can set its own logical address based on the logical address in the request and return a confirmation message to the master station after completion. This confirmation message indicates to the master station that the address setting is complete.

[0089] After receiving the above confirmation information, the master station can determine that the slave station has completed the logical address configuration, thus confirming that the slave station has successfully joined the network. When the slave station successfully joins the network, the master station can update the network status of the slave station. If it is updated to an active status, it indicates that the slave station has successfully joined the network.

[0090] In the aforementioned self-organizing network method for industrial serial bus devices based on dynamic time slot mapping, the master station responds to the network scanning task, generates a network formation message containing time-domain resource parameters and timing constraint parameters, and broadcasts the network formation message to each slave station on the bus. Based on the time-domain resource parameters and timing constraint parameters, the slave station determines that the transmission delay time is met and sends its hardware identification information to the master station. If the master station determines that no network has been formed based on the hardware identification information, it allocates the corresponding logical address and instructs the slave station to set the logical address before returning an acknowledgment message. The master station completes the network formation of the slave station based on the acknowledgment message. Compared to traditional network formation through point-to-point message interaction, this scheme improves the networking efficiency of industrial serial bus devices by broadcasting a network formation message to each slave station on the bus. Each slave station determines the time to send its hardware identification information based on the network formation message, and the master station determines whether to allocate a logical address based on the allocated logical address.

[0091] In one embodiment, determining the transmission delay time based on the time-domain resource parameters and timing constraint parameters in the network packet includes: determining the time slot index information corresponding to the slave station based on the slave station's hardware identification information and the total number of time slots; the time slot index information representing the position of the time window corresponding to the slave station's transmission of hardware identification information; generating a corresponding random jitter window based on the random jitter window threshold; and determining the transmission delay time based on the protection delay, the time slot index information, the single slot physical width, and the random jitter window.

[0092] In this embodiment, the aforementioned time-domain resource parameters include the total number of time slots and the physical width of a single slot. The aforementioned timing constraint parameters include protection delay and random jitter window threshold. The slave station can combine the time-domain resource parameters and timing constraint parameters to determine its own transmission delay time for sending hardware identification information. Specifically, the slave station can determine the corresponding time slot index information based on its hardware identification information and the total number of time slots. The time slot index information represents the position of the time window in which the slave station can send its hardware identification information, i.e., in which time window the slave station can send its hardware identification information. The slave station can generate a corresponding random jitter window based on the aforementioned random jitter window threshold, such as generating a random jitter window smaller than the threshold. Therefore, the slave station can determine the transmission delay time based on the aforementioned protection delay, the aforementioned time slot index information, the aforementioned physical width of a single slot, and the aforementioned random jitter window.

[0093] Specifically, after the master station broadcasts the network formation message, the slave station can perform edge computing power dimensionality reduction and dual-domain spatiotemporal transformation. After receiving and verifying the 0x41 broadcast frame (network formation message), the slave station extracts its factory-defined unique device identifier (UUID) in parallel. The slave station uses its built-in FNV-1a non-cryptographic hash engine to perform dimensionality reduction calculation on the device unique identifier, obtaining a 32-bit intermediate hash digest. Subsequently, the hash digest is compared with the N obtained from the broadcast. count Perform the modulo operation (to improve execution efficiency, when N...) count When the value is a power of 2, it can be converted to a bitwise AND operation, obtaining the discrete macroscopic slot index (time slot index information, Index) of the slave station in this round of scanning. slot Index slot =Hash FNV-1a (UUID)(mod N count ).

[0094] Meanwhile, the slave station uses the noise floor of the hardware analog-to-digital converter (ADC) or the floating pin voltage as a random seed to generate a micro-random jitter time T within the maximum random jitter window threshold range. jitter (Randomly jittering window). Finally, the slave microprocessor calculates the physical absolute delay T that triggers the Universal Synchronous / Asynchronous Receiver / Transmitter (UART) transmit engine. response (Send delay time), the formula is as follows: T response =T base +(Index slot ×T slot )+T jitter T base This ensures that all nodes synchronize with the starting point; where Index slot ×T slot Achieve macroscopic collision avoidance zone isolation; T jitter Used to break absolute time deadlocks caused by hash collisions in the same slot.

[0095] The slave station can also perform distributed time-division response and micro-level conflict resolution. When the slave station's local timer reaches its calculated T... response At that time, the slave station uses the custom function code 0x42 (registration response frame) to report its hardware identification information in plaintext to the bus. Most slave stations report safely within non-overlapping time slots; if two slave stations experience a hash collision, due to their respective generated T... jitterWith a microsecond-level difference, the slave station that first pulls the bus start bit low is highly likely to be locked and successfully decoded by the master station's universal asynchronous transceiver hardware. During the listening window, the master station passively collects all valid 0x42 frames and extracts unique hardware identification information to form a temporary buffer set of devices online in this round. On the other hand, the master station's underlying driver records the number of cyclic redundancy check errors or frame format errors (the number of times the target network is abnormal) that occur in this round of scanning. These erroneous frames represent hard collision nodes that could not be recovered by micro-jitter due to severe signal superposition, and the master station will use them as an important basis for determining whether to rescan.

[0096] Through this embodiment, the slave station can combine time-domain resource parameters and timing constraint parameters to determine the transmission delay time for sending hardware identification information, thereby reducing conflicts that occur when the slave station is networked and improving the networking efficiency of industrial serial bus devices.

[0097] In one exemplary embodiment, such as Figure 4 As shown, Figure 4 This is a flowchart illustrating a self-organizing network method for industrial serial bus devices based on dynamic time slot mapping in another embodiment. In this embodiment, the implementation target is a cluster of half-duplex communication bus devices such as RS485 (e.g., photovoltaic inverters), and includes the following steps:

[0098] A dynamic time-slot hash mapping unit based on the FNV-1a algorithm is introduced into the network discovery control loop. The master station dynamically broadcasts time slot parameters, and the slave stations hash and map their own hardware identification information to discrete time slots in parallel, which greatly dilutes the probability of concurrent collisions from a macroscopic perspective. Microscopic random jitter (T) is introduced into the slave station physical transmission loop. jitter The compensation unit uses a high-frequency timer to generate microsecond-level asynchronous misalignment. Combined with the start-edge capture effect of the receiver of the universal asynchronous transceiver, it forcibly tears open the decoding window at the physical level, transforming hash collisions into valid frames that are highly likely to be captured by fault tolerance. Based on steady-state mapping priority control, a logical addressing design method combining persistent address pool (logical address pool) allocation and device lifecycle state machine is given to ensure that old device addresses are not lost and new devices automatically and seamlessly join the network.

[0099] Before broadcasting the network topology message, the master station can generate a network topology message. The master station can trigger network probing and dynamic parameter distribution based on a network topology scan task. Internally, the master station initiates a network topology scan task, initializing dynamic scan parameters (such as time-domain resource parameters and timing constraint parameters). The master station assembles a global broadcast message (network topology message) with a target address of 0x00, and the function code is defined as a custom 0x41 (scan broadcast frame). The master station encapsulates key dynamic parameters in the message's data payload area, including: the total number of time slots N. count(Usually powers of 2, such as 64 or 128), single slot physical width T slot (Must be greater than the sum of single-frame transmission time and protection interval), basic protection delay (protection delay) T base and the maximum allowed random jitter window T jitter_max (That is, the aforementioned random jitter window threshold, such as 800 microseconds). After the message undergoes a Cyclic Redundancy Check (CRC) verification, it is broadcast via the RS485 bus. The master station can determine the target listening duration, which can be specifically expressed as: T window =T base +N count ×T slot +T jitter_max Among them, T window N represents the target monitoring duration in milliseconds. count ×T slot This indicates the total duration of the time slot. After broadcasting the network configuration message, the master station can initiate a silent listening period of up to the specified target listening duration without interference.

[0100] After the master station broadcasts the network formation message, the slave station can perform edge computing dimensionality reduction and dual-domain spatiotemporal transformation. After receiving and verifying the 0x41 broadcast frame (network formation message), the slave station extracts its factory-installed unique device identifier (UUID) in parallel. The slave station uses its built-in FNV-1a non-cryptographic hash engine to perform dimensionality reduction calculation on the UUID, obtaining a 32-bit intermediate hash digest. Subsequently, the hash digest is compared with the N obtained from the broadcast. count Perform the modulo operation (to improve execution efficiency, when N...) count When the value is a power of 2, it can be converted to a bitwise AND operation, obtaining the discrete macroscopic slot index (time slot index information, Index) of the slave station in this round of scanning. slot Index slot =Hash FNV-1a (UUID)(mod N count ).

[0101] Meanwhile, the slave station uses the noise floor of the hardware analog-to-digital converter (ADC) or the floating pin voltage as a random seed to generate a micro-random jitter time T within the maximum random jitter window threshold range. jitter (Randomly jittering window). Finally, the slave microprocessor calculates the physical absolute delay T that triggers the Universal Synchronous / Asynchronous Receiver / Transmitter (UART) transmit engine. response (Send delay time), the formula is as follows: Tresponse =T base +(Index slot ×T slot )+T jitter T base This ensures that all nodes synchronize with the starting point; where Index slot ×T slot Achieve macroscopic collision avoidance zone isolation; T jitter This is used to break absolute time deadlock caused by hash collisions within the same slot. In some embodiments, the slave station can also use other non-cryptographic hash functions, which can also achieve spatial dimensionality reduction and time slot discretization of hardware identification information.

[0102] The slave station can also perform distributed time-division response and micro-level conflict resolution. When the slave station's local timer reaches its calculated T... response At that time, the slave station uses the custom function code 0x42 (registration response frame) to report its hardware identification information in plaintext to the bus. Most slave stations report safely within non-overlapping time slots; if two slave stations experience a hash collision, due to their respective generated T... jitter With a microsecond-level difference, the slave station that first pulls the bus start bit low is highly likely to be locked and successfully decoded by the master station's universal asynchronous transceiver hardware. During the listening window, the master station passively collects all valid 0x42 frames and extracts unique hardware identification information to form a temporary buffer set of devices online in this round. On the other hand, the master station's underlying driver records the number of cyclic redundancy check errors or frame format errors (the number of times the target network is abnormal) that occur in this round of scanning. These erroneous frames represent hard collision nodes that could not be recovered by micro-jitter due to severe signal superposition, and the master station will use them as an important basis for determining whether to rescan.

[0103] The master station can perform persistent state machine decisions and address pool management based on the device's unique identifier (hardware identification information). Internally, the master station maintains a persistent device mapping table, with fields including: device unique identifier (UUID), logical address (logicAddr, 1 to 247), status code (active / pending / conflict / offline), and last discovered timestamp (lastSeenTs). The master station iterates through the cached set collected in this round (containing hardware identification information sent by each slave station) and executes the following decision algorithm: For debouncing of already bound devices: If the current hardware identification information already exists in the mapping table, the master station directly refreshes its active timestamp, maintaining its original logic unchanged. For new devices joining the network, if the master station detects a completely new device unique identifier, it selects the smallest available logical address from the available logical address pool (excluding broadcast address 0 and specific reserved addresses), generates a mapping record, and marks its status as pending distribution. The main station can also issue conflict alerts. If it detects a risk of overlapping logical address pools, it will mark it as a conflict alert.

[0104] The master station can also perform targeted address assignment, successful node removal, and conflict-based iterative rescanning. In the first phase (prioritizing clearly acquired nodes): for new devices in the pending assignment state, the master station serially sends downlink messages via function code 0x43 (address setting request), with the payload containing [uuid (device unique identifier)][newAddr (new logical address)][applyMode (application mode)]. Upon receiving this, the target slave device solidifies the new logical address and returns an acknowledgment (return confirmation information) with 0x44. After receiving the acknowledgment, the master station changes the status in the mapping table to active, at which point the slave device officially joins the steady-state polling. Crucially, once a slave device obtains a non-zero valid logical address, it will automatically mask and refuse to respond to any subsequent 0x41 broadcast scan frames (network broadcast) for devices without addresses in its underlying logic.

[0105] In the second phase, the master station can iteratively process residual conflicting nodes. Once all online slave devices have completed address assignment and been muted (networking messages blocked), the master station assesses the conflict situation based on the recorded number of error frames (the number of times the target network anomaly occurred). No conflict (or zero error frames) indicates that all nodes scanned in this round have been clearly resolved and assigned, and the self-organizing process ends. Conflicts (error frame count greater than zero) indicate that there are still slave devices on the bus that have not been identified due to signal overlap. The master station will adaptively expand the time slot parameter N for the next round based on the error frame rate. count(That is, expanding the time-domain resource parameters, for example, doubling the number of slots to 128 or 256), and initiating the next round of 0x41 scan broadcast (networking message). Since the nodes that were successfully allocated in the previous round have been removed from the answer pool, only a very small number of nodes that collided in the previous round (slave stations with target network anomalies) participate in the new round of competition. In the new round with a more spacious time slot space, the probability of them colliding again decreases exponentially. The closed loop of the above detection, priority allocation, removal of successful participants, expansion and re-detection will be iterated until no error frames appear in a certain scan window, thus ensuring that all devices are connected to the network without being missed.

[0106] In addition to using the newly defined 0x43 and 0x44 custom function codes to implement address delivery and confirmation, the 0x06 (write a single holding register) or 0x10 (write multiple holding registers) function codes in the Modbus standard protocol can also be used to write a new logical address and effective flag data word to a specific high-order virtual register address (such as 0xFFFF) pre-agreed by the slave station, which can also achieve the purpose of logical address delivery and solidification.

[0107] Through the above embodiments, by broadcasting networking messages to each slave station in the bus, each slave station determines the time to send hardware identification information based on the networking messages, and the master station determines whether to allocate logical addresses to each hardware identification information, and completes the networking of slave stations based on the allocated logical addresses, the technical effect of improving the networking efficiency of industrial serial bus devices is achieved.

[0108] Furthermore, to address the issues of high collision rates from massive concurrent network access and single points of failure in cascaded allocation, corresponding solutions were proposed. The following technical effects were achieved: Zero hardware modification cost and extremely strong backward compatibility: No physical isolation circuits or complex series electronic locking mechanisms were required on the device side; the standard RS485 parallel daisy-chain topology was fully maintained. Plug-and-play functionality was achieved solely through software extensions of the pure firmware protocol stack (introducing custom function codes 0x41 to 0x44 and hash algorithms), significantly reducing BOM costs and construction / maintenance difficulty. Highly efficient detection and collision robustness approaching theoretical limits: The FNV-1a hash dimensionality reduction operation was cleverly combined with the underlying level time axis depth. When inevitable mathematical hash collisions occurred, microscopic random jitter was introduced, utilizing the start-edge capture effect to physically enable the system to forcibly decode overlapping conflict frames. This reduced the broadcast storms caused by traditional random backoff algorithms, resulting in a deterministic and extremely fast network convergence response. Adaptive healing lifecycle address management: Through a persistent mapping state machine design based on hardware identification information at the master station, it effectively distinguishes between new device access and old device reconnection after disconnection. It achieves absolute address stability for old devices and seamless dynamic allocation for new devices, eliminating address drift and confusion caused by network interruptions or restarts, and improving the long-term operational stability of industrial-grade fieldbus networks.

[0109] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0110] Based on the same inventive concept, this application also provides an industrial serial bus device self-organizing network device based on dynamic time slot mapping for implementing the above-mentioned industrial serial bus device self-organizing network method based on dynamic time slot mapping. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more embodiments of the industrial serial bus device self-organizing network device based on dynamic time slot mapping provided below can be found in the limitations of the industrial serial bus device self-organizing network method based on dynamic time slot mapping above, and will not be repeated here.

[0111] In one exemplary embodiment, such as Figure 5 As shown, an industrial serial bus device self-organizing network device based on dynamic time slot mapping is provided, including: a response module 500, an allocation module 502, a first sending module 504, and a networking module 506, wherein:

[0112] The response module 500 is used to respond to the network scanning task by broadcasting a network message to each slave station in the bus; the network message includes time-domain resource parameters and timing constraint parameters; the slave station is used to determine the transmission delay time according to the time-domain resource parameters and the timing constraint parameters, and when the transmission delay time is met, the slave station's hardware identification information is sent to the master station.

[0113] The allocation module 502 is used to allocate a corresponding logical address based on the hardware identification information if it is determined that the slave station is not networked.

[0114] The first sending module 504 is used to generate an address setting request based on the above logical address and send it to the above slave station; the above slave station is used to set the above logical address based on the above address setting request and return confirmation information to the above master station.

[0115] The networking module 506 is used to determine that the above-mentioned slave station has completed networking based on the above confirmation information.

[0116] In one embodiment, the apparatus further includes: a listening module, configured to listen to the hardware identification information sent by the slave station within a target listening duration; the target listening duration is determined based on the sum of the protection delay, the random jitter window threshold, and the total duration of the time slots; the total duration of the time slots is determined based on the total number of time slots and the physical width of a single slot.

[0117] In one embodiment, the allocation module 502 is used to obtain the current minimum available address from the logical address pool; generate a mapping relationship between the hardware identification information and the current minimum available address; and determine that the current minimum available address is used as the logical address corresponding to the hardware identification information.

[0118] In one embodiment, the above apparatus further includes: an anomaly handling module, configured to, if a target networking anomaly is detected in the slave station, expand the time-domain resource parameters, and generate a new networking message based on the expanded time-domain resource parameters and the timing constraint parameters; the target networking anomaly indicates that the transmission delay time of the slave station coincides with the transmission delay time of other slave stations; and broadcast the new networking message to each of the unnetworked slave stations in the bus.

[0119] In one embodiment, the apparatus further includes an update module, configured to update the network status of the slave station corresponding to the hardware identification information by refreshing the corresponding active timestamp based on the hardware identification information if it is determined that the slave station has been networked based on the hardware identification information.

[0120] In one exemplary embodiment, such as Figure 6 As shown, an industrial serial bus device self-organizing network device based on dynamic time slot mapping is provided, including: an acquisition module 600, a first determination module 602, a second transmission module 604, and a second determination module 606, wherein:

[0121] The acquisition module 600 is used to acquire the network topology messages broadcast by the master station; the network topology messages include time domain resource parameters and timing constraint parameters.

[0122] The first determining module 602 is used to determine the transmission delay time based on the time domain resource parameters and timing constraint parameters in the above-mentioned networking message.

[0123] The second sending module 604 is used to send the hardware identification information of the slave station to the master station when the aforementioned sending delay time is met; the master station is used to allocate a corresponding logical address based on the aforementioned hardware identification information if it is determined that the slave station is not networked based on the aforementioned hardware identification information; and to generate an address setting request based on the aforementioned logical address and send it to the slave station.

[0124] The second determining module 606 is used to set the logical address according to the above address setting request and return confirmation information to the above master station; the above master station is used to determine that the above slave station has completed the network formation according to the above confirmation information.

[0125] In one embodiment, the first determining module 602 is configured to determine the time slot index information corresponding to the slave station based on the slave station's hardware identification information and the total number of time slots; the time slot index information represents the position of the time window corresponding to the slave station sending the hardware identification information; generate a corresponding random jitter window based on the random jitter window threshold; and determine the transmission delay time based on the protection delay, the time slot index information, the single slot physical width, and the random jitter window.

[0126] The modules in the aforementioned industrial serial bus self-organizing network device based on dynamic time slot mapping can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0127] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores power data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network. When the computer program is executed by the processor, it implements a self-organizing network method for industrial serial bus devices based on dynamic time-slot mapping.

[0128] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0129] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method for self-organizing industrial serial bus devices based on dynamic time slot mapping.

[0130] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described method for self-organizing industrial serial bus devices based on dynamic time slot mapping.

[0131] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method for self-organizing industrial serial bus devices based on dynamic timeslot mapping.

[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0133] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0134] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0135] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for self-organizing industrial serial bus devices based on dynamic time slot mapping, characterized in that, Applied to the main station, the method includes: In response to the network scanning task, a network formation message is broadcast to each slave station in the bus. The network formation message includes time-domain resource parameters and timing constraint parameters. The time-domain resource parameters include the total number of time slots and the physical width of a single slot. The timing constraint parameters include guard delay and random jitter window threshold. Each slave station performs a hash operation on its hardware identification information, and then performs a modulo operation between the resulting hash digest and the total number of time slots to obtain the time slot index information corresponding to that slave station. The time slot index information represents the position of the time window corresponding to the slave station sending its hardware identification information. (The last sentence appears to be incomplete and possibly refers to a separate process: generating...) The random jitter time is within the random jitter window threshold range; a transmission delay time is determined based on the protection delay, the time slot index information, the single slot physical width, and the random jitter time; when the transmission delay time is met, the slave station's hardware identification information is sent to the master station; the total number of time slots represents the number of time windows for receiving the slave station's hardware identification information; the single slot physical width represents the size of the time window; the protection delay represents the delay between adjacent time windows; the random jitter window threshold represents the threshold for the random jitter time allowed to be generated by the slave station. If it is determined based on the hardware identification information that the slave station is not networked, then a corresponding logical address is allocated according to the hardware identification information; An address setting request is generated based on the logical address and sent to the slave station; the slave station is used to set the logical address based on the address setting request and return confirmation information to the master station. Based on the confirmation information, it is determined that the slave station has completed the network setup; It also includes: if, based on the cyclic redundancy check error frames and / or frame format error frames recorded within the target listening time, it is determined that there are still un-networked slave stations that have experienced conflicts and have not been identified, then the total number of time slots in the next round of networking messages is increased, and a new networking message is broadcast to the bus, so that the remaining un-networked slave stations can re-determine the time slot index information according to the increased total number of time slots; wherein, slave stations that have completed logical address settings and have been determined by the master station to have completed networking will no longer respond to the new networking message.

2. The method according to claim 1, characterized in that, After responding to the network scanning task and broadcasting the network packet to each slave station on the bus, the method further includes: Within the target listening duration, listen for the hardware identification information sent by the slave station; the target listening duration is determined based on the sum of the protection delay, the random jitter window threshold, and the total duration of the time slots; the total duration of the time slots is determined based on the total number of time slots and the physical width of a single slot.

3. The method according to claim 1, characterized in that, The step of allocating a corresponding logical address based on the hardware identification information includes: Obtain the current minimum available address from the logical address pool; Generate a mapping relationship between the hardware identification information and the current minimum available address, and determine that the current minimum available address is the logical address corresponding to the hardware identification information.

4. The method according to any one of claims 1 to 3, characterized in that, After responding to the network scanning task and broadcasting the network packet to each slave station on the bus, the method further includes: If it is determined that the slave station has been networked based on the hardware identification information, then the corresponding active timestamp is refreshed according to the hardware identification information to update the network status of the slave station corresponding to the hardware identification information.

5. A method for self-organizing industrial serial bus devices based on dynamic time slot mapping, characterized in that, Applied to a slave station, the method includes: Obtain the network topology message broadcast by the master station; the network topology message includes time domain resource parameters and timing constraint parameters; the time domain resource parameters include the total number of time slots and the physical width of a single slot; the timing constraint parameters include protection delay and random jitter window threshold; A hash operation is performed on the hardware identification information of the slave station. The resulting hash digest is then modulo-operated with the total number of time slots to obtain the time slot index information corresponding to the slave station. The time slot index information represents the position of the time window corresponding to the slave station sending the hardware identification information. A random jitter time within the random jitter window threshold range is generated. A transmission delay time is determined based on the protection delay, the time slot index information, the single slot physical width, and the random jitter time. The total number of time slots represents the number of time windows for receiving the hardware identification information of the slave station. The single slot physical width represents the size of the time window. The protection delay represents the delay between adjacent time windows. The random jitter window threshold represents the threshold for the random jitter time allowed to be generated by the slave station. When the transmission delay time is met, the hardware identification information of the slave station is sent to the master station; the master station is used to allocate a corresponding logical address based on the hardware identification information if it is determined that the slave station is not networked based on the hardware identification information; and to generate an address setting request based on the logical address and send it to the slave station. The master station sets the logical address according to the address setting request and returns confirmation information to the master station; the master station is used to determine that the slave station has completed networking according to the confirmation information; and is also used to expand the total number of time slots in the next round of networking messages and broadcast a new networking message to the bus if it is determined that there are still un-networked slave stations that have conflicted and have not been identified based on the cyclic redundancy check error frames and / or frame format error frames recorded within the target listening time. If the logical address setting is completed, subsequent networking messages for unnetworked slave stations will no longer be responded to; if the slave station has not yet completed networking and has received a new networking message broadcast by the master station, the total number of expanded time slots in the new networking message will be obtained, and the time slot index information will be re-determined based on the slave station's hardware identification information and the total number of expanded time slots.

6. An industrial serial bus device self-organizing network device based on dynamic time slot mapping, characterized in that, Applied to the main station, the device includes: The response module is used to respond to the network scanning task by broadcasting a network formation message to each slave station in the bus. The network formation message includes time-domain resource parameters and timing constraint parameters. The time-domain resource parameters include the total number of time slots and the physical width of a single slot. The timing constraint parameters include a protection delay and a random jitter window threshold. Each slave station performs a hash operation on its hardware identification information, and then performs a modulo operation between the resulting hash digest and the total number of time slots to obtain the time slot index information corresponding to that slave station. The time slot index information represents the position of the time window corresponding to the slave station sending the hardware identification information. The random jitter time within the random jitter window threshold range is generated; a transmission delay time is determined based on the protection delay, the time slot index information, the single slot physical width, and the random jitter time; when the transmission delay time is satisfied, the hardware identification information of the slave station is sent to the master station; the total number of time slots represents the number of time windows for receiving the hardware identification information of the slave station; the single slot physical width represents the size of the time window; the protection delay represents the delay between adjacent time windows; the random jitter window threshold represents the threshold for the random jitter time allowed to be generated by the slave station. The allocation module is used to allocate a corresponding logical address based on the hardware identification information if it is determined that the slave station is not networked. The first sending module is used to generate an address setting request based on the logical address and send it to the slave station; the slave station is used to set the logical address based on the address setting request and return confirmation information to the master station. The networking module is used to determine, based on the confirmation information, that the slave station has completed networking; It also includes an exception handling module, which, if it is determined, based on the cyclic redundancy check error frames and / or frame format error frames recorded within the target listening time, that there are still unidentified non-networked slave stations that have experienced conflicts, expands the total number of time slots in the next round of networking messages, broadcasts a new networking message to the bus, and causes the remaining non-networked slave stations to re-determine their time slot index information based on the expanded total number of time slots; wherein, slave stations that have completed logical address settings and have been determined by the master station to have completed networking will no longer respond to the new networking message.

7. The apparatus according to claim 6, characterized in that, The device further includes: a listening module, used for: Within the target listening duration, listen for the hardware identification information sent by the slave station; the target listening duration is determined based on the sum of the protection delay, the random jitter window threshold, and the total duration of the time slots; the total duration of the time slots is determined based on the total number of time slots and the physical width of a single slot.

8. The apparatus according to claim 6, characterized in that, The allocation module is used for: Obtain the current minimum available address from the logical address pool; Generate a mapping relationship between the hardware identification information and the current minimum available address, and determine that the current minimum available address is the logical address corresponding to the hardware identification information.

9. The apparatus according to any one of claims 6 to 8, characterized in that, The device further includes: an update module, used for: If it is determined that the slave station has been networked based on the hardware identification information, then the corresponding active timestamp is refreshed according to the hardware identification information to update the network status of the slave station corresponding to the hardware identification information.

10. An industrial serial bus device self-organizing network device based on dynamic time slot mapping, characterized in that, Applied to a slave station, the device includes: The acquisition module is used to acquire the network packets broadcast by the master station; the network packets include time-domain resource parameters and timing constraint parameters; the time-domain resource parameters include the total number of time slots and the physical width of a single slot; the timing constraint parameters include protection delay and random jitter window threshold. The first determining module is used to perform a hash operation on the hardware identification information of the slave station, and perform a modulo operation on the hash digest obtained and the total number of time slots to obtain the time slot index information corresponding to the slave station; the time slot index information represents the position information of the time window corresponding to the slave station sending the hardware identification information; generate random jitter time within the range of the random jitter window threshold; determine the transmission delay time according to the protection delay, the time slot index information, the single slot physical width and the random jitter time; the total number of time slots represents the number of time windows for receiving the hardware identification information of the slave station; the single slot physical width represents the size of the time window; the protection delay represents the delay between adjacent time windows; the random jitter window threshold represents the threshold for the random jitter time allowed to be generated by the slave station; The second sending module is used to send the hardware identification information of the slave station to the master station when the sending delay time is met; the master station is used to allocate a corresponding logical address according to the hardware identification information if it is determined based on the hardware identification information that the slave station is not networked; and to generate an address setting request according to the logical address and send it to the slave station. The second determining module is used to set a logical address according to the address setting request and return confirmation information to the master station; the master station is used to determine that the slave station has completed networking according to the confirmation information; it is also used to expand the total number of time slots in the next round of networking messages and broadcast a new networking message to the bus if it is determined that there are still un-networked slave stations that have conflicted and have not been identified based on the cyclic redundancy check error frames and / or frame format error frames recorded within the target listening time. The device is further configured to, if the logical address setting is completed, no longer respond to subsequent networking messages for unnetworked slave stations; if the slave station has not yet completed networking and has received a new networking message broadcast by the master station, obtain the total number of expanded time slots in the new networking message, and redetermine the time slot index information based on the slave station's hardware identification information and the total number of expanded time slots.

Citation Information

Patent Citations

  • Dynamic networking method and communication method based on RS-485

    CN104410557A