A beacon modulation method, apparatus and electronic device

By embedding beacon information in the time gap of the data packet, and determining the mark with the preset average gap and packet gap of the beacon detection device, the accuracy problem of attacker source identification in the network environment is solved, and the stable and accurate transmission of beacon information is achieved.

CN115277193BActive Publication Date: 2025-07-25CETC CYBERSPACE SECURITY RES INST CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210891354.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2025-07-25
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify the source of an attacker in a network environment, and traditional passive network flow analysis methods are difficult to adapt to the attacker's mobility, resulting in difficulty in identifying the source of an attack.

Method used

Using time slot-based beacon modulation technology, the beacon information is embedded in the time gap of the data packet through the beacon embedding device. The beacon detection device determines the start and end marks based on the preset average gap and the data packet gap, and extracts bit information to obtain the beacon information.

Benefits of technology

It realizes the stability and accuracy transmission of beacon information, can accurately identify the source of the attacker in an anonymous communication network, and has good hiddenness and adaptability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115277193B_ABST
    Figure CN115277193B_ABST
Patent Text Reader

Abstract

The present invention discloses a beacon modulation method, apparatus and electronic device, belonging to the technical field of data transmission. The method is applied to a beacon detection device and includes: obtaining a data packet sent by a beacon embedding device; determining a start marker and an end marker corresponding to the data packet according to a preset average gap or the gap of the data packet, where the preset average gap is the average time slot of the data packet synchronized between the beacon detection device and the beacon embedding device; and obtaining beacon information corresponding to the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet. In the present invention, the beacon detection device uses the preset average gap synchronized with the beacon embedding device to detect the beacon information embedded through the gap of the data packet, so that the beacon embedding device can embed the beacon information by changing the time gap of the sent data packet, realizing slot-based beacon modulation and ensuring the stability and accuracy of beacon information transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and particularly to a beacon modulation method, apparatus, and electronic device. Background Art

[0002] With the continuous development of the Internet, network security has increasingly become the focus of people's attention. Network intruders, for their own interests, threaten network security through various attack means, illegally occupying others' resources. How to identify the source of attacks has become a key issue. In response to these problems, the early solutions mainly adopted passive network flow analysis methods, which detected and distinguished malicious attack traffic by analyzing the characteristics of malicious traffic and predicted the attacker's location. However, due to the mobility of attackers, it is difficult for passive network flow analysis to accurately identify the source of attacks.

[0003] To solve the above problems, researchers, based on the idea of digital watermarking, that is, the method of embedding proprietary information in digital content, proposed a concealed active network flow watermarking technology. By changing the specified characteristics of the network flow generated at the sending end to embed beacons, and then detecting whether there are beacons in the corresponding flow at the receiving end, it is possible to determine whether there is a flow association between the sending end and the receiving end. This active watermarking technology is more adaptable than traditional passive network flow analysis technologies. It can exist completely in anonymous communication networks or other network environments, and has good concealment, making it difficult to be detected by a third party, and can accurately and covertly identify the source of attacks.

[0004] Among them, the time-slot-based beacon modulation technology has developed rapidly. It uses the time gap between data packets in the network flow as the carrier of beacon information. The sending end embeds beacon data by delaying the sent data packets and changing the gap between the data packets to implant network beacons, and the receiving end extracts the beacon information by reading the gap between the data packets. This technology can embed sufficient beacon information in a relatively short network flow, with good concealment, and provides an effective means for solving the problem of identifying the source of attackers.

[0005] Therefore, how to provide a time-slot-based beacon modulation method to ensure the stability and accuracy of beacon information transmission is an urgent problem to be solved nowadays. Summary of the Invention

[0006] The object of the present invention is to provide a beacon modulation method, apparatus, and electronic device to implement time-slot-based beacon modulation and ensure the stability and accuracy of beacon information transmission.

[0007] To solve the above technical problems, the present invention provides a beacon modulation method applied to a beacon detection device, including:

[0008] Obtaining data packets sent by a beacon embedding device;

[0009] Determine the start marker and end marker corresponding to the data packet according to the preset average gap or the gap of the data packet; wherein, the preset average gap is the average time slot of the data packet for the beacon detection device to synchronize with the beacon embedding device.

[0010] According to the preset average gap and the gap of the data packet, obtain the beacon information corresponding to the bit information between the start marker and the end marker.

[0011] Optionally, the determining the start marker and end marker corresponding to the data packet according to the preset average gap or the gap of the data packet includes:

[0012] Take the first consecutive first number of first gaps as the start marker; wherein, the first gap is between the first multiple and the second multiple of the gap of the data packet, the first number is a positive integer greater than or equal to 2, and the second multiple is greater than the first multiple.

[0013] Take the second consecutive second number of second gaps as the end marker; wherein, the second gap is between the third multiple and the fourth multiple of the gap of the data packet, the second number is a positive integer greater than or equal to 2, and the fourth multiple is greater than the third multiple.

