A bus time slot configuration method, device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202511882781.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2045-12-12
AI Technical Summary
[0009]基于上述技术问题,本发明提出一种总线时隙配置方法、装置、存储介质和电子设备,解决核电现场总线在组网前对通信时序进行可验证的可靠性评估与安全确认的问题
[0058]1.本发明提出一种总线时隙配置方法、装置、存储介质和电子设备,通过在从节点配置过程中采集从节点报文数据,依据实际通信情况计算帧周期并完成节点时隙划分,使得不同从节点的通信占用得到明确的周期性安排,避免了传统主从轮询方式中统一访问周期带来的带宽浪费;同时,主节点在发送时隙分配报文后,基于该报文构建通信时间的形式化模型,并对从节点的最坏通信完成时间进行分析,使通信时序在进入组网前即可被验证,解决了现有技术中无法在组网前评估通信确定性的问题;最终,主节点依据最坏通信完成时间是否满足要求决定是否发送倒计时帧进入组网阶段,从而避免不满足通信时限约束的从节点进入网络,提高了总线访问的效率、通信的可预测性以及组网过程的安全可靠性。
Smart Images

Figure CN121690905B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nuclear power plant bus control technology, specifically to a bus time slot configuration method, apparatus, storage medium, and electronic device. Background Technology
[0002] Fieldbus is an industrial data bus that has developed rapidly in recent years, used for real-time digital communication between field measurement and control devices. In typical industrial scenarios, traditional fieldbuses such as PROFIBUS-DP, Modbus RTU, and CC-Link often employ a master-slave communication architecture, where the master station polls the slave station, and the slave station passively responds. While this type of communication can meet basic data exchange requirements in general automation systems, it still presents the following problems in safety-critical or critical control systems such as those in nuclear power plants:
[0003] (1) The traditional architecture uses a fixed polling method, in which all slave devices are accessed once within the same period. However, the data refresh requirements of different devices in a nuclear power system vary greatly. For example, critical safety measurement points require high-frequency data acquisition, while some ordinary measurement points have a longer refresh cycle. Unified polling leads to a large amount of invalid communication, reduces the effective utilization of bus bandwidth, and is not conducive to meeting the deterministic communication requirements of nuclear-grade systems.
[0004] (2) Nuclear power systems require that the communication cycle, message sequence and response time have strict controllability and stability. However, traditional master-slave protocols do not provide a clear frame cycle derivation mechanism, nor do they support automatic division of communication time slots based on the actual message characteristics of the device. Bus communication behavior relies on manual configuration or experience settings, and it is difficult to verify in a timely manner whether the real-time constraints are still met when the communication scale increases or the load changes.
[0005] (3) Nuclear power systems generally adopt dual-bus, dual-master or redundant network architectures, but traditional master-slave protocols only provide basic capabilities for redundancy switching and node consistency verification, and do not support dynamic verification of node participation, time slot consistency or configuration consistency based on communication timing, which makes it difficult to meet the requirements of nuclear-grade systems for deterministic redundant communication.
[0006] Patent document CN116701281A discloses a method, system, device, and medium for adaptive bus cycle, including: acquiring module configuration information; the module configuration information includes: the number of input modules and the number of output modules; determining the total bus time slots based on the module configuration information; determining the bus cycle based on the total bus time slots; however, it does not address the issue of verifiable reliability assessment and safety confirmation of communication timing before the nuclear power fieldbus is networked.
[0007] Patent document CN106656711B discloses a token bus time slot predefinition method, which includes predefining token bus time slot priorities. Each unit determines the currently occupying unit, time slot, and the order of time slot occupation based on received messages, calculates its own occupied bus time slot, and sequentially occupies the bus to send messages. Using the predefined bus time slot storage working mode proposed in this invention, all units on the bus can determine the currently occupying unit and time slot based on the number and time of received messages, and send messages according to the predefined bus time slot priority order. However, this does not solve the problem of verifiable reliability assessment and security confirmation of communication timing before nuclear power fieldbus networking.
[0008] In summary, neither of the two existing patents mentioned above has solved the problem of verifying the reliability and safety of communication timing before the nuclear power fieldbus is networked. Summary of the Invention
[0009] Based on the above-mentioned technical problems, this invention proposes a bus time slot configuration method, device, storage medium, and electronic device to solve the problem of verifiable reliability assessment and security confirmation of communication timing before nuclear power fieldbus networking.
[0010] To achieve the above objectives, this invention proposes a bus time slot configuration method.
[0011] A bus time slot configuration method, comprising:
[0012] The master node and slave nodes are incorporated into the network, and the master node configures the slave nodes;
[0013] The master node collects slave node message data during the slave node configuration process, calculates the frame period based on the slave node message data, divides the node time slots based on the frame period, and sends a time slot allocation message to the slave node, the time slot allocation message including the frame period and the node time slot;
[0014] A formal model of communication time is constructed based on the time slot allocation message, and the worst-case communication completion time is obtained by analyzing the slave node according to the formal model.
[0015] The master node determines whether to send a countdown frame to the slave node to enter the networking phase based on the worst-case communication completion time.
[0016] Furthermore, the slave node message data includes slave node identifier, slave node type, slave node period, and message length.
[0017] Furthermore, the master node configures the slave node, including:
[0018] The master node sequentially sends slave node message data to the slave node, and the slave node sequentially responds to the master node; the master node sends a time synchronization message to the slave node, and after the slave node responds to the master node, the master node sends a test piece confirmation message to complete the configuration of the slave node.
[0019] Furthermore, the master node sequentially sends the slave node message data to the slave node, including:
[0020] The master node first sends a message containing the slave node's identifier to the slave node, and the slave node responds to the master node after setting the slave node's identifier; the master node then sends a message to the slave node including the slave node type, slave node period, and message length, and the slave node responds to the master node after setting the message accordingly.
[0021] Further, calculating the frame period based on the slave node message data includes:
[0022] The physical transmission time is calculated based on the link bandwidth and the message length. The node level is determined based on the slave node type and type weighting rules. The frame period is calculated based on the slave node period, the physical transmission time, and the node level, as expressed below:
[0023] ,
[0024] in The frame period is... For the slave node period, The node level of the i-th slave node. Let g be the physical transmission time of the i-th slave node, g be the guard time, i be the index, and M be the number of slave nodes. This is the upper bound of the synchronization error.
[0025] Furthermore, the physical transmission time is calculated based on the link bandwidth and the message length, and its expression is as follows:
[0026] ,
[0027] in The physical transmission time, The message length is... The bandwidth of the link is [value].
[0028] Furthermore, the type weighting rule includes:
[0029] When the slave node sends commands including reactor protection system commands, emergency shutdown control commands, core cooling critical feedback path commands, or emergency control commands, the node level is set to 2-3; when the slave node sends commands including safety auxiliary control commands or redundant paths for important measurement points, the node level is set to 1-2; when the slave node sends commands including switch control commands, data acquisition commands, statistical data commands, or data retrieval commands, the node level is set to 1.
[0030] Further, obtaining node time slots based on the frame period division includes:
[0031] The frame period is evenly divided into multiple first time slots according to the number of slave nodes. The period weights of all slave node periods are normalized. The node time slots corresponding to the slave nodes are obtained by multiplying the period weights by the first time slots.
[0032] Furthermore, the periodic weights are obtained by normalizing all the nodes' periods, and are expressed as follows:
[0033] ,
[0034] in The period weight is r, the node period is M, the number of slave nodes is i, and j are indices.
[0035] Furthermore, the frame period includes service frames and special frames.
[0036] Furthermore, the frame period also includes a reserved emergency time slot frame.
[0037] Furthermore, a formal model of communication time is constructed based on the time slot allocation message, including:
[0038] The formal model is constructed as follows:
[0039] ,
[0040] Where WCET is the formal model. The frame period is denoted as g, and the guard time is denoted as g. This is the upper bound of the synchronization error. To maximize preemption delay, This represents the maximum queuing delay.
[0041] Furthermore, the maximum preemption delay is expressed as follows:
[0042] ,
[0043] in The maximum preemption delay is... The number of consecutive triggers of the emergency time slot frame. The length of the emergency time slot frame.
[0044] Furthermore, the maximum queuing delay is expressed as follows:
[0045] ,
[0046] in For the maximum queuing delay, It is the maximum gap between two adjacent time slots of the nodes.
[0047] Furthermore, the worst-case communication completion time is obtained by analyzing the slave node based on the formal model, including:
[0048] The worst-case communication completion time is obtained by finding the maximum value of the formal model.
[0049] Further, determining whether the master node should send a countdown frame to the slave node to enter the network formation phase based on the worst-case communication completion time includes:
[0050] A preset communication security threshold is set. If the worst-case communication completion time is less than the communication security threshold, the master node will send a countdown frame to the slave node to enter the networking phase. If the worst-case communication completion time is greater than the communication security threshold, the frame period will be re-divided.
[0051] To achieve the above objectives, the present invention also proposes a bus time slot configuration device.
[0052] A bus time slot configuration device, characterized in that it comprises:
[0053] The configuration module is used to integrate master nodes and slave nodes into the network, wherein the master node sends an acknowledgment message to the slave node to configure the slave node;
[0054] The partitioning module is used to collect slave node message data during the slave node configuration process, calculate the frame period based on the slave node message data, partition the node time slots based on the frame period, and send a time slot allocation message to the slave node. The time slot allocation message includes the frame period and the node time slots.
[0055] The verification module is used to construct a formal model of communication time based on the time slot allocation message, and to analyze the slave node according to the formal model to obtain the worst communication completion time.
[0056] The networking module is used to determine whether the master node should send a countdown frame to the slave node to enter the networking phase based on the worst-case communication completion time.
[0057] Based on the above technical solution, the present invention has at least the following beneficial effects:
[0058] 1. This invention proposes a bus time slot configuration method, apparatus, storage medium, and electronic device. By collecting slave node message data during slave node configuration, calculating the frame period based on actual communication conditions, and completing node time slot allocation, the communication occupancy of different slave nodes is clearly and periodically arranged, avoiding the bandwidth waste caused by the uniform access period in the traditional master-slave polling method. Simultaneously, after sending the time slot allocation message, the master node constructs a formal model of communication time based on the message and analyzes the worst-case communication completion time of the slave nodes, allowing the communication timing to be verified before entering the network, solving the problem in existing technologies where communication determinism cannot be evaluated before network formation. Finally, the master node decides whether to send a countdown frame to enter the network formation stage based on whether the worst-case communication completion time meets the requirements, thereby preventing slave nodes that do not meet the communication time constraints from entering the network, improving the efficiency of bus access, the predictability of communication, and the security and reliability of the network formation process.
[0059] 2. This invention proposes a bus time slot configuration method, apparatus, storage medium, and electronic device. By collecting slave node message data such as slave node identifier, type, period, and message length, and calculating the frame period based on link bandwidth, type weight rules, and node period, the communication period occupancy of each slave node in the bus can be quantitatively expressed according to the actual transmission time, node level, and access frequency, thereby achieving adaptive construction of the frame period. Furthermore, the frame period is evenly divided according to the number of slave nodes and node time slots are generated by combining normalized period weights, so that the communication time slots of different slave nodes can be configured differently according to their access periods, avoiding bandwidth waste caused by uniform polling and improving the matching degree between bus bandwidth utilization and access scheduling.
[0060] 3. This invention proposes a bus time slot configuration method, device, storage medium, and electronic device. By reserving emergency time slot frames in the frame period and constructing a formal communication time model based on the time slot allocation message after the time slot allocation is completed, the communication time can be modeled and described using quantitative parameters such as frame period, guard time, upper bound of synchronization error, maximum preemption delay, and maximum queuing delay. The maximum preemption delay and maximum queuing delay are calculated based on the continuous triggering of emergency time slots and the time slot gap between nodes, respectively. This allows the model to cover the preemption and queue blocking effects during the communication process, so that the communication completion time that meets the worst-case condition constraints can be obtained before network deployment, realizing verifiable and quantifiable analysis of communication determinism.
[0061] 4. This invention proposes a bus time slot configuration method, apparatus, storage medium, and electronic device. By maximizing a formal model to obtain the worst-case communication completion time, and comparing this time with a preset communication security threshold, the master node can determine whether the current time slot allocation meets the communication time limit requirements before entering the networking phase. When the worst-case communication completion time exceeds the security threshold, the master node automatically re-divides the frame period and adjusts the communication allocation strategy, thereby preventing time slot configurations that do not meet communication security requirements from entering the field network, improving the security of the networking phase, the reliability of communication configuration, and the robustness of the network construction process. Attached Figure Description
[0062] The accompanying drawings, which form part of this specification, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:
[0063] Figure 1 A flowchart of a bus slot configuration method according to one embodiment is shown;
[0064] Figure 2 A flowchart illustrating the configuration of a master node with a slave node in one embodiment is shown;
[0065] Figure 3 A flowchart illustrating the partitioning of node time slots in one embodiment is shown;
[0066] Figure 4 A flowchart illustrating the countdown process for the networking phase of an embodiment is shown;
[0067] Figure 5 A schematic diagram of multiple frame cycles during the networking phase of an embodiment is shown;
[0068] Figure 6 A schematic diagram of a bus time slot configuration device according to one embodiment is shown;
[0069] Figure 7 A schematic diagram of the structure of a bus time slot configuration product according to one embodiment is shown;
[0070] Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment is shown. Detailed Implementation
[0071] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0072] The present invention will be further described in detail below with reference to specific embodiments, which should not be construed as limiting the scope of protection claimed by the present invention.
[0073] Example
[0074] To address the issue of verifiable reliability assessment and security verification of communication timing before nuclear power fieldbus networking, this invention proposes a bus time slot configuration method, apparatus, storage medium, and electronic device.
[0075] To achieve the above objectives, the present invention also proposes a bus time slot configuration method.
[0076] like Figure 1 The figure illustrates a bus time slot configuration method according to an embodiment of the present invention. The process mainly includes the following steps:
[0077] S101: Integrate the master node and slave node into the network, and configure the slave node.
[0078] Furthermore, the master node is used as a gateway device, and multiple slave nodes, i.e., each IO module, are connected to the same bus to construct a communication architecture, verifying whether the master node and slave nodes can send and receive messages.
[0079] Furthermore, the master node sequentially sends slave node message data to the slave node. The slave node message data includes a slave node identifier, a slave node type, a slave node period, and a message length. The slave node responds to the master node sequentially. The master node sends a time synchronization message. After the slave node responds to the master node, the configuration of the slave node is completed.
[0080] Specifically, such as Figure 2 As shown, the master node first sends a message containing the slave node identifier, i.e., setting the slave node ID. After setting the slave node identifier, the slave node responds to the master node to confirm the slave node ID information. Subsequently, the master node sends a message containing the slave node type, slave node period, and message length, i.e., configuration information, to the slave node. After setting according to the message, the slave node responds to the master node to confirm the configuration information. Finally, the master node sends a time synchronization message to the slave node. After the slave node responds to the master node, the master node sends a test piece confirmation message, completing the configuration of slave node 1 in the figure. The master node continues to repeat the above steps to configure slave node 2 until the configuration of all slave nodes is completed.
[0081] S102: Collect slave node message data during the slave node configuration process, calculate the frame period based on the slave node message data, divide the node time slots based on the frame period, and send a time slot allocation message to the slave node. The time slot allocation message includes the frame period and the node time slots.
[0082] Furthermore, such as Figure 3As shown in the diagram, in the previous step, when the master node configures the slave node, all node message data sent by the master node is collected, along with the node identifier of each slave node, the corresponding slave node type, slave node period, and message length.
[0083] Furthermore, the physical transmission time is calculated based on the link bandwidth and the message length, and its expression is as follows:
[0084] ,
[0085] in The physical transmission time, The message length is... The link bandwidth is defined as follows: the node level is determined according to the slave node type and type weighting rules, wherein the type weighting rules include: when the slave node sends commands including reactor protection system commands, emergency shutdown control commands, core cooling critical feedback path commands, or emergency control commands, the node level is set to 2-3; when the slave node sends commands including safety auxiliary control commands or redundant paths for important measurement points, the node level is set to 1-2; when the slave node sends commands including switch control commands, data acquisition commands, statistical data commands, or data retrieval commands, the node level is set to 1.
[0086] Furthermore, based on the physical transmission time, node level, and acquisition slave node period calculated according to the above steps, the frame period is calculated as follows:
[0087] ,
[0088] in The frame period is... For the slave node period, The node level of the i-th slave node. Let g be the physical transmission time of the i-th slave node, g be the guard time, i be the index, and M be the number of slave nodes. This is the upper bound of the synchronization error; the guard time and the upper bound of the synchronization error are set by empirical values.
[0089] Furthermore, the frame period is evenly divided into multiple first time slots according to the number of slave nodes, and the multiple first time slots contain an equal number of time frames. The period weight corresponding to each slave node is obtained by normalizing all the slave node periods, which is expressed as follows:
[0090] ,
[0091] in The period weight is defined as r, the node period is defined as M, the number of slave nodes is defined as M, and i and j are indices. The node time slot corresponding to the slave node is obtained by multiplying the period weight by the first time slot.
[0092] Furthermore, the frame period includes service frames and special frames, and preferably also includes emergency time slot frames, which are redundant frames in the frame period reserved for sending emergency instructions in an emergency state at a nuclear power plant.
[0093] Furthermore, such as Figure 3 The obtained frame period and node time slot are sent to the slave node as a time slot allocation message for configuration.
[0094] S103: Construct a formal model of communication time based on the time slot allocation message, and analyze the slave node according to the formal model to obtain the worst communication completion time.
[0095] Preferably, the formal model is constructed as follows:
[0096] ,
[0097] Where WCET is the formal model. The frame period is denoted as g, and the guard time is denoted as g. This is the upper bound of the synchronization error. To maximize preemption delay, The maximum queuing delay is denoted as ; the maximum preemption delay is expressed as follows:
[0098] ,
[0099] in The maximum preemption delay is... The number of consecutive triggers of the emergency time slot frame. The length of the emergency time slot frame; the maximum queuing delay, expressed as follows:
[0100] ,
[0101] in For the maximum queuing delay, The maximum gap between two adjacent node time slots; in other embodiments, an emergency time slot frame may not be set, i.e. It is 0.
[0102] Furthermore, the worst-case communication completion time is obtained by finding the maximum value of the formal model.
[0103] S104: Determine whether the master node should send a countdown frame to the slave node to enter the networking phase based on the worst-case communication completion time.
[0104] Furthermore, a preset communication security threshold is defined. If the worst-case communication completion time is less than the communication security threshold, the master node will send a countdown frame to the slave node to enter the networking phase. If the worst-case communication completion time is greater than the communication security threshold, the frame period will be re-divided.
[0105] Furthermore, such as Figure 4 As shown, after the confirmation frame period is greater than the time slot allocation completion, a countdown phase begins, awaiting the countdown frame sent by the master node. When the master node wants the system to enter the networking phase and begin formal operation, it sends a countdown start frame in conjunction with synchronization pulses. Each time it sends a countdown start frame, the countdown in the countdown frame content decreases by 1. The countdown content indicates how many synchronization pulses have elapsed before the start time of the next synchronization pulse. All slave nodes in the entire system simultaneously enter the networking time slot. By sending countdown start frames multiple times, the reliability of correct reception is improved.
[0106] Furthermore, such as Figure 5 The diagram shows the networking phase, where each slave node enters its formal working state. Each slave node counts time slots according to the information received in the time slot allocation message and transmits data in its own node time slot. At the beginning of each cycle of the networking phase, a time slot start pulse is provided by the time base node to indicate the start of a frame cycle.
[0107] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0108] Based on another aspect of the embodiments of this application, the present invention also provides a bus time slot configuration device. For example... Figure 6 As shown, the device includes:
[0109] Configuration module 601 is used to integrate master nodes and slave nodes into the network, wherein the master node sends an acknowledgment message to the slave node to configure the slave node;
[0110] The partitioning module 602 is used to collect slave node message data during the slave node configuration process, calculate the frame period based on the slave node message data, partition and obtain node time slots based on the frame period, and send a time slot allocation message to the slave node. The time slot allocation message includes the frame period and the node time slot.
[0111] The verification module 603 is used to construct a formal model of communication time based on the time slot allocation message, and to analyze the slave node according to the formal model to obtain the worst communication completion time.
[0112] The networking module 604 is used to determine whether the master node should send a countdown frame to the slave node to enter the networking phase based on the worst-case communication completion time.
[0113] As an optional solution, the above-mentioned device is also used to: collect the slave node message data, including slave node identifier, slave node type, slave node period and message length.
[0114] As an optional solution, the above-mentioned device is further used for: the master node configuring the slave node, including: the master node sequentially sending slave node message data to the slave node, and the slave node sequentially responding to the master node; the master node sending a time synchronization message to the slave node, and after the slave node responds to the master node, the master node sending a test piece confirmation message to complete the configuration of the slave node.
[0115] As an optional solution, the above-mentioned device is further configured to: the master node sequentially send the slave node message data to the slave node, including: the master node first sends a message containing the slave node identifier to the slave node, and the slave node responds to the master node after setting the slave node identifier; the master node sends a message including the slave node type, slave node period and message length to the slave node, and the slave node responds to the master node after setting according to the message.
[0116] As an optional solution, the above-mentioned apparatus is further used to: calculate the frame period based on the slave node message data, including: calculating the physical transmission time based on the link bandwidth and the message length, determining the node level based on the slave node type and type weight rules, and calculating the frame period based on the slave node period, the physical transmission time, and the node level, as expressed below: ,in The frame period is... For the slave node period, The node level of the i-th slave node. Let g be the physical transmission time of the i-th slave node, g be the guard time, i be the index, and M be the number of slave nodes. This is the upper bound of the synchronization error.
[0117] As an optional solution, the above-mentioned device is also used to: calculate the physical transmission time based on the link bandwidth and the message length, the expression of which is as follows: ,in The physical transmission time, The message length is... The bandwidth of the link is [value].
[0118] As an optional solution, the above-mentioned device is also used to: provide the type weighting rules, including: when the slave node sends a command including a reactor protection system command, an emergency shutdown control command, a core cooling critical feedback path command, or an emergency control command, the node level is set to 2-3; when the slave node sends a command including a safety auxiliary control command or a redundant path for an important measurement point, the node level is set to 1-2; when the slave node sends a command including a switch control command, a data acquisition command, a statistical data command, or a data retrieval command, the node level is set to 1.
[0119] As an optional solution, the above-mentioned apparatus is further used to: obtain node time slots according to the frame period, including: uniformly dividing the frame period into multiple first time slots according to the number of slave nodes, normalizing all the slave node periods to obtain period weights, and multiplying the period weights and the first time slots to obtain the node time slots corresponding to the slave nodes.
[0120] As an optional solution, the above-mentioned device is further used to: normalize all the periods of the nodes to obtain the periodic weights, which are expressed as follows: ,in The period weight is r, the node period is M, the number of slave nodes is i, and j are indices.
[0121] As an optional solution, the above-mentioned apparatus is also used to: construct a formal model of communication time based on the time slot allocation message, including: constructing the formal model, the expression of which is as follows: Where WCET is the formal model, The frame period is denoted as g, and the guard time is denoted as g. This is the upper bound of the synchronization error. To maximize preemption delay, This represents the maximum queuing delay.
[0122] As an optional solution, the above-mentioned device is also used for: the maximum preemption delay, the expression of which is as follows: ,in The maximum preemption delay is... The number of consecutive triggers of the emergency time slot frame. The length of the emergency time slot frame.
[0123] As an optional solution, the above-mentioned device is also used for: the maximum queuing delay, the expression of which is as follows: ,in For the maximum queuing delay, It is the maximum gap between two adjacent time slots of the nodes.
[0124] As an optional solution, the above-mentioned apparatus is further used to: analyze the slave node according to the formal model to obtain the worst-case communication completion time, including: finding the maximum value of the formal model to obtain the worst-case communication completion time.
[0125] As an optional solution, the above-mentioned device is also used to: determine whether the master node should send a countdown frame to the slave node to enter the networking stage based on the worst-case communication completion time, including: setting a preset communication security threshold; if the worst-case communication completion time is less than the communication security threshold, then whether the master node should send a countdown frame to the slave node to enter the networking stage; if the worst-case communication completion time is greater than the communication security threshold, then re-dividing the frame period.
[0126] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0127] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0128] According to one aspect of this application, a computer program product is provided, the computer program product comprising a computer program.
[0129] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0130] Figure 7 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.
[0131] It should be noted that, Figure 7 The computer system 700 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0132] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 702 or programs loaded from storage section 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for system operation. The CPU 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output interface 705 (I / O interface) is also connected to the bus 704.
[0133] The following components are connected to the input / output interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a local area network card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output interface 705 as needed. A removable medium 73, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0134] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 73. When the computer program is executed by central processing unit 701, it performs various functions defined in the system of this application.
[0135] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable medium 73. When the computer program is executed by the central processing unit 701, it performs various functions provided in the embodiments of this application.
[0136] According to another aspect of the embodiments of this application, an electronic device for a bus time slot configuration method is also provided. This embodiment uses a terminal device as an example for illustration. Figure 8 As shown, the electronic device includes a memory 802 and a processor 804. The memory 802 stores a computer program, and the processor 804 is configured to execute the steps in any of the above method embodiments via the computer program.
[0137] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.
[0138] Optionally, in this embodiment, the processor may be configured to execute the methods in the embodiments of this application via a computer program.
[0139] Alternatively, as those skilled in the art will understand, Figure 8 The structure shown is for illustrative purposes only. Figure 8 This does not limit the structure of the aforementioned electronic devices. For example, the electronic device may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 8 The different configurations shown.
[0140] The memory 802 can be used to store software programs and modules, such as the program instructions / modules corresponding to the bus time slot configuration method and apparatus in this embodiment. The processor 804 executes various functional applications and data processing by running the software programs and modules stored in the memory 802, thereby implementing the aforementioned bus time slot configuration method. The memory 802 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 802 may further include memory remotely located relative to the processor 804, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 802 may be used, but is not limited to, to store collected operational data or cleaned data information. As an example, such as... Figure 8 As shown, the memory 802 may include, but is not limited to, the configuration module 601, cost allocation module 602, verification module 603, and networking module 604 in the aforementioned bus time slot configuration device. Furthermore, it may include, but is not limited to, other module units in the aforementioned device, which will not be elaborated upon in this example.
[0141] Optionally, the transmission device 806 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 806 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 806 is a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0142] In addition, the aforementioned electronic device also includes: a display 808 for displaying the aforementioned operating data or cleaning data; and a connection bus 810 for connecting the various module components in the aforementioned electronic device.
[0143] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.
[0144] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of an electronic device reads computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the electronic device to perform a bus time slot configuration method provided in one of the various alternative implementations of the above-described bus time slot configuration aspect.
[0145] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store methods for performing the embodiments of this application.
[0146] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0147] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0148] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more electronic devices to execute all or part of the steps of the methods described in the various embodiments of this application.
[0149] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0150] In the several embodiments provided in this application, it should be understood that the disclosed application can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0151] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0152] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0153] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0154] In summary, as can be seen from the above description, the embodiments of the present invention achieve the following technical effects:
[0155] 1. This invention proposes a bus time slot configuration method, apparatus, storage medium, and electronic device. By collecting slave node message data during slave node configuration, calculating the frame period based on actual communication conditions, and completing node time slot allocation, the communication occupancy of different slave nodes is clearly and periodically arranged, avoiding the bandwidth waste caused by the uniform access period in the traditional master-slave polling method. Simultaneously, after sending the time slot allocation message, the master node constructs a formal model of communication time based on the message and analyzes the worst-case communication completion time of the slave nodes, allowing the communication timing to be verified before entering the network, solving the problem in existing technologies where communication determinism cannot be evaluated before network formation. Finally, the master node decides whether to send a countdown frame to enter the network formation stage based on whether the worst-case communication completion time meets the requirements, thereby preventing slave nodes that do not meet the communication time constraints from entering the network, improving the efficiency of bus access, the predictability of communication, and the security and reliability of the network formation process.
[0156] 2. This invention proposes a bus time slot configuration method, apparatus, storage medium, and electronic device. By collecting slave node message data such as slave node identifier, type, period, and message length, and calculating the frame period based on link bandwidth, type weight rules, and node period, the communication period occupancy of each slave node in the bus can be quantitatively expressed according to the actual transmission time, node level, and access frequency, thereby achieving adaptive construction of the frame period. Furthermore, the frame period is evenly divided according to the number of slave nodes and node time slots are generated by combining normalized period weights, so that the communication time slots of different slave nodes can be configured differently according to their access periods, avoiding bandwidth waste caused by uniform polling and improving the matching degree between bus bandwidth utilization and access scheduling.
[0157] 3. This invention proposes a bus time slot configuration method, device, storage medium, and electronic device. By reserving emergency time slot frames in the frame period and constructing a formal communication time model based on the time slot allocation message after the time slot allocation is completed, the communication time can be modeled and described using quantitative parameters such as frame period, guard time, upper bound of synchronization error, maximum preemption delay, and maximum queuing delay. The maximum preemption delay and maximum queuing delay are calculated based on the continuous triggering of emergency time slots and the time slot gap between nodes, respectively. This allows the model to cover the preemption and queue blocking effects during the communication process, so that the communication completion time that meets the worst-case condition constraints can be obtained before network deployment, realizing verifiable and quantifiable analysis of communication determinism.
[0158] 4. This invention proposes a bus time slot configuration method, apparatus, storage medium, and electronic device. By maximizing a formal model to obtain the worst-case communication completion time, and comparing this time with a preset communication security threshold, the master node can determine whether the current time slot allocation meets the communication time limit requirements before entering the networking phase. When the worst-case communication completion time exceeds the security threshold, the master node automatically re-divides the frame period and adjusts the communication allocation strategy, thereby preventing time slot configurations that do not meet communication security requirements from entering the field network, improving the security of the networking phase, the reliability of communication configuration, and the robustness of the network construction process.
[0159] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0160] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0161] It should be noted that, in the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
Claims
1. A bus time slot configuration method, characterized in that, include: The master node and slave nodes are incorporated into the network, and the master node configures the slave nodes; The slave node packet data collected during the slave node configuration process includes slave node identifier, slave node type, slave node period, and packet length. The frame period is calculated based on the slave node packet data, including: calculating the physical transmission time based on the link bandwidth and the packet length; determining the node level based on the slave node type and type weighting rules; and calculating the frame period based on the slave node period, physical transmission time, and node level. This is expressed as follows: , in The frame period is... For the slave node period, The node level of the i-th slave node. Let M be the physical transmission time of the i-th slave node, where i is the index and M is the number of slave nodes. The upper bound of the synchronization error is defined; the node time slot is obtained according to the frame period; the master node sends a time slot allocation message to the slave node, the time slot allocation message including the frame period and the node time slot; Constructing a formal model of communication time based on the time slot allocation message includes: constructing the formal model, the expression of which is as follows: , Where WCET is the formal model. The frame period is denoted as g, and the guard time is denoted as g. This is the upper bound of the synchronization error. To maximize preemption delay, To determine the maximum queuing delay, the worst-case communication completion time is obtained by analyzing the slave node according to the formal model, including finding the maximum value of the formal model to obtain the worst-case communication completion time. The master node determines whether to send a countdown frame to the slave node to enter the networking phase based on the worst-case communication completion time.
2. The method according to claim 1, characterized in that, The master node configures the slave node, including: The master node sequentially sends slave node message data to the slave node, and the slave node sequentially responds to the master node; the master node sends a time synchronization message to the slave node, and after the slave node responds to the master node, the master node sends a test piece confirmation message to complete the configuration of the slave node.
3. The method according to claim 2, characterized in that, The master node sequentially sends the slave node message data to the slave node, including: The master node first sends a message containing the slave node's identifier to the slave node, and the slave node responds to the master node after setting the slave node's identifier; the master node then sends a message to the slave node including the slave node type, slave node period, and message length, and the slave node responds to the master node after setting the message accordingly.
4. The method according to claim 1, characterized in that, The physical transmission time is calculated based on the link bandwidth and the message length, and its expression is as follows: , in The physical transmission time, The message length is... The bandwidth of the link is [value].
5. The method according to claim 1, characterized in that, The type weighting rules include: When the slave node sends commands including reactor protection system commands, emergency shutdown control commands, core cooling critical feedback path commands, or emergency control commands, the node level is set to 2 or 3. When the slave node is a redundant path for sending instructions including safety auxiliary control commands or important measurement points, the node level is set to 1 or 2. When the slave node sends commands including switch control commands, data acquisition commands, statistical data commands, or data retrieval commands, the node level is set to 1.
6. The method according to claim 1, characterized in that, Obtaining node time slots based on the frame period division includes: The frame period is evenly divided into multiple first time slots according to the number of slave nodes. The period weights of all slave node periods are normalized. The node time slots corresponding to the slave nodes are obtained by multiplying the period weights by the first time slots.
7. The method according to claim 6, characterized in that, The periodic weights obtained by normalizing all the node periods are expressed as follows: , in The period weight is r, where r is the period of the slave node, M is the number of slave nodes, and i and j are indices.
8. The method according to claim 1, characterized in that, The frame period includes service frames and special frames.
9. The method according to claim 1, characterized in that, The frame period also includes reserved emergency time slot frames.
10. The method according to claim 9, characterized in that, The maximum queuing delay is expressed as follows: , in For the maximum queuing delay, It is the maximum gap between two adjacent time slots of the nodes.
11. The method according to claim 1, characterized in that, Determining whether the master node should send a countdown frame to the slave node to enter the network formation phase based on the worst-case communication completion time includes: A preset communication security threshold is set. If the worst-case communication completion time is less than the communication security threshold, the master node will send a countdown frame to the slave node to enter the networking phase. If the worst-case communication completion time is greater than the communication security threshold, the frame period will be re-divided.
12. A bus time slot configuration device, capable of implementing the method of claim 1, characterized in that, include: The configuration module is used to integrate master nodes and slave nodes into the network, wherein the master node sends an acknowledgment message to the slave node to configure the slave node; The partitioning module is used to collect slave node message data during the slave node configuration process, calculate the frame period based on the slave node message data, partition the node time slots based on the frame period, and send a time slot allocation message to the slave node. The time slot allocation message includes the frame period and the node time slots. The verification module is used to construct a formal model of communication time based on the time slot allocation message, and to analyze the slave node according to the formal model to obtain the worst communication completion time. The networking module is used to determine whether the master node should send a countdown frame to the slave node to enter the networking phase based on the worst-case communication completion time.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 11.
14. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program performs the steps of the method described in any one of claims 1 to 11.
15. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 11 through the computer program.
Citation Information
Patent Citations
A token bus slot predefinition method
CN106656711B
Bus period self-adaption method, system, equipment and medium
CN116701281A
Sending method of synchronization information of node, device and node
CN107027166A
Time slot allocation method for wireless time-sensitive network in spacecraft based on wired and wireless fusion
CN114501654A