Communication system, method and device, positioning system, computing device and storage medium

By adding verification data of predetermined rule changes to the data packet and verifying it, the problem of malicious device playback attacks is solved, improving the reliability of data transmission and the security of information interaction.

CN112003815BActive Publication Date: 2025-01-14ALIBABA GROUP HOLDING LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN201910446928.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-27
Publication Date
2025-01-14
Estimated Expiration
2039-05-27

AI Technical Summary

Technical Problem

Existing communication solutions cannot effectively prevent replay attacks from malicious devices, affecting the reliability and service quality of information interaction.

Method used

Add verification data with predetermined rules to the data packet, and verify the legality of the data packet by comparing the verification data in the received data packet with the verification data in the previous data packet to the verification data in the previous data packet to prevent repetition of malicious devices. Release attack.

Benefits of technology

Improve the reliability of data transmission, prevent replay attacks from malicious devices, and ensure the security of information interaction and service quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112003815B_ABST
    Figure CN112003815B_ABST
Patent Text Reader

Abstract

This invention discloses a communication system, method, apparatus, computing device, and storage medium. The system includes a first device and a server. The first device broadcasts a first data packet containing verification data, the changes in which the verification data relative to previously broadcast verification data in a first data packet conform to a predetermined rule. The server receives a second data packet corresponding to the first device. If the changes in the verification data in the second data packet compared to previously received verification data in a previous second data packet from the first device conform to the predetermined rule, the server determines that the second data packet is the first data packet and records the verification data in the currently received second data packet. This improves the reliability of data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to a communication system, method and apparatus, computing equipment and storage medium. Background Art

[0002] With the rapid development of information technology and Internet technology, major service providers usually need to exchange a lot of information with users' terminal devices when providing services to users. In order to ensure the security of information interaction, digital signatures and digital signature verification technologies are usually used to encrypt and decrypt the transmitted interactive information to ensure the integrity and security of information transmission.

[0003] The above scheme can guarantee the security of information interaction to a certain extent. However, in some cases, it still cannot prevent malicious device attacks. For example, for Bluetooth devices, malicious devices can cause replay attacks by simply capturing the air broadcast packets of Bluetooth devices and resending the broadcast packets, thereby affecting the reliability of information interaction and the quality of related services.

[0004] Therefore, a more reliable communication solution is still needed to solve the above problems. Summary of the invention

[0005] The purpose of the present disclosure is to provide a communication system, method, device, and positioning system to avoid replay attacks by malicious devices and improve the reliability of data transmission.

[0006] According to one aspect of the present disclosure, a communication system is provided, which includes a first device and a server, wherein a first data packet broadcast by the first device includes verification data, and changes in the verification data relative to the verification data in the first data packet last broadcast by the first device comply with predetermined rules; the server receives a second data packet corresponding to the first device, and when changes in the verification data in the second data packet compared with previous verification data in a previous second data packet previously received from the first device comply with predetermined rules, the server determines that the second data packet is a first data packet, and records the verification data in the second data packet currently received.

[0007] Optionally, when the verification data in the second data packet of the server is changed in comparison with the previous verification data in the previous second data packet previously received from the first device and the change does not comply with the predetermined rule, the server determines that the second data packet is not the first data packet.

[0008] Optionally, the predetermined rule is: an increasing rule, that is, the verification data in the later first data packet is greater than the verification data in the earlier first data packet; or a decreasing rule, that is, the verification data in the later first data packet is less than the verification data in the earlier first data packet.

[0009] Optionally, each time the first device broadcasts, the verification data increases or decreases by a predetermined value; or the verification data increases or decreases as time passes.

[0010] Optionally, the first device maintains the verification data in its volatile memory and saves third data in its non-volatile memory, wherein, under an increasing rule, the third data is greater than the current verification data, and under a decreasing rule, the third data is less than the current verification data, and in response to the first device being powered on again after being powered off, the third data is obtained from the non-volatile memory as the current verification data and saved in the volatile memory.

[0011] Optionally, the first device: in response to the third data not being saved in the non-volatile memory, determines the third data based on the current verification data, and saves it in the non-volatile memory; and / or in response to the first device being powered on again after being powered off, uses the previous third data as the current verification data, re-determines the third data based on the current verification data, and saves it in the non-volatile memory; and / or under an increasing rule, in response to the current verification data being increased to be greater than or equal to the third data, re-determines the third data based on the current verification data, and saves it in the non-volatile memory; or under a decreasing rule, in response to the current verification data being decreased to be less than or equal to the third data, re-determines the third data based on the current verification data, and saves it in the non-volatile memory.

[0012] Optionally, under the increasing rule, the third data is determined to be not less than the new current verification data after the first device sends a predetermined number of first data packets from the current time; or under the increasing rule, the third data is determined to be not less than the new current verification data after a predetermined time period from the current time; or under the decreasing rule, the third data is determined to be not greater than the new current verification data after the first device sends a predetermined number of first data packets from the current time; or under the decreasing rule, the third data is determined to be not greater than the new current verification data after a predetermined time from the current time.

[0013] Optionally, the first device generates the first signature information based on a device key of the first device, a plaintext ID corresponding to the device key, and the verification data, and the first data packet also includes the first signature information and the plaintext ID.

[0014] Optionally, the server obtains a corresponding device key based on the plaintext ID, generates second signature information based on the device key, the plaintext ID and the verification data; and compares the second signature information with the first signature information to perform signature verification.

[0015] Optionally, when the change in the verification data in the second data packet compared with the previous verification data in the previous second data packet previously received from the first device complies with a predetermined rule, and the signature verification is successful, the second data packet is determined to be the first data packet.

[0016] Optionally, the system may also include one or more second devices, which add signal strength information when the second device receives the first data packet from the first device in the first data packet broadcast by the first device, and forward the first data packet to the server. The server determines the location of the first device based on the signal strength information contained in the first data packet and the location of the second device that forwards the first data packet.

[0017] Optionally, when multiple second devices forward the same data packet broadcast by the first device to the server, the server uses previous verification data in the same previously received second data packet from the first device to compare with the verification data in the data packets forwarded by the multiple second devices.

[0018] Optionally, the server maintains a receiving window, and regards first data packets received from the multiple second devices within the time window as the same data packet broadcast by the first device.

[0019] Optionally, the receiving window has a set time length; or the server, in response to the verification data in a newly received second data packet corresponding to the first device being changed in accordance with the predetermined rule compared with the previous verification data in the previous second data packet previously received from the first device, ends the receiving window corresponding to the previous second data packet and opens the receiving window corresponding to the newly received second data packet.

[0020] Optionally, the server also sends verification result information to the first device and / or the second device.

[0021] Optionally, the first device and the second device communicate with each other based on a Bluetooth communication protocol; and / or the second device and the server communicate with each other based on wireless communication or wired communication.

[0022] According to another aspect of the present disclosure, a positioning system is also provided, including a first device, one or more second devices and a server, wherein the first data packet broadcast by the first device includes verification data, and the change of the verification data relative to the verification data in the first data packet broadcast by the first device last conforms to a predetermined rule; the second device adds the signal strength information when the second device receives the first data packet from the first device in the first data packet broadcast by the first device, and forwards the first data packet to the server, the server receives a second data packet corresponding to the first device, and when the change of the verification data in the second data packet compared with the previous verification data in the previous second data packet received from the first device conforms to the predetermined rule, the server determines the orientation of the first device based on the signal strength information contained in the second data packet and the device position of the second device forwarding the second data packet, and records the verification data in the second data packet currently received.

[0023] According to another aspect of the present disclosure, a communication method is also provided, which is applied to a first device, and the method includes: generating a first data packet, the first data packet including verification data, and the change of the verification data relative to the verification data in the last broadcast first data packet complies with a predetermined rule; and broadcasting the first data packet.

[0024] Optionally, the predetermined rule is: an increasing rule, that is, the verification data in the later first data packet is greater than the verification data in the earlier first data packet; or a decreasing rule, that is, the verification data in the later first data packet is less than the verification data in the earlier first data packet.

[0025] Optionally, each time the first device broadcasts, the verification data increases or decreases by a predetermined value; or the verification data increases or decreases as time passes.

[0026] Optionally, it also includes: maintaining the verification data in a volatile memory, and saving third data in a non-volatile memory, wherein, under an increasing rule, the third data is greater than the current verification data, and under a decreasing rule, the third data is less than the current verification data, and in response to powering on again after power failure, obtaining the third data from the non-volatile memory as the current verification data and saving it in the volatile memory.