[0014] Optionally, before obtaining the data packet sent by the beacon embedding device, it further includes:

[0015] Synchronize with the beacon embedding device to calculate and record the preset average gap.

[0016] Optionally, the obtaining the beacon information corresponding to the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet includes:

[0017] Extract the bit information according to the preset average gap and the gap of the data packet.

[0018] Determine each check group in the bit information; wherein, the check group includes the third number of bit information and the fourth preset number of check codes.

[0019] Use the check codes in each check group to check the respective bit information to obtain the check result.

[0020] If the check results corresponding to each check group are all successful in checking, convert the bit information into byte information.

[0021] Decode the byte information to obtain the beacon information.

[0022] Optionally, extracting the bit information according to the preset average gap and the gap of the data packet includes:

[0023] If the gap corresponding to the current bit position in the bit information is less than or equal to five times the preset average gap, determine that the current bit position is 0;

[0024] If the gap corresponding to the current bit position is greater than five times the preset average gap and less than six times the preset average gap, determine that the current bit position is 1; where the sixth multiple is greater than the fifth multiple.

[0025] The present invention also provides a beacon modulation device, which is applied to a beacon detection device and includes:

[0026] A receiving module, configured to obtain a data packet sent by a beacon embedding device;

[0027] A determining module, configured to determine a start marker and an end marker corresponding to the data packet according to a preset average gap or the gap of the data packet; where the preset average gap is the average time slot of the data packet for the beacon detection device to synchronize with the beacon embedding device;

[0028] An obtaining module, configured to obtain beacon information corresponding to the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet.

[0029] The present invention also provides a beacon modulation method, which is applied to a beacon embedding device and includes:

[0030] Obtain bit information corresponding to the beacon information to be sent;

[0031] Configure the transmission gap of the data packet corresponding to the bit information according to a preset average gap; where the transmission gap includes a start marker, an end marker, and a delay time corresponding to the bit information; the preset average gap is the average time slot of the data packet for the beacon detection device to synchronize with the beacon embedding device;

[0032] Send the data packet to the beacon detection device according to the transmission gap.

[0033] Optionally, obtaining the bit information corresponding to the beacon information to be sent includes:

[0034] Encode the beacon information to be sent to obtain encrypted information corresponding to the beacon information to be sent;

[0035] Convert the encrypted information into original bit information;

[0036] Determine each check group in the original bit information;

[0037] Embed a check code corresponding to the respective bit information in each of the check groups to generate the bit information.

[0038] The present invention also provides a beacon modulation device, which is applied to a beacon embedding device and includes:

[0039] A conversion module, configured to obtain bit information corresponding to the beacon information to be sent;

[0040] A configuration module, configured to configure a transmission gap of a data packet corresponding to the bit information according to a preset average gap; wherein, the transmission gap includes a start marker, an end marker, and a delay time corresponding to the bit information; the preset average gap is the average time slot of the data packet for the beacon detection device to synchronize with the beacon embedding device;

[0041] A sending module, configured to send the data packet to the beacon detection device according to the transmission gap.

[0042] In addition, the present invention also provides an electronic device, including:

[0043] A memory, configured to store a computer program;

[0044] A processor, configured to implement the steps of the beacon modulation method applied to the beacon detection device and / or the beacon modulation method applied to the beacon embedding device as described above when executing the computer program.

[0045] A beacon modulation method provided by the present invention, which is applied to a beacon detection device, includes: obtaining a data packet sent by a beacon embedding device; determining a start marker and an end marker corresponding to the data packet according to a preset average gap or a gap of the data packet; wherein, the preset average gap is the average time slot of the data packet for the beacon detection device to synchronize with the beacon embedding device; obtaining beacon information corresponding to the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet;

[0046] It can be seen that the present invention obtains beacon information corresponding to the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet, and uses the preset average gap synchronized with the beacon embedding device to detect the beacon information embedded through the gap of the data packet, so that the beacon embedding device can embed beacon data by changing the time gap of the sent data packet, realizing time slot-based beacon modulation, and ensuring the stability and accuracy of beacon information transmission. In addition, the present invention also provides a beacon modulation method device, a beacon modulation method, a device and an electronic device applied to a beacon embedding device, which also have the above beneficial effects. Description of the Drawings

[0047] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0048] Figure 1 Flowchart of a beacon modulation method provided by an embodiment of the present invention;

[0049] Figure 2 Transmission schematic diagram of another beacon modulation method provided by an embodiment of the present invention;

[0050] Figure 3 Display diagram of the marker configuration of another beacon modulation method provided by an embodiment of the present invention;

[0051] Figure 4 Flow schematic diagram of another beacon modulation method provided by an embodiment of the present invention;

