Relationship Establishment Method and Apparatus, Network Establishment Method and Apparatus

Through the coordinated work of the client and the server, the encryption key is established based on image identification and verification data, which solves the problems of poor network establishment flexibility and low communication efficiency in the prior art, and realizes efficient and secure vehicle intelligence and networked communication.

CN115208556BActive Publication Date: 2025-06-24ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110322224.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-25
Publication Date
2025-06-24
Estimated Expiration
2041-03-25

AI Technical Summary

Technical Problem

In the prior art, the network of intelligent and connected vehicles has poor flexibility in establishing a network, low communication efficiency, and a connection is required to achieve mutual communication.

Method used

Through a relationship establishment method, the client determines the target device based on image identification and works in collaboration with the server to generate and exchange verification data to establish an encryption key to realize the association relationship between the client, the server and the target device.

Benefits of technology

It improves network construction flexibility and communication efficiency, allows target devices to communicate with each other without establishing a connection, and greatly improves the security of communication between target devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115208556B_ABST
    Figure CN115208556B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a relationship establishment method and apparatus, and a network establishment method and apparatus. Among them, the network establishment method is applied to a client, and includes determining at least two target devices associated with the initial object based on the initial object, and generating a data key based on the initial object; determining the encryption key of each target device among the at least two target devices, and transmitting the data key to each target device based on the encryption key of each target device; and constructing a mesh network between the at least two target devices based on the association relationship between the at least two target devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present specification relate to the field of computer technology, and in particular, to a method for establishing a relationship. One or more embodiments of the present specification also relate to a method for establishing a network, a method for sending data, a method for receiving data, a device for establishing a relationship, a device for establishing a network, a device for sending data, a device for receiving data, a computing device, and a computer-readable storage medium. Background Art

[0002] Currently, the intelligent and connected vehicle is already a trend. Through modern communication and network technologies, vehicles can be intelligently connected to their in-vehicle devices or other vehicles to achieve comfortable and personalized intelligent operations.

[0003] However, currently, the solutions used in the industry are all connection-based solutions, that is, connections need to be established between vehicles or vehicle devices before they can communicate with each other. The flexibility of network formation is poor, and the communication efficiency is low. Summary of the Invention

[0004] In view of this, the embodiments of the present specification provide a method for establishing a relationship. One or more embodiments of the present specification also relate to a method for establishing a network, a method for sending data, a method for receiving data, a device for establishing a relationship, a device for establishing a network, a device for sending data, a device for receiving data, a computing device, and a computer-readable storage medium to solve the technical defects existing in the prior art.

[0005] According to the first aspect of the embodiments of the present specification, a method for establishing a relationship is provided, including a client, a server, and a target device, where

[0006] the client determines the target device based on the image identifier, and sends the device information and verification information of the target device to the server;

[0007] the server generates first verification data based on the device information and verification information of the target device, and sends the first verification data to the target device through the client based on the device information;

[0008] the target device generates second verification data based on the first verification data, and sends the second verification data to the server through the client based on the first verification data, and generates an encryption key based on the second verification data;

[0009] the server generates the encryption key based on the second verification data, and sends the encryption key to the client to establish the association relationship among the client, the server, and the target device.

[0010] According to the second aspect of the embodiments of this specification, a network establishment method is provided, which is applied to a client and includes:

[0011] Determine at least two target devices associated with the initial object based on the initial object, and generate a data key based on the initial object;

[0012] Determine the encryption key of each target device among the at least two target devices, and transmit the data key to each target device based on the encryption key of each target device;

[0013] Based on the association relationship between the at least two target devices, construct a mesh network between the at least two target devices,

[0014] wherein, the encryption key of each target device is obtained through the above relationship establishment method.

[0015] According to the third aspect of the embodiments of this specification, a data sending method is provided, which is applied to a data sending target device and includes:

[0016] Generate an initial data packet based on a preset data format and the network address of the data receiving target device;

[0017] Set a corresponding message sequence number for the initial data packet in an incremental manner;

[0018] Encrypt the initial data packet according to a preset encryption algorithm and the data key of the data sending target device, and generate a message check code;

[0019] Generate a broadcast data packet based on the initial data packet and the message check code, generate a corresponding network identifier for the broadcast data packet based on the data key, and send the broadcast data packet carrying the network identifier to the network according to a preset sending time sequence,

[0020] wherein, the network is obtained through the above network establishment method.

[0021] According to the fourth aspect of the embodiments of this specification, a data receiving method is provided, which is applied to a data receiving target device and includes:

[0022] Receive a network broadcast data packet, and decrypt and obtain the message check code of the broadcast data packet based on a preset decryption algorithm and the data key when it is verified that the network identifier of the broadcast data packet is verified through the data key of the data receiving target device;

[0023] Obtain the network address in the broadcast data packet when it is determined that the message check code is verified;

[0024] In the case where the network address matches a pre-stored network address, parse and respond to the broadcast data packet,

[0025] wherein, the network is obtained by the above network establishment method.

[0026] According to a fifth aspect of the embodiments of the present specification, a relationship establishment system is provided, including a client, a server, and a target device, wherein,

[0027] The client is configured to determine the target device based on an image identifier, and send device information and verification information of the target device to the server;

[0028] The server is configured to generate first verification data in the case where the device information of the target device corresponds to the verification information, and send the first verification data to the target device through the client;

[0029] The target device is configured to generate second verification data in the case where the first verification data passes the verification, and send the first verification data and the second verification data to the server through the client;

[0030] The server is further configured to generate an encryption key for the target device based on the first verification data and the second verification data, and send the encryption key to the client to establish an association relationship among the client, the server, and the target device.

[0031] According to a sixth aspect of the embodiments of the present specification, a network establishment device is provided, including:

[0032] A data key generation module, configured to determine at least two target devices associated with the initial object based on the initial object, and generate a data key based on the initial object;

[0033] A transmission module, configured to determine an encryption key for each of the at least two target devices, and transmit the data key to each of the at least two target devices based on the encryption key for each target device;

[0034] A network establishment module, configured to construct a mesh network among the at least two target devices based on the association relationship among the at least two target devices,

[0035] wherein, the encryption key for each target device is obtained by the above relationship establishment method.

[0036] According to a seventh aspect of the embodiments of the present specification, a data sending device is provided, including:

[0037] A data packet generation module, configured to generate an initial data packet based on a preset data format and the network address of the data receiving target device;

[0038] A message sequence number generation module, configured to set a corresponding message sequence number for the initial data packet in an increasing manner;

[0039] A verification code generation module, configured to encrypt the initial data packet according to a preset encryption algorithm and the data key of the data sending target device, and generate a message verification code;

[0040] A broadcast data packet generation module, configured to generate a broadcast data packet based on the initial data packet and the message verification code, generate a corresponding network identifier for the broadcast data packet based on the data key, and send the broadcast data packet carrying the network identifier to the network according to a preset sending time sequence,

[0041] Wherein, the network is obtained by the above network establishment method.

[0042] According to the eighth aspect of the embodiments of the present specification, a data receiving device is provided, including:

[0043] A broadcast data packet receiving module, configured to receive a network broadcast data packet, and decrypt and obtain the message verification code of the broadcast data packet based on a preset decryption algorithm and the data key when the network identifier verification of the broadcast data packet is passed based on the data key of the data receiving target device;

[0044] A network address acquisition module, configured to acquire the network address in the broadcast data packet when it is determined that the message verification code verification is passed;

[0045] A response module, configured to parse and respond to the broadcast data packet when the network address matches the pre-stored network address,

[0046] Wherein, the network is obtained by the above network establishment method.

[0047] According to the ninth aspect of the embodiments of the present specification, a computing device is provided, including:

[0048] A memory and a processor;

[0049] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above relationship establishment method, network establishment method, data sending method or data receiving method are implemented.

[0050] According to the tenth aspect of the embodiments of the present specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the above-mentioned relationship establishment method, network establishment method, data sending method or data receiving method are implemented.