[0027] Optionally, it also includes: in response to the third data not being saved in the non-volatile memory, determining the third data based on the current verification data, and saving it in the non-volatile memory; and / or in response to the first device being powered on again after being powered off, using the previous third data as the current verification data, re-determining the third data based on the current verification data, and saving it in the non-volatile memory; and / or under an increasing rule, in response to the current verification data being increased to be greater than or equal to the third data, re-determining the third data based on the current verification data, and saving it in the non-volatile memory; or under a decreasing rule, in response to the current verification data being decreased to be less than or equal to the third data, re-determining the third data based on the current verification data, and saving it in the non-volatile memory.

[0028] Optionally, under the increasing rule, the third data is determined to be not less than the new current verification data after the first device sends a predetermined number of first data packets from the current time; or under the increasing rule, the third data is determined to be not less than the new current verification data after a predetermined time period from the current time; or under the decreasing rule, the third data is determined to be not greater than the new current verification data after the first device sends a predetermined number of first data packets from the current time; or under the decreasing rule, the third data is determined to be not greater than the new current verification data after a predetermined time from the current time.

[0029] Optionally, it also includes: generating the first signature information based on a device key of the first device, a plaintext ID corresponding to the device key, and the verification data, and the first data packet also includes the first signature information and the plaintext ID.

[0030] Optionally, the first data packet broadcast by the first device is received by one or more second devices and forwarded to the server via the one or more second devices. The second device adds signal strength information when the second device receives the first data packet from the first device to the first data packet broadcast by the first device. The signal strength information contained in the first data packet can be used to determine the location of the first device.

[0031] Optionally, the method further includes: receiving verification result information from a server or forwarded via the second device.

[0032] Optionally, the first device and the second device communicate with each other based on a Bluetooth communication protocol; and / or the second device and the server communicate with each other based on wireless communication or wired communication.

[0033] According to another aspect of the present disclosure, a communication method is also provided, including: receiving a second data packet corresponding to a first device; extracting verification data from the second data packet; determining that the second data packet is a first data packet broadcast by the first device if a change in the verification data in the second data packet compared to a previous verification data in a previous second data packet previously received from the first device complies with a predetermined rule; and recording the verification data in the second data packet currently received.

[0034] Optionally, it also includes: when the verification data in the second data packet is compared with the previous verification data in the previous second data packet previously received from the first device, and the change does not comply with the predetermined rule, determining that the second data packet is not the first data packet broadcast by the first device.

[0035] Optionally, the predetermined rule is: an increasing rule, that is, the verification data in the later first data packet is greater than the verification data in the earlier first data packet; or a decreasing rule, that is, the verification data in the later first data packet is less than the verification data in the earlier first data packet.

[0036] Optionally, each time the first device broadcasts, the verification data increases or decreases by a predetermined value; or the verification data increases or decreases as time passes.

[0037] Optionally, the first data packet also includes first signature information and a plaintext ID, and the first signature information is generated by the first device based on a device key of the first device, a plaintext ID corresponding to the device key, and the verification data. The method also includes: obtaining the corresponding device key based on the plaintext ID; generating second signature information based on the device key, the plaintext ID and the verification data; and comparing the second signature information with the first signature information for signature verification.

[0038] Optionally, the first data packet broadcast by the first device is forwarded to the server via the second device, and the second device adds signal strength information when the second device receives the first data packet from the first device in the first data packet broadcast by the first device. The method also includes: determining the location of the first device based on the signal strength information contained in the first data packet and the location of the second device that forwards the first data packet.

[0039] Optionally, in the case where multiple second devices forward the same data packet broadcast by the first device to the server, the method further includes: using previous verification data in the same previously received second data packet from the first device to compare with the verification data in the data packets forwarded by the multiple second devices.

[0040] Optionally, it also includes: in response to receiving a first data packet broadcast by a first device forwarded via a second device, based on the verification data included in the first data packet, maintaining a time window corresponding to the broadcast, wherein within the time window, when the verification data in the first data packet broadcast by the first device forwarded to the server by multiple second devices is the same as the verification data in the first data packet broadcast by the first device forwarded to the server by the one second device, the multiple second devices forward to the server the same data packet broadcast by the first device.

[0041] Optionally, the method further includes: sending verification result information to the first device and / or the second device.

[0042] Optionally, the first device and the second device communicate with each other based on a Bluetooth communication protocol; and / or the second device and the server communicate with each other based on wireless communication or wired communication.

[0043] According to another aspect of the present disclosure, a communication device is also provided, including: a data packet generating device, used to generate a first data packet, the first data packet including verification data, and the change of the verification data relative to the verification data in the first data packet broadcast last conforms to a predetermined rule; and a broadcasting device, used to broadcast the first data packet.

[0044] According to another aspect of the present disclosure, a communication device is also provided, characterized in that it includes: a processor for generating a first data packet, the first data packet including verification data, and changes in the verification data relative to the verification data in the first data packet last broadcast comply with predetermined rules; and a communication module for broadcasting the first data packet.

[0045] Optionally, it also includes: a volatile memory, in which the verification data is maintained; a non-volatile memory, in which third data is stored, wherein, under an increasing rule, the third data is greater than the current verification data, and under a decreasing rule, the third data is less than the current verification data, and the processor obtains the third data from the non-volatile memory in response to powering on again after power failure, and stores it in the volatile memory as the current verification data.

[0046] According to another aspect of the present disclosure, a server for executing a communication method is also provided, including: a data packet receiving device for receiving a second data packet corresponding to a first device; a verification data extraction device for extracting verification data from the second data packet; a determination device for determining that the second data packet is a first data packet broadcast by the first device when a change in the verification data in the second data packet compared with the verification data in a previously received second data packet from the first device complies with a predetermined rule; and a recording device for recording the verification data in the second data packet currently received.

[0047] According to another aspect of the present disclosure, a computing device is provided, including: a processor; and a memory on which executable codes are stored, and when the executable codes are executed by the processor, the processor executes the method as described above.

[0048] According to another aspect of the present disclosure, a non-transitory machine-readable storage medium is provided, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.

[0049] Therefore, the technical solution disclosed above improves the reliability of data transmission by adding verification data that changes according to predetermined rules to the transmitted data packet and verifying the verification data in the received data packet based on the predetermined rules to avoid replay attacks by malicious devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.

[0051] Figure 1 A schematic block diagram of a communication system according to an embodiment of the present disclosure is shown.

[0052] Figure 2A A communication schematic diagram according to an embodiment of the present disclosure is shown.

[0053] Figure 2B A schematic diagram of a communication process according to an embodiment of the present disclosure is shown.

[0054] Figure 2C A schematic diagram of determining current verification data according to an embodiment of the present disclosure is shown.

[0055] Figure 3 A flow chart of a communication method according to an embodiment of the present disclosure is shown.

[0056] Figure 4 A flow chart of a communication method according to another embodiment of the present disclosure is shown.

[0057] Figure 5 A schematic diagram of a communication device according to an embodiment of the present disclosure is shown.

[0058] Figure 6 A schematic diagram of a communication device according to an embodiment of the present disclosure is shown.

[0059] Figure 7 A schematic diagram of a communication device according to another embodiment of the present disclosure is shown.

[0060] Figure 8 A schematic block diagram of a computing device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0061] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0062] As mentioned above, the current data communication scheme still has some hidden dangers. When there is a replay attack by malicious devices, the legitimacy of the transmitted data cannot be accurately verified, which affects the reliability of information exchange and the quality of related services based on the data.

[0063] In view of this, the present disclosure proposes a more reliable communication scheme, wherein verification data that changes according to a predetermined rule is added to the transmitted data packet and the verification data is verified to avoid replay attacks by malicious devices and improve the reliability of data transmission. Furthermore, based on legitimate data packets, a variety of more reliable services can be provided, such as device positioning services.

[0064] The communication scheme of the present disclosure will be described in detail below with reference to the accompanying drawings and embodiments.

[0065] Figure 1 A schematic block diagram of a communication system according to an embodiment of the present disclosure is shown, wherein the communication system can be used to implement the communication solution of the present disclosure.

[0066] like Figure 1 As shown, the communication system 100 of the present disclosure may include a server 110 , a first device 120 , and a second device 130 .

[0067] The server 120 is any server that can provide information required for interactive services in a network accessible manner.

[0068] The first device 120 and / or the second device 130 are any suitable terminal devices that can be used to access the network, and preferably can be portable electronic devices, including but not limited to smart phones, tablet computers, smart devices, wearable devices or other portable clients. In some embodiments, the first device 120 may not have a network access function, and the first device 120 can communicate with the second device 130, and communicate with the server 110 via the second device 130.

