A method for removing duplication of carrier communication messages in an HPLC network
By utilizing the MSDU frame sequence number and bitmap variable for deduplication in the HPLC network, the problem of efficient deduplication of duplicate messages in the HPLC network is solved, improving processing efficiency and reducing memory consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO LIANZHONGXIN CLOUD TECH CO LTD
- Filing Date
- 2023-01-09
- Publication Date
- 2026-05-05
AI Technical Summary
In HPLC networks, existing technologies suffer from low efficiency and high memory consumption in order to efficiently distinguish and remove duplicate carrier communication messages, especially in tree-structured networks and with poor communication links.
By defining a structure array g_bitmap, deduplication is performed using the MSDU frame sequence number. The offset value is calculated using formulas 1 and 2 to determine whether the message is new or old. The sequence number status is recorded using the bitmap variable to achieve efficient deduplication.
It improves message processing efficiency, reduces memory consumption, and meets the deduplication requirements of complex structures and broadcast-type messages in HPLC networks.
Smart Images

Figure CN116800690B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of carrier communication technology, and more particularly to a method for deduplication of carrier communication messages in an HPLC network. Background Technology
[0002] Currently, the State Grid HPLC network is used in various application scenarios such as power supply and demand networks and low-voltage power distribution networks. As carrier communication technology becomes increasingly sophisticated, the amount of carrier communication message data on power lines is also increasing. How can the node devices (including CCO and STA) in the HPLC network distinguish whether the received carrier communication messages need further processing? This involves the problem of carrier communication message filtering and deduplication.
[0003] The filtering of carrier communication messages mainly refers to filtering out the messages of the HPLC network where the node device is located. The carrier communication messages carry a network identifier (SNID). Different HPLC networks have different network identifiers. The carrier communication messages of the local HPLC network can be filtered by the network identifier of the local HPLC network.
[0004] Deduplication of carrier communication messages refers to removing duplicate carrier communication messages received in the HPLC network, reducing the processing of duplicate carrier communication messages by the equipment, and improving message processing efficiency.
[0005] Scenario 1 for duplicate message reception: The HPLC network has a tree-like structure, and message transmission between adjacent levels has a forwarding mechanism. This means that some nodes may receive duplicate carrier communication messages. Scenario 2 for duplicate message reception: When the communication link is weak, local broadcasting may occur. Local broadcasting refers to the proxy node sending carrier communication messages in a broadcast manner. Additionally, some business communication requirements necessitate network-wide data broadcasting, which means that all proxy nodes in the HPLC network forward the received carrier communication messages. Broadcast messages are the primary messages that need to be deduplicated. Summary of the Invention
[0006] To overcome the shortcomings of existing technologies, this invention provides a deduplication method based on carrier communication messages in an HPLC network.
[0007] This invention is achieved through the following technical solution: a deduplication method for carrier communication messages in an HPLC network, specifically including the following steps:
[0008] Step S1: Define a structure array, with the number of array elements matching the number of node devices in the actual network scale. Name the structure array g_bitmap. Each node device defines its own array, and the array subscript matches the node device's terminal device identifier. Define a 32-bit variable named bitmap within the structure to store the status of updating the MSDU sequence number of the carrier communication message received from the corresponding node device. Define a variable named msdu_sn to store the MSDU frame sequence number, and define variables sn_cnt and offset. Initialize all three variables to 0.
[0009] Step S2: When a node device receives an MSDU message from this network, it extracts the MSDU frame sequence number from the message and saves it to the variable msdu_sn. At the same time, it extracts the TEI of the node device that sent the message from the MSDU message.
[0010] Step S3: Convert the MSDU frame sequence number into an offset value according to formula (1).
[0011] offset = msdu_sn - sn_cnt<<4(1);
[0012] Whenever offset equals 32, the value of sn_cnt is incremented by 1, at which point the lower 16 bits of the bitmap need to be shifted to the higher 16 bits;
[0013] Step S4: Substitute the offset value converted from the MSDU frame sequence number according to Formula 1 into Formula 2. If the result calculated by Formula (2) is 0, proceed to Step S5. If the result calculated by Formula 2 is 1, proceed to Step S6.
[0014] g_bitmap[i].bitmap&(1<<(31 –offset)(2);
[0015] Step S5: The result of formula (2) is 0, which means that the received MSDU message is a new message. Proceed to step S7 to update the value of g_bitmap[i].bitmap.
[0016] Step S6: The result of formula (2) is 1, which means that the received MSDU message is an old message. The variable g_bitmap[i].bitmap has recorded the MSDU frame sequence number of the message. The message that recorded the MSDU sequence number has been received and processed. The message is discarded.
[0017] Step S7: Update the value of g_bitmap[i].bitmap: Divide the 32-bit variable g_bitmap[i].bitmap into two groups, the high 16 bits and the low 16 bits. The low 16 bits are used to record the new MSDU sequence number;
[0018] Step S8: Determine the restart flag of the node device;
[0019] Step S9: The deduplication process ends.
[0020] As a preferred solution, in step S7, if it is a new MSDU sequence number, the bits in the highest position of the lower 16 bits that are not set to 1 are set to 1. Assuming that the highest bit that is not set to 1 is bit 12, then bit 12 is set to 1, and bits 15 to 13 are already set to 1. After all the lower 16 bits are set to 1, the lower 16 bits are shifted to the higher 16 bits. The higher 16 bits are used to store the 16 most recent MSDU sequence numbers. By repeating this process, the MSDU sequence number of the updating node device can be recorded as the latest. Each time an MSDU sequence number is received, the value of the corresponding bit can be compared to determine whether it is a duplicate message.
[0021] Furthermore, if the value of the corresponding bit is 1, the message is a duplicate message and needs to be discarded; if the value of the corresponding bit is 0, the message is a new message and the bit needs to be set to 1.
[0022] As a preferred option, if the node device restarts in step S8, the variables msdu_sn, sn_cnt, offset, and g_bitmap[i].bitmap need to be cleared, and the MSDU frames of the node device are re-determined and recorded.
[0023] The present invention, by adopting the above technical solutions, has the following beneficial effects compared with the prior art: the message deduplication method provided by this patent only requires calculating the values of formula 1 and formula 2. Compared with the deduplication method of MSDU frame sequence number by loop querying in ordinary message deduplication, the message deduplication method of this patent is more efficient and more accurate.
[0024] HPLC networks typically have multiple layers. The higher the layer, the longer the transmission time of each network-wide broadcast carrier communication message. This means that the deduplication process for network-wide broadcast carrier communication messages requires a longer retention time, i.e., a certain retention period is needed in the node devices. Ordinary message deduplication methods generally save the MSDU frame sequence number of the received carrier communication message. The longer the time, the more MSDU frame sequence numbers need to be saved, thus increasing the memory space required by the node device system. The message deduplication method provided in this patent does not incur additional memory space consumption, and compared with ordinary message deduplication methods, it can reduce memory space consumption.
[0025] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0026] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0027] Figure 1 This is a flowchart of the node device message deduplication process of the present invention;
[0028] Figure 2 This is a flowchart for step 2;
[0029] Figure 3 The flowchart is for steps 3, 4, 5, and 7.
[0030] Figure 4 Flowchart for steps 3, 4, and 6. Detailed Implementation
[0031] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0032] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0033] The following is combined with Figures 1 to 4 The deduplication method for carrier communication messages in an HPLC network based on embodiments of the present invention will be described in detail.
[0034] The basic principle of this invention is to use the MSDU sequence number (the MSDU sequence number field carried in the MAC frame header of the HPLC link layer) in the HPLC network carrier communication message to determine whether it is a duplicate message. The MSDU sequence number is an incrementing sequence number assigned to the MSDU frame by the node device that generates the MSDU frame. After receiving the MSDU frame, other node devices cannot modify the received MSDU sequence number. If forwarding is required, it will be forwarded directly.
[0035] like Figure 1 As shown, this invention proposes a deduplication method for carrier communication messages in an HPLC network, specifically including the following steps:
[0036] Step S1: Define a structure array. The number of array elements should match the number of node devices in the actual network scale. Name the structure array g_bitmap. Each node device should have its own array. The array subscripts should match the Terminal Equipment Identifier (TEI) of the node device. Define a 32-bit variable named bitmap in the structure to store the status of updating the MSDU sequence number of the carrier communication message received from the corresponding node device. Define a variable named msdu_sn to store the MSDU frame sequence number. Define variables sn_cnt and offset. Initialize all three variables to 0.
[0037] Step S2: As Figure 2 As shown, when a node device receives an MSDU message from the local network, it extracts the MSDU frame sequence number from the message and saves it to the variable msdu_sn. At the same time, it extracts the TEI of the node device that sent the message from the MSDU message.
[0038] Step S3: Convert the MSDU frame sequence number into an offset value according to formula (1).
[0039] offset = msdu_sn - sn_cnt<<4(1);
[0040] Whenever offset equals 32, the value of sn_cnt is incremented by 1, at which point the lower 16 bits of the bitmap need to be shifted to the higher 16 bits;
[0041] Step S4: Substitute the offset value converted from the MSDU frame sequence number according to Formula 1 into Formula 2. If the result calculated by Formula (2) is 0, proceed to Step S5. If the result calculated by Formula 2 is 1, proceed to Step S6.
[0042] g_bitmap[i].bitmap&(1<<(31 –offset)(2);
[0043] Step S5: As Figure 3 As shown, the result of formula (2) is 0, indicating that the received MSDU message is a new message, and proceed to step S7 to update the value of g_bitmap[i].bitmap.
[0044] Step S6: As Figure 4 As shown, the result of formula (2) is 1, indicating that the received MSDU message is an old message. The variable g_bitmap[i].bitmap has already recorded the MSDU frame sequence number of the message. The message that recorded the MSDU sequence number has been received and processed, so the message is discarded.
[0045] Step S7: Update the value of g_bitmap[i].bitmap: Divide the 32-bit variable g_bitmap[i].bitmap into two groups, the high 16 bits and the low 16 bits. The low 16 bits are used to record the new MSDU sequence number. If it is a new MSDU sequence number, the bits in the highest position of the low 16 bits that are not set to 1 are set to 1. Assuming that the highest bit that is not set to 1 is bit12, then bit12 is set to 1, and bits15~13 are already set to 1. After all the low 16 bits are set to 1, the low 16 bits are shifted to the high 16 bits. The high 16 bits are used to store the 16 most recent MSDU sequence numbers. By repeating this process, the MSDU sequence number of the updating node device can be recorded as the latest. Each time an MSDU sequence number is received, the value of the corresponding bit can be compared to determine whether it is a duplicate message. If the value of the corresponding bit is 1, the message is a duplicate message and needs to be discarded. If the value of the corresponding bit is 0, the message is a new message and the bit needs to be set to 1.
[0046] Table 1 shows an example of the bitmap relationship when msdu_sn is different. In the first row of the figure, 31~0 from left to right represent the bits corresponding to the 32-bit variable bitmap. Rows 2 to 8 represent the actual values corresponding to the 32 bits of the bitmap.
[0047] Table 1 shows the correspondence between msdu_sn and bitmap.
[0048]
[0049] Step S8: Determine the restart flag of the node device; if the node device has restarted, the variables msdu_sn, sn_cnt, offset, and g_bitmap[i].bitmap need to be cleared, and the MSDU frames of the node device should be re-determined and recorded.
[0050] Step S9: The deduplication process ends.
[0051] In the description of this invention, the term "a plurality of" refers to two or more. Unless otherwise explicitly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.
[0052] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0053] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A deduplication method based on carrier communication messages in an HPLC network, characterized in that... Specifically, it includes the following steps: Step S1: Define a structure array, with the number of array elements matching the number of node devices in the actual network scale. Name the structure array g_bitmap. Each node device defines its own array, and the array subscript matches the node device's terminal device identifier. Define a 32-bit variable named bitmap within the structure to store the status of updating the MSDU sequence number of the carrier communication message received from the corresponding node device. Define a variable named msdu_sn to store the MSDU frame sequence number, and define variables sn_cnt and offset. Initialize all three variables to 0. Step S2: When a node device receives an MSDU message from this network, it extracts the MSDU frame sequence number from the message and saves it to the variable msdu_sn. At the same time, it extracts the TEI of the node device that sent the message from the MSDU message. Step S3: Convert the MSDU frame sequence number into an offset value according to formula (1). offset = msdu_sn - sn_cnt<<4(1); Whenever offset equals 32, the value of sn_cnt is incremented by 1, at which point the lower 16 bits of the bitmap need to be shifted to the higher 16 bits; Step S4: Substitute the offset value converted from the MSDU frame sequence number according to formula (1) into formula (2). If the result calculated by formula (2) is 0, proceed to step S5. If the result calculated by formula (2) is 1, proceed to step S6. g_bitmap[i].bitmap &(1<<(31 –offset))(2); Step S5: The result of formula (2) is 0, which means that the received MSDU message is a new message. Proceed to step S7 to update the value of g_bitmap[i].bitmap; Step S6: The result of formula (2) is 1, which means that the received MSDU message is an old message. The variable g_bitmap[i].bitmap has recorded the MSDU frame sequence number of the message. The message that recorded the MSDU sequence number has been received and processed. The message is discarded. Step S7: Update the value of g_bitmap[i].bitmap: Divide the 32-bit variable g_bitmap[i].bitmap into two groups, the high 16 bits and the low 16 bits. The low 16 bits are used to record the new MSDU sequence number; Step S8: Determine the restart flag of the node device; if the node device has restarted, the variables msdu_sn, sn_cnt, offset, and g_bitmap[i].bitmap need to be cleared, and the MSDU frames of the node device should be re-determined and recorded. Step S9: The deduplication process ends.
2. The deduplication method for carrier communication messages in an HPLC network according to claim 1, characterized in that... In step S7, if it is a new MSDU sequence number, the bits in the lower 16 bits that are not currently set to 1 are set to 1. For example, if the highest bit that is not currently set to 1 is bit 12, then bit 12 is set to 1, and bits 15 to 13 are already set to 1. After all the lower 16 bits are set to 1, the lower 16 bits are shifted to the higher 16 bits. The higher 16 bits are used to store the 16 most recent MSDU sequence numbers. This process is repeated in sequence to keep the updated node device's MSDU sequence number up-to-date. Each time an MSDU sequence number is received, the value of the corresponding bit can be compared to determine whether it is a duplicate message.
3. The deduplication method for carrier communication messages in an HPLC network according to claim 2, characterized in that... If the value of the corresponding bit is 1, the message is a duplicate message and needs to be discarded; if the value of the corresponding bit is 0, the message is a new message and the bit needs to be set to 1.
Citation Information
Patent Citations
Redundant message processing method, apparatus and system
CN106452695A
Data message multi-sending selective-receiving sending and receiving method, device and system
CN114793210A