[0051] An embodiment of the present specification implements a network establishment method, which is applied to a server side and includes determining at least two target devices associated with the initial object based on the initial object, and generating a data key based on the initial object; determining an encryption key for each of the at least two target devices, and transmitting the data key to each target device based on the encryption key of each target device; constructing a mesh network among the at least two target devices based on the association relationship among the at least two target devices. Specifically, the network establishment method uses non-interactive broadcast technology to connect each target device associated with the initial object, construct a network based on the initial object, and all target devices within the network can communicate with each other without establishing a connection, improving the flexibility of network construction and communication efficiency; and subsequently, the target devices within the network can communicate based on the data key, greatly improving the security of communication between the target devices. Description of the Drawings

[0052] Figure 1 is a flowchart of a relationship establishment method provided by an embodiment of the present specification;

[0053] Figure 2 is a processing flowchart of a connection relationship establishment method provided by an embodiment of the present specification;

[0054] Figure 3 is a flowchart of a network establishment method provided by an embodiment of the present specification;

[0055] Figure 4 is a flowchart of a data sending method provided by an embodiment of the present specification;

[0056] Figure 5 is a flowchart of a data receiving method provided by an embodiment of the present specification;

[0057] Figure 6 is a processing flowchart of a data receiving method provided by an embodiment of the present specification;

[0058] Figure 7 is a schematic structural diagram of a relationship establishment system provided by an embodiment of the present specification;

[0059] Figure 8 is a schematic structural diagram of a network establishment device provided by an embodiment of the present specification;

[0060] Figure 9 It is a schematic structural diagram of a data sending device provided by an embodiment of this specification;

[0061] Figure 10 It is a schematic structural diagram of a data receiving device provided by an embodiment of this specification;

[0062] Figure 11 It is a structural block diagram of a computing device provided by an embodiment of this specification. Detailed implementation manners

[0063] In the following description, many specific details are set forth in order to provide a thorough understanding of this specification. However, this specification can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of this specification. Therefore, this specification is not limited by the specific implementations disclosed below.

[0064] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a", "the", and "said" used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more of the associated listed items.

[0065] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of this specification to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".

[0066] First, the noun terms related to one or more embodiments of this specification are explained.

[0067] Non-interactive broadcast: A communication method based on broadcast technology, similar to the UDP (User Datagram Protocol) communication method.

[0068] Mesh networking: A mesh network without a central node, where devices in the network can communicate directly with each other.

[0069] APP: APPlication, an application program, mainly referring to software installed on a smart phone.

[0070] PaaS: Platform as a Service, platform as a service.

[0071] In this specification, a method for establishing a relationship is provided. One or more embodiments of this specification simultaneously relate to a method for establishing a network, a method for sending data, a method for receiving data, a device for establishing a relationship, a device for establishing a network, a device for sending data, a device for receiving data, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.

[0072] See Figure 1 , Figure 1 shows a flowchart of a method for establishing a relationship provided according to an embodiment of this specification. Specifically, the method for establishing a relationship includes a client, a server, and a target device, and specifically includes the following steps:

[0073] Step 102: The client determines the target device based on the image identifier and sends the device information and verification information of the target device to the server.

[0074] Among them, the client can be understood as a terminal APP; the server can be understood as a PaaS service; the target device can be specifically set according to different actual application scenarios. For example, if the actual application scenario is a smart car scenario, then the target device can be a vehicle, a vehicle seat, a windshield wiper, etc. If the actual application scenario is a smart two-wheeled electric vehicle, then the target device can be a vehicle, a helmet, a car stereo, etc.

[0075] For ease of understanding, the following embodiments will be described in detail by taking the target device applied in the smart two-wheeled electric vehicle scenario as an example.

[0076] Specifically, the image identifier includes but is not limited to a QR code, a barcode, or other graphic identifiers, etc. In actual applications, an image identifier can be associated with one target device or multiple target devices, and can be specifically set according to actual application requirements, without any limitation here. The embodiments of this specification will be described in detail by taking one image identifier corresponding to one target device as an example.

[0077] Taking the image identifier as a QR code as an example, the client determines the target device based on the image identifier, which can be understood as the terminal APP scanning the QR code to determine the target device associated with the QR code, such as a helmet.

[0078] Specifically, when the client determines the target device based on the image identifier, it can obtain the device information and verification information of the target device based on the image identifier; then the client sends the device information and verification information of the target device obtained through the image identifier to the server.

[0079] Among them, the device information of the target device can be understood as the device ID of the target device, that is, the device identifier that can uniquely identify the target device; the verification information of the target device can be understood as the based-on legality verification information, that is, after the server receives the device information and verification information of the target device sent by the client, it can determine the legality of the device information and verification information of the target device sent by the client based on the verification information.

[0080] In practical applications, each target device corresponds to a device triple information [a, b, c]. Among them, the device information of the target device can be the target device ID formed by [a, b] in the device triple information, and the verification information of the target device can be the encrypted verification information cc formed by encrypting [c] in the device triple information.

[0081] Step 104: The server generates first verification data based on the device information and verification information of the target device, and sends the first verification data to the target device through the client based on the device information.

[0082] Specifically, after the client sends the device information and verification information of the target device to the server, the server receives the device information and verification information of the target device sent by the client, and then performs a legality verification on the device information and verification information of the target device. The specific implementation method is as follows:

[0083] The server generates first verification data based on the device information and verification information of the target device, including:

[0084] The server verifies the correspondence between the device information of the target device and the verification information based on the attribute information of the target device pre-stored;

[0085] In the case of successful verification, generate first sub-verification data and first sub-signature data based on the attribute information of the target device, where the first sub-verification data and the first sub-signature data constitute the first verification data.

[0086] Among them, the attribute information of the target device can be understood as the device triple information [a, b, c] of the above-mentioned target device. In practical applications, the server will pre-store the device triple information of the target device. Therefore, after the server receives the device information and verification information of the target device sent by the client, it can decrypt the verification information cc based on the pre-stored device triple information [c]. If the device triple information [c] is obtained after decryption, it can be determined that there is a corresponding relationship between the device triple information [c] and the device triple information [a, b]. At this time, it can be determined that the verification is passed, indicating that the device information and verification information of the target device sent by the client are legal; if the device triple information [d] is obtained after decryption, it can be determined that there is no corresponding relationship between the device triple information [d] and the device triple information [a, b]. At this time, it can be determined that the verification fails, indicating that the device information and verification information of the target device sent by the client are illegal, and then the server will not perform subsequent processing; in addition, the above verification method is not the only one. In practical applications, [c] can also be obtained by querying from the pre-stored device triple information of the target device based on the device triple information [a, b], and then cc is calculated from the device triple information [a, b, c]. Finally, the calculated cc is compared with the verification information cc for verification. The specific verification method can be set according to the actual situation, and this embodiment of the specification does not make any limitations on this.

[0087] In practical applications, the first verification data includes first sub-verification data and first sub-signature data. Among them, the first sub-verification data is random data generated by the server, and the first sub-signature data is signature data encrypted by the server based on the device triple information of the target device; and the first sub-verification data and the first sub-signature data are sent to the client and then sent to the target device by the client.

[0088] Specifically, when the server sends the first verification data to the target device, it will carry the device information of the target device to accurately send the first verification data to the corresponding target device.

[0089] In the embodiment of the present application, the server will verify the correspondence between the device information and verification information of the target device sent by the client based on the pre-stored attribute information of the target device to ensure the legality of the device information and verification information of the target device sent by the received client, thereby ensuring the security of the target device.

[0090] Step 106: The target device generates second verification data based on the first verification data, and sends the second verification data to the server through the client based on the first verification data, and generates an encryption key based on the second verification data.

[0091] Specifically, after the client sends the first sub-verification data and the first sub-signature data generated by the server to the target device, the target device will verify the legality of the first sub-verification data and the first sub-signature data sent by the client generated by the server to ensure the security of the first sub-verification data and the first sub-signature data generated by the server. The specific implementation method is as follows:

[0092] The target device generates second verification data based on the first verification data, including:

[0093] The target device receives the first sub-verification data and the first sub-signature data sent by the server through the client, and verifies the first sub-verification data based on the attribute information of the target device stored in advance and the first sub-signature data;

[0094] In the case of successful verification, generate second sub-verification data and second sub-signature data based on the attribute information of the target device, where the second sub-verification data and the second sub-signature data constitute the second verification data.

[0095] In practical applications, the target device will pre-store the device triple information of the target device, and can verify the legality of the first verification data sent by the server based on the verification method of the above embodiment through the pre-stored device triple information of the target device, which will not be elaborated here.

[0096] When the target device determines that the first verification data sent by the server passes the verification, generate second sub-verification data and second sub-signature data based on the attribute information of the target device, where the second sub-verification data is random data generated by the target device, and the second sub-signature data is signature data encrypted by the target device based on the device triple information of the target device.

[0097] After generating the second sub-verification data and the second sub-signature data, send the second sub-verification data and the second sub-signature data to the client, and the client sends them to the server.

[0098] Specifically, when implementing, generating the encryption key based on the second verification data includes:

[0099] The target device generates an encryption key based on the second sub-verification data and the second sub-signature data.

[0100] Among them, the first verification data includes first sub-verification data and first sub-signature data, and the second verification data includes second sub-verification data and second sub-signature data. The first sub-verification data is random data generated by the server, the first sub-signature data is signature data encrypted by the server based on the device triple information of the target device, the second sub-verification data is random data generated by the target device, and the second sub-signature data is signature data encrypted by the target device based on the device triple information of the target device.

[0101] After the target device determines the random number and signature data generated by itself and the random number and signature data generated by the associated server, it can generate the encryption key of the target device based on a preset algorithm.

[0102] For example, if the random number generated by the server is Random1, the random number generated by the target device is Random2, and the second sub-signature data is DeviceSecret, the encryption key key of the target device can be generated based on the preset algorithm as key = SHA***(Random1|Random2|DeviceSecret); among them, the preset algorithm can be set according to actual needs, and the present application does not make any limitations in this regard. In practical applications, DeviceSecret can also be understood as [c] in the device triple information of the above target device.

[0103] In the embodiment of the present application, after the target device receives the random data and signature data sent by the server, it generates its own random data and signature data, and then generates the encryption key of the target device according to its own random data and signature data. Subsequently, when data is transmitted, the communication data transmitted can be encrypted based on this encryption key to ensure data security.

[0104] Specifically, the target device generating an encryption key based on the second sub-verification data and the second sub-signature data includes:

[0105] The target device generates and stores a first encryption key and a second encryption key of the target device based on the second sub-verification data and the second sub-signature data, where the encryption key includes the first encryption key and the second encryption key.

[0106] Continuing with the above example, the first 16 bytes in key = SHA***(Random1|Random2|DeviceSecret) can be used as key1 (i.e., the first encryption key), and the last 16 bytes can be used as key2 (i.e., the second encryption key). Specifically, key1 is used for encryption and decryption of communication data.

[0107] In the embodiments of this specification, the target device may generate a first encryption key and a second encryption key of the target device based on its own random data and signature data. In actual communication, only the first encryption key may be used to encrypt data to ensure data security. At the same time, the decryption efficiency of the data recipient will be reduced, improving the user experience.

[0108] Step 108: The server generates the encryption key based on the second verification data and sends the encryption key to the client to establish an association relationship among the client, the server, and the target device.

[0109] Specifically, after the target device generates the second verification data, it will send the first sub-verification data, the second sub-verification data, and the second sub-signature data sent by the server received through the client to the server. Among them, the purpose of sending the first sub-verification data to the server is to determine the server corresponding to the target device through the first sub-verification data, avoiding data leakage and loss when the second verification data of the target device is sent to a server that does not correspond to it.

[0110] After the server receives the first sub-verification data, the second sub-verification data, and the second sub-signature data of the target device sent by the client, it will verify the legality of the second sub-verification data again based on the pre-stored device triple information of the target device and the second sub-signature data. If the verification passes, the encryption key of the target device is generated through the second verification data. At this time, the encryption key generated by the target device based on the second verification data is the same as the encryption key generated by the server based on the second verification data.

[0111] In specific implementation, the server generates the encryption key based on the second verification data and sends the encryption key to the client, including:

[0112] The server receives the second sub-verification data and the second sub-signature data sent by the target device through the client;

[0113] Generate and store the first encryption key and the second encryption key of the target device based on the second sub-verification data and the second sub-signature data, where the encryption key includes the first encryption key and the second encryption key,

[0114] Send the first encryption key to the client.

[0115] In practical applications, the server receives the second sub-verification data and the second sub-signature data sent by the client based on the first sub-verification data of the target device, and then generates and stores the first encryption key and the second encryption key of the target device based on the second sub-verification data and the second sub-signature data. At this time, it can be ensured that the first encryption key and the second encryption key of the target device generated by the server are the same as the first encryption key and the second encryption key of the target device generated by the target device.

[0116] Then the server will send the first encryption key of the target device generated by itself to the client to establish an association relationship among the server, the client, and the target device. Finally, the client will send the message of successful relationship binding to the target device in the form of encryption with the first encryption key, so as to record the association relationship between the first encryption key and the target device on the client side, and enable the client to determine that when interacting with the target device, the data needs to be transmitted using the first encryption key.

[0117] In the embodiments of this specification, both the server and the target device generate the same encryption key of the target device based on the second verification data, so as to realize the safe storage of the encryption key of the target device on the server and the target device respectively without transmission. Then the server will transmit the key that needs to be used for data communication encryption in the encryption key to the target device through the client. In this way, a connection-based communication channel between the client and the target device is established, so that the client can subsequently send data keys to each target device safely based on the encryption key, thereby establishing a connectionless communication relationship between each target device.

[0118] See Figure 2 , Figure 2 shows a flowchart of the processing procedure of a connection relationship establishment method provided by an embodiment of this specification. The method includes an APP (client), a PaaS (server), and a sub-device (DEV, that is, the target device); specifically, it includes the following steps.

[0119] Step 202: The APP receives a QR code scanning request initiated by the user.

[0120] Step 204: The APP scans the QR code based on the QR code scanning request, and obtains the sub-device corresponding to the QR code, the device information of the sub-device, and the QR code verification information.

[0121] Step 206: The APP sends the device information of the sub-device and the QR code verification information to the PaaS.

[0122] Step 208: The PaaS verifies the legitimacy of the device information and the QR code verification information of the sub-device sent by the APP based on the pre-stored device triple information of the sub-device. If it is legal, it generates device authentication information R1 and the R1 signature.

[0123] Among them, the device authentication information R1 can be understood as the first sub-verification data in the above embodiment, and the R1 signature can be understood as the first sub-signature data in the above embodiment.

[0124] Step 210: The PaaS sends the device authentication information R1 and the R1 signature to the APP.

[0125] Step 212: The APP establishes a Bluetooth connection with the sub-device.

[0126] Step 214: The APP forwards the device authentication information R1 and the R1 signature to the sub-device.

[0127] Step 216: The sub-device verifies the legitimacy of the device authentication information R1 based on its own device triple information and the R1 signature. If it is legal, it generates device authentication information R2 and the R2 signature.

[0128] Among them, the device authentication information R2 can be understood as the second sub-verification data in the above embodiment, and the R2 signature can be understood as the second sub-signature data in the above embodiment.

[0129] Specifically, the specific generation methods of the device authentication information R1 and the R1 signature, and the device authentication information R2 and the R2 signature can refer to the detailed introduction in the above embodiment, which will not be elaborated here.

[0130] Step 218: The sub-device sends the device authentication information R2 and the R2 signature to the APP.