[0052] Figure 5 Structural block diagram of a beacon modulation device provided by an embodiment of the present invention;

[0053] Figure 6 Flowchart of another beacon modulation method provided by an embodiment of the present invention;

[0054] Figure 7 Flow schematic diagram of another beacon modulation method provided by an embodiment of the present invention;

[0055] Figure 8 Structural block diagram of another beacon modulation device provided by an embodiment of the present invention;

[0056] Figure 9 Structural schematic diagram of an electronic device provided by an embodiment of the present invention;

[0057] Figure 10 Specific structural schematic diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0059] Please refer to Figure 1 , Figure 1 which is a flowchart of a beacon modulation method provided by an embodiment of the present invention; this method is applied to a beacon detection device and may include:

[0060] Step 101: Obtain a data packet sent by a beacon embedding device.

[0061] Among them, the beacon embedding device in this embodiment may be a device that sends data packets to the beacon detection device through a network (such as the routing network in Figure 2 ), such as the beacon embedding party (CP1) in Figure 2 . Bit information corresponding to beacon information is embedded in the gap (time gap, time slot) of the data packet, so that the beacon detection device can detect the corresponding beacon information according to the gap of the received data packet. The beacon detection device in this embodiment may be a device that receives data packets sent by the beacon embedding device through a network, such as Figure 2 the overall beacon detection party (CP2). The beacon detection device can obtain the beacon information embedded by the beacon embedding device according to the gap of the data packet.

[0062] Specifically, for the specific manner in which the beacon detection device obtains the data packet sent by the beacon embedding device in this step, it can be set by the designer according to the practical scenario and user requirements. For example, it can be implemented in the same or similar manner as the data packet receiving method in the prior art. This embodiment does not impose any restrictions on this.

[0063] It should be noted that the beacon detection device in this embodiment can synchronize a preset average gap with the beacon embedding device before obtaining the data packet sent by the beacon embedding device, so as to improve the stability of beacon information transmission through the synchronization of the preset average gap. For example, the beacon embedding device can synchronize the preset average gap with the beacon detection device before sending the data packet to the beacon detection device, so that the beacon detection device can use the preset average gap to change the gap of the data packet to be sent.

[0064] Correspondingly, for the specific manner in which the beacon detection device and the beacon embedding device synchronize the preset average gap, it can be set by the designer according to the practical scenario and user requirements. For example, the beacon detection device and the beacon embedding device can synchronously calculate and record the preset average gap. For example, before the beacon embedding device embeds the bit information corresponding to the beacon information, the beacon embedding device and the beacon detection device can synchronize the gap of the data packet and calculate and record the average time slot of the data packet (i.e., the preset average gap). The beacon detection device can also directly receive the preset average gap sent by the beacon embedding device. This embodiment does not impose any restrictions on this.

[0065] Specifically, in this embodiment, the beacon embedding device and the beacon detection device can use NFQUEUE + scapy to obtain or change the time slots of data packets. NFQUEUE is a part of the Netfilter (the firewall framework of the Linux kernel). Through the NFQUEUE mechanism, user programs can receive data packets on the network card. The program can modify the data packets and then tell Netfilter to continue processing the data packets or discard them. Scapy is a tool for operating network data packets, which allows users to send, listen to, parse, and spoof network packets.

[0066] Step 102: Determine the start marker and end marker corresponding to the data packet according to the preset average gap or the gap of the data packet. The preset average gap is the average time slot of the data packets synchronized by the beacon detection device and the beacon embedding device.

[0067] It can be understood that the start marker and end marker in this embodiment can be the start and end markers of the bit information corresponding to the beacon information embedded through the gap of the data packet. That is, the beacon detection device can start extracting the bit information corresponding to the beacon information after detecting the start marker corresponding to the gap of the data packet, and stop extracting the bit information after detecting the end marker corresponding to the gap of the data packet. Thus, by setting the start marker and end marker, the accuracy of beacon information transmission is improved.

[0068] Specifically, for the specific method of the beacon detection device in this step to determine the start marker and end marker corresponding to the data packet according to the preset average gap or the gap of the data packet, it can be set by the designer according to the practical scenario and user requirements. For example, the beacon detection device can determine the start marker and end marker corresponding to the data packet according to the gap of the data packet. For example, the beacon detection device can use a continuous first number (such as 3) of first gaps as the start marker, and a continuous second number (such as 5) of second gaps as the end marker. The first gap can be between the first multiple (such as 4.5) and the second multiple (such as 6.5) of the gap of the data packet. The first number is a positive integer greater than or equal to 2, and the second multiple is greater than the first multiple. The second gap is between the third multiple (such as 4.5) and the fourth multiple (such as 6.5) of the gap of the data packet. The second number is a positive integer greater than or equal to 2, and the fourth multiple is greater than the third multiple. The first multiple, second multiple, third multiple, and fourth multiple can all be greater than 0.