[0069] In one embodiment, the system may include at least one server and multiple terminal devices (e.g., multiple first devices and / or multiple second devices). The first device 120 and / or the second device 130 may transmit and receive information with the server 110 via the network 140. The server 110 may, for example, obtain the content required by the first device 120 and / or the second device 130 by accessing a database. The terminal devices (e.g., the first device 120 and the second device 130, different first devices, or different second devices) may communicate with each other, for example, via a network or short-distance communication. The network 40 may be a network for information transmission in a broad sense, and may include one or more communication networks, such as a wireless communication network, the Internet, a private area network, a local area network, a metropolitan area network, a wide area network, or a cellular data network.

[0070] In the following description, a single or partial terminal device will be described, but those skilled in the art should understand that the above-mentioned multiple terminal devices are intended to represent a large number of terminals existing in a real network, and the single server shown is intended to represent the operation of the server involved in the technical solution of the present invention. The terminals with specific numbers and a single server are described in detail at least for the convenience of explanation, and do not imply any limitation on the types or locations of the terminals and servers.

[0071] It should be noted that if additional modules are added to the illustrated environment or individual modules are removed therefrom, the underlying concepts of the exemplary embodiments of the present invention will not be changed. In addition, it should be understood that the description of "first", "second" or "third" in the text is intended to distinguish the described objects, rather than to have any explicit or implicit provisions on their order and size. In addition, the connection lines in the accompanying drawings indicate that there is information interaction between the first device 120 and the second device 130, and the above-mentioned connection lines can be wired connections, wireless connections, or any form of connection that can transmit information.

[0072] In an embodiment of the present invention, the first device 120 can act as a data sender to send a data packet. The first device acts as a legitimate data sender of the present disclosure, and the data packet sent by the first device can be referred to as a first data packet. The first data packet can include verification data, which can be used for verification so that the data receiver can determine whether the data packet it receives is a data packet broadcast by the first device, that is, a legitimate data packet.

[0073] A data receiver, such as a server, can receive the data packet, wherein the server can verify the legitimacy of the received data packet.

[0074] In one embodiment, the data packet received by the server may be a data packet corresponding to the first device (for the sake of distinction, the data packet may also be referred to as a second data packet in the present disclosure), and the server may extract verification data from the received second data packet and perform verification to determine whether the received second data packet is a legitimate data packet. The data packet corresponding to the first device may be, for example, the second data packet including the device identification of the first device, and the "legitimate data packet" may, for example, indicate that the second data packet is a first data packet sent by a legitimate data sender, such as the first device.

[0075] The server may compare the verification data extracted from the received second data packet with the previous verification data in the previous second data packet previously received by the server from the first device, and verify the extracted verification data by comparing to determine whether the change in the extracted verification data complies with a predetermined rule. The previous second data packet is a data packet previously received and determined to be a legitimate data packet, and the verification data included in the legitimate data packet may be recorded and used as the previous verification data to verify the legitimacy of the related data packet received later.

[0076] In other words, in the embodiment of the present disclosure, after receiving a data packet corresponding to the first device, the server can extract verification data from the received data packet, and verify the extracted verification data based on the previous verification data corresponding to the first device that was previously obtained and recorded, thereby achieving legal verification of the received data packet and ensuring the security of data transmission.

[0077] Specifically, for example, when the extracted verification data is compared with the previous verification data in the previous second data packet previously received by the server from the first device, and the change that occurs meets the predetermined rule, the second data packet can be determined to be the first data packet broadcasted by the first device, that is, a legal data packet. For example, when the extracted verification data is compared with the previous verification data in the previous second data packet previously received by the server from the first device, and the change that occurs does not meet the predetermined rule, the second data packet can be determined not to be the first data packet broadcasted by the first device, that is, an illegal data packet.

[0078] In different application scenarios, "legal data packets" or "illegal data packets" may correspond to different treatments to facilitate subsequent operations and processing. For example, legal data packets and illegal data packets may be marked with legal labels and illegal labels, respectively. Alternatively, data packets may not be marked to distinguish them, but legal data packets and illegal data packets may be processed differently. For example, legal data packets may be allowed to enter subsequent processing flows (such as processing flows related to the services provided), while illegal data packets may not enter subsequent service flows. Alternatively, illegal data packets may be deleted while legal data packets are retained. The present disclosure does not limit this.

[0079] In different application scenarios, the first device can send the first data packet in a mode suitable for the scenario, and the present disclosure does not limit this. For example, the first device 120 can send the first data packet outward in a unidirectional information flow mode (such as broadcast).

[0080] In order to ensure the reliability of data transmission, for example, to prevent the first data packet broadcasted by the first device from being received by a malicious device and performing a replay attack. In one embodiment, the verification data included in the first data packet broadcasted by the first device may be variable, for example, at least compared with the verification data in the first data packet broadcasted by the first device last time, it is changed.

[0081] In an embodiment of the present invention, the verification data may include, for example, numbers, letters, or other characters. For other characters such as letters, for example, the size comparison or calculation may be performed using their ASCII codes. Alternatively, the comparison may be simply performed using the alphabetical order, etc. Furthermore, the verification data may be changed based on a predetermined rule. Among them, the predetermined rule may be implemented in a variety of ways, and may be a regular change rule, an irregular change rule, or both a regular change rule and an irregular change rule, and the present disclosure does not limit this.

[0082] As an example, the above-mentioned predetermined rule may be, for example, an increasing rule, that is, the verification data in the later first data packet is greater than the verification data in the earlier first data packet. Alternatively, the above-mentioned predetermined rule may also be, for example, a decreasing rule, that is, the verification data in the later first data packet is less than the verification data in the earlier first data packet. It should be understood that the verification data may be changed in a variety of ways, and the embodiments of the present disclosure are merely illustrative and not limiting.

[0083] In the embodiment of the present invention, the timing of the change of the verification data may be fixed or non-fixed. For example, the verification data may change once each time the first device broadcasts it, the verification data may change over time, or the verification data may change periodically with a predetermined change period. It should be understood that the timing of the change of the verification data may also be varied, and the embodiments of the present disclosure are only illustrative and not limiting.

[0084] Wherein, corresponding to the above-mentioned increasing rule and / or decreasing rule, each time the first device broadcasts, the verification data may increase or decrease by a predetermined value, for example, the predetermined value may be 1. Alternatively, the verification data may increase or decrease over time, in other words, the verification data may change as a function of time, for example, linearly increase or decrease over time. The predetermined value of the increase or decrease of the verification data or the increase or decrease over time may be determined according to the actual application scenario, and the present disclosure does not limit this.

[0085] The first device can locally maintain the verification data that changes according to a predetermined rule. The first device can pre-configure the verification data change rule, and change the verification data based on the configured change rule, and carry the verification data in the first data packet to be sent.

[0086] In one embodiment, the first device may maintain the verification data in its volatile storage, such as a memory, so that the first device provides faster performance.

[0087] In one embodiment, the first device may store third data in its non-volatile memory, and the third data may be read as verification data, for example, when the first device is powered off. In response to the first device being powered on again after being powered off, the third data may be obtained from the non-volatile memory as current verification data and stored in the volatile memory.

[0088] The third data can be set as the future verification data that will be reached or exceeded after the first device is powered on this time, if the verification data continues to change from the current verification data (initial verification data at the time of power-on this time) according to the above-mentioned predetermined rules, and will not be reached within a predetermined time period (for example, one day) or a predetermined number of data packet transmissions (for example, 10,000 times). For example, the third data can be set as the future verification data after the verification data continues to change from the current verification data for a predetermined time period or a predetermined number of times. In this way, in the event that the verification data in the volatile memory is lost due to a power outage or the like in the first device, the verification data can be restored, and compared with the previous verification data, the above-mentioned predetermined rules will not be violated.

[0089] The third data may be pre-written into the non-volatile memory for backup.

[0090] The introduction of the third data stored in the non-volatile memory makes it unnecessary to write the verification data in the volatile memory into the non-volatile memory every time the verification data changes, which greatly reduces the writing operation of the non-volatile memory, reduces its damage and prolongs its service life.

[0091] The second data may also be set based on the current verification data when the third data is set (generally when the device is first powered on or restarted, or when the verification data continues to change for a predetermined period of time or a predetermined number of times so that it is about to reach or has reached or exceeded the original third data).

