CN-116800690-B - Method for de-duplicating carrier communication message based on HPLC network
Abstract
The invention provides a de-duplication method based on carrier communication message in HPLC network, which uses MSDU serial number (MSDU serial number field carried in HPLC link layer MAC frame head) in carrier communication message of HPLC network to judge whether it is repeated message, MSDU serial number is increment serial number allocated to MSDU frame by node device generating MSDU frame, other node device can not modify received MSDU serial number after receiving MSDU frame, if it needs to be forwarded, it directly forwards. By means of the technical scheme, the message deduplication mode according to the method provided by the patent only needs to calculate the values of the formula 1 and the formula 2, and compared with the deduplication mode of comparing MSDU frame sequence numbers in a mode of performing cyclic inquiry by common message deduplication, the message deduplication mode of the method is higher in efficiency and higher in accuracy.
Inventors
- WU JUNQIANG
- LIU DEBO
- GUO XING
- ZHAO YONG
- LIU YONGQI
Assignees
- 青岛联众芯云科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230109
Claims (3)
- 1. The de-duplication method based on the carrier communication message in the HPLC network is characterized by comprising the following steps: Step S1, defining a structure body array, wherein the number of array elements is consistent with the number of node equipment in an actual network scale, the structure body array is named as g_bitmap, each node equipment is defined with the array, the array footer is consistent with the identification of node equipment terminal equipment, a 32-bit variable named as bitmap is defined in the structure body and used for storing and updating the state of receiving the MSDU serial number of a carrier communication message of the corresponding node equipment, the variable for storing the MSDU frame serial number is defined as msdu_sn, the variable sn_cnt and the variable offset are defined, and the initial values of the three variables are all 0; Step S2, the node equipment receives the MSDU message of the network, extracts the MSDU frame serial number in the message, stores the MSDU frame serial number in the variable msdu_sn, and extracts the TEI of the node equipment for transmitting the message from the MSDU message; Step S3, converting MSDU frame sequence number into offset value according to formula (1), offset = msdu_sn - sn_cnt<<4(1); Every time the offset is equal to 32, the sn_cnt value is incremented by 1, at which time the lower 16 bits of the bitmap are shifted to the upper 16 bits; Step S4, substituting the offset value converted by the MSDU frame sequence number according to the formula (1) into the formula (2), if the result calculated by the formula (2) is 0, performing the processing of step S5, and if the result calculated by the formula (2) is 1, performing the processing of step S6; g_bitmap[i].bitmap &(1<<(31 –offset))(2); Step S5, the calculated result of the formula (2) is 0, which shows that the received MSDU message is a new message, and the step S7 is changed to update the value of g_bitmap [ i ]. Bitmap; Step S6, the calculation result of the formula (2) is 1, which shows that the received MSDU message is an old message, the variable g_bitmap [ i ]. Bitmap has recorded the MSDU frame serial number of the message, the message recording the MSDU serial number has been received and processed, and the message is discarded; S7, updating the value of g_bitmap [ i ]. Bitmap, namely dividing the variable g_bitmap [ i ]. Bitmap of 32 bits into two groups, namely a high 16 bits and a low 16 bits, wherein the low 16 bits are used for recording a new MSDU serial number; Step S8, judging a restarting mark of the node equipment, if the node equipment is restarted, resetting variables msdu_sn, sn_cnt, offset and g_bitmap [ i ]. Bitmap, and re-judging and re-recording the MSDU frame of the node equipment; And S9, judging that the heavy flow is ended.
- 2. The method for de-duplication of carrier communication messages based on an HPLC network according to claim 1, wherein in step S7, if the new MSDU sequence number is the bit1 that is not set at the highest position in the low 16 bits, if the highest bit that is not set at the highest position is bit12, bit12 is set 1, bit15 to bit13 is already set 1, after all the low 16 bits are set 1, the low 16 bits are shifted to the high 16 bits, the high 16 bits are used for storing the current first 16 latest MSDU sequence numbers, and the new node device MSDU sequence numbers can be recorded and updated, and if the new MSDU sequence number is received, whether the message is a duplicate message can be judged by comparing the values of the corresponding bit.
- 3. The method for de-duplication of a message based on carrier communication in an HPLC network according to claim 2, wherein if the value of the corresponding bit is 1, the message is a duplicate message and needs to be discarded, and if the value of the corresponding bit is 0, the message is a new message, and the bit needs to be set to 1.
Description
Method for de-duplicating carrier communication message based on HPLC network Technical Field The invention relates to the technical field of carrier communication, in particular to a deduplication method based on carrier communication messages in an HPLC network. Background The current national network HPLC network is applied to different application scenes such as an application mining network, a low-voltage distribution network and the like, the development of carrier communication technology is gradually perfected, the data volume of carrier communication messages on a power line is increased, and the problem of screening and de-duplication of the carrier communication messages is related to how node equipment (comprising CCO and STA) in the HPLC network distinguishes whether the received carrier communication messages need further processing or not. The screening of the carrier communication message mainly refers to screening out a message of an HPLC network where the node equipment is located, the carrier communication message carries network identifiers (SNIDs for short), the network identifiers of different HPLC networks are different, and the carrier communication message of the network can be screened through the network identifiers of the HPLC network where the node equipment is located. The de-duplication of the carrier communication message refers to removing the repeated carrier communication message received in the HPLC network, reducing the processing of the repeated carrier communication message by the device, and improving the message processing efficiency. The first repeated message receiving scenario is that the HPLC network is a tree structure network, message transmission between adjacent layers is provided with a forwarding mechanism, so that some node devices can receive repeated carrier communication messages, the second repeated message receiving scenario is that local broadcasting exists under the condition that communication link communication effects are poor, the local broadcasting means that proxy nodes send carrier communication messages in a broadcasting mode, in addition, certain service communication requirements need to carry out whole network data broadcasting, and the whole network broadcasting means that all proxy nodes in the HPLC network forward the received carrier communication messages. Broadcast messages are messages that mainly need to be deduplicated. Disclosure of Invention In order to make up for the defects of the prior art, the invention provides a deduplication method based on carrier communication messages in an HPLC network. The invention is realized by the following technical scheme that the method for de-duplicating the carrier communication message based on the HPLC network specifically comprises the following steps: Step S1, defining a structure body array, wherein the number of array elements is consistent with the number of node equipment in an actual network scale, the structure body array is named as g_bitmap, each node equipment is defined with the array, the array footer is consistent with the identification of node equipment terminal equipment, a 32-bit variable named as bitmap is defined in the structure body and used for storing and updating the state of receiving the MSDU serial number of a carrier communication message of the corresponding node equipment, the variable for storing the MSDU frame serial number is defined as msdu_sn, the variable sn_cnt and the variable offset are defined, and the initial values of the three variables are all 0; Step S2, the node equipment receives the MSDU message of the network, extracts the MSDU frame serial number in the message, stores the MSDU frame serial number in the variable msdu_sn, and extracts the TEI of the node equipment for transmitting the message from the MSDU message; Step S3, converting MSDU frame sequence number into offset value according to formula (1), offset = msdu_sn - sn_cnt<<4(1); Every time the offset is equal to 32, the sn_cnt value is incremented by 1, at which time the lower 16 bits of the bitmap are shifted to the upper 16 bits; step S4, substituting the offset value converted by the MSDU frame sequence number according to the formula 1 into the formula 2, if the result calculated by the formula 2 is 0, performing the processing of step S5, and if the result calculated by the formula 2 is 1, performing the processing of step S6; g_bitmap[i].bitmap&(1<<(31 –offset)(2); and S5, calculating the result of the formula (2) to be 0, namely, the received MSDU message is a new message, and turning to the step S7 to update the value of the g_bitmap [ i ]. Bitmap. Step S6, the calculation result of the formula (2) is 1, which shows that the received MSDU message is an old message, the variable g_bitmap [ i ]. Bitmap has recorded the MSDU frame serial number of the message, the message recording the MSDU serial number has been received and processed, and the message is discarded; S7, upda