A method, system, device and medium for accelerating power grid communication protocol based on RDMA
Patent Information
- Application Number
- CN202610725651.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-09-29
AI Technical Summary
[0006]因此,本发明解决的技术问题是:当电网中出现流量突发或链路带宽趋于饱和时,则无法对报文的紧迫性等级进行调整,导致高紧迫性报文仍被分配至负载已趋于饱和的队列中,无法及时触发应急通道
[0018]本发明的有益效果:通过在确定传输紧迫性级别时,传输紧迫性级别的判定反映报文自身业务属性与链路实时负载状态,从而克服了现有技术中仅依赖类型标识进行映射缺陷。
Smart Images

Figure CN122845532A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power grid communication technology, and specifically to a method, system, device, and medium for accelerating power grid communication protocols based on RDMA. Background Technology
[0002] Remote Direct Memory Access, also known as RDMA, is used in scenarios that accelerate power grid communication protocols. In existing technologies, a static configuration of RDMA queue pairs is typically used. Based on the service type identifier of the power grid communication message, messages are allocated to specific sending and receiving queues according to fixed mapping rules to complete transmission.
[0003] However, because the determination of transmission urgency level lacks awareness of the real-time status of the link, when there is a traffic surge in the power grid or the link bandwidth approaches saturation, the urgency level of the message cannot be adjusted. As a result, high-urgency messages are still assigned to queues that are already saturated, and the emergency channel cannot be triggered in time.
[0004] When a fault occurs in a smart substation, although the service type identifier of the relay protection message has been marked as high priority, if the link bandwidth saturation has exceeded the threshold, and the message is still mapped to a fixed queue according to the type identifier, the message will continue to wait in the queue and cannot be transmitted within the required delay window. Summary of the Invention
[0005] In view of the above-mentioned problems, the present invention is proposed.
[0006] Therefore, the technical problem solved by this invention is that when a traffic surge occurs in the power grid or the link bandwidth becomes saturated, the urgency level of the message cannot be adjusted, resulting in high-urgency messages still being assigned to queues that are already saturated, and the emergency channel cannot be triggered in time.
[0007] To address the aforementioned technical problems, this invention provides the following technical solution: a method for accelerating power grid communication protocols based on RDMA, comprising the following steps: obtaining a transmission urgency level through the type identifier of the power grid communication message; allocating the power grid communication message to a primary pending-transmission queue according to the transmission urgency level, and generating differentiated transmission instructions; configuring the differentiated transmission instructions with a first parameter set to obtain a dual-mode gating configuration; writing the power grid communication message into the peer's pre-registered physical memory through the dual-mode gating configuration combined with the primary transmission to obtain transmission performance data; analyzing the trigger frequency of the primary pending-transmission queue based on the transmission performance data, and migrating from the primary pending-transmission queue to the secondary pending-transmission queue in response to the power grid communication message meeting certain conditions.
[0008] As a preferred embodiment of the RDMA-based power grid communication protocol acceleration method described in this invention, the step of obtaining the transmission urgency level includes: determining the basic service urgency level based on the type identifier carried in the power grid communication message header; determining a first feature based on the number of message descriptors that have not been transmitted in the sending queue, and performing a first-level analysis on the current transmission channel based on the first feature to obtain a queue congestion status flag; determining a second feature based on the byte increment difference statistically analyzed within a continuous sampling period, and performing a second-level analysis on the current link traffic based on the second feature to obtain a traffic mutation status flag; determining a third feature based on the current instantaneous data transmission status, and performing a third-level analysis on the remaining available space of the current link based on the third feature to obtain a bandwidth-limited status flag; and correcting the basic service urgency level using the bandwidth-limited status flag, the traffic mutation status flag, and the queue congestion status flag to obtain the transmission urgency level.
[0009] As a preferred embodiment of the RDMA-based power grid communication protocol acceleration method described in this invention, the step of correcting the service basic urgency level includes: determining whether the remaining available space of the current link is in a saturation blocking range based on the bandwidth-limited status flag; if it is in a saturation blocking range, upgrading the service basic urgency level to a transmission urgency level; if not, maintaining the current transmission urgency level as the service basic urgency level; determining whether the current link traffic is in a fluctuation range based on the traffic mutation status flag; if it is in a fluctuation range and the current transmission urgency level has not reached the highest level, initially correcting the service basic urgency level based on a preset first urgency tier level to obtain a first corrected urgency level; determining whether there is a backlog of untransmitted message descriptors in the sending queue based on the queue congestion status flag; if there is a backlog of messages and the first corrected urgency level is lower than a preset emergency transmission threshold, increasing the first corrected urgency level based on a preset second urgency tier level to obtain a transmission urgency level.
[0010] As a preferred embodiment of the RDMA-based power grid communication protocol acceleration method described in this invention, the step of generating differentiated transmission instructions includes: when the transmission urgency level is lower than a preset emergency transmission threshold, allocating the power grid communication message to the base access queue pair in the primary pending transmission queue pair and generating a fixed time slot instruction; when the transmission urgency level is not lower than the preset emergency transmission threshold, allocating the power grid communication message to the emergency access queue pair in the primary pending transmission queue pair and generating a priority preemption instruction.
[0011] As a preferred embodiment of the RDMA-based power grid communication protocol acceleration method described in this invention, the step of configuring the differentiated transmission instruction into a first parameter set includes: determining continuous time segments of a reference access queue pair within a single communication cycle based on the fixed time slot instruction correspondence and the power grid communication message; defining absolute time window boundaries based on the continuous time segments and generating an alternating sequence of port opening and closing based on the frame number status of the power grid communication message, forming a time-aware gating list; determining the gating state switching point based on the emergency message type and corresponding allowed delay threshold in the priority preemption instruction; establishing a logical mutual exclusion mapping relationship based on the gating state switching point; generating a maximum duration upper limit by combining the logical mutual exclusion mapping relationship with the second feature, embedding an interrupt response segment in the basic timing structure, forming a hybrid gating timing framework; and combining the time-aware gating list with the hybrid gating timing framework to obtain the dual-mode gating configuration.
[0012] As a preferred embodiment of the RDMA-based power grid communication protocol acceleration method described in this invention, the step of obtaining transmission performance data includes: issuing a gating trigger signal through the dual-mode gating configuration; writing the power grid communication message from the sending end into the pre-registered physical memory of the receiving end according to the gating trigger signal; transmitting the power grid communication message in the reference access queue when the gating trigger signal originates from the time-aware gating list; interrupting the current transmission of the reference access queue pair and directly writing the power grid communication message from the sending end when the gating trigger signal originates from the interrupt response section; collecting feature data after each transmission and summarizing it to obtain transmission performance data.
[0013] As a preferred embodiment of the RDMA-based power grid communication protocol acceleration method described in this invention, the step of migrating from the first-level transmit queue pair to the second-level transmit queue pair includes: based on the cumulative trigger count of the emergency access queue pair in the transmission performance data, selecting power grid communication message types that meet a preset high-frequency threshold to obtain an emergency message set; calculating the additional fixed time slot duration required to be included in the baseline access queue pair using each type of power grid communication message in the emergency message set, and comparing it with the current state to obtain the demand value for the next cycle; obtaining a time slot replacement adjustment scheme using the demand value; and rearranging the order in the time-aware gating list for the next cycle according to the time slot replacement adjustment scheme to generate an updated gating sequence and complete the writing of the new gating configuration table entries.
[0014] This invention provides a power grid communication protocol acceleration system based on RDMA.
[0015] To solve the above technical problems, the present invention provides the following technical solution: a power grid communication protocol acceleration system based on RDMA, comprising: a transmission module, which obtains the transmission urgency level according to the type identifier of the power grid communication message and in combination with the link load characteristics; The dual-mode gating configuration module generates differentiated transmission instructions based on the transmission urgency level, and configures the differentiated transmission instructions with a first parameter set to obtain the dual-mode gating configuration. The migration module writes the power grid communication message into the pre-registered physical memory of the peer through primary transmission to obtain transmission performance data; it analyzes the trigger frequency of the primary transmission queue based on the transmission performance data, and migrates from the primary transmission queue to the secondary transmission queue when the power grid communication message meets the conditions.
[0016] The present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the aforementioned RDMA-based power grid communication protocol acceleration method.
[0017] The present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the aforementioned RDMA-based power grid communication protocol acceleration method.
[0018] The beneficial effects of this invention are that by determining the transmission urgency level, the determination of the transmission urgency level reflects the service attributes of the message itself and the real-time load status of the link, thereby overcoming the defect of the prior art that only relies on type identifiers for mapping.
[0019] By implementing differentiated scheduling for the two queue pairs through dual-mode gating configuration, the emergency access queue pair can interrupt the current transmission of the baseline access queue pair by interrupting the response segment when a high-urgency message is detected. This solves the problem in the prior art where high-urgency messages are blocked in the congestion queue due to the lack of link state awareness, and thus cannot meet the requirements for deterministic low-latency transmission. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 The present invention provides an overall flowchart of a power grid communication protocol acceleration method based on RDMA as an embodiment of the present invention.
[0022] Figure 2 The flowchart illustrates the transmission urgency level correction method of an RDMA-based power grid communication protocol acceleration method, as provided in one embodiment of the present invention.
[0023] Figure 3 This is a dual-mode gated transmission scenario diagram of a power grid communication protocol acceleration method based on RDMA provided in one embodiment of the present invention. Detailed Implementation
[0024] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0025] Example 1, referring to Figure 1 This is one embodiment of the present invention, which provides a method for accelerating a power grid communication protocol based on RDMA, comprising the following steps: The urgency level of transmission can be obtained by identifying the type of the power grid communication message; Based on the transmission urgency level, power grid communication messages are allocated to the first-level waiting queue, and differentiated transmission instructions are generated.
[0026] The differentiated transmission instructions are configured with the first parameter set to obtain the dual-mode gating configuration.
[0027] By combining the dual-mode gating configuration with primary transmission, the power grid communication messages are written into the pre-registered physical memory at the other end to obtain transmission performance data.
[0028] Based on the transmission performance data analysis, the trigger frequency of the primary queue to be sent is determined, and in response to the power grid communication message meeting the conditions, the message is moved from the primary queue to the secondary queue to be sent.
[0029] Because the determination of transmission urgency level lacks awareness of the real-time status of the link, when there is a traffic surge in the power grid or the link bandwidth approaches saturation, the urgency level of the message cannot be adjusted. As a result, high-urgency messages are still assigned to queues that are already saturated, and the emergency channel cannot be triggered in time.
[0030] By determining the transmission urgency level, the judgment of the transmission urgency level reflects the service attributes of the message itself and the real-time load status of the link, thereby overcoming the defect of the existing technology that only relies on type identifier for mapping.
[0031] By implementing differentiated scheduling for the two queue pairs through dual-mode gating configuration, the emergency access queue pair can interrupt the current transmission of the baseline access queue pair by interrupting the response segment when a high-urgency message is detected. This solves the problem in the prior art where high-urgency messages are blocked in the congestion queue due to the lack of link state awareness, and thus cannot meet the requirements for deterministic low-latency transmission.
[0032] Example 2, refer to Figures 1-3 As an embodiment of the present invention, based on the previous embodiment, a method for accelerating power grid communication protocols based on RDMA is provided, comprising the following steps: S1. The transmission urgency level is obtained by identifying the type of the power grid communication message.
[0033] Specifically, the steps for determining the transmission urgency level include S1.1 to S1.5: S1.1 Determine the urgency level of the business infrastructure based on the type identifier carried in the header of the power grid communication message.
[0034] In this embodiment, a service type identifier code is pre-written into the header field of the power grid communication message. This identifier code is assigned by the power grid communication protocol during the message encapsulation stage according to the nature of the service.
[0035] After reading the type identifier code, different business types are mapped to the corresponding business urgency levels according to the preset business level mapping table.
[0036] For example, when a smart substation sends a relay protection message to the dispatch center, the system reads the message header type identifier code as PROT_RELAY, and after querying the service level mapping table, determines the service basic urgency level of the message to be level 4.
[0037] S1.2. Based on the number of message descriptors that have not been transmitted in the sending queue, determine the first feature, and perform a first-level analysis of the current transmission channel according to the first feature to obtain the queue congestion status flag.
[0038] The number of incomplete descriptors recorded in the RDMA network card's transmit queue register is read and used as the first characteristic. Incomplete descriptors refer to message descriptors that have been submitted to the transmit queue but have not yet received a completion notification; their number directly reflects the current backlog depth of the transmit queue.
[0039] The first feature is compared with a preset queue backlog depth threshold. When the number of incomplete descriptors exceeds the threshold, it is determined that there is data backlog in the current transmission channel, and the queue congestion status flag is set to high level. When the number of incomplete descriptors does not exceed the threshold, the transmission channel is considered to be unobstructed, and the queue congestion status flag is set to low.
[0040] Specifically, the current RDMA network card transmit queue register is read. If the number of incomplete descriptors is 128 and the preset queue backlog depth threshold is 64, the first characteristic value of 128 exceeds the threshold of 64. Therefore, it is determined that there is a data backlog in the current transmission channel, and the queue congestion status flag is set to high level.
[0041] S1.3. Based on the byte increment difference statistically analyzed within the continuous sampling period, determine the second feature, and perform secondary analysis on the current link traffic according to the second feature to obtain the traffic change status flag.
[0042] In this embodiment, the total number of bytes passing through the link in each consecutive adjacent sampling period is counted by the traffic counter of the network interface card, and the difference in byte increment between adjacent sampling periods is calculated. This difference is used as the second feature, namely the traffic burst slope.
[0043] Then, the second feature is compared with a preset traffic mutation slope threshold. When the difference in byte increment exceeds the slope threshold, it is determined that the current link traffic is showing a sharp upward trend, and the traffic mutation status flag is set to a high level. When the difference in byte increment does not exceed the slope threshold, the current link traffic is determined to be in a stable state, and the traffic mutation status flag is set to low level.
[0044] Specifically, if the total number of bytes in the link is 200MB in the Nth sampling period and 350MB in the N+1th sampling period, and the difference in byte increment over two weeks is 150MB, and the preset threshold for traffic mutation slope is 100MB / period, if the second characteristic value of 150MB exceeds the threshold of 100MB, then the current link traffic is determined to be in the fluctuation range, and the traffic mutation status flag is set to high level.
[0045] S1.4. Based on the current instantaneous data transmission status, determine the third feature, and perform a three-level analysis on the remaining available space of the current link according to the third feature to obtain the bandwidth-limited status flag.
[0046] In this embodiment, the current instantaneous data transmission rate is monitored in real time through the physical link layer interface, and the ratio of the instantaneous data transmission rate to the theoretical maximum bandwidth of the link is calculated to obtain the instantaneous bandwidth saturation of the link. This saturation is used as the third feature.
[0047] The system compares the third feature with a preset bandwidth saturation threshold. When the instantaneous saturation of the link bandwidth exceeds the threshold, it determines that the remaining available space of the current physical channel is lower than the safe level and the remaining available space of the current link is in the saturation blocking range. The bandwidth limited status flag is then set to a high level. When the instantaneous saturation of the link bandwidth does not exceed the threshold, it is determined that there is still sufficient transmission margin in the current physical channel, and the bandwidth-limited status flag is set to low level.
[0048] In this embodiment, the instantaneous data transmission rate of the current link is detected to be 9.2Gbps, the theoretical maximum bandwidth of the link is 10Gbps, the instantaneous bandwidth saturation of the link is calculated to be 92%, the preset bandwidth saturation threshold is 85%, and the third characteristic value of 92% exceeds the threshold of 85%. Therefore, it is determined that the remaining available space of the current link is in the saturation blocking range, and the bandwidth limited status flag is set to a high level.
[0049] Reference Figure 2 As shown, in step S1.5, the service urgency level is modified by the bandwidth-limited status flag, the traffic mutation status flag, and the queue congestion status flag to obtain the transmission urgency level.
[0050] The steps for revising the urgency level of the business foundation include A1 to A3: A1. Determine whether the remaining available space of the current link is in the saturation blocking range by using the bandwidth-limited status flag; When the system is in a saturation blocking zone, the service basic urgency level is upgraded to the transmission urgency level; when it is not in a saturation blocking zone, the current transmission urgency level is maintained at the service basic urgency level.
[0051] Specifically, first check the level of the bandwidth-limited status flag.
[0052] When the bandwidth-limited status flag is high, it is determined that the remaining available space of the current link is in the saturation blocking range. Then, the service basic urgency level is jumped to the highest transmission urgency level to ensure that when the physical link is saturated, all packets to be transmitted can participate in subsequent scheduling competition with the highest priority. When the bandwidth-limited status flag is low, the current transmission urgency level is maintained at the service-based urgency level.
[0053] For example, when the bandwidth-limited status flag is high, it is determined that the current link is in a saturated blocking range. The service basic urgency level of the relay protection message is directly upgraded from level 4 to the highest transmission urgency level 5. After the A1 correction is completed, the final transmission urgency level output is level 5.
[0054] A2. Determine whether the current link traffic is in a fluctuating range by using the traffic mutation status flag; When the current transmission urgency level is not at the highest level and the fluctuating range is in progress, the basic urgency level of the service is initially corrected based on the preset first urgency tier level to obtain the first corrected urgency level.
[0055] Specifically, when the traffic change status flag is high and the current transmission urgency level has not yet reached the highest level, the current basic urgency level of the service is initially adjusted upward according to the preset first urgency tier level to obtain the first adjusted urgency level. When the traffic surge status flag is low, the current transmission urgency level remains unchanged.
[0056] Assuming the bandwidth-limited status flag is low in step A1, the current transmission urgency level remains at service-based urgency level 3.
[0057] The flow change status flag is high level. The current level is 3 and has not reached the highest level of 5. The level is initially corrected by the preset first urgency level, and the first corrected urgency level is 4.
[0058] A3. Determine whether there is a backlog of message descriptors in the sending queue that have not been transmitted based on the queue congestion status flag. When there is a message backlog and the first correction urgency level is lower than the preset emergency transmission threshold, the first correction urgency level is increased based on the preset second urgency tier level to obtain the transmission urgency level.
[0059] The level of the queue congestion status flag is further examined. When the queue congestion status flag is high, it indicates that there is a backlog of messages in the sending queue. If the first correction urgency level is still lower than the preset emergency transmission threshold, the first correction urgency level is further increased according to the preset second urgency tier level to finally obtain the transmission urgency level. When the queue congestion status flag is low, or the first correction urgency level has reached or exceeded the emergency transmission threshold, the first correction urgency level is maintained as the final transmission urgency level output.
[0060] For example, when the first urgency level is 4, the preset emergency transmission threshold is 5, which is lower than 5.
[0061] Entering step A3, the queue congestion status flag is high, indicating a message backlog. The first modified urgency level 4 is upgraded according to the preset second urgency tier, ultimately resulting in a transmission urgency level of 5, reaching the emergency transmission threshold.
[0062] S2. Based on the transmission urgency level, allocate the power grid communication message to the first-level waiting queue and generate differentiated transmission instructions.
[0063] The steps for generating differentiated transmission instructions include S2.1 to S2.2: S2.1 When the transmission urgency level is lower than the preset emergency transmission threshold, the power grid communication message is allocated to the reference access queue pair in the first-level pending transmission queue pair, and a fixed time slot instruction is generated.
[0064] In this embodiment, when the urgency level of the output transmission is lower than the preset emergency transmission threshold, the message is determined to belong to the category of regular business and is assigned to the baseline access queue pair.
[0065] The baseline access queue is used to carry periodic, non-urgent routine business messages in the power grid, such as status monitoring data, metering data, and telemetry and telecontrol messages.
[0066] For messages allocated to the baseline access queue pair, a fixed timeslot instruction is generated. The fixed timeslot instruction includes fixed transmission resource parameters corresponding to the message type, including the reserved bandwidth value and the time interval length of the message transmission period.
[0067] Specifically, the telemetry data messages periodically reported by a power distribution automation system are calculated to have a transmission urgency level of 2, and the preset emergency transmission threshold is 5. If level 2 is lower than level 5, the message will be allocated to the baseline access queue pair and a fixed time slot instruction will be generated.
[0068] S2.2 When the transmission urgency level is not lower than the preset emergency transmission threshold, the power grid communication message is allocated to the emergency access queue in the first-level waiting queue pair, and a priority preemption instruction is generated.
[0069] In this embodiment, when the output transmission urgency level is not lower than the preset emergency transmission threshold, the message is determined to belong to the high urgency service category and is assigned to the emergency access queue pair.
[0070] The emergency access queue is used to carry time-sensitive service messages such as fault recording, relay protection, and emergency control commands in the power grid, and is completely isolated from the base access queue in terms of physical queue resources.
[0071] Priority preemption instructions are generated by assigning messages to emergency access queue pairs. These instructions contain the message type code for the emergency service and its corresponding maximum allowed delay threshold.
[0072] Specifically, when the urgency level of a relay protection message is calculated to be level 5, and the preset emergency transmission threshold is level 5 (level 5 is not lower than level 5), the message is assigned to the emergency access queue and a priority preemption instruction is generated.
[0073] S3. Configure the differentiated transmission instructions into the first parameter set to obtain the dual-mode gating configuration.
[0074] The specific steps include S3.1 to S3.6: S3.1. Determine the continuous time segments of the reference access queue pair within a single communication cycle by corresponding to the fixed time slot instruction and the power grid communication message.
[0075] Extract the reserved bandwidth value and the time interval length of the message transmission cycle from the fixed time slot instruction, and combine them with the maximum frame length parameter of the current power grid communication message to calculate the continuous time segment that the reference access queue pair needs to exclusively occupy in a single communication cycle.
[0076] The start and end times of a continuous time segment are determined by the reserved bandwidth value and the transmission cycle time interval. The start time corresponds to the time when the base queue obtains port opening authorization within the communication cycle, and the end time corresponds to the time when the base queue ends its exclusive transmission and releases the port resources.
[0077] For example, the reserved bandwidth parameter of 200Mbps and the transmission period interval of 10ms are read from the fixed time slot instruction. Combined with the maximum frame length of 1500 bytes of the current telemetry data message, it is calculated that the continuous time segment required by the reference access queue pair in a single 10ms communication cycle is 60μs. The start time of this time segment is determined to be the 0μs of each cycle, and the end time is the 60μs.
[0078] S3.2 Determine the absolute time window boundary based on the continuous time segments, and combine it with the frame number status of the power grid communication message to generate an alternating sequence of port opening and closing, forming a time-aware gating list.
[0079] Based on the defined start and end times of continuous time segments, these segments are mapped to absolute time window boundaries synchronized with the network clock, ensuring that the time slot locking of the reference access queue pairs has deterministic cross-node characteristics.
[0080] Subsequently, based on the frame count status of the power grid communication messages to be sent within the current communication cycle, i.e. the number of frames of the messages to be sent and the minimum frame interval to be retained between each frame, an alternating sequence of port open status identifiers and port closed status identifiers is generated within the absolute time window boundary.
[0081] Each port open status flag corresponds to the sending window of a message frame, and the port closed status flag corresponds to the frame interval protection segment. All alternating sequences are summarized to form a time-aware gating list, which serves as the basis for hardware scheduling of the baseline access queue pairs.
[0082] In this embodiment, the absolute time window boundary is defined with 0 μs as the start and 60 μs as the end. There are a total of 3 telemetry data packets to be sent in the current period, and the minimum frame interval is 2 μs.
[0083] An alternating sequence is generated within a 0~60μs window: [0μs on → 18μs off → 20μs on → 38μs off → 40μs on → 58μs off], forming a time-aware gating list of on / off alternation entries.
[0084] S3.3 Determine the gating state switching point by using the emergency message type and the corresponding allowed delay threshold in the priority preemption instruction.
[0085] Extract the message type code of the emergency service and its corresponding maximum allowable delay threshold from the generated priority preemption command. Using the maximum allowable delay threshold as a constraint, calculate the maximum allowed waiting time for the emergency access queue from the detection of the sudden message to the completion of the first frame transmission, and determine the time node corresponding to this time as the gating state switching point.
[0086] The gate control status switching point marks the latest moment when the emergency exit is forcibly activated.
[0087] Specifically, the emergency message type code and the maximum allowable delay threshold of 500μs are read from the priority preemption instruction. The maximum waiting time for the emergency access queue from the detection of this type of message to the completion of the first frame transmission is calculated to be 500μs. The 500μs mark from the detection time is determined as the gating state switching point. That is, if the emergency message arrives at time T, the gating state switching of the emergency channel and the first frame transmission shall be completed no later than time T+500μs.
[0088] S3.4, and establish a logical mutually exclusive mapping relationship based on the gate state switching point.
[0089] Specifically, when the gating status of the emergency access queue pair changes from closed to open at the switching point, a pause signal is simultaneously sent to the base access queue pair to interrupt the transmission that is currently in progress or about to occur on the base channel. Conversely, when the emergency access queue resumes its gated state and closes, the base channel pause signal is released, allowing the base access queue to resume transmission from the point of interruption.
[0090] For example, when the T+500μs gate state switching point is triggered and the emergency access queue pulls up the gate opening signal, a pause signal is simultaneously sent to the base access queue to interrupt the telemetry data frame that is currently being sent. When the relay protection message is sent and the emergency access queue is closed by pulling the gate control signal low, the reference channel pause signal is released, and the reference access queue resumes sending from the breakpoint frame.
[0091] S3.5. Combine the logical mutual exclusion mapping relationship with the second feature to generate the maximum duration upper limit, and embed the interrupt response segment in the basic timing structure to form a hybrid gating timing framework.
[0092] The second feature, namely the traffic burst slope, reflects the maximum rate of increase of link traffic. Therefore, it is used to estimate the maximum time that the emergency access queue may need to continuously occupy port resources under extreme burst conditions, and to use this as the upper limit of the maximum duration of the variable length insertion slot, so as to prevent the emergency channel from being interrupted for a long time due to continuous occupation.
[0093] An interrupt response segment is embedded in the basic timing structure. The time slot length of the interrupt response segment is constrained by the upper limit of the maximum duration, forming a hybrid gating timing framework.
[0094] Specifically, in step S1.3, the traffic burst slope is 150MB / cycle. Combined with the logical mutual exclusion mapping relationship, the maximum duration of continuous occupation of port resources by the emergency access queue under extreme burst conditions is calculated to be 800μs. An interrupt response segment of up to 800μs is embedded in the time-aware gating list frame interval segment of the basic timing structure to form a hybrid gating timing framework.
[0095] S3.6. The dual-mode gating configuration is obtained by combining the time-aware gating list with the hybrid gating timing framework.
[0096] In a dual-mode gating configuration, a time-aware gating list is responsible for driving the periodic deterministic transmission of the reference access queue pairs according to a fixed time slot sequence when there are no emergency events. In the hybrid gating timing framework, the interrupt response section intervenes based on the logical mutual exclusion mapping relationship when an emergency message arrives and the gating state switching point is triggered. It overwrites the current scheduling state of the time-aware gating list and activates the emergency access queue to complete preemptive transmission.
[0097] The dual-mode gating configuration is ultimately issued and solidified into the queue scheduling engine of the RDMA network card and the switch in the form of hardware scheduling configuration instructions, forming a dual-mode hardware gating mechanism that can respond in real time.
[0098] In the example, a time-aware gating list is integrated with a hybrid gating timing framework that embeds an 800μs interrupt response segment to generate a dual-mode gating configuration and send it to the RDMA network card scheduling engine.
[0099] During normal operation, the network interface card (NIC) periodically drives the transmission of telemetry data packets according to the alternating sequence of a time-aware gating list; When a relay protection message arrives and the T+500μs switching point is triggered, the interrupt response section of the hybrid gating timing framework is forcibly activated. The emergency access queue completes the RDMA direct transmission of the relay protection message to the takeover port resources. After the transmission is completed, the reference access queue resumes periodic scheduling.
[0100] S4. By combining the dual-mode gating configuration with primary transmission, the power grid communication message is written into the pre-registered physical memory of the peer end to obtain transmission performance data.
[0101] Reference Figure 3 As shown, this represents a scenario where dual-mode gating is configured for data transmission. The steps for obtaining transmission performance data include S4.1 to S4.5: S4.1. A gate trigger signal is issued through the dual-mode gate configuration.
[0102] The RDMA network card scheduling engine operates in a dual-mode gating configuration. At the 0μs moment of each 10ms communication cycle, the time-aware gating list generates a reference trigger signal, which drives the reference access queue to send telemetry data packets to the open port. When a relay protection message arrives at the emergency access queue pair at a certain moment within the cycle and the gating state switching point has been reached 500μs from the detection time, the hybrid gating timing framework generates a preemption trigger signal and outputs it to the emergency access queue pair sending control unit.
[0103] S4.2. Based on the gating trigger signal, write the power grid communication message from the sending end into the pre-registered physical memory of the receiving end.
[0104] After receiving the gating trigger signal, the transmitting RDMA network card immediately reads the grid communication message to be sent from the corresponding queue pair in user space memory and writes the message data into the physical memory address range that is pre-registered and locked by the receiving end.
[0105] After the reference trigger signal arrives, the RDMA network card reads the telemetry data packet from the user space memory address 0x7F00A000, and writes 1500 bytes of packet data to the pre-registered physical memory address 0xB800C000 of the receiving end through the RDMA Write operation. The entire writing process bypasses the kernel protocol stack, and the end-to-end transmission delay is about 18μs.
[0106] S4.3 When the gating trigger signal originates from the time-aware gating list, the power grid communication message is transmitted in the reference access queue.
[0107] In this embodiment, when the source identifier of the gating trigger signal is the reference trigger signal generated by the time-aware gating list, the driving reference access queue sends a power grid communication message to the receiving end within a predetermined time segment according to the port open status identifier corresponding to the current entry in the time-aware gating list.
[0108] The baseline access queue exclusively transmits port resources within this time segment, and completes the RDMA write operation of each frame in the order of the packets in the queue, until the port close status flag corresponding to the current time-aware gating list entry is triggered, at which point the baseline access queue stops transmitting and releases the port resources.
[0109] In this embodiment, the time-aware gating list generates a reference trigger signal at 0μs. The reference access queue obtains port opening authorization and sequentially writes 3 frames of telemetry data packets into the pre-registered physical memory of the receiving end. After the 3 frames are sent, the port closing status flag is received at 58μs. The reference access queue stops sending, the port resources are released, and it waits for the reference trigger signal of the next 10ms cycle.
[0110] S4.4 When the gate trigger signal originates from the interrupt response section, the current transmission of the interrupt reference access queue is directly written into the power grid communication message of the sending end.
[0111] Specifically, when the relay protection message arrives and the preemption trigger signal is triggered, if the reference access queue is sending the second frame of telemetry data message, a pause signal is sent to the reference access queue to interrupt the transmission of the second frame. The emergency access queue takes over the port resources and writes the relay protection message into the pre-registered physical memory of the receiving end. The whole process takes about 320μs, which is lower than the maximum allowable delay threshold of 500μs.
[0112] S4.5 Collect the feature data after each transmission is completed, and summarize them to obtain transmission performance data.
[0113] In this embodiment, after each RDMA write operation is completed, the characteristic data of this transmission is read from the RDMA network card completion queue; The feature data includes the message type code, the queue pair identifier, the transmission start time, the transmission completion time, the message byte length, and the gating trigger signal source type to which this transmission belongs.
[0114] The characteristic data is classified and summarized according to the queue pair identifier and message type code. The cumulative number of triggers, average transmission delay, maximum transmission delay and delay jitter range of each type of message in the baseline access queue pair and emergency access queue pair are statistically analyzed to form structured transmission performance data.
[0115] For example, after one statistical cycle, the cumulative number of telemetry data packets collected from the RDMA network card in the baseline access queue pair is 600, with an average transmission delay of 18μs; the cumulative number of relay protection messages in the emergency access queue pair is 87, with an average transmission delay of 320μs and a maximum transmission delay of 498μs, which will be summarized into structured transmission performance data.
[0116] S5. Analyze the trigger frequency of the primary queue to be sent based on the transmission performance data, and when the power grid communication message meets the conditions, migrate from the primary queue to the secondary queue to be sent.
[0117] Specifically, the steps for migrating from the first-level pending-send queue pair to the second-level pending-send queue pair include S5.1 to S5.4: S5.1 Based on the cumulative trigger count of the emergency access queue pairs in the transmission performance data, filter out the power grid communication message types that meet the preset high-frequency threshold to obtain the emergency message set.
[0118] Extract the cumulative number of triggers for each type of power grid communication message within the emergency access queue in the current statistical period from the transmission performance data, and calculate the trigger frequency of each type of message, i.e., the average number of triggers per unit statistical time.
[0119] The triggering frequency of each type of message is compared with a preset high-frequency threshold. Message types whose triggering frequency consistently exceeds the preset high-frequency threshold are filtered out and summarized into a set of emergency messages.
[0120] For example, analyzing transmission performance data, the relay protection message type has been triggered a total of 87 times in the emergency access queue within the current statistical period, with a trigger frequency of 87 times / hour and a preset high-frequency threshold of 60 times / hour. Because 87 exceeds 60, it is included in the emergency message set.
[0121] S5.2. Calculate the additional fixed time slot duration required for inclusion in the baseline access queue using the various types of power grid communication messages in the emergency message set, and compare it with the current state to obtain the demand value for the next cycle.
[0122] In this embodiment, the average message length and average transmission interval of each type of message in the emergency message set are extracted from the historical transmission records. Based on this, the total amount of fixed time slot time required in each communication cycle is calculated if the message of this type is converted into a periodic service in the baseline access queue pair.
[0123] The total duration of the additional fixed time slot is compared with the fixed transmission resources already allocated to the current baseline access queue pair to assess whether the current remaining available bandwidth capacity can accommodate the new time slot demand. This yields the time slot expansion demand or time slot compression demand value for the baseline access queue pair in the next cycle, serving as a quantitative basis for time slot replacement adjustment.
[0124] S5.3. Based on the required values, a time slot replacement adjustment scheme is obtained.
[0125] In this embodiment, the time slot distribution structure of the reference access queue pair in the current communication cycle is adjusted and planned based on the obtained time slot expansion requirement value or time slot compression requirement value for the next cycle.
[0126] When the demand value is a slot expansion demand, the system adds a new slot of corresponding duration at the boundary of the non-critical time window of the time-aware gating list in the current baseline access queue, and embeds the periodic transmission slot corresponding to the high-frequency emergency message into it; When the demand value is a time slot compression demand, the system narrows the non-critical time window boundary of low-frequency baseline services, freeing up enough time slot space for new periodic services.
[0127] S5.4 According to the time slot replacement adjustment scheme, rearrange the order of the time-aware gating list for the next cycle, generate an updated gating sequence, and complete the writing of the new gating configuration table entries.
[0128] Based on the obtained time slot replacement adjustment scheme, the order of port open status indicators and port closed status indicators in the time-aware gating list for the next cycle is rearranged. The newly added periodic service time slot slots are inserted into the corresponding positions of the original alternation sequence according to the boundary positions specified in the adjustment scheme, thereby generating a time-aware update gating sequence.
[0129] Example 3 is an embodiment of the present invention, which provides a power grid communication protocol acceleration system based on RDMA, comprising: The transmission module determines the transmission urgency level based on the type identifier of the power grid communication message and the link load characteristics; The dual-mode gating configuration module generates differentiated transmission instructions based on the transmission urgency level, and configures the differentiated transmission instructions with a first parameter set to obtain the dual-mode gating configuration. The migration module writes the power grid communication message into the pre-registered physical memory of the peer through primary transmission to obtain transmission performance data; it analyzes the trigger frequency of the primary transmission queue based on the transmission performance data, and migrates from the primary transmission queue to the secondary transmission queue when the power grid communication message meets the conditions.
[0130] This embodiment also provides an electronic device applicable to a power grid communication protocol acceleration method based on RDMA, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the power grid communication protocol acceleration method based on RDMA as proposed in the above embodiment.
[0131] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a power grid communication protocol acceleration method based on RDMA as proposed in the above embodiment.
[0132] The storage medium proposed in this embodiment belongs to the same inventive concept as the method for accelerating a power grid communication protocol based on RDMA proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0133] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for accelerating power grid communication protocols based on RDMA, characterized in that, Includes the following steps: The urgency level of transmission can be obtained by identifying the type of the power grid communication message; Based on the transmission urgency level, the power grid communication messages are allocated to the first-level waiting queue, and differentiated transmission instructions are generated. Configure the differentiated transmission instructions with the first parameter set to obtain the dual-mode gating configuration; By combining the dual-mode gating configuration with primary transmission, the power grid communication messages are written into the pre-registered physical memory at the other end to obtain transmission performance data. Based on the transmission performance data analysis, the trigger frequency of the primary queue to be sent is determined, and in response to the power grid communication message meeting the conditions, the message is moved from the primary queue to the secondary queue to be sent.
2. The method for accelerating power grid communication protocols based on RDMA as described in claim 1, characterized in that, The steps to determine the transmission urgency level include: The urgency level of the business infrastructure is determined based on the type identifier carried in the header of the power grid communication message; Based on the number of message descriptors that have not been transmitted in the sender's queue, a first feature is determined, and a first-level analysis of the current transmission channel is performed based on the first feature to obtain the queue congestion status flag. Based on the byte increment difference statistically analyzed within a continuous sampling period, a second feature is determined, and a secondary analysis of the current link traffic is performed based on the second feature to obtain a traffic mutation status flag. Based on the current instantaneous data transmission status, a third feature is determined, and a three-level analysis of the remaining available space of the current link is performed according to the third feature to obtain a bandwidth-limited status indicator. The service urgency level is modified by using the bandwidth-limited status flag, the traffic mutation status flag, and the queue congestion status flag to obtain the transmission urgency level.
3. The method for accelerating power grid communication protocols based on RDMA as described in claim 2, characterized in that, The steps for revising the business fundamental urgency level include: The bandwidth-limited status flag is used to determine whether the remaining available space of the current link is in a saturated blocking range. When the system is in a saturation blocking zone, the service basic urgency level is upgraded to the transmission urgency level; when it is not in a saturation blocking zone, the current transmission urgency level is maintained at the service basic urgency level. The traffic mutation status flag is used to determine whether the current link traffic is in a fluctuating range. When the service is in a fluctuating range and the current transmission urgency level has not reached the highest level, the basic urgency level of the service is initially corrected based on the preset first urgency tier level to obtain the first corrected urgency level. The number of message descriptors that have not been transmitted in the sending queue is determined based on the queue congestion status flag to determine whether there is a message backlog. When there is a message backlog and the first correction urgency level is lower than the preset emergency transmission threshold, the first correction urgency level is increased based on the preset second urgency tier level to obtain the transmission urgency level.
4. The method for accelerating power grid communication protocols based on RDMA as described in claim 3, characterized in that, The steps for generating differentiated transmission instructions include: When the transmission urgency level is lower than the preset emergency transmission threshold, the power grid communication message is allocated to the reference access queue pair in the first-level pending transmission queue pair, and a fixed time slot instruction is generated. When the transmission urgency level is not lower than the preset emergency transmission threshold, the power grid communication message is allocated to the emergency access queue in the first-level pending transmission queue, and a priority preemption instruction is generated.
5. The method for accelerating power grid communication protocols based on RDMA as described in claim 4, characterized in that, The step of configuring the differentiated transmission instructions into the first parameter set includes: The continuous time segments of the reference access queue pair within a single communication cycle are determined by the fixed time slot instruction correspondence and the power grid communication message. The absolute time window boundary is defined based on the continuous time segments, and the alternating sequence of port opening and closing is generated by combining the frame number status of the power grid communication message to form a time-aware gating list. The gating state switching point is determined by the emergency message type and the corresponding allowed delay threshold in the priority preemption instruction; A logical mutual exclusion mapping relationship is established based on the gate state switching point; The maximum duration upper limit is generated by combining the logical mutual exclusion mapping relationship with the second feature, and the interrupt response segment is embedded in the basic timing structure to form a hybrid gating timing framework. The dual-mode gating configuration is obtained by combining the time-aware gating list with the hybrid gating timing framework.
6. The method for accelerating power grid communication protocols based on RDMA as described in claim 5, characterized in that, The steps to obtain transmission performance data include: The gate trigger signal is issued through the dual-mode gating configuration; According to the gating trigger signal, the power grid communication message from the sending end is written into the pre-registered physical memory of the receiving end; When the gating trigger signal originates from the time-aware gating list, a power grid communication message is transmitted in the reference access queue. When the gate trigger signal originates from the interrupt response section, the current transmission of the interrupt reference access queue pair is directly written into the power grid communication message of the sending end. Collect feature data after each transmission is completed, and summarize the data to obtain transmission performance data.
7. The method for accelerating power grid communication protocols based on RDMA as described in claim 6, characterized in that, The steps for migrating from the first-level pending-send queue pair to the second-level pending-send queue pair include: Based on the cumulative trigger count of the emergency access queue pairs in the transmission performance data, the power grid communication message types that meet the preset high-frequency threshold are selected to obtain the emergency message set. By using the various types of power grid communication messages in the emergency message set, the additional fixed time slot duration required for inclusion in the baseline access queue is calculated and compared with the current state to obtain the demand value for the next cycle. Based on the aforementioned demand values, a time slot replacement adjustment scheme is obtained; According to the time slot replacement adjustment scheme, the order of the time-aware gating list for the next cycle is rearranged to generate an updated gating sequence, and the new gating configuration entries are written.
8. A power grid communication protocol acceleration system based on RDMA, employing the power grid communication protocol acceleration method based on RDMA as described in any one of claims 1 to 7, characterized in that, This includes a transmission module that determines the transmission urgency level based on the type identifier of the power grid communication message and the link load characteristics. The dual-mode gating configuration module generates differentiated transmission instructions based on the transmission urgency level, and configures the differentiated transmission instructions with a first parameter set to obtain the dual-mode gating configuration. The migration module writes the power grid communication message into the pre-registered physical memory of the peer through primary transmission to obtain transmission performance data; it analyzes the trigger frequency of the primary transmission queue based on the transmission performance data, and migrates from the primary transmission queue to the secondary transmission queue when the power grid communication message meets the conditions.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the RDMA-based power grid communication protocol acceleration method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the RDMA-based power grid communication protocol acceleration method according to any one of claims 1 to 7.