[0092] The third data may be set so that when used as new verification data, it always complies with the above-mentioned predetermined change rule of the verification data compared with the previous verification data. For example, under the increasing rule, the third data is greater than the current verification data, and under the decreasing rule, the third data is less than the current verification data. In this way, for example, after the first device is powered off and powered on again, the current verification data determined based on the third data also complies with the change rule of the verification data, so that the data packet based on the current verification data can be determined as a legitimate data packet.

[0093] In different scenarios, the third data may be determined in different ways.

[0094] For example, when the third data is not saved in the non-volatile memory, such as when the first device is powered on for the first time, the first device can determine the third data based on the current verification data in response to the fact that the third data is not saved in the non-volatile memory, and save it in the non-volatile memory.

[0095] In addition, the first device side may preset original verification data, such as an original verification value S1, and when powered on for the first time, the third data may be determined based on the original verification data.

[0096] For example, after the first device is powered off and then powered on again, the first device may, in response to the first device being powered on again after being powered off, use the third data previously determined and stored in the non-volatile memory as the current verification data, re-determine new third data based on the current verification data, and store it in the non-volatile memory.

[0097] The third data can be set based on the approximate time statistics of general power-on, power-off, and re-power-on, or the statistics of the number of data packets generally sent from power-on to power-off, for example, based on the general duration from one power-on to power-off, or the general duration from one power-on to the next power-on. In this way, in most cases, the verification data will generally not reach the third data after power-on and before power-off. After the next power-on, the initial verification data after this power-on can be set based on the third data, for example, the third data can be directly used as the initial verification data. In this way, it can be ensured that compared with the verification data in the first data packet sent in the last power-on stage, for example, the above-mentioned predetermined rules will not be violated. In this way, generally, after the first device is powered on and the second data is determined, it is not necessary to calculate the second data again and write it to the non-volatile memory until the next power-off. In this way, the calculation and writing operations of the non-volatile memory can be further reduced.

[0098] In addition, there are also some cases where the power is not cut off for a long time after power is turned on once, or there is no power cut after a large number of first data packets are sent. In this way, during the duration between the power on and the power off, the verification data changes according to the above predetermined rule and may reach or even exceed the third data.

[0099] In order to ensure that when the third data is used as verification data after the next power-on after the current power outage, it does not violate the above predetermined rules compared with the verification data in the first data packet sent before the current power outage, the third data needs to be adaptively modified.

[0100] For example, in the case where the verification data changes as a function of time, corresponding to the above-mentioned increasing / decreasing rules, under the increasing rule, in response to the current verification data increasing to be greater than or equal to the third data, the third data can be re-determined based on the current verification data and stored in the non-volatile memory. Alternatively, under the decreasing rule, in response to the current verification data decreasing to be less than or equal to the third data, the third data can be re-determined based on the current verification data and stored in the non-volatile memory.

[0101] For example, in the case where the verification data changes once each time the first data packet is broadcast, corresponding to the above-mentioned increasing / decreasing rules, under the increasing rule, the third data is determined to be not less than the new current verification data after the first device sends a predetermined number of first data packets from now on. Alternatively, under the increasing rule, the third data is determined to be not less than the new current verification data after a predetermined time period has passed from now on. Alternatively, under the decreasing rule, the third data is determined to be not greater than the new current verification data after the first device sends a predetermined number of first data packets from now on. Alternatively, under the decreasing rule, the third data is determined to be not greater than the new current verification data after a predetermined time has passed from now on.

[0102] Take the change rule based on the original verification value S1 and the number of data packets (or the number of broadcasts) as an example. For example, initially, the original verification value S1=0, and the value of the configuration verification data increases by one with the number of broadcasts of the first device. The third data S1=50 can be written in advance based on the possibility that the first device will be powered off after sending a predetermined number (e.g., 50, or an empirical value or other value) of data packets.

[0103] Take the original verification value S1 and the time-based change rule as an example. For example, initially, the third data S2 to be written in advance to the non-volatile memory can be determined based on the original verification data S1 and the preset verification data change rule (for example, based on), for example, S2 = S1 + Kt, where K is a preset change parameter, and t can be the time from the last power failure of the first device to the next possible power failure.

[0104] In one embodiment, the first device can be pre-set to be powered off periodically, or it can be assumed that the first device is powered off periodically, so as to update the second device based on the power-off cycle of the first device. In this case, the time t from the last power-off of the first device to the next possible power-off is the power-off cycle of the first device, for example, 1 day, that is, 24*60*60s.

[0105] Therefore, the present disclosure can determine and write the third data in the non-volatile memory in advance by estimating and / or counting the power-off and power-on situations of the first device, so that in the event that the first device loses power and causes the verification data stored in its volatile storage to be lost, verification data that meets the predetermined rules can still be obtained, thereby avoiding errors in subsequent processing based on the verification data (such as verification of the verification data).

[0106] In addition, to prevent malicious devices from generating a data packet corresponding to the first device (in order to distinguish it from the first data packet broadcast by the first device, the data packet corresponding to the first device is referred to as the second data packet here), the first data packet sent by the first device may also include signature information to be verified. The data recipient, such as a server, may perform signature verification on the signature information to determine the legitimacy of the data packet.

[0107] The first device may generate first signature information to be verified based on a device key (device Secret) of the first device, a plaintext ID corresponding to the device key, and the verification data, and the first data packet broadcasted by the first device may include the first signature information and the plaintext ID.

[0108] The server can extract the verification data and plaintext ID from the received second data packet, and obtain the corresponding device key based on the plaintext ID. Thereafter, the server generates second signature information based on the device key, the plaintext ID and the verification data, and performs signature verification by comparing the second signature information with the first signature information, thereby determining whether the second data packet received by the recipient is the first data packet broadcast by the first device, that is, a legitimate data packet.

[0109] The first device sending the first data packet and the server as the data receiver can use the same digest algorithm, such as sha256, and both parties know the digest algorithm. The device key and plaintext ID can be determined based on the actual algorithm used, which will not be repeated here.

[0110] Furthermore, the server can determine that the second data packet is the first data packet broadcast by the first device, i.e., a legitimate data packet, if the change in the verification data in the second data packet compared with the previous verification data in the previous second data packet previously received from the first device complies with predetermined rules and the signature verification is successful.

[0111] In one embodiment, the first device may be, for example, a device that cannot directly communicate with the server, such as a Bluetooth device.

[0112] At this time, the communication system of the present disclosure may further include one or more second devices, and the first data packet broadcast by the first device may be received by the second device and forwarded to the server via the second device, so that the server can provide services related to the first device, such as the positioning service of the first device. The second device may be, for example, a Bluetooth gateway or other access point (AP), and the first device and the second device may communicate based on the Bluetooth communication protocol, and the second device and the server may communicate based on wireless communication or wired communication.

[0113] In one embodiment, the second device may add information to the first data packet broadcast by the first device to improve the service quality. For example, for a device positioning service, the second device may add the signal strength information when the second device receives the first data packet from the first device to the first data packet broadcast by the first device. The server may determine the position of the first device based on the signal strength information contained in the first data packet and the position of the second device that forwarded the first data packet. This facilitates reliable positioning of the first device.

[0114] Among them, when the data packet forwarded by the second device corresponds to the first device (for example, contains the device identification of the first device), the data packet may also be intercepted and generated by a malicious device. Therefore, the data recipient, such as a server, still needs to verify the data packet forwarded by the second device to determine the legitimacy of the data packet. The specific verification can be found in the relevant description above and will not be repeated here.

[0115] When verifying a data packet forwarded by a second device, when there are multiple second devices forwarding the same data packet broadcast by a first device to the server, the server can, for example, use previous verification data in the same previously received second data packet from the first device to compare with the verification data in the data packets forwarded by the multiple second devices.

[0116] In order to better understand the verification principle of the verification data when multiple second devices forward data packets, Figure 2A The diagram shows a schematic diagram of respectively verifying the legitimacy of first data packets forwarded by multiple (for example, three) second devices when the first data packet broadcasted by the first device is forwarded by the multiple second devices.

[0117] See also Figure 2A As shown in the schematic diagram, for a first data packet broadcasted by the first device 120, the second devices 130_1, 130_2, 130_3 can all receive and forward it to the server 110, and the verification data included in the same data packet forwarded by the second devices 130_1, 130_2, 130_3 are the same.