[0069] Correspondingly, for the specific numerical settings of the above first number, second number, and first multiple to fourth multiple, it can be set by the designer according to the practical scenario and user requirements. As Figure 3 shown, the beacon embedding device can continuously set 3 delay times T s = T a(Preset average gap) × 5 represents the start flag, and five delay times T are set continuously. s = T a × 5 represents the end flag, then the beacon detection device can use the gap T of three consecutive 4.5 - 6.5 times the data packet. d to determine as the start marker, and five consecutive 4.5 - 6.5 times of T d as the end marker, that is, the first quantity can be 3, the second quantity can be 5, the first multiple and the third multiple can be 4.5, and the second multiple and the fourth multiple can be 6.5.

[0070] Step 103: According to the preset average gap and the gap of the data packet, obtain the beacon information corresponding to the bit information between the start marker and the end marker.

[0071] Among them, in this step, the beacon detection device can first extract the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet; then obtain the beacon information corresponding to the extracted bit information. For example, the beacon detection device can judge whether the start marker is detected according to the gap of the data packet; if the start marker is detected, extract the bit information according to the preset average gap and the gap of the data packet; judge whether the end marker is detected according to the gap of the data packet; if the end marker is detected, stop extracting the bit information, and obtain the corresponding beacon information according to the extracted bit information; if the start marker is not detected, this process can be directly ended and wait for the next detection of the start marker; if the end marker is not detected, the bit information can continue to be extracted.

[0072] Specifically, as Figure 4 shown, after the beacon detection device obtains the average interval T (i.e., the preset average gap) through interval parameter learning, it can use the obtained gap of the data packet to detect the start flag bit (i.e., the start marker); if the start flag bit is detected, detect the gap of the data packet, extract the bit information, and detect the end flag bit (end marker); if the end flag bit is detected, use the extracted bit information to obtain the final information (i.e., the beacon information).

[0073] It is understandable that the specific method for the beacon detection device to extract the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet can be set by the designer according to the practical scenario and user requirements. If the gap corresponding to the current bit position in the bit information is less than or equal to five times the preset average gap, it is determined that the current bit position is 0; if the gap corresponding to the current bit position is greater than five times the preset average gap (such as 1.5) and less than six times the preset average gap (such as 3.5), it is determined that the current bit position is 1; where the sixth multiple is greater than the fifth multiple, and both the fifth multiple and the sixth multiple can be greater than 0. For example, the beacon embedding device can embed bit information by adding the delay time T of the data packet s in the way of embedding bit information according to the bit information to be transmitted and the average gap T a (i.e., the preset average gap) to set T s to different values: when the beacon embedding device embeds the bit position P i (i.e., the current bit position) as 1, the delay time T s is set to twice of T a ; when the beacon embedding device embeds the bit position P i as 0, the delay time Ts is set to 0. That is:

[0074]

[0075] Correspondingly, the beacon detection device can detect the bit position information P d by using the obtained gap T of the data packet i :

[0076]

[0077] That is to say, the fifth multiple can be 1.5 and the sixth multiple can be 3.5.

[0078] Specifically, for the specific manner in which the beacon detection device obtains the beacon information corresponding to the extracted bit information, it can be set by the designer according to the practical scenario and user requirements. For example, the beacon detection device can directly convert the bit information into beacon information. For instance, in time-slot-based beacon transmission, only bit data can be transmitted, so to convert byte information and bit information into each other, ASCII (American Standard Code for Information Interchange) code can be used to achieve the conversion between byte information and bit information. That is, the beacon detection device can use ASCII code to convert every 8-bit bit information into 1-bit byte information to obtain the beacon information. To improve the security and accuracy of beacon transmission, the beacon detection device can first convert the bit information into byte information and then decode the byte information to obtain the beacon information. That is to say, during the process of converting beacon information into bit information, the beacon embedding device can first encrypt the beacon information to obtain the encrypted byte information and then convert the encrypted byte information into bit information. For example, the beacon detection device can perform fountain code decoding on the byte information obtained by converting the bit information to obtain the beacon information. Correspondingly, the beacon embedding device can perform fountain code calculation and encoding on the beacon information to obtain the encrypted byte information and then use ASCII code to convert the byte information into the corresponding bit information.

[0079] Furthermore, time-slot-based beacon transmission depends on a stable network environment. Since there are often some network jitters in the actual network environment that can affect the gaps between data packets, resulting in some errors in the received bit information, error correction can be added in this embodiment to reduce or avoid errors in beacon transmission and improve the transmission accuracy. For example, the beacon detection device can determine each check group in the bit information; use the check codes in each check group to check the respective bit information to obtain the check result; if the check results corresponding to each check group are all successful checks, then convert the bit information into byte information; decode the byte information to obtain the beacon information. Among them, the check group includes a third quantity of bit information and a fourth preset quantity of check codes.