[0131] Step 220: The APP forwards the device authentication information R2 and the R2 signature to the corresponding PaaS based on the device authentication information R1.

[0132] Step 222: The sub-device generates the encryption keys of the first encryption key and the second encryption key based on the device authentication information R2 and the R2 signature.

[0133] Step 224: The PaaS verifies the legitimacy of the device authentication information R2 based on the pre-stored device triple information and the R2 signature. If it is legal, it generates the encryption keys including the first encryption key and the second encryption key based on the device authentication information R2 and the R2 signature.

[0134] Among them, there is no necessary sequential relationship between Step 222 and Step 224, and they can be executed serially or in parallel.

[0135] Step 226: The PaaS sends the first encryption key in the encryption key to the APP to establish the binding relationship among the PaaS, the client, and the sub-device.

[0136] Step 228: The APP encrypts the binding relationship with the first encryption key and sends it to the sub-device.

[0137] Step 230: The sub-device stores the encryption keys of the generated first encryption key and the second encryption key.

[0138] In the embodiments of this specification, the PaaS and the sub-device communicate through the client to enable the PaaS and the sub-device to establish the same encryption key respectively, without the need to transmit and share the encryption key to the other end after establishing the encryption key at one end, avoiding the leakage of the encryption key during the transmission process and causing security risks. And the server transmits the first encryption key to the APP, and the APP transmits the message of successful binding to the sub-device through the first encryption key to ensure the security of the data.

[0139] See Figure 3 , Figure 3 shows a flowchart of a network establishment method provided by an embodiment of this specification. The method is applied to the client and specifically includes the following steps.

[0140] Step 302: Based on the initial object, determine at least two target devices associated with the initial object, and generate a data key based on the initial object.

[0141] Among them, the client can be understood as the client in the above embodiments, and the initial object can be determined according to actual project requirements. For example, when the project requirement is to establish a network relationship between a smart electric two-wheeler, a helmet, and a car audio, the initial object can be understood as the smart electric two-wheeler; or when the project requirement is to establish a network relationship between multiple smart electric two-wheelers, the initial object can be understood as the same account among multiple smart electric two-wheelers.

[0142] In practical applications, the connection relationship between the client and the target device is established through the above relationship establishment method. At this time, when the initial object is an account, the client will obtain multiple target devices associated with the account, such as multiple smart electric two-wheelers; and generate a data key based on the account.

[0143] Specifically, when the initial object is an account, the data key can be understood as the key corresponding to the account; when the initial object is the core device, the data key can be understood as the key of the core device. For example, to establish a network relationship between a smart electric two-wheeler, a helmet, and a car audio, a smart electric two-wheeler is required, then the smart electric two-wheeler is the core device, and at this time, the password of the smart electric two-wheeler can be the data key.

[0144] Step 304: Determine the encryption key of each of the at least two target devices, and transmit the data key to each target device based on the encryption key of each target device.

[0145] Among them, the encryption key of each target device is obtained through the above relationship establishment method, that is, the encryption key of each target device is the same as the encryption key of each target device obtained in the embodiment of the above relationship establishment method. Specifically, the encryption key in the embodiment of this specification can be understood as the first encryption key of each target device obtained in the embodiment of the above relationship establishment method, that is, the data communication between the client and the target device is all realized based on this first encryption key.

[0146] Specifically, after the client establishes an association relationship with the target device, the first encryption key of each target device is recorded inside the client. In practical applications, the client obtains the first encryption key of each recorded device, and then transmits the data key to the corresponding target device based on the encryption key of each target device.

[0147] In specific implementation, a prerequisite for networking between target devices is a key based on the core device or account, denoted as KeyBase. When networking between target devices, KeyBase can be directly used or a key derived from KeyBase can be used as the networking key KeyNet. Then, through the mobile phone APP, the first encryption key of each target device is used to distribute the networking key KeyNet (data key) to the corresponding target device, so that each target device has the same KeyNet.

[0148] Step 306: Based on the association relationship between the at least two target devices, construct a network between the at least two target devices.

[0149] Specifically, after each target device has the same KeyNet, an association relationship is established between each target device. Then, based on this association relationship, a network can be constructed among all the target devices in the at least two target devices. At this time, a mesh network without a central node is formed among all the target devices, and subsequently, each target device can send broadcast data to other devices in the form of broadcast to achieve communication.

[0150] In the embodiments of this specification, the network establishment method uses non-interactive broadcasting technology to connect each target device associated with the initial object, constructing a network based on the initial object. All target devices within the network can communicate with each other without establishing a connection, improving the flexibility of network formation and communication efficiency. Moreover, subsequent target devices within the network can communicate based on data keys, greatly enhancing the security of communication between target devices.

[0151] In another embodiment of this specification, after constructing the network between the at least two target devices, it further includes:

[0152] Generating a corresponding network address for each target device based on the network and sending the network address to the corresponding target device.

[0153] Specifically, when forming a network, a corresponding network identity will be assigned to each target device. When assigning the network identity, a network address (Unicast Address) used during communication will be distributed to each target device, and this address can replace the original MAC address of the target device. For example, a network address with a smaller number of bytes is used to replace the original network address of the target device. For example, based on the broadcasting rules of Bluetooth 4.2, each broadcast contains 31 bytes. At this time, reducing the network address of the communication target device from 6 bytes to 1 byte can increase the transmission bandwidth by at least twenty percent.

[0154] In the embodiments of this specification, a network address smaller than itself is assigned to each target device based on the network, so that the network transmission efficiency can be improved when communicating based on this network address subsequently.

[0155] Specifically, the target device includes a data receiving target device and a data sending target device;

[0156] Correspondingly, after constructing the network between the at least two target devices, it further includes:

[0157] Receiving a multicast address subscription request sent by the data receiving target device and returning the corresponding multicast address to the data receiving target device based on the subscription request.

[0158] In practical applications, the target devices include data receiving target devices and data sending target devices. Specifically, according to different actual application scenarios, each target device can be a data receiving target device or a data sending target device. For example, if the target devices include Device 1, Device 2, and Device 3, then when Device 1 is a data sending target device, Device 2 and Device 3 can be regarded as data receiving target devices; when Device 2 is a data sending target device, Device 1 and Device 3 can be regarded as data receiving target devices; when Device 3 is a data sending target device, Device 1 and Device 2 can be regarded as data receiving target devices.

[0159] In the embodiments of this specification, if all the at least two target devices are regarded as data receiving target devices, then multicast address subscription requests sent by each data receiving target device can be received, and based on this subscription request, the corresponding multicast address can be returned to the data receiving target device, so that the subscribed multicast address is recorded in the data receiving target device; subsequently, after the data receiving target device receives a broadcast data packet, the message target address in the broadcast data packet can be parsed, and it can be determined whether the message target address is a multicast address based on the subscribed multicast address.

[0160] In another embodiment of this specification, after the network between the at least two target devices is constructed, it further includes:

[0161] Obtain the initial corpus corresponding to each target device from the corpus, extract the target corpus from the initial corpus according to a preset extraction rule, and form multiple corpus packets from the target corpus and distribute them to each target device according to a preset distribution rule.

[0162] Among them, the preset extraction rule and the preset distribution rule can be set according to actual applications. For example, the preset extraction rule can be to extract the non-variable part in the initial anticipation. For example, if the initial corpus is: Today is the *th year, *th month, and *th day of the solar calendar, then the target anticipation extracted from this initial corpus based on this preset extraction rule is "Today is the solar calendar, year, month, and day".

[0163] In practical applications, the initial corpus corresponding to each target device is different. The target corpus can be extracted from the initial corpus corresponding to each target device according to a preset extraction rule, and the target corpus can be formed into multiple corpus packets and distributed to the corresponding target device according to a preset distribution rule.

[0164] Specifically, the preset distribution rule is a distribution rule set according to actual needs. For example, the preset distribution rule is to distribute two corpora to the target device in sequence.