[0118] After receiving the data packets forwarded by the second devices 130_1, 130_2, and 130_3, the server can perform the same processing on the data packets of these second devices 130_1, 130_2, and 130_3, that is, use the previous verification data extracted and recorded by the server from the previous second data packet broadcasted by the first device 120 last time (that is, the second data packet previously received by the server and determined to be the first data packet broadcasted by the first device), and compare the verification data extracted from the data packets currently forwarded by these second devices 130_1, 130_2, and 130_3, so as to verify whether the data packets currently forwarded by each second device are legal.

[0119] In one embodiment, taking into account network conditions or network delays, data packets forwarded via multiple second devices fail to arrive at the server at the same time. The server can maintain a time window (i.e., a receiving window) and regard the first data packet received from the multiple second devices within the time window as the same data packet broadcast by the first device, so as to receive data packets forwarded via multiple second devices corresponding to the same data packet broadcast by the first device, and verify them respectively.

[0120] The receiving window may have a set time length, such as 200 ms, or the maintenance time limit of the receiving window may be related to the verification data in the first data packet received by the server from the first device.

[0121] For example, the server can monitor the data packet corresponding to the first device (for example, based on the device identification of the first device) and the verification data included therein. Starting from the time when the server receives a legitimate data packet from the first device, the server can maintain the receiving window corresponding to the broadcast corresponding to the legitimate data packet. When the time limit of the receiving window is reached, or in response to the verification data in the newly received second data packet corresponding to the first device compared with the previous verification data in the previous second data packet previously received from the first device, the change that occurs meets the predetermined rule, the server can determine that the second data packet corresponding to the first device is the first data packet broadcast by the first device, that is, a legitimate data packet. At this time, the receiving window corresponding to the previous second data packet can be ended, and the receiving window corresponding to the newly received second data packet can be opened.

[0122] Thus, the server can maintain a receiving window corresponding to the first data packet broadcasted by the first device so as to receive the first data packet forwarded via multiple second devices as much as possible, so as to provide better service.

[0123] In one embodiment, the server may also send verification result information to the first device and / or the second device so that the first device and / or the second device can learn the verification result on the server side to facilitate subsequent processing and / or service.

[0124] In addition, at the service level, the above communication system can be a positioning system, which can also include a first device, one or more second devices and a server. The first data packet broadcast by the first device can include verification data, and the change of the verification data relative to the verification data in the first data packet broadcast by the first device last time meets the predetermined rule; the second device adds the signal strength information when the second device receives the first data packet from the first device in the first data packet broadcast by the first device, and forwards the first data packet to the server. The server receives the second data packet corresponding to the first device. When the change of the verification data in the second data packet is compared with the previous verification data in the previous second data packet received from the first device, it can be determined that the received second data packet is the first data packet broadcast by the first device, that is, a legal data packet. At this time, the position of the first device can be determined based on the signal strength information contained in the data packet and the device position of the second device forwarding the data packet, and the verification data in the currently received second data packet can be recorded. Wherein, compared with the second data packet received later, the verification data in the currently recorded second data packet is the previous verification data in the previous second data packet received from the first device mentioned above. The implementation of the positioning system and its functions may be the same as or similar to the above-mentioned communication system. The implementation details involved may refer to the relevant description above and will not be repeated here.

[0125] In order to better understand the communication scheme of the present disclosure, the following Figure 2B The schematic diagram of the communication process shown schematically illustrates the communication process that can be implemented by the communication system of the present disclosure (including the server 110, the first device 120 and the second device 130). The first device 120 may be a Bluetooth device, the second device 130 may be a Bluetooth gateway, the first device 120 and the second device 130 communicate based on the Bluetooth protocol, and the second device 130 and the server 110 communicate based on wireless communication or wired communication.

[0126] See also Figure 2B As shown, in step S210, on the first device 120 side, current verification data is determined.

[0127] Among them, see Figure 2CAs shown in the schematic diagram of determining the current verification data, the first device may include a volatile memory and a non-volatile memory. In step S201, on the volatile memory side, the current verification data changes according to a predetermined rule and is used as the current verification data. At the same time, in step S202, third data is determined based on the current verification data and the predetermined rule, and in step S203, the third data is saved in the non-volatile memory.

[0128] When the first device is powered off and then powered on again, the first device reads the previously saved third data from its non-volatile memory as the current verification data, and changes the current verification data according to a predetermined rule. At the same time, in step S206, the third data is determined according to the current verification data and the predetermined rule, and in step S207, the third data is saved in the non-volatile memory.

[0129] Thus, by making the verification data change based on a predetermined rule, support is provided for verification of the verification data based on the change. Furthermore, by pre-saving the third data in the non-volatile memory, data loss caused by power failure of the device is avoided, and there is no need to write the third data in real time, thereby reducing the device performance overhead.

[0130] return Figure 2B As shown in the communication flow chart, when the first device 120 desires to broadcast a first data packet, in step S211, the first device 120 generates first signature information based on the device key of the first device 120, the plaintext ID, and the current verification data.

[0131] In step S212, a first data packet to be broadcast is generated, wherein the first data packet may include current verification data, first signature information to be verified, and a plaintext ID.

[0132] In step S213 , the first device 120 broadcasts the first data packet externally.

[0133] In step S214 , the second device 130 can receive the first data packet broadcasted by the first device 120 , and add the signal strength information when the second device 130 receives the data packet from the first device 120 to the first data packet.

[0134] In step S215 , the second device 130 forwards the first data packet to which the signal strength information is added to the server 110 .

[0135] In step S216, the server 110 receives the data packet forwarded by the second device 130, and extracts the verification information from the data packet, wherein the received data packet corresponds to the first device.

[0136] In step S217, the server 110 verifies the extracted verification data to determine whether the changes in the verification data compared to the verification data included in the first data packet previously broadcast by the first device comply with the predetermined rules. In the case where the changes do not comply with the predetermined rules, it can be determined that the data packet forwarded via the second device is not the first data packet broadcast by the first device, that is, an illegal data packet. In the case where the changes comply with the predetermined rules, the corresponding receiving window can be maintained based on the extracted verification data, that is, the receiving window is updated. Within the receiving window, data packets received from multiple second devices are deemed to correspond to the same data packet broadcast by the first device.

[0137] In step S218, the server 110 may extract the first signature information from the received data packet and perform signature verification. For example, the second signature information is generated based on the device key, the plaintext ID, and the verification data, and the second signature information is compared with the first signature information to perform signature verification. When the change in the verification data compared with the previous verification data in the previous second data packet previously received from the first device complies with the predetermined rules and the signature verification is successful, the received data packet is determined to be the first data packet broadcasted by the first device, i.e., a legitimate data packet.

[0138] In step S219, the server 110 may send verification result information to the second device 130. The verification result information may include information on successful verification of the forwarded data packet, information on failed verification of the data packet, or only response information to the information forwarded by the second device.

[0139] Thus, through the communication process disclosed above, secure data transmission between the first device, the second device and the server can be achieved. By adding verification data that changes according to a predetermined rule to the transmitted data packet and verifying the verification data, replay attacks by malicious devices can be avoided, thereby improving the reliability of data transmission.

[0140] The above communication scheme can also be implemented as a communication method, wherein the communication method can be executed by the above first device or by the above server. The following will be briefly described in conjunction with the accompanying drawings and embodiments, and the implementation details involved can be found in the above combined with Figure 1 -2 description is not repeated here.

[0141] Figure 3 A flow chart of a communication method according to an embodiment of the present disclosure is shown. Figure 5 A schematic diagram of a communication device 500 according to an embodiment of the present disclosure is shown. Figure 6 A schematic diagram of a communication device according to an embodiment of the present disclosure is shown. Figure 3 The method shown can be Figure 5 The communication device shown or Figure 6 The communication device 600 shown executes, and wherein, Figure 6 The communication device shown may be Figure 1 The first device is shown in .

[0142] See also Figure 3 In step S310, for example, Figure 5 The data packet generating device 510 shown generates a first data packet, wherein the first data packet includes verification data, and the change of the verification data relative to the verification data in the previous first data packet broadcast by the first device last time complies with a predetermined rule. Figure 5 The broadcasting device 520 shown broadcasts the first data packet.

[0143] In other embodiments, for example, Figure 6 The processor 610 executes the above step S310, Figure 6 The communication module shown executes the above step S320.

[0144] In the embodiment of the present invention, the above-mentioned predetermined rule may be, for example, an increasing rule, i.e., the verification data in the later first data packet is greater than the verification data in the earlier first data packet. Alternatively, the above-mentioned predetermined rule may be, for example, a decreasing rule, i.e., the verification data in the later first data packet is less than the verification data in the earlier first data packet.