[0080] That is to say, before embedding information, the beacon embedding device can add the information of every third number of bits to the check code of the fourth number of bits, so that after the beacon detection device detects the bit information, the third number + the fourth number of bits can be divided into a group (i.e., the check group), and the bit information of the third number can be verified according to the check code of the fourth number of bits. For example, the beacon embedding device can add n (i.e., the fourth number) -bit Hamming check codes to every 8 (i.e., the third number) bits of information, so that after the beacon detection device detects the bit information, 8 + n bits can be determined as a check group, and the 8 bits of information in the group can be verified according to the n -bit Hamming check codes in the check group, that is, the check code in the check group can specifically be the Hamming check code.

[0081] In this embodiment, the embodiment of the present invention obtains the beacon information corresponding to the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet, and uses the preset average gap synchronized with the beacon embedding device to detect the beacon information embedded through the gap of the data packet, so that the beacon embedding device can embed beacon data by changing the time gap of the sent data packet, realizing time - slot - based beacon modulation and ensuring the stability and accuracy of beacon information transmission.

[0082] Corresponding to the above - mentioned method embodiment, the embodiment of the present invention also provides a beacon modulation device, and a beacon modulation device described below can be correspondingly referred to the beacon modulation method described above.

[0083] Please refer to Figure 5 , Figure 5 which is a structural block diagram of a beacon modulation device provided by the embodiment of the present invention. This device is applied to a beacon detection device and may include:

[0084] A receiving module 10, configured to obtain a data packet sent by a beacon embedding device;

[0085] A determining module 20, configured to determine the start marker and the end marker corresponding to the data packet according to the preset average gap or the gap of the data packet; wherein, the preset average gap is the average time slot of the data packet synchronized by the beacon detection device and the beacon embedding device;

[0086] An obtaining module 30, configured to obtain the beacon information corresponding to the bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet.

[0087] Optionally, the determining module 20 may include:

[0088] A first determining sub - module, configured to use consecutive first number of first gaps as the start marker; wherein, the first gap is between the first multiple and the second multiple of the gap of the data packet, the first number is a positive integer greater than or equal to 2, and the second multiple is greater than the first multiple;

[0089] A second determination sub-module, configured to use a second consecutive number of second gaps as termination markers; wherein, the second gap is between a third multiple and a fourth multiple of the gap of the data packet, the second number is a positive integer greater than or equal to 2, and the fourth multiple is greater than the third multiple.

[0090] Optionally, the apparatus may further include:

[0091] A synchronization module, configured to synchronously calculate and record a preset average gap with the beacon embedding device before acquiring a data packet sent by the beacon embedding device.

[0092] Optionally, the acquisition module 30 may include:

[0093] An extraction sub-module, configured to extract bit information according to the preset average gap and the gap of the data packet;

[0094] A grouping sub-module, configured to determine each check group in the bit information; wherein, the check group includes a third number of bit information and a fourth preset number of check codes;

[0095] A verification sub-module, configured to verify the bit information in each check group by using the check codes in the check groups to obtain a verification result;

[0096] A conversion sub-module, configured to convert the bit information into byte information if the verification results corresponding to each check group are all verification successes;

[0097] A decoding sub-module, configured to decode the byte information to obtain beacon information.

[0098] Optionally, the extraction sub-module may be specifically configured to determine that the current bit is 0 if the gap corresponding to the current bit in the bit information is less than or equal to a fifth multiple of the preset average gap; and determine that the current bit is 1 if the gap corresponding to the current bit is greater than a fifth multiple of the preset average gap and less than a sixth multiple of the preset average gap; wherein, the sixth multiple is greater than the fifth multiple.

[0099] In this embodiment, the embodiment of the present invention acquires, by the acquisition module 30, beacon information corresponding to the bit information between the start marker and the termination marker according to the preset average gap and the gap of the data packet, and uses the preset average gap synchronized with the beacon embedding device to detect the beacon information embedded through the gap of the data packet, so that the beacon embedding device can embed beacon data by changing the time gap of the sent data packet, realizing beacon modulation based on time slots and ensuring the stability and accuracy of beacon information transmission.

[0100] Corresponding to the above method embodiments, the embodiments of the present invention further provide a beacon modulation method applied to a beacon embedding device. A beacon modulation method described below can be correspondingly referred to in relation to a beacon modulation method applied to a beacon detection device described above.

[0101] Please refer to Figure 6 , Figure 6 which is a flowchart of another beacon modulation method provided by the embodiments of the present invention. The device is applied to a beacon embedding device and may include:

[0102] Step 201: Obtain bit information corresponding to the beacon information to be sent.

[0103] Herein, the beacon information to be sent in this embodiment may be the beacon information that needs to be sent to the beacon detection device, that is, the beacon information that needs to be embedded into the time slot of the data packet and sent to the beacon detection device. Since only bit data can be transmitted in time slot-based beacon transmission, the bit information in this embodiment may be the bit data corresponding to the beacon information to be sent.