[0165] For example, if the corpus is: Today is * year * month * day in the Gregorian calendar. Wish you a happy birthday. Then the extracted corpus packages are "Today is in the Gregorian calendar, year, month, day" and "Wish you a happy birthday". These two corpus packages can be sent to the corresponding target devices according to the rule of sending the package with "Today is in the Gregorian calendar, year, month, day" first and "Wish you a happy birthday" second.

[0166] In specific implementation, when the corpus is sent to the target device, according to the content to be sent, the common corpus is extracted and split into multiple voice packages for sending to the target device. And the repeated corpus can use the same voice package to save the space of the voice package.

[0167] In practical applications, when the subsequent target device plays voice, the voice playback can be freely combined. Different voice packages can be freely combined into coherent sentences, and the voice timbre and language can also be customized. The platform provides a rich selection of timbres and languages (dialects); when voice playback is required, the target device selects the sent corpus combinations to form the corresponding voice for playing device linkage. For example, when playing voice, it can link the devices around the vehicle.

[0168] In the embodiments of this specification, a corresponding voice package can be set for each target device. When each subsequent target device is triggered, the target device can generate corresponding voice information based on the corresponding voice package for playback to improve the user experience.

[0169] See Figure 4 , Figure 4 shows a flowchart of a data sending method provided by an embodiment of this specification. The method is applied to a data sending target device and specifically includes the following steps.

[0170] Step 402: Generate an initial data packet based on a preset data format and the network address of the data receiving target device.

[0171] Among them, the data sending target device can be understood as the data sending target device in the above-mentioned network establishment method embodiments.

[0172] In practical applications, when the data sending target device wants to send broadcast data to the data receiving target device, it first determines which format of broadcast packet to use to send the broadcast data.

[0173] Among them, the preset data format can be set according to actual applications. For example, the preset data format is the Payload format. The network address of the data receiving target device can be a multicast address or a unicast address.

[0174] Among them, the Payload format is shown in Table 1:

[0175] Table 1

[0176]

[0177] Among them, the network address of the data receiving target device can be understood as the message target address, which is used to represent the receiver (data receiving target device) of the message (broadcast data packet), and the message target address is divided into a unicast address and a multicast address.

[0178] The unicast address indicates that the message is sent to a specific device within the network; the multicast address indicates that the message is sent to a group of devices within the network; the message receiver (data receiving target device) can freely subscribe to the multicast address.

[0179] When the network address (unicast address) of the message receiver is equal to the message target address (unicast); or when the message target address (multicast) is included in the multicast addresses subscribed by the message receiver, the message receiver will respond and process the message.

[0180] Step 404: Set a corresponding message sequence number for the initial data packet in an incremental manner.

[0181] Specifically, when generating the initial data packet, based on a preset data format, an incremental method is used to set the corresponding message sequence number for the initial data packet. For example, if the message sequence number of the previous initial data packet is 1, then the message sequence number of the current initial data packet is 2.

[0182] In practical applications, first, the opcode, parameter, and the address of the receiver are specified. Among them, the address of the receiver is the network address of the data receiving target device, which can be a multicast address or a unicast address. Then, the payload is packetized (initial data packet) according to the payload format, and a message sequence number is set for each initial data packet according to seq.

[0183] Specifically, the message sequence number is used to represent different messages to ensure the uniqueness of each message; this field is incremented each time a new message is sent, and this field is included in the unencrypted information (initial data packet) and is encrypted together with the message content later to ensure that even if the sent message content is the same, the encrypted data is different, which can effectively prevent replay attacks. Subsequently, the data receiving target device needs to record the message sequence numbers corresponding to the messages (broadcast data packets) sent by different data sending target devices. When receiving a message sent from the same device address, first compare the message sequence numbers, and it is required that the message sequence number of this message must be greater than the previously stored message sequence number before responding and processing the message.

[0184] Step 406: Encrypt the initial data packet according to a preset encryption algorithm and the data key of the data sending target device, and generate a message check code.

[0185] Among them, the preset encryption algorithm can be set according to actual requirements. For example, the preset encryption algorithm can be the AES-CCM algorithm.

[0186] Specifically, after generating the initial data packet carrying the message sequence number, encrypt the initial data packet according to the preset encryption algorithm and the data key of the data sending target device to generate a message verification code.

[0187] In practical applications, the message verification code combined with the data key KeyNet is used to determine whether the message is a message of this network; specifically, the AES CCM encryption algorithm can be used to obtain the message verification code, and the algorithm parameters are shown in Table 2:

[0188] Table 2

[0189]

[0190] Among them, KEY1 can be understood as the first encryption key in the above embodiment.

[0191] Step 408: Generate a broadcast data packet based on the initial data packet and the message verification code, generate a corresponding network identifier for the broadcast data packet based on the data key, and send the broadcast data packet carrying the network identifier to the network according to the preset sending time sequence.

[0192] Among them, the network is obtained through the network establishment method in the above embodiment.

[0193] Specifically, generate a broadcast data packet based on the encrypted initial data packet and the message verification code, and generate a corresponding network identifier (network KID) for the broadcast data packet based on the data key.

[0194] In practical applications, the use of the network KID is as follows: after a data receiving device in the network receives a broadcast message, it can quickly determine whether the message is a message of this network, which can greatly reduce the number of messages that need to be decoded, thereby saving computing resources and power consumption.

[0195] Specifically, the generation of the network KID uses bitwise operation Hash, for example, it is generated by bytewise exclusive OR operation according to a 16-byte data key.

[0196] In practical applications, when using non-interactive broadcasting for communication, since it is easy to be affected by environmental interference, resulting in incorrect or lost broadcast data, the broadcast time sequence is optimized. The same message can be sent multiple times within a certain time interval to ensure that the message receiving party can correctly receive the message. Among them, the broadcast time sequence can be set according to actual requirements and is not limited here.

[0197] Specifically, when the broadcast packet is a BLE broadcast packet, the data format of the broadcast packet is shown in Table 3:

[0198] Table 3

[0199]

[0200] Among them, the KID in Table 3 is the network identifier, and the MIC is the message check code.

[0201] In the embodiments of this specification, the data sending target device can send the broadcast data packet generated based on the data key to the network, so that all data receiving target devices in the same network as the data sending target device can receive the broadcast data packet, and subsequent responses can be made based on the parsing of the broadcast data packet to improve the user experience.

[0202] See Figure 5 , Figure 5 shows a flowchart of a data receiving method provided by an embodiment of this specification, which is applied to a data receiving target device and specifically includes the following steps.

[0203] Step 502: Receive the network broadcast data packet. When the network identifier verification of the broadcast data packet is passed based on the data key of the data receiving target device, decrypt the message check code of the broadcast data packet based on a preset decryption algorithm and the data key.

[0204] Among them, after receiving the network broadcast data packet, the data receiving target device turns on Bluetooth and scans the broadcast data packets in the network in real time.

[0205] When the broadcast data packet is a BLE broadcast data packet, the BLE scan parameters are shown in Table 4:

[0206] Table 4

[0207]

[0208] Specifically, when implementing, the data receiving target device scans and receives the broadcast data packets in the network. When receiving the broadcast data packets in the network, first parse the network identifier KID in the broadcast data packet based on the data key of the data receiving target device. If the parsed network identifier KID is the same as the KID carried in the broadcast data packet, it means that the broadcast data packet belongs to the broadcast message of the network where the data receiving target device is located.

[0209] Then decrypt the message check code of the broadcast data packet based on a preset decryption algorithm and the data key, where the preset decryption algorithm corresponds to the preset encryption algorithm in the above embodiments.

[0210] Step 504: When it is determined that the message check code passes the verification, obtain the network address in the broadcast data packet.

[0211] Specifically, a decryption algorithm and the data key of the data receiving target device can be preset to parse the message check code in the broadcast data packet. If the parsed message check code is the same as the message check code carried in the broadcast data packet, it indicates that the message check code passes the verification, and the broadcast data packet belongs to the broadcast message of the network where the data receiving target device is located.

