Service data packet transmission method and system based on parallel redundancy protocol
By dynamically determining the target discarding strategy, the business failure problem caused by the internal sequence logic of service packets in data transmission based on parallel redundant protocol is solved, and higher service demand satisfaction and system stability are achieved.
Patent Information
- Application Number
- CN202411894123.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
AI Technical Summary
During data transmission based on parallel redundant protocols, standard drop-off policies may lead to service failures caused by internal sequential logic of service packets.
By obtaining the discard policy parameters in the configuration information, the target discard policy is dynamically determined, including the first discard policy and the second discard policy for the service message. The second drop policy performs a drop operation when the preset condition is met, otherwise the packet is retained.
It avoids business failures caused by the standard PRP discarding scheme due to the internal sequence logic of service messages, meets actual business needs, and improves the adaptability of the system and the continuity and stability of business operations.
Smart Images

Figure CN119814899A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method and system for transmitting service data packets based on a parallel redundant protocol. Background Art
[0002] During data transmission based on the Parallel Redundancy Protocol (PRP), the sender will copy each data packet and send it simultaneously through two independent network channels, such as link A and link B. The receiver will receive data packets from these two channels at the same time and check the received redundant data packets to ensure that the data can still reach the destination smoothly when a single link fails.
[0003] The PRP protocol usually adopts a discarding strategy of "first come, first sent, last arrived, discarded". When the data packets of link A and link B arrive at the receiving end alternately, the system will give priority to sending the data packets that arrive first and discard the duplicate data packets that arrive later (i.e., the redundant data packets that arrive later). The protocol is based on the principle of no packet loss. Due to factors such as network delay and path differences, data packets from different links may not arrive at the receiving end completely synchronously, so there is a small amount of duplicate or delayed packets being forwarded.
[0004] Although the PRP discard strategy effectively reduces the transmission of redundant data, in certain specific scenarios, especially for some industry standard service messages with internal sequence logic, the use of the standard PRP discard solution may cause service failures. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a method for transmitting a service data packet based on a parallel redundant protocol; on the other hand, it also provides a system for transmitting a service data packet based on a parallel redundant protocol.
[0006] The technical problem solved by the present invention can be achieved by adopting the following technical solutions:
[0007] A first aspect of the present invention is to provide a method for transmitting a service data packet based on a parallel redundant protocol, comprising:
[0008] Acquire configuration information, where the configuration information includes configuration parameters of a discarding strategy;
[0009] Determining a target discarding strategy according to the configuration parameters in the configuration information;
[0010] When a data packet is received, it is determined whether to perform a discard operation on the received data packet according to the determined target discard strategy.
[0011] Preferably, the target discard policy includes a first discard policy, and the first discard policy is configured as a policy based on the Parallel Redundancy Protocol.
[0012] Preferably, the target discard policy includes a second discard policy for service packets. The second discard policy is applied to the data packets that have been screened and retained by the Parallel Redundancy Protocol, and the second discard policy is configured as follows:
[0013] When a preset condition is satisfied, perform a discard operation on the data packet;
[0014] When the preset condition is not satisfied, do not perform a discard operation on the data packet.
[0015] Preferably, the second discard policy is further configured as follows:
[0016] a) When a first preset condition is satisfied, do not perform a discard operation on the data packet;
[0017] b) When the first preset condition is not satisfied, further judge:
[0018] If a second preset condition is satisfied, jump to the non-discard time window stage;
[0019] If the second preset condition is not satisfied, do not perform a discard operation on the data packet;
[0020] c) In the non-discard time window stage, further judge:
[0021] If a third preset condition is satisfied, perform a discard operation on the data packet;
[0022] If the third preset condition is not satisfied, do not perform a discard operation on the data packet.
[0023] Preferably, the first preset condition is that the difference between the current packet forwarding time and the last packet forwarding time exceeds a preset timeout.
[0024] Preferably, set the sequence number of the last forwarded data packet as A, the sequence number of the current data packet as B, the window value of the discard time window as M, and the upper limit value of the sequence number as SN. The second preset condition is:
[0025] A≥M and A - M < B ≤ A; or
[0026] 0≤A<M and (0≤B≤A or SN + A - M < B ≤ SN).
[0027] Preferably, the third preset condition is:
[0028] The difference between the current data packet forwarding time and the last data packet forwarding time is greater than the window value of the non-discard time window; or
[0029] The difference between the current packet forwarding time and the last processing time of each sequence number is less than the sequence number rollover time.
[0030] Preferably, the data packet is transmitted via at least two links, and the at least two links share the same discard time window and non-discard time window.
[0031] Preferably, not performing a discard operation on the data packet comprises:
[0032] A forwarding operation is performed on the received data packet, and the sequence number of the last forwarded data packet, the forwarding time of the last data packet, and the last processing time of each sequence number are updated.
[0033] A second aspect of the present invention is to provide a service data packet transmission system based on a parallel redundant protocol, which is used to implement the service data packet transmission method based on a parallel redundant protocol as described above, comprising:
[0034] A configuration module, used to obtain configuration information, wherein the configuration information includes configuration parameters of a discarding strategy;
[0035] A target policy determination module, connected to the configuration module, for determining a target discard policy according to configuration parameters in the configuration information;
[0036] The execution module is connected to the target policy determination module and is used to determine whether to execute a discard operation on the received data packet according to the determined target discard policy when receiving the data packet.
[0037] The advantages or beneficial effects of the technical solution of the present invention are:
[0038] The present invention dynamically determines the target discarding strategy based on the discarding scheme based on the parallel redundant protocol according to the configuration information, thereby avoiding the service failure caused by the internal sequence logic of the service message in the standard PRP discarding scheme, thereby meeting the actual service demand. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A schematic flow chart of a method for transmitting a service data packet based on a parallel redundant protocol in a preferred embodiment of the present invention;
[0040] Figure 2 It is a structural block diagram of a service data packet transmission method based on a parallel redundant protocol in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0043] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0044] In a preferred embodiment of the present invention, based on the above problems existing in the prior art, a service data packet transmission method based on a parallel redundant protocol is provided. Figure 1 As shown, including:
[0045] Obtain configuration information, including configuration parameters of a discard strategy;
[0046] Determine a target discard strategy according to configuration parameters in the configuration information;
[0047] When a data packet is received, it is determined whether to perform a discard operation on the received data packet according to the determined target discard strategy.
[0048] Specifically, for certain specific scenarios, especially for some industry standard business messages with internal sequential logic, the use of a standard PRP discarding scheme may lead to business failures. In this embodiment, the target discarding strategy can be dynamically determined based on the discarding scheme based on the parallel redundant protocol according to the configuration information, thereby avoiding business failures caused by the standard PRP discarding scheme due to the internal sequential logic of the business messages, thereby meeting actual business needs.
[0049] In actual applications, the configuration information is pre-configured by the user according to business requirements, including the enabled discarding policy and its parameter configuration.
[0050] Specifically, the user selects which policy to enable during the configuration process according to actual needs, such as the first discard policy and the second discard policy shown below.
[0051] For the selected strategy, the configuration information needs to further include specific parameter configurations under the strategy. Taking the second discard strategy as an example, the strategy may need to set a window value of a discard time window, a window value of a non-discard time window, and a preset timeout.
[0052] After receiving the configuration information pre-configured by the user, the target discard policy can be automatically determined according to the policy type and parameter configuration specified therein, and in the subsequent data packet processing process, it is determined whether to perform a discard operation on the received data packet based on the policy.
[0053] The discarding strategy based on user pre-configuration and flexible parameter setting in the embodiment of the present invention not only improves the adaptability of the system, but also ensures the continuity and stability of business operation.
[0054] As a preferred implementation, the target discarding strategy includes a first discarding strategy, and the first discarding strategy is configured as a strategy based on a parallel redundancy protocol.
[0055] Specifically, in this embodiment, the first discarding strategy may also be referred to as a PRP discarding strategy.
[0056] The PRP discard strategy adopts the discard strategy of "first come, first sent, last arrived, discarded". When the data packets of link A and link B arrive at the receiving end alternately, the system will give priority to the data packets that arrive first and discard the duplicate data packets that arrive later (that is, the redundant data packets that arrive later).
[0057] Specifically, for each received packet, the system makes a judgment based on the conditions of the standard PRP drop policy:
[0058] If the data packet meets the discard conditions in the standard PRP discard policy, the data packet is directly discarded.
[0059] If the data packet does not meet the discard conditions of the standard PRP discard policy, the data packet is retained.
[0060] The discard conditions include but are not limited to duplicate packet detection, timeout packet detection, etc.
[0061] As an example and not limitation, the discard condition can be implemented based on a sequence number. Each data packet includes a sequence number for identifying the position of the data packet in the transmission sequence.
[0062] Specifically, the sequence number of the currently received packet is compared with the sequence numbers of packets that have already been received:
[0063] When the sequence number of the received data packet contains the sequence number of the current data packet, the data packet is discarded;
[0064] When the sequence number of the received data packet does not contain the sequence number of the current data packet, the data packet is not discarded.
[0065] Of course, the PRP discard strategy is not limited to the discard scheme based on the sequence number. It can also include other types of discard strategies, such as discard based on timestamp, discard based on data content comparison, etc. The selection of these strategies depends on the specific application scenario and network environment.
[0066] As a preferred implementation, the target discarding strategy includes a second discarding strategy for service packets, and the second discarding strategy is applied to data packets that have been screened and retained by the parallel redundancy protocol.
[0067] Specifically, in this embodiment, a service model discarding algorithm is added on the basis of the original standard PRP discarding algorithm.
[0068] If only the PRP discard policy is enabled in the configuration information, the system will directly apply the standard PRP discard algorithm to process the received data packets.
[0069] If the business model discard algorithm is enabled in the configuration information, the system will take a two-step process: first apply the standard PRP discard policy, and then apply the business model discard algorithm based on this.
[0070] The business model discard algorithm may be the second discard strategy shown in the embodiment of the present invention. Of course, the business model discard algorithm is not limited to the discard scheme of the second discard strategy. It may also include discard strategies of other conditions. These strategies are formulated for specific services, support the selection of discard strategies according to business requirements, and adapt to more redundant business scenarios.
[0071] As a preferred implementation, the second discard strategy is configured as follows:
[0072] When the preset conditions are met, the data packet is discarded;
[0073] When the preset conditions are not met, the data packet is not discarded.
[0074] Specifically, in this embodiment, the data packet retained by the PRP discard algorithm is further judged according to the preset conditions of the second discard strategy: if the data packet meets the preset conditions, the discard operation is performed; if the data packet does not meet the preset conditions, the data packet is retained and not discarded.
[0075] As a preferred implementation, the second discard strategy is further configured as:
[0076] a) when the first preset condition is met, no discard operation is performed on the data packet;
[0077] b) When the first preset condition is not met, further determination is made:
[0078] If the second preset condition is met, jump to the non-discarding time window stage;
[0079] If the second preset condition is not met, no discard operation is performed on the data packet;
[0080] c) In the non-discarding time window stage, further judgment is made:
[0081] If the third preset condition is met, a discard operation is performed on the data packet;
[0082] If the third preset condition is not met, the data packet is not discarded.
[0083] Specifically, when the first preset condition is not met and the second preset condition and the third preset condition are met at the same time, that is, the preset conditions of the second discarding strategy are met, a discarding operation is performed on the data packet.
[0084] When the first preset condition is met, or the first preset condition and the second preset condition are not met at the same time, or the first preset condition, the second preset condition and the second preset condition are not met at the same time, that is, the so-called preset condition of the above-mentioned second discard strategy is not met, a retention operation is performed on the data packet.
[0085] Exemplarily, the parameters in the second discard strategy are described as follows:
[0086] The window value M of the discard time window (configurable): The default value is 30000, but it can be configured according to actual needs;
[0087] The sequence number A of the last forwarded data packet: used to record the sequence number of the last successfully sent data packet. The value is -1 by default during initialization and ranges from 0 to 65535, where the upper limit of the sequence number SN is 65535;
[0088] The last packet forwarding time is L: used to record the specific time point of the last forwarding packet;
[0089] The sequence number of the current data packet is B: it indicates the sequence number of the currently received data packet;
[0090] The current data packet forwarding time is C: represents the timestamp of the current data packet;
[0091] Window value N of the non-discarding time window (configurable): used to define the conditions under which packets should not be discarded within a specific time period;
[0092] Sequence number rollover time X: Under 100M bandwidth conditions, X is about 400ms;
[0093] The last processing time Y of each sequence number. This parameter is initialized to 0. The timestamp of the last processing of each sequence number is recorded in the protocol stack.
[0094] Configurable timeout D: used to determine the maximum time a data packet waits for processing in the system.
[0095] As a preferred embodiment, the first preset condition is that the difference between the current packet forwarding time and the last packet forwarding time exceeds the preset timeout.
[0096] As a preferred embodiment, assume the sequence number of the last forwarded data packet is A, the sequence number of the current data packet is B, the window value of the discard time window is M, and the upper limit value of the sequence number is SN. The second preset condition is:
[0097] A≥M and A - M < B ≤ A; or
[0098] 0 ≤ A < M and (0 ≤ B ≤ A or SN + A - M < B ≤ SN).
[0099] As a preferred embodiment, the third preset condition is:
[0100] The difference between the current packet forwarding time C and the last packet forwarding time L is greater than the window value N of the non-discard time window; or
[0101] The difference between the current packet forwarding time C and the last processing time Y of each sequence number is less than the sequence number rollover time X.
[0102] Specifically, in this embodiment, the second discard policy executes the following logic:
[0103] When C – L > D, forward the data packet and update the sent sequence number A = B, L = C, Y = C;
[0104] When C – L ≤ D, further judge:
[0105] If A≥M and A - M < B ≤ A, jump to the non-discard time window; or
[0106] If 0 ≤ A < M and (0 ≤ B ≤ A or 65535 + A - M < B ≤ 65535), jump to the non-discard time window;
[0107] Otherwise, forward the data packet and update the sent sequence number A = B, L = C, Y = C.
[0108] Execute the following logic during the non-discard time window:
[0109] If C – L > N or C – Y < X, discard the data packet;
[0110] Conversely, if the above conditions are not met, that is, C – L ≤ N and C – Y ≥ X, forward the data packet and update the last processing time Y of each sequence number.
[0111] As a preferred implementation, the data packet is transmitted via at least two links, and the at least two links share the same discard time window and non-discard time window.
[0112] As a preferred implementation, not performing a discard operation on the data packet includes:
[0113] Perform forwarding operations on the received data packets, and update the sequence number of the last forwarded data packet, the forwarding time of the last data packet, and the last processing time of each sequence number.
[0114] The present invention also provides a service data packet transmission system based on a parallel redundant protocol, which is used to implement the service data packet transmission method based on a parallel redundant protocol as described above. Figure 2 As shown, including:
[0115] Configuration module 1, used to obtain configuration information, the configuration information includes configuration parameters of the discarding strategy;
[0116] The target policy determination module 2 is connected to the configuration module 1 and is used to determine the target discarding policy according to the configuration parameters in the configuration information;
[0117] The execution module 3 is connected to the target policy determination module 2 and is used to determine whether to execute a discard operation on the received data packet according to the determined target discard policy when receiving the data packet.
[0118] The advantages or beneficial effects of adopting the above technical solution are: the present invention dynamically determines the target discarding strategy based on the discarding scheme based on the parallel redundant protocol according to the configuration information, thereby avoiding the service failure caused by the standard PRP discarding scheme due to the internal sequential logic of the service message, thereby meeting the actual service needs.
[0119] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of this specification and illustrations should be included in the protection scope of the present invention.
Claims
1. A method for transmitting a service data packet based on a parallel redundant protocol, characterized in that: Including: Obtain configuration information, where the configuration information includes configuration parameters of a discard policy; Determine a target discard policy according to the configuration parameters in the configuration information; When receiving a data packet, determine whether to perform a discard operation on the received data packet according to the determined target discard policy.
2. The method for transmitting service data packets based on the parallel redundant protocol according to claim 1, characterized in that: The target discard policy includes a first discard policy, and the first discard policy is configured as a policy based on the Parallel Redundancy Protocol.
3. The method for transmitting service data packets based on the parallel redundant protocol according to claim 1, characterized in that: The target discard policy further includes a second discard policy for service packets, and the second discard policy is applied to the data packets that have been screened and retained by the Parallel Redundancy Protocol. The second discard policy is configured as follows: When a preset condition is satisfied, perform a discard operation on the data packet; When the preset condition is not satisfied, do not perform a discard operation on the data packet.
4. The method for transmitting service data packets based on the parallel redundant protocol according to claim 3, characterized in that: The second discard policy is further configured as follows: a) When a first preset condition is satisfied, do not perform a discard operation on the data packet; b) When the first preset condition is not satisfied, further judge: If a second preset condition is satisfied, jump to the non-discard time window stage; If the second preset condition is not satisfied, do not perform a discard operation on the data packet; c) In the non-discard time window stage, further judge: If a third preset condition is satisfied, perform a discard operation on the data packet; If the third preset condition is not satisfied, do not perform a discard operation on the data packet.
5. The method for transmitting service data packets based on the parallel redundant protocol according to claim 4, characterized in that: The first preset condition is that the difference between the current packet forwarding time and the last packet forwarding time exceeds a preset timeout.
6. The method for transmitting service data packets based on the parallel redundant protocol according to claim 4, characterized in that: Set the sequence number of the last forwarded data packet as A, the sequence number of the current data packet as B, the window value of the discard time window as M, and the upper limit value of the sequence number as SN. The second preset condition is: A≥M and A - M < B ≤ A; or 0 ≤ A < M and (0 ≤ B ≤ A or SN + A - M < B ≤ SN).
7. The method for transmitting service data packets based on the parallel redundant protocol according to claim 4, characterized in that: The third preset condition is: The difference between the current data packet forwarding time and the last data packet forwarding time is greater than the window value of the non-discard time window; or The difference between the current data packet forwarding time and the last processing time of each sequence number is less than the sequence number rollover time.
8. The method for transmitting service data packets based on the parallel redundant protocol according to claim 4, characterized in that: The data packet is transmitted via at least two links, and the at least two links share the same discard time window and non-discard time window.
9. The method for transmitting service data packets based on the parallel redundant protocol according to claim 3, characterized in that: The non-performance of the discard operation on the data packet includes: Perform a forwarding operation on the received data packet, and update the sequence number of the last forwarded data packet, the forwarding time of the last data packet, and the last processing time of each sequence number.
10. A service data packet transmission system based on a parallel redundant protocol, characterized in that: For implementing the method for transmitting service data packets based on the Parallel Redundancy Protocol according to any one of claims 1-9, including: A configuration module for obtaining configuration information, where the configuration information includes configuration parameters of a discard policy; A target policy determination module connected to the configuration module for determining a target discard policy according to the configuration parameters in the configuration information; An execution module connected to the target policy determination module for determining whether to perform a discard operation on the received data packet according to the determined target discard policy when receiving a data packet.