[0145] In the embodiment of the present invention, the verification data may be increased or decreased by a predetermined value each time the first device broadcasts; or the verification data may be increased or decreased as time passes.

[0146] In the embodiment of the present invention, the processor of the communication device or communication equipment may, for example, also maintain the verification data in a volatile memory, save third data in a non-volatile memory, and in response to powering on again after power failure, obtain the third data from the non-volatile memory as the current verification data, and save it in the volatile memory. Wherein, under the increasing rule, the third data is greater than the current verification data, and under the decreasing rule, the third data is less than the current verification data.

[0147] In an embodiment of the present invention, the processor of a communication device or a communication equipment may, for example, determine the third data based on the current verification data and save it in the non-volatile memory in response to the third data not being saved in the non-volatile memory; and / or in response to the first device being powered on again after being powered off, use the previous third data as the current verification data, re-determine the third data based on the current verification data, and save it in the non-volatile memory; and / or under an increasing rule, in response to the current verification data being increased to be greater than or equal to the third data, re-determine the third data based on the current verification data and save it in the non-volatile memory; or under a decreasing rule, in response to the current verification data being decreased to be less than or equal to the third data, re-determine the third data based on the current verification data and save it in the non-volatile memory.

[0148] In an embodiment of the present invention, under the increasing rule, the third data can be determined as being no less than the new current verification data after the first device sends a predetermined number of first data packets from the current time; or under the increasing rule, the third data can be determined as being no less than the new current verification data after a predetermined time period from the current time; or under the decreasing rule, the third data can be determined as being no greater than the new current verification data after the first device sends a predetermined number of first data packets from the current time; or under the decreasing rule, the third data can be determined as being no greater than the new current verification data after a predetermined time from the current time.

[0149] In an embodiment of the present invention, the processor of a communication device or a communication equipment can also generate the first signature information based on the device key of the first device, the plaintext ID corresponding to the device key and the verification data. The first data packet broadcast by the communication device or the communication equipment can also include the first signature information and the plaintext ID.

[0150] In an embodiment of the present invention, a first data packet broadcasted by a first device is received by one or more second devices and forwarded to a server via the one or more second devices. The second device adds the signal strength information when the second device receives the first data packet from the first device to the first data packet broadcasted by the first device. The signal strength information contained in the forwarded first data packet can be used to determine the position of the first device. The first device and the second device can communicate based on the Bluetooth communication protocol, and the second device and the server can communicate based on wireless communication or wired communication.

[0151] In the embodiment of the present invention, the communication apparatus or communication device may also receive verification result information from the server or forwarded via the second device.

[0152] Figure 4 A flow chart of a communication method according to another embodiment of the present disclosure is shown. Figure 7 FIG. 1 shows a schematic diagram of a server 700 according to an embodiment of the present disclosure. Figure 4 The communication method shown can be Figure 7 In other embodiments, Figure 4 The communication method shown may also be executed by other devices or terminals (such as a control terminal), and the present disclosure does not limit this.

[0153] See also Figure 4 In step S410, for example, Figure 7 The data packet receiving device 710 shown receives a second data packet corresponding to a first device, wherein the second data packet may correspond to the first device in a variety of ways, for example, the second data packet may include a device identifier of the first device.

[0154] In step S420, for example, Figure 7 The verification data extraction device 720 shown extracts the verification data from the second data packet.

[0155] In step S420, for example, Figure 7 The determination device 730 shown determines that the second data packet is the first data packet broadcast by the first device, that is, a legal data packet, when the change in the verification data in the second data packet compared with the previous verification data in the previous second data packet previously received from the first device complies with a predetermined rule.

[0156] In step S420, for example, Figure 7 The recording device 740 shown records the verification data in the second data packet currently received.

[0157] In an embodiment of the present invention, the determination device 730 can also determine that the second data packet is not the first data packet broadcast by the first device, that is, an illegal data packet, when the change between the verification data and the previous verification data in the previous second data packet previously received from the first device does not comply with the predetermined rule.

[0158] In the embodiment of the present invention, the predetermined rule may be, for example, an increasing rule, i.e., the verification data in the later first data packet is greater than the verification data in the earlier first data packet. Alternatively, the predetermined rule may be, for example, a decreasing rule, i.e., the verification data in the later first data packet is less than the verification data in the earlier first data packet.

[0159] In the embodiment of the present invention, each time the first device broadcasts, the verification data increases or decreases by a predetermined value; or the verification data may increase or decrease as time passes.

[0160] In an embodiment of the present invention, the first data packet also includes first signature information and a plaintext ID. The first signature information is generated by the first device based on the device key of the first device, the plaintext ID corresponding to the device key, and the verification data. The verification data extraction device 720 can also obtain the corresponding device key based on the plaintext ID; generate second signature information based on the device key, the plaintext ID and the verification data; the determination device 730 can compare the second signature information with the first signature information for signature verification.

[0161] In an embodiment of the present invention, the first data packet broadcasted by the first device is forwarded to the server via the second device, and the second device adds the signal strength information when the second device receives the first data packet from the first device to the first data packet broadcasted by the first device. The server may also include a positioning device, which may also determine the position of the first device based on the signal strength information contained in the forwarded first data packet and the position of the second device forwarding the first data packet. The first device and the second device may communicate based on the Bluetooth communication protocol, and the second device and the server may communicate based on wireless communication or wired communication.

[0162] In an embodiment of the present invention, when multiple second devices forward the same data packet broadcast by the first device to the server, the positioning device can use the previous verification data in the same previously received previous second data packet from the first device to compare with the verification data in the data packets forwarded by the multiple second devices.

[0163] In an embodiment of the present invention, the server may further include a time window device, which may maintain a time window corresponding to the broadcast in response to receiving a first data packet broadcast by a first device forwarded via a second device, based on verification data included in the first data packet, wherein, within the time window, when the verification data in the first data packet broadcast by the first device forwarded to the server by multiple second devices is the same as the verification data in the first data packet broadcast by the first device forwarded to the server by the one second device, the multiple second devices forward to the server the same data packet broadcast by the first device.

[0164] In the embodiment of the present invention, the server may further include a verification result sending device, which may send verification result information to the first device and / or the second device.

[0165] So far, it has been combined Figure 3-Figure 7 The relevant devices or apparatuses for implementing the communication scheme of the present disclosure are briefly described. Among them, the functional modules of the communication device or communication device or server can be implemented by hardware, software or a combination of hardware and software that implements the principles of the present invention. It can be understood by those skilled in the art that Figure 5 , 6 , 7 can be combined or divided into sub-modules to implement the principles of the above invention. Therefore, the description herein can support any possible combination, or division, or further limitation of the functional modules described herein. The above is only a brief description of the functional modules that a communication device or communication equipment or server may have and the operations that each functional module may perform. For the details involved, please refer to the above combined with Figure 1 -2 description is not repeated here.

[0166] Figure 8 A schematic diagram of the structure of a computing device according to an embodiment of the present invention is shown.

[0167] See also Figure 8 , the computing device 800 includes a memory 810 and a processor 820 .

[0168] The processor 820 may be a multi-core processor or may include multiple processors. In some embodiments, the processor 820 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor 820 may be implemented using a customized circuit, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).

[0169] The memory 810 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 820 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 810 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 810 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0170] The memory 810 stores processable codes, and when the processable codes are processed by the processor 820 , the processor 820 can execute the communication method mentioned above.

[0171] The communication system, method, device and positioning system according to the present invention have been described above in detail with reference to the accompanying drawings.

[0172] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing the above steps defined in the above method of the present invention.

[0173] Alternatively, the present invention may also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or computing device, server, etc.), the processor executes the various steps of the above-mentioned method according to the present invention.

[0174] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or a combination of both.

[0175] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0176] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A communication system, characterized in that: comprising a first device and a server, The first data packet broadcasted by the first device includes verification data, and a change in the verification data relative to previous verification data in the first data packet broadcasted by the first device last time complies with a predetermined rule, wherein the predetermined rule is an increasing rule or a decreasing rule; The server receives a second data packet corresponding to the first device, and if the verification data in the second data packet is changed in accordance with a predetermined rule compared with the previous verification data in the previous second data packet received from the first device, determines that the second data packet is the first data packet, and records the verification data in the second data packet currently received; The first device maintains the verification data in its volatile memory and saves the introduction of third data in its non-volatile memory, wherein, under a predetermined rule, the third data is greater than or less than the current verification data, In response to the first device being powered on again after being powered off, acquiring the third data according to the introduction of the third data stored in the non-volatile memory as current verification data, and storing the third data in the volatile memory; The first device: In response to the non-volatile memory not storing the third data, determining the third data based on the current verification data and storing the third data in the non-volatile memory; In response to the first device being powered on again after being powered off, taking the previous third data as the current verification data, re-determining the third data based on the current verification data, and storing the third data in the non-volatile memory; Under the increment rule, in response to the current verification data being incremented to be greater than or equal to the third data, re-determining the third data based on the current verification data and storing it in the non-volatile memory; Under the decrement rule, in response to the current verification data being decremented to be less than or equal to the third data, the third data is re-determined based on the current verification data and stored in the non-volatile memory.