[0212] When the message check code passes the verification, obtain the network address in the broadcast data packet. This network address can be understood as the message target address in the above embodiment.

[0213] In actual use, if the network address is a unicast address, the data receiving target device matches its own network address with the unicast address. If the match is successful, it makes a response; if the match fails, it does not process the broadcast data packet. If the network address is a multicast address, the data receiving target device matches the subscribed multicast address with the multicast address. If the match is successful, it makes a response; if the match fails, it does not process the broadcast data packet.

[0214] Step 506: When the network address matches the pre-stored network address, parse and respond to the broadcast data packet.

[0215] Among them, the network is obtained through the network establishment method in the above embodiment.

[0216] Specifically, based on the matching relationship between the network address and the pre-stored network address, it can be determined whether to parse and respond to the broadcast data packet.

[0217] In specific implementation, in order to avoid the loss of broadcast data packets, the data sending target device will send a broadcast data packet multiple times. Then, in order to avoid the data receiving target device from parsing and responding to the same broadcast data packet multiple times, resulting in resource occupation, after the network address matching, the message sequence number of the broadcast data packet will also be verified. The specific implementation method is as follows:

[0218] Responding to the broadcast data packet includes:

[0219] Determine the data sending target device of the broadcast data packet and the message sequence number of the broadcast data packet;

[0220] Judge whether the message sequence number is greater than the message sequence number of the previous broadcast data packet received from the data sending target device,

[0221] If so, respond to the broadcast data packet.

[0222] In practical applications, there is only one message sequence number for the broadcast data packet sent to the same data sending target device during transmission, and the message sequence numbers of all broadcast data packets sent by the same data sending target device are incremented. Therefore, if the message sequence number of the broadcast data packet received this time from the same data sending target device is the same as the message sequence number of the broadcast data packet sent by this data sending target device received previously, it can be considered that this broadcast data packet is a duplicate reception, and no response processing will be performed on it.

[0223] When specifically implemented, the response to the broadcast data packet includes:

[0224] Determine at least one corpus packet corresponding to the data receiving target device, generate voice data based on a preset generation rule for the at least one corpus packet, and play the voice data.

[0225] In the embodiments of this specification, there can be multiple ways for the data receiving target device to respond to the broadcast data packet. Taking voice as an example, after the data receiving target device determines that the broadcast data packet is a broadcast data packet sent to itself, it can generate and play the corresponding voice data based on the pre-stored corpus packet to implement the response to the broadcast data packet.

[0226] Among them, the corpus packet of the data receiving target device can be understood as the corpus packet generated in the network establishment method in the above embodiments.

[0227] Taking the networking of intelligent two-wheeled electric vehicles as an example, after a vehicle forms a mesh network with other devices of the vehicle, any device in this network can perform an operation to send a specific broadcast data packet to other devices. After receiving the broadcast data packet, other devices can respond to the broadcast data packet according to the content of the broadcast data packet. For example, on the user's birthday, when the user starts the vehicle, a birthday blessing is played; at the same time, devices such as the vehicle lights / helmet are linked to flash, creating a surprise for the user; when the vehicle battery power is low and the user turns off the vehicle, the vehicle horn plays a low-battery voice prompt; at the same time, the vehicle lights give a special light effect prompt; the helmet plays a low-battery voice prompt; on the day of a specific schedule set by the user, when the user starts / turns off the vehicle, a corresponding voice prompt is played; when the user starts / turns off the vehicle, a voice prompt is played according to the weather to prompt the user to take corresponding countermeasures (bring an umbrella / sun protection); when the user operates the turn signal, the helmet turn signal is linked; when accidentally falling during riding, the vehicle automatically gives a light warning; the helmet is linked to give a light warning; the helmet is linked to call the emergency contact number; the remote control handle is used to control the locking and unlocking state of the vehicle.

[0228] In practical applications, it is not excluded that mesh networking can be achieved through different types of smart terminals. For example, a mesh network can be formed by a smartphone and multiple smart vehicles, or a mesh network can be formed by a smartphone, smart vehicles, and other devices of the smart vehicles. At this time, in the mesh network, the smartphone can be regarded as the device for sending or receiving broadcast data packets.

[0229] Taking the example of a mesh network formed by a smartphone and multiple smart vehicles, when the smartphone in the network sends a broadcast data packet, the smart vehicles in the network can make unlocking responses or honking responses based on the content of the broadcast data packet. Or when a certain smart vehicle in the network sends a broadcast data packet, the corresponding other smart vehicles in the network can make unlocking responses or honking responses based on the content of the broadcast data packet, and the corresponding smartphone in the network can make responses such as unlocking the phone or playing music based on the content of the broadcast data packet.

[0230] In the embodiments of this specification, the data receiving target device can obtain the corresponding broadcast data packet through a series of determinations of the network KID, message check code, message target address, and message sequence number, so as to make corresponding responses to the broadcast data packet, enhance the interest of network interconnection, and can ensure the security of the received broadcast data packet based on the above series of determinations, improving the user experience.

[0231] Based on the above embodiments, the target device only needs to have a simple broadcast function without a connection function; it can effectively reduce the demand of the target device for hardware resources and significantly reduce the chip cost.

[0232] See Figure 6 , Figure 6 which shows the processing flow chart of a data receiving method provided by an embodiment of this specification, specifically including the following steps.

[0233] Step 602: Receive the broadcast data packet of the network.

[0234] Step 604: Determine whether the KID in the broadcast data packet is legal. If so, execute step 606; if not, execute step 612.

[0235] Step 606: Decode the message and determine whether the message check code in the broadcast data packet is legal. If so, execute step 608; if not, execute step 612.

[0236] Step 608: Determine whether the message target address in the broadcast data packet is legal. If so, execute step 610; if not, execute step 612.

[0237] Step 610: Parse and respond to the broadcast data packet.

[0238] Step 612: Discard the broadcast data packet.

[0239] Specifically, the verification processes of the KID, message check code, and message target address can be referred to the detailed introduction in the above embodiments, and will not be elaborated here.

[0240] In the embodiments of this specification, the target device receiving the broadcast data can obtain the corresponding broadcast data packet through a series of determinations of the KID, message check code, message target address, and message sequence number, so as to respond to the broadcast data packet accordingly, enhancing the interest of network interconnection, and can ensure the security of the received broadcast data packet based on the above series of verifications, improving the user experience.

[0241] Corresponding to the above method embodiments, this specification also provides embodiments of a relationship establishment system. Figure 7 It shows a schematic structural diagram of a relationship establishment system provided by an embodiment of this specification. As Figure 7 shown, the system includes:

[0242] A client 702, a server 704, and a target device 706, where

[0243] The client 702 is configured to determine the target device based on the image identifier, and send the device information and verification information of the target device to the server 704;

[0244] The server 704 is configured to generate first verification data when determining that the device information of the target device corresponds to the verification information, and send the first verification data to the target device 706 through the client 702;

[0245] The target device 706 is configured to generate second verification data when determining that the first verification data passes the verification, and send the first verification data and the second verification data to the server 704 through the client 702;

[0246] The server 704 is further configured to generate an encryption key for the target device 706 based on the first verification data and the second verification data, and send the encryption key to the client 702.

[0247] Optionally, the server is further configured to verify the correspondence between the device information of the target device and the verification information based on the attribute information of the target device stored in advance;

[0248] In the case of successful verification, generate first sub-verification data and first sub-signature data based on the attribute information of the target device, where the first sub-verification data and the first sub-signature data constitute the first verification data.

[0249] Optionally, the target device is further configured to receive the first sub-verification data and the first sub-signature data sent by the server through the client, and verify the first sub-verification data based on the pre-stored attribute information of the target device and the first sub-signature data;

[0250] In the case of successful verification, generate second sub-verification data and second sub-signature data based on the attribute information of the target device, where the second sub-verification data and the second sub-signature data constitute the second verification data.