[0104] Specifically, for the specific manner of obtaining the bit information corresponding to the beacon information to be sent in this step, it can be set by the designer. For example, the beacon embedding device can directly convert the beacon information to be sent into bit information, such as converting the beacon information to be sent into bit information using ASCII code. The beacon embedding device can also encode the beacon information to be sent (such as Figure 7 fountain code encoding in

[0105] to obtain encrypted information corresponding to the beacon information to be sent; convert the encrypted information into original bit information; determine each check group in the original bit information; embed the check code corresponding to the bit position information of each check group in each check group to generate bit information; where each check group may include a third quantity of bit position information and a fourth preset quantity of check codes.

[0106] Specifically, the sending gap in this step can be the gap for the beacon embedding device to send data packets to the beacon detection device. For the specific method of the beacon embedding device to configure the sending gap of the data packet corresponding to the bit information according to the preset average gap, it can be set by the designer. For example, the beacon embedding device can configure the first consecutive number of first delay times as the delay time corresponding to the start marker; configure the second consecutive number of second delay times as the delay time corresponding to the end marker; where the first delay time is the seventh multiple of the preset average gap (such as 5 times), and the second delay time is the eighth multiple of the preset average gap (such as 5 times). As Figure 3 shown, the beacon embedding device can continuously set 3 first delay times T s = T a (preset average gap) × 5 to represent the start flag, and continuously set 5 first delay times T s = T a × 5 to represent the end flag, that is, the first number can be 3, the second number can be 5, and the seventh multiple and the eighth multiple can be 5.

[0107] Correspondingly, if the current bit in the bit information is 0, the beacon embedding device can configure the delay time corresponding to the current bit to 0; if the current bit in the bit information is 1, the beacon embedding device can configure the delay time corresponding to the current bit to the ninth multiple of the preset average gap (such as 2); where the ninth multiple can be a value greater than 0; for example, the beacon embedding device can embed the bit information by adding the delay time T s of the data packet. According to the bit information to be transmitted and the average gap T a (i.e., the preset average gap), set the delay time T s corresponding to the bit information to different values: when the beacon embedding device embeds the bit P i (i.e., the current bit) as 1, set the delay time T s to twice that of T a (i.e., the ninth multiple); when the beacon embedding device embeds the bit P i as 0, set the delay time Ts to 0.

[0108] It should be noted that in this embodiment, the beacon embedding device can synchronize a preset average gap with the beacon detection device before sending a data packet, so as to improve the stability of beacon information transmission through the synchronization of the preset average gap. For the specific method of synchronizing the preset average gap between the beacon embedding device and the beacon detection device, it can be set by designers according to the practical scenario and user requirements. For example, the beacon detection device and the beacon embedding device can synchronously calculate and record the preset average gap. For example, before the beacon embedding device embeds the bit information corresponding to the beacon information, the beacon embedding device and the beacon detection device can synchronize the gap of the data packet and calculate and record the average time slot of the data packet (i.e., the preset average gap). The beacon embedding device can also directly receive the preset average gap sent to the beacon detection device, and this embodiment does not impose any restrictions on this.

[0109] Step 203: Send data packets to the beacon detection device according to the sending gap.

[0110] It can be understood that in this step, the beacon embedding device embeds the bit information corresponding to the beacon information into the gap of the data packet by sending data packets to the beacon detection device according to the configured sending gap, so that the beacon detection device can detect the beacon information according to the gap of the received data packet, realizing beacon transmission based on time slots.

[0111] In this embodiment, the embodiment of the present invention configures the sending gap of the data packet corresponding to the bit information according to the preset average gap, uses the preset average gap synchronized with the beacon detection device, embeds the beacon information by changing the time gap of the sent data packet, so that the beacon detection device obtains the beacon information by detecting the gap of the data packet, realizing beacon modulation based on time slots, and ensuring the stability and accuracy of beacon information transmission.

[0112] Corresponding to the above method embodiment, the embodiment of the present invention also provides a beacon modulation device applied to a beacon embedding device. A beacon modulation device applied to a beacon embedding device described below can be correspondingly referred to with a beacon modulation method applied to a beacon embedding device described above.

[0113] Please refer to Figure 8 , Figure 8 , which is a structural block diagram of another beacon modulation device provided by the embodiment of the present invention. This device is applied to a beacon embedding device and may include:

[0114] A conversion module 40, configured to obtain bit information corresponding to the beacon information to be sent;

[0115] Configuration module 50, configured to configure the transmission gap of a data packet corresponding to bit information according to a preset average gap; wherein, the transmission gap includes a start marker, an end marker, and a delay time corresponding to the bit information; the preset average gap is the average time slot of a data packet for the beacon detection device to synchronize with the beacon embedding device.

[0116] Transmission module 60, configured to send data packets to the beacon detection device according to the transmission gap.

[0117] Optionally, the conversion module 40 may include:

[0118] Encryption and encoding sub-module, configured to encode the beacon information to be sent to obtain encrypted information corresponding to the beacon information to be sent;

[0119] Encryption conversion sub-module, configured to convert the encrypted information into original bit information;

[0120] Encryption grouping sub-module, configured to determine each check group in the original bit information;

[0121] Check embedding sub-module, configured to embed a check code corresponding to the bit position information of each bit position in each check group to generate bit information.

[0122] Optionally, the configuration module 50 may include:

[0123] First configuration sub-module, configured to configure consecutive first number of first delay times as the delay time corresponding to the start marker; wherein, the first delay time is the seventh multiple of the preset average gap;

[0124] Second configuration sub-module, configured to configure consecutive second number of second delay times as the delay time corresponding to the end marker; wherein, the second delay time is the eighth multiple of the preset average gap.

[0125] Optionally, the configuration module 50 may include:

[0126] Third configuration sub-module, configured to, if the current bit position in the bit information is 0, configure the delay time corresponding to the current bit position as 0; if the current bit position in the bit information is 1, configure the delay time corresponding to the current bit position as the ninth multiple of the preset average gap.

[0127] Optionally, the device may further include:

[0128] Synchronization calculation module, configured to synchronize and calculate with the beacon detection device and record the preset average gap.

[0129] In this embodiment, the embodiment of the present invention configures, by means of a configuration module 50, the transmission gap of data packets corresponding to bit information according to a preset average gap, and embeds beacon information by changing the time gap of the transmitted data packets by using the preset average gap synchronized with the beacon detection device. Thus, the beacon detection device obtains the beacon information by detecting the gap of the data packets, realizing beacon modulation based on time slots and ensuring the stability and accuracy of beacon information transmission.

[0130] Corresponding to the above method embodiment, the embodiment of the present invention further provides an electronic device, and an electronic device described below can be correspondingly referred to with a beacon modulation method applied to a beacon detection device and a beacon embedding device described above.

[0131] Please refer to Figure 9 , Figure 9 which is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device may include:

[0132] A memory D1 for storing a computer program;

[0133] A processor D2 for implementing the steps of the beacon modulation method applied to the beacon detection device and / or the beacon modulation method applied to the beacon embedding device provided by the above method embodiment when executing the computer program.

[0134] Specifically, please refer to Figure 10 , Figure 10 which is a specific structural diagram of an electronic device provided by an embodiment of the present invention. The electronic device 310 may vary greatly due to configuration or performance differences, and may include one or more processors (central processing units, CPUs) 322 (for example, one or more processors) and a memory 332, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 342 or data 344. Among them, the memory 332 and the storage media 330 may be transient storage or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the electronic device. Further, the central processor 322 may be configured to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the electronic device 310.

[0135] The electronic device 310 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341. For example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0136] Specifically, the electronic device provided in this embodiment may specifically be a beacon detection device and / or a beacon embedding device.