2. The system according to claim 1, characterized in that The server determines that the second data packet is not the first data packet if the change in the verification data in the second data packet compared with the previous verification data in the previous second data packet previously received from the first device does not comply with the predetermined rule.

3. The system according to claim 1, characterized in that The incremental rule is that the verification data in the later first data packet is greater than the verification data in the earlier first data packet; The decreasing rule is that the verification data in the later first data packet is smaller than the verification data in the earlier first data packet.

4. The system according to claim 3, characterized in that Each time the first device broadcasts, the verification data increases or decreases by a predetermined value; or The verification data is incremented or decremented as time passes.

5. The system according to claim 3, characterized in that Under the increasing rule, the third data is greater than the current verification data, and under the decreasing rule, the third data is less than the current verification data.

6. The system according to claim 1, characterized in that Under the incremental rule, the third data is determined to be not less than the new current verification data after the first device sends a predetermined number of first data packets from now on; or Under the incremental rule, the third data is determined to be not less than the new current verification data after a predetermined period of time has passed since the present; or Under the decreasing rule, the third data is determined to be no greater than the new current verification data after the first device sends a predetermined number of first data packets from now on; or Under the decrement rule, the third data is determined to be still no greater than the new current verification data after a predetermined time has passed from now.

7. The system according to claim 1, characterized in that The first device generates first signature information based on a device key of the first device, a plaintext ID corresponding to the device key, and the verification data, The first data packet also includes the first signature information and the plaintext ID.

8. The system according to claim 7, characterized in that The server obtains a corresponding device key based on the plaintext ID, and generates second signature information based on the device key, the plaintext ID and the verification data; as well as The second signature information is compared with the first signature information to perform signature verification.

9. The system according to claim 8, characterized in that If the change in the verification data in the second data packet of the server compared with the previous verification data in the previous second data packet previously received from the first device complies with a predetermined rule and the signature verification is successful, the second data packet is determined to be the first data packet.

10. The system according to claim 1, characterized in that Also comprising one or more second devices, The second device adds the signal strength information when the second device receives the first data packet from the first device to the first data packet broadcast by the first device, and forwards the first data packet to the server. The server determines the location of the first device based on the signal strength information included in the first data packet and the location of the second device that forwards the first data packet.

11. The system according to claim 10, characterized in that In the case that multiple second devices forward the same data packet broadcast by the first device to the server, the server uses previous verification data in the same previously received second data packet from the first device to compare with the verification data in the data packets forwarded by the multiple second devices.

12. The system according to claim 11, characterized in that The server maintains a receiving window, and regards first data packets received from the plurality of second devices within the receiving window as corresponding to the same data packet broadcasted by the first device.

13. The system according to claim 12, characterized in that The receiving window has a set time length; or The server, in response to the verification data in a newly received second data packet corresponding to the first device being changed in accordance with the predetermined rule compared with the previous verification data in the previous second data packet previously received from the first device, ends the receiving window corresponding to the previous second data packet and opens the receiving window corresponding to the newly received second data packet.

14. The system according to claim 10, characterized in that The server also sends verification result information to the first device and / or the second device.

15. The system according to claim 10, characterized in that The first device and the second device communicate with each other based on the Bluetooth communication protocol; and / or The second device communicates with the server based on wireless communication or wired communication.

16. A positioning system, characterized in that: comprising a first device, one or more second devices and a server, The first data packet broadcasted by the first device includes verification data, and a change in the verification data relative to the verification data in the first data packet broadcasted by the first device last time complies with a predetermined rule, wherein the predetermined rule is an increasing rule or a decreasing rule; The second device adds the signal strength information when the second device receives the first data packet from the first device to the first data packet broadcast by the first device, and forwards the first data packet to the server. The server receives a second data packet corresponding to the first device, and if a change in the verification data in the second data packet relative to the previous verification data in the previous second data packet received from the first device complies with a predetermined rule, determines the position of the first device based on the signal strength information contained in the second data packet and the device position of the second device forwarding the second data packet, and records the verification data in the second data packet currently received; The first device maintains the verification data in its volatile memory and saves the introduction of third data in its non-volatile memory, wherein, under a predetermined rule, the third data is greater than or less than the current verification data, In response to the first device being powered on again after being powered off, acquiring the third data according to the introduction of the third data stored in the non-volatile memory as current verification data, and storing the third data in the volatile memory; The first device: In response to the non-volatile memory not storing the third data, determining the third data based on the current verification data and storing the third data in the non-volatile memory; In response to the first device being powered on again after being powered off, taking the previous third data as the current verification data, re-determining the third data based on the current verification data, and storing the third data in the non-volatile memory; Under the increment rule, in response to the current verification data being incremented to be greater than or equal to the third data, re-determining the third data based on the current verification data and storing it in the non-volatile memory; Under the decrement rule, in response to the current verification data being decremented to be less than or equal to the third data, the third data is re-determined based on the current verification data and stored in the non-volatile memory.

17. A communication method, characterized in that: Applied to a first device, the method includes: Generate a first data packet, the first data packet including verification data, the change of the verification data relative to the previous verification data in the first data packet broadcast last time conforms to a predetermined rule, the predetermined rule being an increasing rule or a decreasing rule; and broadcasting the first data packet; Maintaining the verification data in its volatile memory and saving the introduction of third data in its non-volatile memory, wherein, under a predetermined rule, the third data is greater than or less than the current verification data, In response to the first device being powered on again after being powered off, acquiring the third data according to the introduction of the third data stored in the non-volatile memory as current verification data, and storing the third data in the volatile memory; In response to the non-volatile memory not storing the third data, determining the third data based on the current verification data and storing the third data in the non-volatile memory; In response to the first device being powered on again after being powered off, taking the previous third data as the current verification data, re-determining the third data based on the current verification data, and storing the third data in the non-volatile memory; Under the increment rule, in response to the current verification data being incremented to be greater than or equal to the third data, re-determining the third data based on the current verification data and storing it in the non-volatile memory; Under the decrement rule, in response to the current verification data being decremented to be less than or equal to the third data, the third data is re-determined based on the current verification data and stored in the non-volatile memory.

18. The method according to claim 17, characterized in that The incremental rule is that the verification data in the later first data packet is greater than the verification data in the earlier first data packet; The decreasing rule is that the verification data in the later first data packet is smaller than the verification data in the earlier first data packet.

19. The method according to claim 18, characterized in that Each time the first device broadcasts, the verification data increases or decreases by a predetermined value; or The verification data is incremented or decremented as time passes.

20. The method according to claim 18, characterized in that Also includes: Under the increasing rule, the third data is greater than the current verification data, and under the decreasing rule, the third data is less than the current verification data.

21. The method according to claim 17, characterized in that Under the incremental rule, the third data is determined to be not less than the new current verification data after the first device sends a predetermined number of first data packets from now on; or Under the incremental rule, the third data is determined to be not less than the new current verification data after a predetermined period of time has passed since the present; or Under the decreasing rule, the third data is determined to be no greater than the new current verification data after the first device sends a predetermined number of first data packets from now on; or Under the decrement rule, the third data is determined to be still no greater than the new current verification data after a predetermined time has passed from now.

22. The method according to claim 17, characterized in that Also includes: generating first signature information based on a device key of the first device, a plaintext ID corresponding to the device key, and the verification data, The first data packet also includes the first signature information and the plaintext ID.

23. The method according to claim 17, characterized in that The first data packet broadcast by the first device is received by one or more second devices and forwarded to the server via the one or more second devices. The second device adds signal strength information when the second device receives the first data packet from the first device to the first data packet broadcast by the first device. The signal strength information contained in the first data packet and the position of the second device forwarding the first data packet can be used to determine the location of the first device.

24. The method according to claim 23, characterized in that Also includes: Receive verification result information from the server or forwarded via the second device.

25. The method according to claim 23, characterized in that The first device and the second device communicate with each other based on the Bluetooth communication protocol; and / or The second device communicates with the server based on wireless communication or wired communication.