[0251] Optionally, the target device is further configured to generate an encryption key based on the second sub-verification data and the second sub-signature data.

[0252] Optionally, the target device is further configured to generate and store a first encryption key and a second encryption key of the target device based on the second sub-verification data and the second sub-signature data, where the encryption key includes the first encryption key and the second encryption key.

[0253] Optionally, the server is further configured to receive the second sub-verification data and the second sub-signature data sent by the target device through the client;

[0254] Generate and store a first encryption key and a second encryption key of the target device based on the second sub-verification data and the second sub-signature data, where the encryption key includes the first encryption key and the second encryption key,

[0255] Send the first encryption key to the client.

[0256] The above is a schematic solution of a relationship establishment system in this embodiment. It should be noted that the technical solution of this relationship establishment system and the technical solution of the above relationship establishment method belong to the same concept. For the details not described in the technical solution of the relationship establishment system, reference can be made to the description of the technical solution of the above relationship establishment method.

[0257] Corresponding to the above method embodiment, this specification also provides an embodiment of a network establishment device, Figure 8 showing a schematic structural diagram of a network establishment device provided by an embodiment of this specification. As Figure 8 shown, the device includes:

[0258] A data key generation module 802, configured to determine at least two target devices associated with the initial object based on the initial object, and generate a data key based on the initial object;

[0259] A transmission module 804, configured to determine an encryption key for each of the at least two target devices, and transmit the data key to each target device based on the encryption key of each target device;

[0260] A network establishment module 806, configured to construct a network between the at least two target devices based on the association relationship between the at least two target devices,

[0261] wherein, the encryption key of each target device is obtained by the above relationship establishment method.

[0262] Optionally, the device further includes:

[0263] An address generation module, configured to generate a corresponding network address for each target device based on the network, and send the network address to the corresponding target device.

[0264] Optionally, the target device includes a data receiving target device and a data sending target device;

[0265] Correspondingly, the device further includes:

[0266] A subscription module, configured to receive a multicast address subscription request sent by the data receiving target device, and return a corresponding multicast address to the data receiving target device based on the subscription request.

[0267] Optionally, the device further includes:

[0268] A corpus distribution module, configured to obtain an initial corpus corresponding to each target device from a corpus library, extract a target corpus from the initial corpus according to a preset extraction rule, and form a plurality of corpus packets with the target corpus and distribute them to each target device according to a preset distribution rule.

[0269] The above is a schematic solution of a network establishment device in this embodiment. It should be noted that the technical solution of this network establishment device and the technical solution of the above network establishment method belong to the same concept. For the details not described in detail in the technical solution of the network establishment device, reference can be made to the description of the technical solution of the above network establishment method.

[0270] Corresponding to the above method embodiment, this specification also provides an embodiment of a data sending device, Figure 9 showing a structural schematic diagram of a data sending device provided by an embodiment of this specification. As Figure 9As shown in the figure, the device includes:

[0271] A data packet generation module 902, configured to generate an initial data packet based on a preset data format and the network address of the data receiving target device;

[0272] A message sequence number generation module 904, configured to set a corresponding message sequence number for the initial data packet in an increasing manner;

[0273] A verification code generation module 906, configured to encrypt the initial data packet according to a preset encryption algorithm and the data key of the data sending target device, and generate a message verification code;

[0274] A broadcast data packet generation module 908, configured to generate a broadcast data packet based on the initial data packet and the message verification code, generate a corresponding network identifier for the broadcast data packet based on the data key, and send the broadcast data packet carrying the network identifier to the network according to a preset sending time sequence,

[0275] wherein, the network is obtained by the above network establishment method.

[0276] The above is a schematic solution of a data sending device in this embodiment. It should be noted that the technical solution of this data sending device and the technical solution of the above data sending method belong to the same concept. For the details not described in the technical solution of the data sending device, reference can be made to the description of the technical solution of the above data sending method.

[0277] Corresponding to the above method embodiment, this specification also provides an embodiment of a data receiving device. Figure 10 The structure diagram of a data receiving device provided by an embodiment of this specification is shown. As Figure 10 shown in the figure, the device includes:

[0278] A broadcast data packet receiving module 1002, configured to receive a network broadcast data packet, and decrypt and obtain the message verification code of the broadcast data packet based on a preset decryption algorithm and the data key when the verification of the network identifier of the broadcast data packet is passed based on the data key of the data receiving target device;

[0279] A network address acquisition module 1004, configured to acquire the network address in the broadcast data packet when the message verification code is passed;

[0280] A response module 1006, configured to parse and respond to the broadcast data packet when the network address matches the pre-stored network address.

[0281] wherein, the network is obtained by the above network establishment method.

[0282] Optionally, the response module 1006 is further configured to:

[0283] Determine the data sending target device of the broadcast data packet and the message sequence number of the broadcast data packet;

[0284] Judge whether the message sequence number is greater than the message sequence number of the previous broadcast data packet received by the data sending target device,

[0285] If so, respond to the broadcast data packet.

[0286] Optionally, the response module 1006 is further configured to:

[0287] Determine at least one corpus packet corresponding to the data receiving target device, generate voice data based on a preset generation rule from the at least one corpus packet, and play the voice data.

[0288] The above is a schematic solution of a data receiving device according to this embodiment. It should be noted that the technical solution of this data receiving device and the technical solution of the above data receiving method belong to the same concept. For the details not described in the technical solution of the data receiving device, reference can be made to the description of the technical solution of the above data receiving method.

[0289] Figure 11 FIG. shows a structural block diagram of a computing device 1100 according to an embodiment of this specification. The components of the computing device 1100 include but are not limited to a memory 1110 and a processor 1120. The processor 1120 is connected to the memory 1110 through a bus 1130, and a database 1150 is used to store data.

[0290] The computing device 1100 further includes an access device 1140, and the access device 1140 enables the computing device 1100 to communicate via one or more networks 1060. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 1140 may include one or more of any type of wired or wireless network interfaces (for example, a network interface card (NIC)), such as an IEEE802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0291] In an embodiment of this specification, the above components of the computing device 1100 and Figure 11Other components not shown may also be connected to each other, for example, via a bus. It should be understood that Figure 11 The block diagram of the computing device shown is for illustrative purposes only and is not a limitation on the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0292] The computing device 1100 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.) or other types of mobile devices, or a stationary computing device such as a desktop computer or a PC. The computing device 1100 can also be a mobile or stationary server.

[0293] Wherein, the processor 1120 is used to execute the following computer-executable instructions, and when the computer-executable instructions are executed by the processor, the steps of the above-mentioned relationship establishment method, network establishment method, data sending method or data receiving method are implemented.

[0294] The above is a schematic solution of a computing device in this embodiment. It should be noted that the technical solution of this computing device and the technical solutions of the above-mentioned relationship establishment method, network establishment method, data sending method or data receiving method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the descriptions of the technical solutions of the above-mentioned relationship establishment method, network establishment method, data sending method or data receiving method.

[0295] An embodiment of this specification also provides a computer-readable storage medium, which stores computer instructions, and when the computer-executable instructions are executed by a processor, the steps of the above-mentioned relationship establishment method, network establishment method, data sending method or data receiving method are implemented.

[0296] The above is a schematic solution of a computer-readable storage medium in this embodiment. It should be noted that the technical solution of this storage medium and the technical solutions of the above-mentioned relationship establishment method, network establishment method, data sending method or data receiving method belong to the same concept. For the details not described in detail in the technical solution of the storage medium, reference can be made to the descriptions of the technical solutions of the above-mentioned relationship establishment method, network establishment method, data sending method or data receiving method.

[0297] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0298] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, removable hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0299] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the embodiments of this specification are not limited by the described order of actions, because according to the embodiments of this specification, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments of this specification.

