WIFI networking method, swan-gap equipment, intelligent terminal and medium
By building a network framework and reasonably setting the interactive logic between the main and to-be-applied ends, using BLE technology, encryption and security authentication, the problems of low WIFI networking efficiency and poor security in complex network environments of OpenHarmony system equipment are solved, and the WIFI networking efficiency and poor security are achieved. Efficient and secure WIFI networking.
Patent Information
- Application Number
- CN202411379316.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, when OpenHarmony system equipment performs WIFI networking in complex external network environments, it is susceptible to external WIFI network interference, resulting in low network efficiency and poor security.
By building a network framework, the interactive logic between the main and end-to-ends is reasonably set, and BLE technology and encryption and security authentication mechanisms are used to ensure that the networking process is not disturbed by the external network environment, and the efficiency and security of WIFI networking are improved. sex.
It significantly improves the efficiency of WIFI networking, and enhances the security of networking through encryption and security authentication to ensure the stability and security of networking process.
Smart Images

Figure CN118900413A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of WIFI networking technology, and in particular to a WIFI networking method, Hongmeng equipment, smart terminal and medium. Background Art
[0002] In the prior art, when a device with the OpenHarmony system installed is connected to a WIFI network, the device usually searches for a target WIFI network under a complex external network environment. The device is easily interfered by the external WIFI network, resulting in low efficiency and low security of the network. It can be seen that this WIFI networking method cannot control the external network environment, so the effect is easily affected by the complex external network environment, resulting in poor security of the WIFI network. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the object of the present invention is to provide a WIFI networking method, Hongmeng equipment, smart terminal and medium, aiming to solve the problem of poor security of WIFI networking under the condition that the external network environment is uncontrollable in the prior art.
[0004] In order to achieve the above-mentioned object, the first aspect of the present invention provides a method for WIFI networking of a Hongmeng device, which is applied to a terminal application to be configured of the Hongmeng device, comprising the following steps: Start the provisioning service, turn on BLE and broadcast; In response to receiving the BLE pairing request and network configuration data sent by the master and pairing end application, parsing the network configuration data and verifying the signature information in the network configuration data; If the network configuration data is successfully parsed and the signature information is successfully verified, the WIFI networking action is executed.
[0005] In one implementation, turning on BLE and broadcasting includes: Call the Bluetooth interface through inter-process communication, turn on BLE and perform BLE broadcast.
[0006] In one embodiment, the network configuration data further includes a shared secret, and before the WIFI networking action is performed, the following steps are included: The network configuration information and the shared secret in the network configuration data are encrypted and stored.
[0007] In one embodiment, after the WIFI networking action is performed, the method further includes: Get network configuration results; Feedback the network distribution result to the main distribution terminal application.
[0008] A first aspect of the present invention provides another method for WIFI networking of a Hongmeng device, which is applied to a main and side application of a Hongmeng device, comprising the following steps: Start the main configuration service, turn on BLE and scan; In response to receiving a BLE pairing request sent by the to-be-paired application, calling back the device information of the to-be-paired application to the network configuration application; When the network configuration application matches the end application to be configured, a network configuration operation is performed. If the network configuration operation is successful, a BLE pairing request is initiated to the end application to be configured and network configuration data is sent.
[0009] In one implementation, if the network configuration operation is successful, initiating a BLE pairing request to the application to be configured and sending network configuration data includes: If the network configuration operation is successful, the network configuration data is encrypted using the secret key to obtain the encrypted network configuration data; Initiate a BLE pairing request to the application on the to-be-paired end and send the encrypted network configuration data according to a preset communication protocol.
[0010] A third aspect of the present invention provides a Hongmeng device, the device comprising: The first startup module is used to start the service to be configured, turn on BLE and broadcast; A data parsing module, configured to, in response to receiving a BLE pairing request and network configuration data sent by a master-matching terminal application, parse the network configuration data and verify the signature information in the network configuration data; The network configuration module is used to execute the WIFI networking action if the network configuration data is successfully parsed and the signature information is successfully verified.
[0011] A fourth aspect of the present invention provides another Hongmeng device, the device comprising: The second startup module is used to start the main configuration service, turn on BLE and scan; A pairing request response module is used to respond to a BLE pairing request sent by a to-be-paired application and to call back the device information of the to-be-paired application to the network configuration application; The network configuration data sending module is used to perform a network configuration operation when the network configuration application matches the end application to be configured. If the network configuration operation is successful, a BLE pairing request is initiated to the end application to be configured and network configuration data is sent.
[0012] A fifth aspect of the present invention provides a smart terminal, which includes a memory, a processor, and a program for WIFI networking of Harmony devices stored in the memory and run on the processor. When the program for WIFI networking of Harmony devices is executed by the processor, any step of the above-mentioned method for WIFI networking of Harmony devices is implemented.
[0013] A sixth aspect of the present invention provides a computer-readable storage medium, on which is stored a program for WIFI networking of Hongmeng devices. When the program for WIFI networking of Hongmeng devices is executed by a processor, any step of the above-mentioned method for WIFI networking of Hongmeng devices is implemented.
[0014] Compared with the prior art, the beneficial effects of this solution are as follows: The method for WIFI networking of Hongmeng devices proposed in the present invention is to start the to-be-paired service, turn on BLE and broadcast in the to-be-paired application; in response to receiving the BLE pairing request and network configuration data sent by the main pairing application, parse the network configuration data and verify the signature information in the network configuration data, and execute the WIFI networking action. In the main pairing application, start the main pairing service, turn on BLE and scan; in response to receiving the BLE pairing request sent by the to-be-paired application, call back the device information of the to-be-paired application to the network configuration application; when the network configuration application matches the to-be-paired application, perform the network configuration operation, initiate a BLE pairing request to the to-be-paired application and send the network configuration data. It can be seen that the present invention builds a network configuration framework, reasonably sets the interaction logic between the main pairing service and the to-be-paired service, is not affected by the external network environment, further enhances the security of networking between different applications through encryption and security authentication, and can significantly improve the efficiency of WIFI networking. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0016] Figure 1 This is a network distribution framework diagram for WIFI networking of Hongmeng devices in the present invention; Figure 2 A flow chart of a method for performing WIFI networking on Hongmeng devices according to the present invention; Figure 3 This is a flow chart of another method of performing WIFI networking on Hongmeng devices according to the present invention; Figure 4 A schematic diagram of a Hongmeng device module of the present invention; Figure 5 This is another schematic diagram of a Hongmeng device module of the present invention; Figure 6 It is a schematic diagram of the structure of the intelligent terminal of the present invention. DETAILED DESCRIPTION
[0017] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0018] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0019] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0020] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0021] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0022] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0024] At present, when the device installed with the OpenHarmony system is connected to the WIFI network, it is usually connected to the network by searching for the target WIFI network under the condition of complex external network environment. The device is easily interfered by the external WIFI network, resulting in low efficiency and low security of the network. It can be seen that this WIFI networking method cannot control the external network environment, so the effect is easily affected by the complex external network environment, resulting in poor security of the WIFI network.
[0025] In the face of the problem of poor security of WIFI networking under uncontrollable external network environment in the prior art, the present invention builds a network distribution framework, reasonably sets the interaction logic between the main distribution end network distribution service and the to-be-distributed end network distribution service, and provides a method for WIFI networking of Hongmeng devices for the to-be-distributed end Hongmeng devices installed with to-be-distributed end applications. This method is not affected by the external network environment, and further enhances the security of networking between different applications through encryption and security authentication, and can significantly improve the efficiency of WIFI networking.
[0026] The distribution network framework proposed by the present invention is as follows Figure 1As shown, it mainly includes the main distribution service corresponding to the main distribution end Hongmeng device, the distribution application for performing the distribution action, the distribution service corresponding to the to-be-distributed Hongmeng device, and the wireless router / hotspot for transmitting WIFI signals. Among them, the main distribution end Hongmeng device is used in BLE communication, which can actively scan the surrounding to-be-distributed Hongmeng devices and initiate connection requests. It has higher power management capabilities and more resources, and can communicate with multiple to-be-distributed Hongmeng devices at the same time. The main distribution end Hongmeng device is installed with a distribution application for performing distribution actions. The BLE main distribution component refers to a set of components used in the main distribution end Hongmeng device to initiate connection, manage connection and communicate with the to-be-distributed Hongmeng device, such as HCI, GAP, L2CAP, ATT and GATT, which work together to realize the functions of the main distribution end Hongmeng device. The to-be-distributed Hongmeng device is a device that passively waits for a connection request, responds to the connection request of the main distribution end Hongmeng device and establishes a connection, has lower power consumption and fewer resources, and is used to provide specific services or data. BLE to-be-paired components refer to a set of components in the to-be-paired HarmonyOS device that are used to wait for connection requests, respond to connection requests, and communicate with the main-paired HarmonyOS device, such as HCI, GAP, L2CAP, ATT, and GATT, but they work differently in the to-be-paired HarmonyOS device than in the main-paired HarmonyOS device. In actual applications, the components of BLE devices can be configured and optimized according to specific application scenarios and requirements. The main-pairing service is used to interact with the to-be-paired service and the network configuration application for commands and information. The network configuration application is used to receive commands sent by the main-pairing service or to send commands or transmit information to the main-pairing service. The to-be-paired service is used to connect to the router / hotspot through WIFI networking with the main-pairing service. In short, the entire network configuration process is performed through the main-pairing service, the to-be-paired service, the network configuration application, and the router / hotspot.
[0027] The method for WIFI networking of HarmonyOS devices provided in the embodiment of the present invention is deployed on electronic devices such as computers and servers, and is applied to the scenario of WIFI networking of two HarmonyOS devices through a to-be-matched application and a main-matched application. WIFI networking methods are proposed respectively for the to-be-matched HarmonyOS device installed with the to-be-matched application and the main-matched HarmonyOS device installed with the main-matched device.
[0028] For the Hongmeng devices to be configured, a method for WIFI networking of Hongmeng devices is proposed, such as Figure 1 and Figure 2 As shown, the following steps are included: Step S100: Start the service to be paired, turn on BLE and broadcast.
[0029] Specifically, the application to be paired in the Hongmeng device to be paired starts the Bluetooth Low Energy (BLE) network configuration component by calling the JS interface (such as startNetCfgService) provided by the network configuration framework, and passes in the parameters type=ble and role=to be paired, indicating that it is in the state to be configured during the Bluetooth Low Energy (BLE) network configuration process. The network configuration service management module of the Hongmeng device to be paired loads the BLE to-be-paired component dynamic library according to the parameters passed in by the application to be paired, starts the to-be-paired service and registers the callback.
[0030] Since the Hongmeng device to be paired needs to start BLE broadcasting in order to be discovered by the main pairing end, this embodiment calls the Bluetooth interface provided by the Bluetooth framework through inter-process communication (IPC), turns on BLE and performs BLE broadcasting.
[0031] Step S200: In response to receiving the BLE pairing request and network configuration data sent by the master-pairing application, parsing the network configuration data and verifying the signature information in the network configuration data.
[0032] Specifically, in response to receiving the BLE pairing request and network configuration data sent by the master and pairing end application, the network configuration data includes network configuration information, shared secrets and signature information. Since the network configuration data is sent in binary or JSON, XML and other encoding formats, it is necessary to parse the network configuration data to obtain the network configuration information, shared secrets and signature information, and the data format obtained by parsing can be used directly, and the specific format to be converted can be set accordingly according to the communication protocol or application requirements.
[0033] In order to ensure that the data has not been tampered with during transmission and to ensure that only authorized devices can communicate with each other, this embodiment verifies the signature information. Specifically, obtain the public key, which corresponds to the private key used by the main configuration application to generate the signature; use the same hash algorithm as the main configuration application to calculate a part of the network configuration data (usually all content except the signature) to obtain a hash value; and use the public key and signature algorithm to verify whether the signature matches the calculated hash value. If it matches, the signature verification is successful, otherwise the verification fails. If the verification fails, the process of verifying the signature information is re-executed to ensure that all devices that meet the network configuration conditions can access the network normally, thereby improving the fault tolerance of the system. If the signature information verification fails again, the subsequent network configuration operation is terminated and a corresponding prompt message is given.
[0034] For example, the hardware and software foundation for pairing connection between L2 and L0 devices is pre-set, where L0 represents the Hongmeng device to be paired, L2 represents the Hongmeng device at the main pairing end, and the L2 network configuration application represents the application used to implement the network connection function of the main pairing end. Then, when using the L2 network configuration application to compare the network configuration list, the Hongmeng device to be paired that sends the BLE broadcast will be securely authenticated to verify whether the Hongmeng device to be paired is a L0 type device that matches the main pairing end Hongmeng device L2 corresponding to the L2 network configuration application, where the security authentication mechanism includes key exchange and identity authentication between devices. If the public key and signature algorithm are used to verify whether the signature matches the calculated hash value, it means that the Hongmeng device to be paired is a L0 type device and the main pairing end Hongmeng device is a L2 type device, which means that the signature verification is successful, otherwise the verification fails. If the verification fails, the process of verifying the signature information is re-executed to ensure that all devices that meet the network configuration conditions can access the network normally, thereby improving the fault tolerance of the system. If the signature verification fails again, the subsequent network configuration operation will be terminated and a corresponding prompt message will be given.
[0035] In a preferred implementation, before the WIFI networking action is executed, the network configuration information and the shared secret in the network configuration data are encrypted and stored.
[0036] Specifically, a key is a password or code used to encrypt and decrypt data. In the field of network security, a key is a key element to ensure the confidentiality, integrity and authenticity of communications. Through a key, plaintext (original data) can be converted into ciphertext (encrypted data), and only the recipient with the correct key can decrypt the ciphertext into plaintext. The role of a key in encrypting network configuration information includes: protecting data confidentiality. Network configuration information usually contains sensitive data such as the network configuration and authentication credentials of the device. Encrypting this information with a key can ensure that even if it is intercepted during transmission, it cannot be decrypted by an unauthorized third party, thereby protecting the confidentiality of the data; preventing data tampering. The encryption process not only hides the content of the data, but also generates a unique representation of the data (such as a hash value) through a specific algorithm and key, which makes any tampering with the data detected during the decryption or verification process, thereby ensuring the integrity of the data; enhancing the strength of authentication. During the network configuration process, identity authentication is required between devices to confirm each other's legitimacy and authority. Encrypting and decrypting with a key can be used as part of the authentication mechanism to confirm the identity of the other party by verifying whether the other party can correctly decrypt or encrypt specific information. The roles of keys in shared secrets include: secure distribution. Shared secrets (such as encryption keys, session keys, etc.) need to be securely distributed between devices or systems. Using public and private key pairs in asymmetric encryption technology (such as RSA), shared secrets can be securely delivered to the recipient. The sender uses the recipient's public key to encrypt the shared secret, and the recipient uses his own private key to decrypt it, thereby ensuring the security of the shared secret during transmission; permission control. Through key management, access rights to shared secrets can be controlled. Only entities with the correct keys can access or decrypt shared secrets, thereby ensuring that only authorized entities can use these sensitive information; preventing leakage. The complexity and confidentiality of keys are crucial to preventing the leakage of shared secrets. By regularly changing keys, using strong password policies, and implementing a strict key management system, the risk of shared secrets being leaked can be significantly reduced.
[0037] Based on this, the BLE to-be-matched component in this embodiment calls the Harmony Universal KeyStore (HUKs) component to encrypt and store the network configuration information and shared secrets, including: during the network configuration process, the system may generate one or more keys, which are used to encrypt the network configuration information and shared secrets; then, the generated keys are used to encrypt the network configuration information and shared secrets to ensure the security of the network configuration information and shared secrets during storage and transmission. The Harmony Universal Key Store system HUKs is used to store and manage all keys, ensuring that only keys that pass the permission control and user authentication mechanism can decrypt and access the network configuration information and shared secrets, protecting the network configuration information from unauthorized access or tampering, thereby improving the security and availability of the keys.
[0038] Step S300: If the network configuration data is parsed successfully and the signature information is verified successfully, the WIFI networking action is executed.
[0039] Specifically, if the network configuration data is parsed successfully and the signature information is successfully verified, the WIFI SSID (Service Set Identifier) and password and other information are extracted from the parsed network configuration data, and the extracted SSID and password and other information are used to configure the network parameters of the WIFI module through AT commands, SDK and other interfaces provided by the WIFI module, and then send a connection command to the WIFI signal emitted by the wireless router or device hotspot. After sending the connection command, check the connection status of the WIFI module at a preset time interval to ensure that the device has successfully connected to the specified WIFI network. If the WIFI connection fails, it is necessary to retry the connection or notify the user to check the network settings, and set a reasonable number of retries based on the power consumption and performance of the device to avoid frequent connection and disconnection of WIFI when it is not necessary.
[0040] In a preferred embodiment, after executing the WIFI networking action, it also includes: obtaining the network configuration result, and after receiving the network configuration result information, the to-be-matched end feeds back the WIFI networking result to the main matching end Hongmeng device through the BLE to-be-matched component, so that the user can perform subsequent operation actions according to the network configuration result.
[0041] Furthermore, after the network configuration and connection process is completed, no longer needed resources can be cleaned up in a timely manner, such as releasing allocated memory, closing unnecessary files or network connections, etc.
[0042] In summary, the method of the present invention optimizes the interaction logic between the network distribution service of the end to be distributed and the network distribution service of the main distribution end, is not interfered by the external network environment, can effectively improve the efficiency of WIFI networking, and further enhances the security of networking between different applications through encryption and security authentication.
[0043] For the main and side Hongmeng devices, a method for WIFI networking of Hongmeng devices is proposed, such as Figure 1 and Figure 3 As shown, the following steps are included: Step S400: Start the main matching service, turn on BLE and scan.
[0044] Specifically, the main configuration application starts the Bluetooth Low Energy (BLE) configuration component by calling the JS interface (such as startNetCfgService) provided by the configuration framework, and passes in the parameters type=ble and role=main configuration to indicate the dominant role of the main configuration in the configuration process. The main configuration service management module loads the Bluetooth Low Energy BLE main configuration component dynamic library according to the parameters passed in by the configuration application, starts the service and registers the callback. For example, this embodiment registers two callback functions deviceFound and networkConfigState in the main configuration application, so that one function can be passed as a parameter to another function during the entire program call process, and calls and executes the corresponding function when the device to be configured is found or the configuration status changes, thereby realizing the code structure and improving the operation efficiency. Among them, deviceFound is used to be called when the device to be configured is found, and networkConfigState is used to be called when the configuration status changes.
[0045] Then, the BLE main matching component calls the target interface provided by the Bluetooth framework through inter-process communication (IPC), turns on BLE and performs a BLE scan to scan for Hongmeng devices to be matched that meet the matching requirements.
[0046] Step S500: In response to receiving a BLE pairing request sent by the to-be-paired application, the device information of the to-be-paired application is called back to the network configuration application.
[0047] Specifically, in response to receiving the BLE pairing request sent by the application on the end to be paired, the BLE main pairing component receives the BLE broadcast of the end to be paired, and calls back the device information of the end to be paired to the network configuration application. The network configuration application receives the BLE device information and compares it with the network configuration list for security authentication. For example, the hardware and software foundation for pairing connection between L2 and L0 devices is pre-set, where L0 represents the Hongmeng device on the end to be paired, L2 represents the Hongmeng device on the main pairing end, and the L2 network configuration application represents the application used to implement the network connection function of the main pairing end. Then, when comparing the network configuration list with the L2 network configuration application, the Hongmeng device on the end to be paired that sends the BLE broadcast will be securely authenticated to verify whether the Hongmeng device on the end to be paired is a L0 type device that matches the main pairing end Hongmeng device L2 corresponding to the L2 network configuration application, where the security authentication mechanism includes key exchange and identity authentication between devices. If the Hongmeng device to be paired is not an L0 type device, the network configuration operation process is terminated; if the Hongmeng device to be paired is an L0 type device, the Hongmeng device to be paired is included in the whitelist to ensure that the networking process is not interfered with by the external network environment and to improve the security of WIFI networking. The whitelist is a security mechanism that limits only authorized Hongmeng devices to communicate with the main matching Hongmeng device. Then perform network configuration operations on the matched devices, call the interface used to configure the bridge relationship between the wireless interface and the physical interface (such as the configNetwork interface), and send the carried network configuration information, shared secrets, and signature information to the main matching network configuration service management module.
[0048] Step S600: When the network configuration application matches the end application to be configured, a network configuration operation is performed. If the network configuration operation is successful, a BLE pairing request is initiated to the end application to be configured and network configuration data is sent.
[0049] Specifically, when the network configuration application matches the application to be configured, a BLE connection is established between the main configuration service and the service to be configured according to a preset pairing mechanism, and BLE pairing is performed, including: the main configuration service management module checks whether the main configuration application has passed in the network configuration information. If not, the WIFI service is called to obtain the currently connected WIFI information, and the information is passed to the BLE main configuration component through the component interface. The BLE main configuration component performs BLE connection and pairing by calling the Bluetooth framework interface. After the pairing is successful, the network configuration data is sent to the service to be configured through the main configuration service to implement the network configuration operation. Among them, the network configuration information includes but is not limited to SSID, password, security protocol, etc.; the pairing mechanism represents the rules for pairing the main configuration service and the service to be configured, such as how to exchange pairing codes and how to verify pairing keys.
[0050] In a preferred implementation, if the network configuration operation is successful, a BLE pairing request is initiated to the application to be configured and network configuration data is sent, including: If the network configuration operation is successful, the network configuration data is encrypted using the secret key to obtain the encrypted network configuration data, wherein the network configuration data includes network configuration information, shared secret and signature information; a BLE pairing request is initiated to the application to be paired and the encrypted network configuration data is sent according to the preset communication protocol.
[0051] Specifically, the Just Work mode is used for BLE pairing to ensure non-sensing network pairing and encrypted transmission. The interaction of the Security Manager Protocol (SMP) protocol layer in the JustWork mode, as well as the steps of pairing request, response, key generation and link encryption are as follows: The SMP protocol is a protocol for security management in BLE devices. It defines the implementation of the pairing and key distribution process, as well as the protocols and tools used for these methods. In Just Work mode, the interaction of the SMP protocol layer is mainly focused on the various stages of the pairing process, ensuring that devices can securely exchange information and generate necessary keys.
[0052] In the pairing request process, the main application initiates the pairing request by sending a request data packet containing pairing features to the application to be paired. Then the pairing feature exchange phase begins to exchange information such as authentication requirements, input and output capabilities, and whether secure links are supported.
[0053] During the pairing response process, after receiving the pairing request, the paired application sends a response data packet containing its own pairing feature information to the main paired application to confirm acceptance of the pairing request. Both parties confirm pairing using the Just Work mode through the pairing request and response.
[0054] During the key generation process, in Just Works mode, each device generates a random number. In Just Works mode, since there is no user input, a temporary key is usually generated using these two random numbers. Using the temporary key and information such as the Bluetooth address, a pairing key is generated through a key derivation function, and the correctness of the pairing key is verified through a cryptographic hash function to generate a pairing confirmation value. The two parties exchange confirmation values and verify them. If the confirmation values match, the pairing is considered successful and the random number is used to generate a secret key.
[0055] During the link encryption process, the communication link is encrypted using the generated key, and the secret key is parsed through the signature to further enhance security.
[0056] Furthermore, if the application to be configured feeds back the network configuration result to the main configuration application, the main configuration application will call back the network configuration result to the network configuration application through the BLE main configuration component to complete the entire network configuration process.
[0057] It should be stated that during the data transmission process of the entire distribution network, the main distribution end and the end to be matched use the communication protocol that supports the Hongmeng system to organize, transmit and receive data, ensuring that different devices or systems can correctly establish connections, transmit data, and disconnect, etc. Furthermore, the system has a fault-tolerant mechanism that can handle errors that may occur during the distribution process, such as pairing failure, data transmission errors, etc., and provide corresponding solutions or retry mechanisms.
[0058] In summary, the method of the present invention builds a distribution network framework, reasonably sets the interaction logic between the main distribution end distribution service and the distribution end distribution service, is not interfered by the external network environment, can effectively improve the efficiency of WIFI networking, and further enhances the security of networking between different applications through encryption and security authentication.
[0059] like Figure 4 As shown, corresponding to the above-mentioned method for performing WIFI networking on the Hongmeng device to be matched, an embodiment of the present invention further provides a system for performing WIFI networking on the Hongmeng device to be matched, and the above-mentioned Hongmeng device includes: The first starting module 410 is used to start the service to be configured, turn on BLE and broadcast; The data parsing module 420 is used to parse the BLE pairing request and network configuration data sent by the master and pairing end application and verify the signature information in the network configuration data in response to receiving the BLE pairing request and network configuration data sent by the master and pairing end application; The network configuration module 430 is used to execute the WIFI networking action if the network configuration data is parsed successfully and the signature information is verified successfully.
[0060] like Figure 5 As shown, corresponding to the above-mentioned method for Wi-Fi networking of the main and matching end Hongmeng devices, the embodiment of the present invention also provides another system for Wi-Fi networking of the main and matching end Hongmeng devices, and the above-mentioned Hongmeng devices include: The second starting module 510 is used to start the main matching service, turn on BLE and scan; The pairing request response module 520 is used to respond to the BLE pairing request sent by the to-be-paired application and call back the device information of the to-be-paired application to the network configuration application; The network configuration data sending module 530 is used to perform a network configuration operation when the network configuration application matches the end application to be configured. If the network configuration operation is successful, a BLE pairing request is initiated to the end application to be configured and network configuration data is sent.
[0061] Specifically, in this embodiment, the specific functions of the above-mentioned HarmonyOS devices can also refer to the corresponding description in the above-mentioned method of WIFI networking for HarmonyOS devices, which will not be repeated here.
[0062] Based on the above embodiments, the present invention further provides an intelligent terminal, whose principle block diagram can be shown as follows: Figure 6 As shown. The intelligent terminal can be used to execute the reinforcement learning method provided in the above embodiment, which will not be described here for brevity. The intelligent terminal includes: a processor, the processor is coupled to a memory, the memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions stored in the memory, so that the method in the above method embodiment is executed.
[0063] The present invention also provides a computer-readable storage medium on which computer instructions for implementing the method in the above method embodiment are stored.
[0064] For example, when the computer program is executed by a computer, the computer can implement the method in the above method embodiment.
[0065] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to implement the method in the above method embodiment.
[0066] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0067] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0068] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0069] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0070] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0071] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
Claims
1. A method for WIFI networking of Hongmeng devices. It is characterized in that The end application to be configured for Hongmeng devices includes the following steps: Start the provisioning service, turn on BLE and broadcast; In response to receiving the BLE pairing request and network configuration data sent by the master and pairing end application, parsing the network configuration data and verifying the signature information in the network configuration data; If the network configuration data is parsed successfully and the signature information is verified successfully, the WIFI networking action is executed.
2. According to the method for WIFI networking of Hongmeng devices according to claim 1, It is characterized in that The BLE is turned on and broadcasted, including: Call the Bluetooth interface through inter-process communication, turn on BLE and perform BLE broadcast.
3. According to the method for WIFI networking of Hongmeng devices according to claim 1, It is characterized in that The network configuration data also includes a shared secret, and before the WIFI networking action is executed, includes: The network configuration information and the shared secret in the network configuration data are encrypted and stored.
4. According to the method for WIFI networking of Hongmeng devices according to claim 1, It is characterized in that After the WIFI networking action is performed, the method further includes: Get network configuration results; Feedback the network distribution result to the main distribution terminal application.
5. A method for WIFI networking of Hongmeng devices. It is characterized in that The main and side application applied to Hongmeng devices includes the following steps: Start the main configuration service, turn on BLE and scan; In response to receiving a BLE pairing request sent by the to-be-paired application, calling back the device information of the to-be-paired application to the network configuration application; When the network configuration application matches the end application to be configured, a network configuration operation is performed. If the network configuration operation is successful, a BLE pairing request is initiated to the end application to be configured and network configuration data is sent.
6. According to the method for WIFI networking of Hongmeng devices according to claim 5, It is characterized in that If the network configuration operation is successful, a BLE pairing request is initiated to the application to be configured and network configuration data is sent, including: If the network configuration operation is successful, the network configuration data is encrypted using the secret key to obtain the encrypted network configuration data; Initiate a BLE pairing request to the application on the to-be-paired end and send the encrypted network configuration data according to a preset communication protocol.
7. A Hongmeng device, It is characterized in that The device comprises: The first startup module is used to start the service to be configured, turn on BLE and broadcast; A data parsing module, configured to, in response to receiving a BLE pairing request and network configuration data sent by a master-matching terminal application, parse the network configuration data and verify the signature information in the network configuration data; The network configuration module is used to execute the WIFI networking action if the network configuration data is successfully parsed and the signature information is successfully verified.
8. A Hongmeng device, It is characterized in that The device comprises: The second startup module is used to start the main configuration service, turn on BLE and scan; A pairing request response module is used to respond to a BLE pairing request sent by a to-be-paired application and to call back the device information of the to-be-paired application to the network configuration application; The network configuration data sending module is used to perform a network configuration operation when the network configuration application matches the end application to be configured. If the network configuration operation is successful, a BLE pairing request is initiated to the end application to be configured and network configuration data is sent.
9. A smart terminal, It is characterized in that include: A memory for storing executable instructions; A processor is used to call and run the executable instructions in the memory to execute the steps of the method for WIFI networking for Hongmeng devices as described in any one of claims 1-4 or claims 5-6.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores program instructions. When the program instructions are executed by the processor, the method for WIFI networking of Hongmeng devices as described in any one of claims 1-4 or claims 5-6 is implemented.
Citation Information
Patent Citations
Equipment pairing method and related equipment and device
CN111654844A
Equipment network access method and device
CN115119286A
Home equipment network distribution method and system, and readable storage medium
CN116488952A
Equipment network distribution method and device, equipment and computer readable storage medium
CN118695328A
Method and system for automated intellegent advertising on wearable devices
US20140108151A1