26. A communication method, characterized in that: include: receiving a second data packet corresponding to the first device; extracting verification data from the second data packet; When the verification data in the second data packet is compared with the previous verification data in the previous second data packet received from the first device, and the change occurs in accordance with a predetermined rule, determining that the second data packet is the first data packet broadcasted by the first device, and the predetermined rule is an increasing rule or a decreasing rule; and Recording the verification data in the second data packet currently received; The first device maintains the verification data in its volatile memory and saves the introduction of third data in its non-volatile memory, wherein, under a predetermined rule, the third data is greater than or less than the current verification data, In response to the first device being powered on again after being powered off, acquiring the third data according to the introduction of the third data stored in the non-volatile memory as current verification data, and storing the third data in the volatile memory; The first device: In response to the non-volatile memory not storing the third data, determining the third data based on the current verification data and storing the third data in the non-volatile memory; In response to the first device being powered on again after being powered off, taking the previous third data as the current verification data, re-determining the third data based on the current verification data, and storing the third data in the non-volatile memory; Under the increment rule, in response to the current verification data being incremented to be greater than or equal to the third data, re-determining the third data based on the current verification data and storing it in the non-volatile memory; Under the decrement rule, in response to the current verification data being decremented to be less than or equal to the third data, the third data is re-determined based on the current verification data and stored in the non-volatile memory.

27. The method according to claim 26, characterized in that Also includes: When the verification data in the second data packet is changed in a way that does not conform to the predetermined rule compared to the previous verification data in the previous second data packet received from the first device, it is determined that the second data packet is not the first data packet broadcasted by the first device.

28. The method according to claim 26, characterized in that Incremental rule, i.e. the verification data in the later first data packet is greater than the verification data in the earlier first data packet; The decreasing rule is that the verification data in the later first data packet is smaller than the verification data in the earlier first data packet.

29. The method according to claim 28, characterized in that Each time the first device broadcasts, the verification data increases or decreases by a predetermined value; or The verification data is incremented or decremented as time passes.

30. The method according to claim 26, characterized in that The first data packet also includes first signature information and a plaintext ID, wherein the first signature information is generated by the first device based on a device key of the first device, a plaintext ID corresponding to the device key, and the verification data. The method further includes: Obtaining a corresponding device key based on the plaintext ID; Generate second signature information based on the device key, the plaintext ID and the verification data; and The second signature information is compared with the first signature information to perform signature verification.

31. The method according to claim 26, characterized in that The first data packet broadcasted by the first device is forwarded to the server via the second device, and the second device adds signal strength information when the second device receives the first data packet from the first device to the first data packet broadcasted by the first device. The method further includes: The location of the first device is determined based on the signal strength information included in the first data packet and the location of the second device that forwards the first data packet.

32. The method according to claim 31, characterized in that In the case where multiple second devices forward the same data packet broadcast by the first device to the server, the method further includes: The previous verification data in the same previously received second data packet from the first device is used for comparison with the verification data in the data packets forwarded by the plurality of second devices.

33. The method according to claim 32, characterized in that Also includes: In response to receiving a first data packet broadcast by a first device forwarded via a second device, maintaining a time window corresponding to the broadcast based on verification data included in the first data packet, Within the time window, when the verification data in the first data packet broadcast by the first device and forwarded by multiple second devices to the server is the same as the verification data in the first data packet broadcast by the first device and forwarded by the one second device to the server, the multiple second devices forward to the server the same data packet broadcast by the first device.

34. The method according to claim 31, characterized in that Also includes: Send verification result information to the first device and / or the second device.

35. The method according to claim 31, characterized in that The first device and the second device communicate with each other based on the Bluetooth communication protocol; and / or The second device communicates with the server based on wireless communication or wired communication.

36. A communication device, characterized in that: include: A data packet generating device, configured to generate a first data packet, wherein the first data packet includes verification data, wherein a change in the verification data relative to the verification data in the first data packet last broadcast conforms to a predetermined rule, wherein the predetermined rule is an increasing rule or a decreasing rule; and A broadcasting device, configured to broadcast the first data packet; The data packet generating device is further used to maintain the verification data in its volatile memory and save the introduction of third data in its non-volatile memory, wherein, under a predetermined rule, the third data is greater than or less than the current verification data, In response to the first device being powered on again after being powered off, acquiring the third data according to the introduction of the third data stored in the non-volatile memory as current verification data, and storing the third data in the volatile memory; The data packet generating device is further configured to determine the third data based on the current verification data and store the third data in the non-volatile memory in response to the non-volatile memory not storing the third data; In response to the first device being powered on again after being powered off, taking the previous third data as the current verification data, re-determining the third data based on the current verification data, and storing the third data in the non-volatile memory; Under the increment rule, in response to the current verification data being incremented to be greater than or equal to the third data, re-determining the third data based on the current verification data and storing it in the non-volatile memory; Under the decrement rule, in response to the current verification data being decremented to be less than or equal to the third data, the third data is re-determined based on the current verification data and stored in the non-volatile memory.

37. A communication device, characterized in that: include: a processor, configured to generate a first data packet, wherein the first data packet includes verification data, wherein a change in the verification data relative to the verification data in the first data packet last broadcast complies with a predetermined rule, wherein the predetermined rule is an increasing rule or a decreasing rule; and A communication module, configured to broadcast the first data packet; The processor is further configured to maintain the verification data in its volatile memory and save the introduction of third data in its non-volatile memory, wherein, under a predetermined rule, the third data is greater than or less than the current verification data, In response to the first device being powered on again after being powered off, acquiring the third data according to the introduction of the third data stored in the non-volatile memory as current verification data, and storing the third data in the volatile memory; The processor is further configured to, in response to the non-volatile memory not storing the third data, determine the third data based on the current verification data and store the third data in the non-volatile memory; In response to the first device being powered on again after being powered off, taking the previous third data as the current verification data, re-determining the third data based on the current verification data, and storing the third data in the non-volatile memory; Under the increment rule, in response to the current verification data being incremented to be greater than or equal to the third data, re-determining the third data based on the current verification data and storing it in the non-volatile memory; Under the decrement rule, in response to the current verification data being decremented to be less than or equal to the third data, the third data is re-determined based on the current verification data and stored in the non-volatile memory.

38. The communication device according to claim 37, characterized in that Also includes: a volatile memory in which the authentication data is maintained; a non-volatile memory storing third data therein, wherein, under an increasing rule, the third data is greater than the current verification data, and under a decreasing rule, the third data is less than the current verification data, In response to powering on again after power failure, the processor acquires the third data from the non-volatile memory and stores the third data in the volatile memory as current verification data.

39. A server for executing a communication method, characterized in that: include: A data packet receiving device, configured to receive a second data packet corresponding to the first device; Verification data extraction means, for extracting verification data from the second data packet; a determination device, configured to determine that the second data packet is the first data packet broadcasted by the first device if a change in the verification data in the second data packet compared with the verification data in the previous second data packet received from the first device complies with a predetermined rule, and the predetermined rule is an increasing rule or a decreasing rule; and Recording means, used for recording the verification data in the currently received second data packet; The first device maintains the verification data in its volatile memory and saves the introduction of third data in its non-volatile memory, wherein, under a predetermined rule, the third data is greater than or less than the current verification data, In response to the first device being powered on again after being powered off, acquiring the third data according to the introduction of the third data stored in the non-volatile memory as current verification data, and storing the third data in the volatile memory; The first device: In response to the non-volatile memory not storing the third data, determining the third data based on the current verification data and storing the third data in the non-volatile memory; In response to the first device being powered on again after being powered off, taking the previous third data as the current verification data, re-determining the third data based on the current verification data, and storing the third data in the non-volatile memory; Under the increment rule, in response to the current verification data being incremented to be greater than or equal to the third data, re-determining the third data based on the current verification data and storing it in the non-volatile memory; Under the decrement rule, in response to the current verification data being decremented to be less than or equal to the third data, the third data is re-determined based on the current verification data and stored in the non-volatile memory.

40. A computing device comprising: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 17 to 35.

41. A non-transitory machine-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method as claimed in any one of claims 17 to 35.

Citation Information

Patent Citations

  • Method, device and system for preventing services from being attacked

    CN102164033A

  • Method and system for positioning wireless equipment and forwarding data

    CN106162570A

  • Communication data processing method, device, electronic equipment, program and medium

    CN108390757A

  • Method and system for recovering from abnormal interruption of a parity update operation in a disk array system

    CN1776637A