[0137] The steps in the beacon modulation method applied to the beacon detection device and / or the beacon embedding device described above may be implemented by the structure of the electronic device.

[0138] Corresponding to the above method embodiments, the embodiments of the present invention also provide a computer-readable storage medium. The computer-readable storage medium described below can be correspondingly referred to with the beacon modulation method applied to the beacon detection device and the beacon embedding device described above.

[0139] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, it implements the steps of the beacon modulation method applied to the beacon detection device and / or the beacon modulation method applied to the beacon embedding device provided in the above method embodiments.

[0140] The computer-readable storage medium may specifically be various readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0141] The embodiments in the specification are described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For the devices, electronic devices, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple. For the relevant parts, please refer to the description in the method part.

[0142] Those skilled in the art may further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0143] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium well-known in the technical field.

[0144] The above has introduced in detail a beacon modulation method, device, and electronic device provided by the present invention. Specific examples are used herein to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.

Claims

1. A beacon modulation method, characterized in that, Applied to a beacon detection device, including: Synchronously calculate and record a preset average gap with a beacon embedding device; wherein, the preset average gap is the average time slot of the data packet for the beacon detection device to synchronize with the beacon embedding device; Obtain a data packet corresponding to the bit information corresponding to the beacon information sent by the beacon embedding device; wherein, the beacon embedding device configures the transmission gap of the data packet corresponding to the bit information according to the preset average gap; the transmission gap includes a start marker, an end marker, and a delay time corresponding to the bit information; Determine the start marker and the end marker according to the preset average gap and the gap of the data packet; Extract the bit information according to the preset average gap and the gap of the data packet; Determine each check group in the bit information; wherein, the check group includes a third quantity of bit position information and a fourth preset quantity of check codes; Use the check codes in each check group to check the bit position information respectively, and obtain a check result; If the check results corresponding to each check group are all successful checks, then convert the bit position information into byte information; Decode the byte information to obtain the beacon information.