[0300] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0301] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The alternative embodiments do not exhaust all the details and do not limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can understand and utilize this specification well. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A data sending method, applied to a data sending target device, comprising: generating an initial data packet based on a preset data format and the network address of a data receiving target device; setting a corresponding message sequence number for the initial data packet in an incremental manner; encrypting the initial data packet according to a preset encryption algorithm and the data key of the data sending target device, and generating a message check code; generating a broadcast data packet based on the initial data packet and the message check code, generating a corresponding network identifier for the broadcast data packet based on the data key, and sending the broadcast data packet carrying the network identifier to the network according to a preset sending time sequence.

2. A data receiving method, applied to a data receiving target device, comprising: receiving a network broadcast data packet, and decrypting to obtain the message check code of the broadcast data packet based on a preset decryption algorithm and the data key when the verification of the network identifier of the broadcast data packet is passed based on the data key of the data receiving target device; acquiring the network address in the broadcast data packet when it is determined that the message check code verification is passed; parsing and responding to the broadcast data packet when the network address matches the pre-stored network address.

3. The data receiving method according to claim 2, wherein the responding to the broadcast data packet comprises: determining the data sending target device of the broadcast data packet and the message sequence number of the broadcast data packet; judging whether the message sequence number is greater than the message sequence number of the previous broadcast data packet of the data sending target device received; if so, responding to the broadcast data packet.

4. The data receiving method according to claim 3, wherein the responding to the broadcast data packet comprises: determining at least one corpus packet corresponding to the data receiving target device, generating voice data from the at least one corpus packet based on a preset generation rule, and playing the voice data.

5. A relationship establishment method, comprising a client, a server, and a target device, wherein the client determines the target device based on an image identifier, and sends the device information and verification information of the target device to the server; the server generates first verification data based on the device information and verification information of the target device, and sends the first verification data to the target device through the client based on the device information; the target device generates second verification data based on the first verification data, sends the second verification data to the server through the client based on the first verification data, and generates an encryption key based on the second verification data; the server generates the encryption key based on the second verification data, and sends the encryption key to the client to establish an association relationship among the client, the server, and the target device, wherein the target device comprises a data sending target device and a data receiving target device, and the data sending target device is used to execute the data sending method of claim 1, and the data receiving target device is used to execute the data receiving methods of claims 2-4.

6. The relationship establishment method according to claim 5, wherein the server generates first verification data based on the device information and verification information of the target device, including: The server verifies the correspondence between the device information of the target device and the verification information based on the attribute information of the target device pre-stored; When the verification is passed, first sub-verification data and first sub-signature data are generated based on the attribute information of the target device, wherein the first sub-verification data and the first sub-signature data constitute the first verification data.

7. The relationship establishment method according to claim 6, wherein the target device generates second verification data based on the first verification data, including: The target device receives the first sub-verification data and the first sub-signature data sent by the server through the client, and verifies the first sub-verification data based on the attribute information of the target device pre-stored and the first sub-signature data; When the verification is passed, second sub-verification data and second sub-signature data are generated based on the attribute information of the target device, wherein the second sub-verification data and the second sub-signature data constitute the second verification data.

8. The relationship establishment method according to claim 7, wherein generating an encryption key based on the second verification data includes: The target device generates an encryption key based on the second sub-verification data and the second sub-signature data.

9. The relationship establishment method according to claim 8, wherein the target device generates an encryption key based on the second sub-verification data and the second sub-signature data, including: The target device generates and stores a first encryption key and a second encryption key of the target device based on the second sub-verification data and the second sub-signature data, wherein the encryption key includes the first encryption key and the second encryption key.

10. The relationship establishment method according to claim 7, wherein the server generates the encryption key based on the second verification data and sends the encryption key to the client, including: The server receives the second sub-verification data and the second sub-signature data sent by the target device through the client; Generates and stores a first encryption key and a second encryption key of the target device based on the second sub-verification data and the second sub-signature data, wherein the encryption key includes the first encryption key and the second encryption key, Sends the first encryption key to the client.

11. A network establishment method applied to a client, including: Determining at least two target devices associated with the initial object based on the initial object, and generating a data key based on the initial object, wherein at least two of the target devices include a data sending target device and a data receiving target device, the data sending target device is used to execute the data sending method of claim 1, and the data receiving target device is used to execute the data receiving methods of claims 2-4; Determine the encryption key of each of the at least two target devices, and transmit the data key to each target device based on the encryption key of each target device; Based on the association relationship between the at least two target devices, construct a mesh network between the at least two target devices.

12. The network establishment method according to claim 11, after constructing the mesh network between the at least two target devices, further comprising: Generate a corresponding network address for each target device based on the mesh network, and send the network address to the corresponding target device.

13. The network establishment method according to claim 11, wherein the target device includes a data receiving target device and a data sending target device; Correspondingly, after constructing the mesh network between the at least two target devices, further comprising: Receive a multicast address subscription request sent by the data receiving target device, and return a corresponding multicast address to the data receiving target device based on the subscription request.

14. The network establishment method according to claim 11, after constructing the mesh network between the at least two target devices, further comprising: Obtain the initial corpus corresponding to each target device from the corpus, extract the target corpus from the initial corpus according to a preset extraction rule, and form multiple corpus packets from the target corpus and send them to each target device according to a preset distribution rule.

15. A relationship establishment system, including a client, a server, and a target device, wherein, The client is configured to determine the target device based on the image identifier, and send the device information and verification information of the target device to the server; The server is configured to generate first verification data when determining that the device information of the target device corresponds to the verification information, and send the first verification data to the target device through the client; The target device is configured to generate second verification data when determining that the first verification data passes the verification, and send the first verification data and the second verification data to the server through the client; The server is further configured to generate the encryption key of the target device based on the first verification data and the second verification data, and send the encryption key to the client to establish the association relationship between the client, the server, and the target device, wherein the target device includes a data sending target device and a data receiving target device, the data sending target device is used to execute the data sending method of claim 1, and the data receiving target device is used to execute the data receiving methods of claims 2-4.

16. A network establishment device, including: A data key generation module, configured to determine at least two target devices associated with the initial object based on the initial object, and generate a data key based on the initial object, wherein at least two of the target devices include a data sending target device and a data receiving target device, the data sending target device is used to execute the data sending method of claim 1, and the data receiving target device is used to execute the data receiving methods of claims 2-4; A transmission module, configured to determine an encryption key for each target device among the at least two target devices, and transmit the data key to each target device based on the encryption key of each target device; A network establishment module, configured to construct a mesh network between the at least two target devices based on the association relationship between the at least two target devices.

17. A data sending device, comprising: A data packet generation module, configured to generate an initial data packet based on a preset data format and the network address of the data receiving target device; A message sequence number generation module, configured to set a corresponding message sequence number for the initial data packet in an incremental manner; A verification code generation module, configured to encrypt the initial data packet according to a preset encryption algorithm and the data key of the data sending target device, and generate a message verification code; A broadcast data packet generation module, configured to generate a broadcast data packet based on the initial data packet and the message verification code, generate a corresponding network identifier for the broadcast data packet based on the data key, and send the broadcast data packet carrying the network identifier to the network according to a preset sending time sequence.

18. A data receiving device, comprising: A broadcast data packet receiving module, configured to receive a network broadcast data packet, and decrypt and obtain the message verification code of the broadcast data packet based on a preset decryption algorithm and the data key when the network identifier verification of the broadcast data packet is passed based on the data key of the data receiving target device; A network address obtaining module, configured to obtain the network address in the broadcast data packet when it is determined that the message verification code verification is passed; A response module, configured to parse and respond to the broadcast data packet when the network address matches the pre-stored network address.

19. A computing device, comprising: A memory and a processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method according to any one of claims 1-14 are implemented.

20. A computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, the steps of the method according to any one of claims 1-14 are implemented.

Citation Information

Patent Citations

  • Corpus product recommendation method, device and equipment and storage medium

    CN110297880A

  • Equipment connection method and system and corresponding Internet of Things equipment

    CN112448970A