2. The beacon modulation method according to claim 1, wherein The determining the start marker and the end marker according to the preset average gap and the gap of the data packet includes: Taking consecutive first quantity of first gaps as the start marker; wherein, the first gap is between the first multiple and the second multiple of the preset average gap, the first quantity is a positive integer greater than or equal to 2, and the second multiple is greater than the first multiple; Taking consecutive second quantity of second gaps as the end marker; wherein, the second gap is between the third multiple and the fourth multiple of the preset average gap, the second quantity is a positive integer greater than or equal to 2, and the fourth multiple is greater than the third multiple.

3. The beacon modulation method according to claim 1, wherein The extracting the bit information according to the preset average gap and the gap of the data packet includes: If the gap corresponding to the current bit position in the bit information is less than or equal to the fifth multiple of the preset average gap, then determine that the current bit position is 0; If the gap corresponding to the current bit position is greater than the fifth multiple of the preset average gap and less than the sixth multiple of the preset average gap, then determine that the current bit position is 1; wherein, the sixth multiple is greater than the fifth multiple.

4. A beacon modulation device, characterized in that, Applied to a beacon detection device, including: A synchronization module, configured to synchronously calculate and record a preset average gap with a beacon embedding device; A receiving module, configured to obtain a data packet corresponding to the bit information corresponding to the beacon information sent by the beacon embedding device; wherein, the beacon embedding device configures the transmission gap of the data packet corresponding to the bit information according to the preset average gap; the transmission gap includes a start marker, an end marker, and a delay time corresponding to the bit information; A determining module, configured to determine the start marker and the end marker according to the preset average gap and the gap of the data packet; wherein, the preset average gap is the average time slot of the data packet for the beacon detection device to synchronize with the beacon embedding device; An acquisition module, configured to obtain beacon information corresponding to bit information between the start marker and the end marker according to the preset average gap and the gap of the data packet; Wherein, the acquisition module includes: An extraction sub-module, configured to extract the bit information according to the preset average gap and the gap of the data packet; A grouping sub-module, configured to determine each check group in the bit information; wherein, the check group includes a third quantity of bit position information and a fourth preset quantity of check codes; A check sub-module, configured to use the check codes in each check group to check the corresponding bit position information, and obtain a check result; A conversion sub-module, configured to convert the bit position information into byte information if the check results corresponding to each check group are all successful in checking; A decoding sub-module, configured to decode the byte information to obtain the beacon information.

5. A beacon modulation method, characterized in that, Applied to a beacon embedding device, including: Synchronously calculating and recording a preset average gap with a beacon detection device; Obtaining bit information corresponding to the beacon information to be sent; Configuring a transmission gap of a data packet corresponding to the bit information according to the preset average gap; wherein, the transmission gap includes a start marker, an end marker, and a delay time corresponding to the bit information; the preset average gap is the average data packet time slot for synchronization between the beacon detection device and the beacon embedding device; Sending the data packet to the beacon detection device according to the transmission gap; Wherein, obtaining bit information corresponding to the beacon information to be sent includes: Encoding the beacon information to be sent to obtain encrypted information corresponding to the beacon information to be sent; Converting the encrypted information into original bit information; Determining each check group in the original bit information; Embedding check codes corresponding to the bit position information in each check group to generate the bit information.

6. A beacon modulation device, characterized in that, Applied to a beacon embedding device, including: A synchronization calculation module, configured to synchronously calculate and record a preset average gap with a beacon detection device; A conversion module, configured to obtain bit information corresponding to the beacon information to be sent; A configuration module, configured to configure a transmission gap of a data packet corresponding to the bit information according to the preset average gap; wherein, the transmission gap includes a start marker, an end marker, and a delay time corresponding to the bit information; the preset average gap is the average data packet time slot for synchronization between the beacon detection device and the beacon embedding device; A sending module, configured to send the data packet to the beacon detection device according to the transmission gap; Wherein, the conversion module includes: An encryption encoding sub-module, configured to encode the beacon information to be sent to obtain encrypted information corresponding to the beacon information to be sent; An encryption conversion sub-module, configured to convert the encrypted information into original bit information; An encryption grouping sub-module, configured to determine each check group in the original bit information; A check embedding sub-module, configured to embed check codes corresponding to the bit position information in each check group to generate the bit information.

7. An electronic device, characterized in that, Including: A memory, configured to store a computer program; A processor, configured to implement the steps of the beacon modulation method according to any one of claims 1 to 3 and / or the beacon modulation method according to claim 5 when executing the computer program.

Citation Information

Patent Citations

  • ZigBee equipment-to-WiFi equipment time synchronization method and equipment

    CN108347439A