Password synchronization method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- CN202210469001.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-29
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-04-29
AI Technical Summary
[0005]为了解决现有技术中的上述问题,即在路由器设备修改密码后,对终端设备端的密码进行同步的效率较低导致用户体验差的问题,本发明实施例提供了一种密码同步方法、装置、电子设备和存储介质
[0060]本领域技术人员能够理解的是,本发明实施例提供的一种密码同步方法、装置、电子设备和存储介质,接收路由器设备发送的第一数据帧,第一数据帧是在路由器设备修改连接密码后发送的;确定与第一校验号对应的第一解密算法和第一应用程序接口;通过第一应用程序接口,利用第一解密算法对第一设备标识字段进行解密处理,得到路由器设备的标识,并对第一密码字段进行解密处理,得到新的连接密码;向路由器设备发送第一反馈数据帧;第一反馈数据帧用于通知路由器设备终端设备成功同步新的连接密码;利用路由器设备标识和新的连接密码,与路由器设备建立网络连接。本发明提供的技术方案能够在路由器设备修改连接密码后,获取其修改后的新的连接密码,从而与路由器设备建立网路连接。避免了用户手动输入新的连接密码,以及,服务器对终端设备进行验证而耗费的大量时间的问题,提高了终端设备同步路由器设备的新的连接密码的效率,从而提升了用户体验。
Smart Images

Figure CN117014168B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, specifically to a password synchronization method, device, electronic device, and storage medium. Background Technology
[0002] With the development of the internet, routers are ubiquitous in daily life, providing users with wireless communication technology. User-accessible devices establish connections with routers to utilize the Wi-Fi network provided by the router for network services. When connecting to a router, the terminal device needs to authenticate with the router's password; only after successful authentication can it use the router's Wi-Fi network. During router use, the password may need to be changed, requiring the user to manually enter the new password on the terminal device to establish a connection. However, manually entering the password is time-consuming.
[0003] To address the issue of requiring manual password entry, existing technology involves a process where, after a router changes its connection password, previously connected terminal devices can first connect to the router's hidden Service Set Identifier (SSID), which serves as the router's identifier. The terminal device sends a connection request containing authentication information to the hidden SSID. Upon receiving the request, the router forwards the authentication information to the corresponding authentication server. After successful authentication, the server sends authentication confirmation to the router. Upon receiving the authentication confirmation, the router then sends the actual SSID and the modified password to the terminal device. This allows the terminal device to re-establish its network connection with the router using the modified password and the actual SSID, thus synchronizing the connection password on the terminal device.
[0004] However, in existing technologies, when changing the password on the terminal device, it is necessary to connect to the hidden SSID and pass the server verification in order to obtain the new password on the router device. This takes a long time, making it inefficient to synchronize the password on the terminal device after the password is changed on the router device, thereby reducing the user experience. Summary of the Invention
[0005] To address the aforementioned problems in the prior art, namely the low efficiency of synchronizing passwords on terminal devices after the router device changes the password, resulting in a poor user experience, embodiments of the present invention provide a password synchronization method, apparatus, electronic device, and storage medium.
[0006] This invention provides a password synchronization method applied to a terminal device, the password synchronization method comprising:
[0007] The router device receives a first data frame, which includes a first checksum field, a first device identifier field, and a first password field. The first data frame is sent after the router device modifies the connection password.
[0008] Determine the first decryption algorithm and the first application interface corresponding to the first verification number field.
[0009] Using the first application interface, the first decryption algorithm is used to decrypt the first device identifier field to obtain the router device identifier, and the first password field is decrypted to obtain a new connection password.
[0010] A first feedback data frame is sent to the router device, the first feedback data frame being used to notify the router device that the terminal device has successfully synchronized the new connection password.
[0011] A network connection is established with the router device using the router device identifier and the new connection password.
[0012] Optionally, the first data frame further includes a time identifier field, which stores the restart time of the routing device; the method further includes:
[0013] After the router's restart time is reached, a network connection is established with the router device using the router device identifier and the new connection password.
[0014] Optionally, the first data frame further includes a first identification field and a first function field; the first identification field is used to indicate that the first data frame is a password-initiated transmission frame, and the first function field is used to indicate the function of the first data frame.
[0015] Optionally, the method further includes:
[0016] If a network connection failure result is received from the router device, or if no network connection result is received from the router device within a preset time period, the signal strength of at least one first router device stored in the terminal device is obtained. The first router device is a router device in the terminal device that has a corresponding connection password pre-stored.
[0017] If there is a first router device among the at least one first router devices with a signal strength greater than a signal strength threshold, then a connection request is sent to the first router device with the strongest signal strength among the at least one first router devices to establish a network connection with the first router device with the strongest signal strength. The connection request includes the connection password of the first router device with the strongest signal strength.
[0018] Optionally, the method further includes:
[0019] If none of the at least one first router devices has a signal strength greater than the signal strength threshold, and / or the terminal device does not store a first router device, then a second data frame is sent to at least one second router device, wherein the second router device is a router device scanned by the terminal device but not stored, and a router device stored by the terminal device but with an incorrect connection password, and the second data frame is used to obtain the connection password of the at least one second router device.
[0020] Upon receiving a second feedback data frame sent by at least one of the second router devices based on the second data frame, the target router device is identified among the at least one of the second router devices.
[0021] The second feedback data frame sent by the target router device is decrypted to obtain the target connection password of the target router and the identifier of the target router device.
[0022] A network connection is established with the target router device using the target connection password and the identifier of the target router device.
[0023] Optionally, the second feedback data frame includes a fourth verification number field, a second device identifier field, and a second password field; the step of decrypting the second feedback data frame sent by the target router device to obtain the target connection password and the identifier of the target router device includes:
[0024] The second device identifier field and the second password field are decrypted using the fourth decryption algorithm corresponding to the fourth verification number field in the target router device to obtain the target connection password of the target router device and the identifier of the target router device.
[0025] Optionally, determining the target router device among at least one of the second router devices includes:
[0026] Obtain the network signal strength of at least one of the second router devices.
[0027] Among the second router devices whose network signal strength is greater than the signal strength threshold, the second router device with the strongest network signal strength is identified as the target router device.
[0028] Optionally, the second feedback data frame further includes a fourth identification field and a fourth function field; the fourth identification field is used to indicate that the second feedback data frame is an active feedback frame, and the fourth function field is used to indicate the function of the second feedback data frame.
[0029] This invention provides a password synchronization method applied to a router device, the password synchronization method comprising:
[0030] Change the router's connection password to a new one, which is used to establish a network connection with the terminal device.
[0031] Based on the LAN MAC address of at least one terminal device stored in the LAN MAC address list, a first data frame is sent to the at least one terminal device, wherein the terminal device had established a network connection with the router device before the router device changed the connection password.
[0032] The system receives a first feedback data frame sent by the at least one terminal device, the first feedback data frame being used to indicate that the terminal device has successfully synchronized a new connection password.
[0033] A network connection is established with the terminal device based on the new connection password.
[0034] Optionally, the first data frame includes a time identifier field; the time identifier field stores the restart time of the router device; before establishing a network connection with the terminal device, the method further includes:
[0035] When the router device's restart time is reached, control the router device to perform a restart operation.
[0036] Optionally, the first feedback data frame includes a second identifier field, a second function field, a second verification number field, and a second device address field. The second identifier field indicates that the first feedback data frame is an active feedback frame, and the second function field indicates the function of the first feedback data frame. The method further includes:
[0037] The second device address field is decrypted using the second decryption algorithm corresponding to the second verification number field to obtain the MAC address of the terminal device, and the MAC address of the terminal device is recorded.
[0038] Optionally, the method further includes:
[0039] The system receives a second data frame sent by the terminal device to be synchronized. The second data frame includes a third verification number field, a third device address field, and a key field.
[0040] Determine the third decryption algorithm and the second application interface corresponding to the third verification number field and / or the key field.
[0041] The MAC address of the terminal device to be synchronized is obtained by decrypting the third device address field using the third decryption algorithm through the second application interface.
[0042] A second feedback data frame is sent to the terminal device to be synchronized based on the MAC address of the terminal device to be synchronized. The second feedback data frame contains the identifier of the router device and the new connection password of the router device. The new connection password and the router device identifier are used by the terminal device to be synchronized to establish a network connection with the router device.
[0043] Optionally, the second data frame further includes a third identification field and a third function field; the third identification field is used to indicate that the second data frame is a password request frame, and the third function field is used to indicate the function of the second data frame.
[0044] This invention also provides a cryptographic synchronization device, comprising:
[0045] The receiving module is used to receive a first data frame sent by the router device. The first data frame includes a first verification number field, a first device identifier field, and a first password field. The first data frame is sent after the router device modifies the connection password.
[0046] The processing module is used to determine the first decryption algorithm and the first application programming interface corresponding to the first verification number.
[0047] The processing module is further configured to decrypt the first device identifier field using the first decryption algorithm through the first application programming interface to obtain the router device identifier, and to decrypt the first password field to obtain a new connection password.
[0048] The feedback module is used to send a first feedback data frame to the router device, the first feedback data frame being used to notify the router device that the terminal device has successfully synchronized the new connection password.
[0049] A connection module is used to establish a network connection with the router device using the router device identifier and the new connection password.
[0050] This invention also provides a cryptographic synchronization device, comprising:
[0051] The modification module is used to change the connection password of the router device to a new connection password, which is used to establish a network connection with the terminal device.
[0052] The sending module is used to send a first data frame to at least one terminal device based on the local area network MAC address of at least one terminal device stored in the local area network MAC address list, wherein the terminal device has established a network connection with the router device before the router device changes the connection password.
[0053] The processing module is configured to receive a first feedback data frame sent by the at least one terminal device, wherein the first feedback data frame indicates that the terminal device has successfully synchronized a new connection password.
[0054] The connection module is used to establish a network connection with the terminal device according to the new connection password.
[0055] This invention also provides an electronic device, which includes a processor and a memory communicatively connected to the processor.
[0056] The memory stores computer-executed instructions.
[0057] The processor executes the computer execution instructions stored in the memory to implement the cryptographic synchronization method described in any of the preferred technical solutions above.
[0058] This invention also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the cryptographic synchronization method described in any of the preferred technical solutions above.
[0059] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the cryptographic synchronization method described in any of the preferred technical solutions above.
[0060] Those skilled in the art will understand that the password synchronization method, apparatus, electronic device, and storage medium provided in this embodiment of the invention receive a first data frame sent by a router device after the router device modifies its connection password; determine a first decryption algorithm and a first application programming interface (API) corresponding to a first verification number; decrypt a first device identifier field using the first decryption algorithm through the first API to obtain the router device's identifier, and decrypt a first password field to obtain a new connection password; send a first feedback data frame to the router device; the first feedback data frame is used to notify the router device that the terminal device has successfully synchronized the new connection password; and establish a network connection with the router device using the router device's identifier and the new connection password. The technical solution provided by this invention can obtain the modified new connection password after the router device modifies its connection password, thereby establishing a network connection with the router device. This avoids the problem of users manually entering a new connection password and the significant time spent by the server verifying the terminal device, improving the efficiency of the terminal device synchronizing the new connection password of the router device, thus enhancing the user experience. Attached Figure Description
[0061] Figure 1 This is a schematic diagram illustrating an application scenario of a password synchronization method provided in an embodiment of the present invention;
[0062] Figure 2 This is a flowchart illustrating a cryptographic synchronization method provided in an embodiment of the present invention.
[0063] Figure 3 A flowchart illustrating another cryptographic synchronization method provided in an embodiment of the present invention;
[0064] Figure 4 This is a flowchart illustrating a method for synchronizing passwords from a router device to a terminal device according to an embodiment of the present invention.
[0065] Figure 5 This is a flowchart illustrating a method for a router device to send a password synchronization frame to a terminal device, as provided in an embodiment of the present invention.
[0066] Figure 6 This invention provides a flowchart of a method for a terminal device to actively request a synchronized password from a router device.
[0067] Figure 7 This is a schematic diagram of the structure of a cryptographic synchronization device 70 provided in an embodiment of the present invention;
[0068] Figure 8 This is a schematic diagram of another cryptographic synchronization device 80 provided in an embodiment of the present invention;
[0069] Figure 9 This is a schematic diagram of an electronic device structure provided by the present invention. Detailed Implementation
[0070] First, those skilled in the art should understand that these embodiments are merely for explaining the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make adjustments as needed to adapt to specific application scenarios.
[0071] Secondly, it should be noted that in the description of the embodiments of the present invention, the terms "inner" and "outer", etc., which indicate the direction or positional relationship, are based on the direction or positional relationship shown in the drawings. This is only for the convenience of description and is not intended to indicate or imply that the device or component must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation of the present invention.
[0072] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0073] The technical solution provided in this invention can be applied to password synchronization scenarios, particularly when a router synchronizes a modified password to a terminal device. During use, routers may need to modify their connection password to ensure security. After the router modifies the connection password, the user needs to manually enter the modified password on the terminal device so that the terminal device can establish a network connection with the router. However, manually entering the modified password is time-consuming and results in a poor user experience.
[0074] Currently, after a router changes its connection password, all terminal devices that previously established network connections with that router are connected to the router's hidden Service Set Identifier (SSID). Simultaneously, each terminal device sends a connection request containing its authentication information to the hidden SSID. The router then forwards this authentication information to the corresponding authentication server for verification. Only when the authentication server verifies the connection and the router receives the authentication confirmation does it send the actual SSID and the modified password to the terminal device. This allows the terminal device to connect to the actual SSID using the modified password, thus synchronizing the password on the terminal device.
[0075] While synchronizing the modified connection password from the router to the terminal device by connecting the terminal device to the hidden SSID, requiring the corresponding server to verify the terminal device's identity, avoids the problem of users manually entering the connection password, this method still requires server verification and consumes a significant amount of time, making password synchronization inefficient and thus degrading the user experience.
[0076] To address the issue of low efficiency in synchronizing router connection passwords in existing technologies, after a router changes its connection password, it can send data frames carrying the new connection password and the router's identifier to multiple terminal devices. This synchronizes the new connection password to the terminal devices, enabling them to establish connections with the router using the new password. This improves the efficiency of synchronizing the router with the terminal devices, thereby effectively enhancing the user experience.
[0077] Figure 1 This is a schematic diagram illustrating an application scenario of a password synchronization method provided in an embodiment of the present invention. According to... Figure 1 As shown, the password synchronization method provided in this embodiment of the invention can be applied to router device 100, first terminal device 200, and second terminal device 300. Both first terminal device 200 and second terminal device 300 are devices that have established a network connection with router device 100. For example, both first terminal device 200 and second terminal device 300 can use the Wi-Fi network provided by router device 100. It is understood that... Figure 1 The number of terminal devices in the process can be multiple. This embodiment of the invention only uses the first terminal device and the second terminal device as examples for illustration, but it does not mean that this embodiment of the invention is limited to this.
[0078] Example, based on Figure 1 As shown, after router device 100 changes the old connection password to a new one, the first terminal device 200 and the second terminal device 300 cannot establish a network connection with the router device using the old connection. Therefore, after changing the password, router device 100 needs to send data frames for password synchronization to both the first terminal device 200 and the second terminal device 300. The first terminal device 200 and the second terminal device 300 process the received data frames, such as decryption, to obtain the new connection password and router device identifier (SSID) modified by router device 100, and then use the new connection password to re-establish a network connection with the router device corresponding to the SSID. This embodiment of the invention does not impose any limitations on the connection password of router 100.
[0079] Therefore, the technical solution provided by the embodiments of the present invention does not require the server to verify the identity information of the terminal device. After the router device changes the connection password, the connection password is immediately synchronized to the terminal device that has established a network connection with it, so that the terminal device can use the new connection password to establish a network connection with the router device, saving password synchronization time and thus improving the user experience.
[0080] The password synchronization method provided by this invention can be applied to both terminal devices and router devices. The following will describe in detail the password synchronization method provided by this invention through specific embodiments applied to terminal devices and router devices. It is understood that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0081] Figure 2 This is a schematic flowchart illustrating a password synchronization method provided in an embodiment of the present invention. This password synchronization method can be executed by software and / or hardware devices. For example, the hardware device can be a password synchronization device, which can be a terminal device or a processing chip within the terminal device. For an example, please refer to [link to example]. Figure 2 As shown, the password synchronization method may include:
[0082] S201. Receive a first data frame sent by the router device. The first data frame includes a first checksum field, a first device identifier field, and a first password field. The first data frame is sent after the router device modifies the connection password.
[0083] In this invention, the router device and the terminal device receiving the first data frame sent by the router device are bound to the same account or the same identifier ID through a server. This identifier ID can be user-defined, such as the name of the router device. This embodiment of the invention does not impose any limitations on the specific account or identifier ID. It is understood that after the router device and the terminal device are bound to the same account, a network key, such as a 32-byte network key, can be generated by the server and sent to both the router device and the terminal device. The router device and the terminal device store this network key, which can be used to verify whether the router device and the terminal device are devices under the same account.
[0084] For example, the first checksum field stores the first checksum of the encryption / decryption algorithm corresponding to the first data frame. The first device identifier field stores the identifier of the encrypted router device. The first password field stores the new connection password of the encrypted router device.
[0085] For example, the first data frame may further include a first identifier field, a first function field, a first verification field, and a first random number segment. The first identifier field indicates that the first data frame is a password-initiated frame, and the first function field indicates the function of the first data frame. The first verification field is used to verify the integrity of the first data frame. The first random number segment stores a first random value, which is used for verification and decryption of the first data frame.
[0086] In this embodiment of the invention, the terminal device can determine the type and function of the first data frame through the first identification field and the first function field in the first data frame, so as to perform corresponding operations on the first data frame.
[0087] S202. Determine the first decryption algorithm and the first application interface corresponding to the first verification number field.
[0088] For example, when determining the first application programming interface (API) corresponding to the first verification number field, the first verification number field can be parsed to select its corresponding API. It is understood that an API is a predefined interface, such as a function, an HTTP interface, or a convention for connecting different components of a software system. This embodiment of the invention does not limit the specific parsing method.
[0089] It is understandable that determining the first decryption algorithm corresponding to the first verification number field can be done by identifying the decryption algorithm corresponding to the first verification number in the first verification number field as the first decryption algorithm.
[0090] After obtaining the first decryption algorithm and the first application programming interface, the following step S203 can be performed:
[0091] S203. Through the first application programming interface, the first device identifier field is decrypted using the first decryption algorithm to obtain the identifier of the router device, and the first password field is decrypted to obtain a new connection password.
[0092] In this invention, the identifier of the router device and the new connection password can be set by the user or by other means, and this application embodiment does not specifically limit this.
[0093] It is understandable that when decrypting the first identifier field and the first password field, the first verification field and the first random number segment in the first data frame can be used as an aid to perform the decryption process.
[0094] S204. Send a first feedback data frame to the router device. The first feedback data frame is used to notify the router device that the terminal device has successfully synchronized the new connection password.
[0095] When a terminal device receives a new connection password and a router device identifier, it can automatically generate a first feedback data frame, which can be an acknowledgment character (ACK). This first feedback data frame is then sent to the router device to notify it that the terminal device has successfully synchronized the new connection password. It is understood that the ACK may include an encrypted random number, the terminal device's local area network MAC address, and a checksum used by the router device for verification, etc. This embodiment of the invention does not impose any limitations on these aspects.
[0096] S205. Establish a network connection with the router device using the router device identifier and the new connection password.
[0097] For example, the first data frame may also include a timestamp field, which stores the restart time of the routing device. The terminal device can establish a network connection with the router device after the router's restart time is reached, using the router device identifier and a new connection password, based on the router device's restart time in the timestamp field. The router device's restart time is the time interval between the moment the router device modifies the connection password and the moment it performs the restart operation. The restart time can be 1 minute, 2 minutes, or other times; this embodiment of the invention does not limit this. It is understood that the restart time can also be used by the terminal device to determine whether a new connection password has been obtained before the router device restarts, or for other purposes; this embodiment of the invention does not limit this.
[0098] For example, when establishing a network connection with a router device using a new connection password and router device identifier, a network connection request including the new connection password can be sent to the router device corresponding to the router device identifier; upon receiving a successful network connection result from the router device, a network connection is established with the router device.
[0099] In this embodiment of the invention, the terminal device establishes a network connection with the router device after the router device restarts, which can effectively improve the success rate of network connection between the terminal device and the router device. Furthermore, the terminal device can directly establish a network connection with the corresponding router device using the newly obtained connection password, eliminating the need for the user to manually enter a new connection password and avoiding the significant time spent on server verification, thereby improving the user experience.
[0100] For example, if the terminal device receives a network connection failure result from the router device, or if it does not receive a network connection result from the router device within a preset time period, it obtains the signal strength of at least one first router device stored in the terminal device. If there is a first router device among the at least one first router devices with a signal strength greater than a signal strength threshold, it sends a connection request to the first router device with the strongest signal strength among the at least one first router devices, and establishes a network connection with the first router device with the strongest signal strength. The connection request includes the connection password of the first router device with the strongest signal strength. The preset time period and signal strength threshold can be set according to specific circumstances, and this embodiment of the invention does not impose any limitations on them. The at least one first router device stored in the terminal device can be a router device that has established a network connection with the terminal device, and this embodiment of the invention does not impose any limitations on the number of first router devices.
[0101] For example, in one possible implementation, for a terminal device obtaining a new connection password, there might be a situation where an error in parsing by the terminal device results in an incorrect new connection password. For a terminal device that does not obtain a new connection password, there might be a situation where an incorrect connection is used to establish a network connection. In both of these situations, the terminal device may receive a connection failure message from the router. If no network result is received from the router within a preset time period, it may be due to the router being in a non-functional state or other reasons; this embodiment of the invention does not specifically limit this. It is understood that this embodiment of the invention is only illustrated by the above-described situation, but does not mean that the embodiment of the invention is limited to this.
[0102] For example, to obtain the signal strength of at least one first router device stored in the terminal device, one can obtain at least one first router device identifier stored in the random access memory (RAM) of the terminal device, and obtain the corresponding signal strength according to each first router device identifier.
[0103] In this embodiment of the invention, if the terminal device receives a network connection failure result from the router, or if it does not receive a network connection result from the router within a preset time period, it establishes a network connection with the first router device with the strongest signal stored in the terminal device. This avoids the terminal device continuously trying to establish a network connection with the router device after the password has been changed, which would prevent the terminal device from being able to establish a connection. At the same time, establishing a network connection with the first router device with the strongest signal ensures that the terminal device can obtain better network services after establishing a network connection, thereby improving the user experience.
[0104] For example, in an embodiment of the present invention, if at least one first router device does not have a signal strength greater than a signal strength threshold, and / or the terminal device does not store a first router device, then a second data frame is sent to at least one second router device. The second router device is either a router device scanned by the terminal device but not stored there, or a router device stored by the terminal device with an incorrect connection password. This second data frame is used to obtain the connection password of at least one second router device.
[0105] When a terminal device receives a second feedback data frame from at least one second router device, it identifies the target router device among the at least one second router device. The terminal device decrypts the second feedback data frame sent by the target router device to obtain the target connection password and the identifier of the target router device. The terminal device then uses the target connection password and the identifier of the target router device to establish a network connection with the target router device.
[0106] It is understandable that if the second router is a router whose connection password is incorrect and stored by the terminal device, then the second router may be a router that, after modifying the connection password, sends a first data frame to the terminal device but receives an incorrect new connection password. In other words, when the terminal device receives an incorrect new connection password, it can proactively send a second data frame to the router device to obtain the correct new connection password. This embodiment of the invention is only illustrated by this example and does not imply that the embodiments of the invention are limited to this.
[0107] In this embodiment of the invention, the terminal device can send a second data frame to the second router device to obtain its connection password and establish a network connection with it. This allows the terminal device to actively obtain the router device's connection password, avoiding the time-consuming process of manually entering the connection password and thus improving the user experience.
[0108] In this embodiment, the second feedback data frame received by the terminal device may include a fourth verification number field, a second device identifier field, and a second password field. The terminal device can use a fourth decryption algorithm corresponding to the fourth verification number field in the target router device to decrypt the second device identifier field and the second password field in the second feedback data frame, obtaining the target connection password and the identifier of the target router device. This enables the terminal device to establish a network connection with the target router.
[0109] For example, the second feedback data frame may also include a fourth identifier field and a fourth function field. The fourth identifier field indicates that the second feedback data frame is an active feedback frame, and the fourth function field indicates the function of the second feedback data frame.
[0110] In one possible implementation, the second feedback data frame may further include a second device address field, a fourth verification field, and a fourth random number segment. The second device address field stores the encrypted MAC address of the terminal device, the fourth verification field is used to verify the integrity of the second feedback data frame, and the fourth random number segment stores a fourth random value used for verification and decryption of the second feedback data frame. It is understood that the fourth verification field and the fourth random number segment can assist the terminal device in decrypting the second device identification field and the second password field.
[0111] For example, when determining the target router device, the terminal device can obtain the network signal strength of at least one second router device; and determine the second router device with the largest network signal strength among the second router devices whose network signal strength is greater than the signal strength threshold as the target router device.
[0112] In this embodiment of the invention, the second router device with the strongest network signal strength among the second router devices whose network signal strength is greater than the signal strength threshold is determined as the target router device. This ensures the network signal strength of the terminal device when it establishes a network connection with the target router, thereby further improving the user experience.
[0113] Therefore, the password synchronization method provided in this embodiment of the invention receives a first data frame sent by a router device after the router device modifies its connection password; determines a first decryption algorithm and a first application programming interface (API) corresponding to a first verification number; uses the first API to decrypt the first device identifier field using the first decryption algorithm to obtain the router device's identifier, and decrypts the first password field to obtain a new connection password; sends a first feedback data frame to the router device; the first feedback data frame is used to notify the router device that the terminal device has successfully synchronized the new connection password; and establishes a network connection with the router device using the router device's identifier and the new connection password. This method can obtain the modified new connection password after the router device modifies its connection password, avoiding the time-consuming problem of authentication through a server, improving the efficiency of the terminal device synchronizing the router device's new connection password, and thus enhancing the user experience.
[0114] The following section will apply this password synchronization method to router devices to illustrate the technical solution provided by this invention. Figure 3 This is a schematic flowchart illustrating another password synchronization method provided in an embodiment of the present invention. This password synchronization method can be executed by software and / or hardware devices. For example, the hardware device can be a password synchronization device, which can be a router device or a processing chip within a router device. For example, please refer to [link to example]. Figure 3As shown, the password synchronization method may include:
[0115] S301. Change the router's connection password to a new one. The connection password is used to establish a network connection with the terminal device.
[0116] For example, when changing the connection password of a router, the router may receive a user's command to change the password and modify the router's connection password accordingly. Alternatively, the router may automatically change the password based on its settings. For instance, the router may be configured to change its connection password every week. This application does not impose any limitations on how the connection password of a router is changed.
[0117] S302. Based on the LAN MAC address of at least one terminal device stored in the LAN MAC address list, send a first data frame to at least one terminal device, wherein the terminal device has established a network connection with the router device before the router device changes the connection password.
[0118] For example, according to the above embodiments, the router device and at least one terminal device receiving the first data frame sent by the router device are bound to the same account or the same identifier ID through a server. For details, please refer to the above embodiments; the embodiments of the present invention will not repeat them here. Furthermore, when the router device sends the first data frame to at least one terminal device, it can call the password synchronization interface to actively send a first data request to at least one terminal device; the embodiments of the present invention do not impose any limitations on this.
[0119] It is understood that the MAC addresses of terminal devices stored in the router device can be the MAC addresses of terminal devices with which it has established network connections, or the MAC addresses of terminal devices trusted by the router device. The number of MAC addresses stored in the router device is not limited in this embodiment of the invention. For example, the router device can store the MAC addresses of 31 terminal devices.
[0120] S303. Receive a first feedback data frame sent by at least one terminal device, the first feedback data frame being used to indicate that the terminal device has successfully synchronized the new connection password.
[0121] For example, the first feedback data frame may include a second identifier field, a second function field, a second checksum field, and a second device address field. The second identifier field indicates that the first feedback data frame is an active feedback frame, and the second function field indicates the function of the first feedback data frame. When the router receives the first feedback data frame, it can use the second decryption algorithm corresponding to the second checksum field to decrypt the second device address field, obtain the MAC address of the terminal device, and record the MAC address of the terminal device.
[0122] In this embodiment of the invention, the router device records the MAC address of the terminal device, enabling the router device to promptly identify the terminal devices that have synchronized the new connection password, so as to facilitate subsequent operations of the router device, such as sending the first data frame again to the terminal devices that have not successfully synchronized.
[0123] For example, the first data frame may also include a timestamp field. This timestamp field stores the router's restart time. This allows the router to perform a restart operation when the restart time is reached. The restart time can be 3 minutes or 5 minutes after the router's password is changed, depending on the specific requirements.
[0124] In this embodiment of the invention, by controlling the router device to perform a restart operation, the router device uses a new connection password to verify the terminal device after restarting, so as to determine whether to establish a network connection with the terminal device.
[0125] S304. Establish a network connection with the terminal device based on the new connection password.
[0126] For example, after the router device performs a restart operation, it can also receive network connection requests from terminal devices, including new connection passwords; send a successful network connection result to the terminal device; and establish a network connection with the terminal device.
[0127] Understandably, when a router connects to a terminal device, it can verify the connection password sent by the terminal device. If the connection password sent by the terminal device is a new connection password, the verification is successful, and a network connection is established with the terminal device.
[0128] Therefore, the password synchronization method provided in this embodiment of the invention, applied to a router device, modifies the router device's connection password to a new connection password used to establish a network connection with a terminal device. Based on the LAN MAC addresses of at least one terminal device stored in the LAN MAC address list, a first data frame is sent to at least one terminal device, which had previously established a network connection with the router device before the connection password was modified. A first feedback data frame is received from at least one terminal device, indicating that the terminal device has successfully synchronized the new connection password. A network connection is then established with the terminal device using the new connection password. This method proactively sends a first data frame to the terminal device after the router device modifies the password, synchronizing the modified connection password to the terminal device, enabling the terminal device to establish a network connection with the router device using the new connection password.
[0129] According to the above embodiments, the terminal device can proactively send a second data frame to the router device to obtain a new connection password. Therefore, after controlling the router device to perform a restart operation, the router device can receive the second data frame sent by the terminal device to be synchronized. The second data frame includes a third verification number field, a third device address field, and a key field. It determines a third decryption algorithm and a second application programming interface (API) corresponding to the third verification number field and / or the key field. Through the second API, it uses the third decryption algorithm to decrypt the third device address field to obtain the MAC address of the terminal device to be synchronized. Based on the MAC address of the terminal device to be synchronized, it sends a second feedback data frame to the terminal device to be synchronized. The second feedback data frame contains the router device's identifier and the router device's new connection password. The new connection password and the router device identifier are used by the terminal device to be synchronized to establish a network connection with the router device.
[0130] For example, the terminal device to be synchronized according to the above embodiments can be a device that has never established a network connection with the router device, or a device that has established a network connection with the router device but whose existing connection password is an incorrect connection password. The embodiments of the present invention do not specifically limit the terminal device to be synchronized.
[0131] It is understood that the method for determining the second decryption algorithm and the second application programming interface corresponding to the second verification number is similar to the method for determining the first decryption algorithm and the first application programming interface corresponding to the first verification number in the above embodiments. For details, please refer to the above embodiments. The embodiments of the present invention will not be repeated here.
[0132] In this embodiment of the invention, the router device can send its new connection password and router device identifier to the terminal device to be synchronized based on the second data frame sent by the terminal device to be synchronized. In other words, the terminal device to be synchronized can actively request the synchronization connection password from the router device without manually entering a new connection password, saving a lot of time and thus improving the user experience.
[0133] To facilitate understanding of the password synchronization method provided in this embodiment of the invention, the following will use the interaction between a router device and a terminal device as an example to describe the technical solution provided in this embodiment of the invention in detail. For specific details, please refer to... Figure 4 As shown, Figure 4 This is a flowchart illustrating a method for synchronizing passwords from a router device to a terminal device, as provided in an embodiment of the present invention.
[0134] according to Figure 4As shown, after changing the password, the router device obtains the MAC address of the terminal device connected to the router device and the router device's restart time, and calls the password change synchronization interface to actively send a password change synchronization frame to the terminal device, which is the first data frame described in the above embodiment. The password is the connection password described in the above embodiment, and the router device's restart time can be the time interval between the moment the router device changes the password and the moment the router device performs the restart operation.
[0135] For example, a password change synchronization frame sent by a router device to an end device may include the following fields:
[0136] The first function field, FUNCTION EID|EID LENGTH|EID content, contains EID LENGTH, which indicates the number of bytes. This number is not fixed and can be defined according to the actual situation. For example, defining the length as 4 bytes means that the EID is 4 bytes long, which can describe 4,294,967,295 functions, with a maximum length of 255 bytes. EID represents the function value. The first identifier field, “A”|TYPE, indicates that the first data frame is an active password transmission frame used by company A. The first checksum field, ENCTION EID|EID LENGTH|EID content, describes in detail the encryption / decryption algorithm and the checksum of the verification algorithm. During software parsing, the checksum can be used to select different APIs for calculation. The first device identifier field, SSID EID|EID LENGTH|EID content, stores the router device's SSID. The first password field, PASSWD EID|EID LENGTH|EID content, stores the router's connection password, such as the Wi-Fi password. The first time identifier field (time EID|EID LENGTH|EID content) stores the router's restart time. The first random number field (random number|EID LENGTH|EID content) stores a random value generated by the router for this frame; this value is used for frame verification and decryption. The first device address field (MAC EID|EID LENGTH|EID content) includes up to 31 MAC addresses of terminal devices, each representing a device to which the password is to be synchronized. The Type field indicates that the password synchronization frame was sent proactively. The first verification field (Integrity check|EID LENGTH|EID content) verifies the integrity of the first data frame.
[0137] For example, when a router device calls the password change synchronization interface to actively send a password change synchronization frame to a terminal device, it can send the frame based on the MAC address of the terminal device connected to the router device. This embodiment of the invention does not impose any limitations on the specific MAC address.
[0138] Furthermore, according to Figure 4 It is understood that when the terminal device receives the password change synchronization frame sent by the router, it selects the corresponding algorithm to decrypt the password change synchronization frame, obtains the router device identifier SSID and the modified connection password, generates and sends the acknowledgment character ACK to the router device, which is the first feedback data frame described in the above embodiment. For example, the first feedback data frame sent by the terminal device may include the following fields:
[0139] The second function field is FUNCTION EID|EID LENGTH|EID content. The second identifier field is "A"|TYPE, which indicates that the first data frame is an active feedback frame used by Company A. The second checksum field is ENCTION EID|EID LENGTH|EID content; the second device address field is MAC EID|EID LENGTH|EID content; the second verification field is Integrity check|EID LENGTH|EID content; and the second random number field is random number|EID LENGTH|EID content. The second checksum field can include the MAC address of the terminal device, which can be represented by MACEID. This informs the router that the terminal device corresponding to this MAC address has successfully changed its password, and the field can be encrypted.
[0140] Furthermore, when the router receives the ACK sent by the terminal device, it can decrypt it using the complete checksum to obtain the terminal device's MAC address and determine whether the restart time has been reached. If the restart time has not been reached, it continues to call the password change synchronization interface to send a password change synchronization frame to the terminal device that failed to change its password. It is understandable that since the ACK sent by the terminal device includes its MAC address, when the router sends a password change synchronization frame to the terminal device again, it does not need to send it to the terminal device that received the MAC address. Figure 4 As shown, if the router's restart time is reached, the router will enter the restart process.
[0141] Therefore, the method by which the router sends a password synchronization frame to the terminal device can be found in [reference needed]. Figure 5 As shown, Figure 5This is a flowchart illustrating a method for a router device to send a password synchronization frame to a terminal device, provided by an embodiment of the present invention. It is understood that... Figure 5 The steps shown can be found in the above embodiments, and will not be repeated here in the embodiments of the present invention.
[0142] Example, based on Figure 4 and Figure 5 As shown, for a terminal device, when obtaining the modified password from the router, it can simultaneously obtain the router's restart time. Upon reaching the restart time, it performs a scan to establish a network connection using the modified password and the router's SSID. The process then checks if the scan has timed out. If not, a network connection is established with the router. If the scan times out and no connection is established within a certain time period, the system checks if the number of routers with known passwords stored in the random access memory is greater than one. If greater than one, it checks whether a network connection with the stored routers is allowed. If allowed, it selects the router with the strongest signal strength from the stored routers and checks if this strongest signal strength exceeds a signal strength threshold. If it does, the terminal connects to the router with the strongest signal strength.
[0143] according to Figure 4 As shown, if the number of router devices with known passwords stored in the random access memory is less than or equal to 1, or if the terminal device is not allowed to connect to the stored router devices, and / or if the maximum signal strength is less than or equal to the signal strength threshold, or if the terminal device fails to connect to the router device with the strongest signal strength, then the terminal device actively sends a password request frame, i.e., the second data frame, to the router device to request the router device to synchronize its connection password.
[0144] For an example, the method for a terminal device to actively request password synchronization from a router device can be found in [link to example]. Figure 6 As shown, Figure 6 This is a flowchart illustrating a method for a terminal device to actively request a synchronized password from a router device, as provided in an embodiment of the present invention. Figure 6 As shown, when a terminal device actively requests a password synchronization from a router, the terminal device can actively send a password request frame to the router. This password request frame may include the following fields:
[0145] The third field contains the following: ENCTION EID|EID LENGTH|EID content; the third device address field is MAC EID|EID LENGTH|EID content; the key field is public key|EID LENGTH|EID content; the third identifier field is "A"|TYPE; the third function field is FUNCTION EID|EID LENGTH|EID content; the third check field is Integrity check|EID LENGTH|EID content; and the third random number field is random number|EID LENGTH|EID content. In the third function field, EID LENGTH indicates the number of bytes. This number of bytes is not fixed and can be defined according to the actual situation. For example, defining a length of 4 means that the EID is 4 bytes long, which can describe 4,294,967,295 functions, with a maximum length of 255 bytes. EID represents the function value. The password field can store the public key field. When the router device replies with its SSID and password, it can use a public key encryption algorithm. Whether public key encryption is used depends on whether ENCTION EID indicates that this encryption algorithm is used. The third identifier field can indicate that the data frame is an actively sent password request frame.
[0146] according to Figure 6 As shown, after receiving a password request frame from a terminal device, the router device can send its SSID and password to the terminal device, either via a password synchronization frame. The specific password synchronization frame is described above, and will not be repeated here.
[0147] For example, a terminal device can send password request frames, i.e., second feedback data frames, to multiple router devices to obtain the SSID and password of the router devices and store them in random access memory. It is understood that the number of SSIDs and passwords of router devices that can be stored in the terminal device's random access memory is limited; for example, it can store a maximum of four SSIDs and passwords of router devices. This embodiment of the invention does not impose any limitation on this. The representation of fields in the second feedback data frame can refer to the representation of the first data frame, second data frame, or first feedback data frame described above, and will not be repeated here.
[0148] It is understandable that the representation of the first data frame, the second data frame, the first feedback data frame, and the second feedback data frame can be the same or different. When the representation is the same, the data contained in them are different.
[0149] In summary, the password synchronization method provided by this invention reduces the number of data frames exchanged between the router device and the terminal device, thus ensuring the security and efficiency of password synchronization and improving the user experience.
[0150] Figure 7 This is a schematic diagram of a cryptographic synchronization device 70 provided in an embodiment of the present invention. For example, please refer to [link to example diagram]. Figure 7 As shown, the password synchronization device 70 may include:
[0151] The receiving module 701 is used to receive a first data frame sent by the router device. The first data frame includes a first checksum field, a first device identifier field, and a first password field. The first data frame is sent after the router device modifies the connection password.
[0152] Processing module 702 is used to determine the first decryption algorithm and the first application programming interface corresponding to the first verification number.
[0153] The processing module 702 is also used to decrypt the first device identifier field through the first application programming interface using the first decryption algorithm to obtain the identifier of the router device, and to decrypt the first password field to obtain a new connection password.
[0154] Feedback module 703 is used to send a first feedback data frame to the router device. The first feedback data frame is used to notify the router device that the terminal device has successfully synchronized the new connection password.
[0155] The connection module 704 is used to establish a network connection with the router device using the router device identifier and a new connection password.
[0156] Optionally, the first data frame also includes a timestamp field, which stores the restart time of the routing device. The connection module 704 is specifically used to establish a network connection with the router device after the router's restart time has elapsed, using the router device identifier and a new connection password.
[0157] Optionally, the first data frame further includes a first identifier field and a first function field; the first identifier field is used to indicate that the first data frame is a password-initiated frame, and the first function field is used to indicate the function of the first data frame.
[0158] Optionally, the processing module 702 is further configured to, upon receiving a network connection failure result from a router device, or upon not receiving a network connection result from a router device within a preset time period, obtain the signal strength of at least one first router device stored in the terminal device. The first router device is a router device whose corresponding connection password is pre-stored in the terminal device. If at least one of the first router devices has a signal strength greater than a signal strength threshold, a connection request is sent to the first router device with the strongest signal strength among the at least one first router devices to establish a network connection. The connection request includes the connection password of the first router device with the strongest signal strength.
[0159] Optionally, the processing module 702 is further configured to: send a second data frame to at least one second router device when, in the case that, among at least one first router device, there is no first router device with a signal strength greater than a signal strength threshold, and / or, the terminal device does not store a first router device, wherein the second router device is a router device scanned by the terminal device but not stored, and a router device stored by the terminal device but with an incorrect connection password; the second data frame is used to obtain the connection password of at least one second router device; upon receiving a second feedback data frame sent by at least one second router device based on the second data frame, identify the target router device among the at least one second router device; and decrypt the second feedback data frame sent by the target router device to obtain the target connection password of the target router and the identifier of the target router device.
[0160] The connection module 704 is also used to establish a network connection with the target router device using the target connection password and the identifier of the target router device.
[0161] Optionally, the second feedback data frame includes a fourth verification number field, a second device identifier field, and a second password field; the processing module 702 is specifically used to decrypt the second device identifier field and the second password field using a fourth decryption algorithm corresponding to the fourth verification number field in the target router device, to obtain the target connection password of the target router device and the identifier of the target router device.
[0162] Optionally, the processing module 702 is specifically used to obtain the network signal strength of at least one second router device; and to determine the second router device with the largest network signal strength among the second router devices whose network signal strength is greater than the signal strength threshold as the target router device.
[0163] Optionally, the second feedback data frame further includes a fourth identifier field and a fourth function field; the fourth identifier field is used to indicate that the second feedback data frame is an active feedback frame, and the fourth function field is used to indicate the function of the second feedback data frame.
[0164] The password synchronization device provided in this embodiment of the invention can execute the technical solution of the password synchronization method applied to the terminal device in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the password synchronization method. Please refer to the implementation principle and beneficial effects of the password synchronization method. It will not be repeated here.
[0165] Figure 8 This is a schematic diagram of another cryptographic synchronization device 80 provided in an embodiment of the present invention. For example, please refer to [link to example diagram]. Figure 8 As shown, the cryptographic synchronization device 80 may include:
[0166] Modify module 801 to change the connection password of the router device to a new connection password, which is used to establish a network connection with the terminal device.
[0167] The sending module 802 is used to send a first data frame to at least one terminal device based on the local area network MAC address of at least one terminal device stored in the local area network MAC address list, wherein the terminal device has established a network connection with the router device before the router device changes the connection password.
[0168] The processing module 803 is used to receive a first feedback data frame sent by at least one terminal device, the first feedback data frame being used to indicate that the terminal device has successfully synchronized a new connection password.
[0169] The connection module 804 is used to establish a network connection with the terminal device based on the new connection password.
[0170] Optionally, the first data frame includes a time identifier field; the time identifier field stores the restart time of the router device; the processing module 803 is further configured to control the router device to perform a restart operation when the restart time of the router device is reached.
[0171] Optionally, the first feedback data frame includes a second identifier field, a second function field, a second checksum field, and a second device address field. The second identifier field indicates that the first feedback data frame is an active feedback frame, and the second function field indicates the function of the first feedback data frame. The processing module 803 is further configured to decrypt the second device address field using a second decryption algorithm corresponding to the second checksum field to obtain the MAC address of the terminal device, and record the MAC address of the terminal device.
[0172] The processing module 803 is further configured to receive a second data frame sent by the terminal device to be synchronized, the second data frame including a third verification number field, a third device address field, and a key field; determine a third decryption algorithm and a second application programming interface corresponding to the third verification number field and / or the key field; decrypt the third device address field using the third decryption algorithm through the second application programming interface to obtain the MAC address of the terminal device to be synchronized; and send a second feedback data frame to the terminal device to be synchronized based on the MAC address of the terminal device to be synchronized, the second feedback data frame containing the router device identifier and the router device's new connection password, the new connection password and the router device identifier being used to establish a network connection between the terminal device to be synchronized and the router device.
[0173] Optionally, the second data frame may also include a third identification field and a third function field; the third identification field is used to indicate that the second data frame is a password request frame, and the third function field is used to indicate the function of the second data frame.
[0174] The password synchronization device provided in this embodiment of the invention can execute the technical solution of the password synchronization method applied to router devices in any of the above embodiments. Its implementation principle and beneficial effects are similar to those of the password synchronization method. Please refer to the implementation principle and beneficial effects of the password synchronization method. It will not be repeated here.
[0175] Figure 9 This is a schematic diagram of an electronic device structure provided by the present invention. (See diagram below.) Figure 9 As shown, the electronic device 900 may include at least one processor 901 and a memory 902.
[0176] The memory 902 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions.
[0177] The memory 902 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0178] The processor 901 executes computer execution instructions stored in the memory 902 to implement the cryptographic synchronization method described in the foregoing method embodiments. The processor 901 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. Specifically, when implementing the cryptographic synchronization method described in the foregoing method embodiments, the electronic device may be, for example, a terminal, a server, or other electronic device with processing capabilities.
[0179] Optionally, the electronic device 900 may also include a communication interface 903. In specific implementations, if the communication interface 903, memory 902, and processor 901 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.
[0180] Optionally, in a specific implementation, if the communication interface 903, memory 902, and processor 901 are integrated on a single chip, then the communication interface 903, memory 902, and processor 901 can communicate through an internal interface.
[0181] The present invention also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program instructions, which are used in the methods described in the above embodiments.
[0182] The present invention also provides a program product including executable instructions stored in a readable storage medium. At least one processor of an electronic device can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the electronic device to implement the cryptographic synchronization methods provided in the various embodiments described above.
[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A cryptographic synchronization method, characterized in that, Applied to a terminal device, the method includes: The router receives a first data frame sent by the router device. The first data frame includes a first verification number field, a first device identifier field, a first password field, and a time identifier field. The first data frame is sent after the router device modifies the connection password. The time identifier field stores the restart time of the router device. Determine the first decryption algorithm and the first application programming interface corresponding to the first verification number field; Using the first application interface, the first decryption algorithm is used to decrypt the first device identifier field to obtain the router device identifier, and the first password field is decrypted to obtain a new connection password. Send a first feedback data frame to the router device. The first feedback data frame is used to notify the router device that the terminal device has successfully synchronized the new connection password. Establish a network connection with the router device using the router device identifier and the new connection password; The method further includes: After the router's restart time is reached, a network connection is established with the router device using the router device identifier and the new connection password; The method further includes: If a network connection failure result is received from the router device, or if no network connection result is received from the router device within a preset time period, the signal strength of at least one first router device stored in the terminal device is obtained. The first router device is a router device in the terminal device that has a corresponding connection password pre-stored. If there is a first router device among the at least one first router devices with a signal strength greater than a signal strength threshold, then a connection request is sent to the first router device with the strongest signal strength among the at least one first router devices to establish a network connection with the first router device with the strongest signal strength. The connection request includes the connection password of the first router device with the strongest signal strength.
2. The method according to claim 1, characterized in that, The first data frame also includes a first identifier field and a first function field; The first identifier field is used to indicate that the first data frame is a password-initiated frame, and the first function field is used to indicate the function of the first data frame.
3. The method according to claim 1, characterized in that, The method further includes: If there is no first router device with a signal strength greater than the signal strength threshold among the at least one first router devices, and / or the terminal device does not store a first router device, then a second data frame is sent to at least one second router device, wherein the second router device is a router device scanned by the terminal device but not stored, and a router device stored by the terminal device but with an incorrect connection password, and the second data frame is used to obtain the connection password of the at least one second router device; Upon receiving a second feedback data frame sent by at least one of the second router devices according to the second data frame, the target router device is identified among the at least one of the second router devices; The second feedback data frame sent by the target router device is decrypted to obtain the target connection password of the target router and the identifier of the target router device; A network connection is established with the target router device using the target connection password and the identifier of the target router device.
4. The method according to claim 3, characterized in that, The second feedback data frame includes a fourth verification number field, a second device identifier field, and a second password field; The step of decrypting the second feedback data frame sent by the target router device to obtain the target connection password and the identifier of the target router device includes: The second device identifier field and the second password field are decrypted using the fourth decryption algorithm corresponding to the fourth verification number field in the target router device to obtain the target connection password of the target router device and the identifier of the target router device.
5. The method according to claim 3, characterized in that, The step of identifying the target router device among at least one of the second router devices includes: Obtain the network signal strength of at least one of the second router devices; Among the second router devices whose network signal strength is greater than the signal strength threshold, the second router device with the strongest network signal strength is identified as the target router device.
6. The method according to claim 4, characterized in that, The second feedback data frame also includes a fourth identifier field and a fourth function field; The fourth identification field is used to indicate that the second feedback data frame is an active feedback frame, and the fourth function field is used to indicate the function of the second feedback data frame.
7. A cryptographic synchronization method, characterized in that, Applied to router devices, the method includes: Change the router's connection password to a new connection password, which is used to establish a network connection with the terminal device; Based on the LAN MAC addresses of at least one terminal device stored in the LAN MAC address list, a first data frame is sent to the at least one terminal device. The terminal device had established a network connection with the router device before the router device changed the connection password. The first data frame includes a first verification number field, a first device identifier field, a first password field, and a time identifier field. The time identifier field stores the restart time of the router device, so that the terminal device can determine the first decryption algorithm and the first application interface corresponding to the first verification number field. Through the first application interface, the terminal device uses the first decryption algorithm to decrypt the first device identifier field to obtain the router device identifier, and decrypts the first password field to obtain the new connection password. Then, a first feedback data frame is sent to the router device. Receive a first feedback data frame sent by the at least one terminal device, the first feedback data frame being used to indicate that the terminal device has successfully synchronized the new connection password; Establish a network connection with the terminal device based on the new connection password; Before establishing a network connection with the terminal device, the method further includes: When the router device's restart time is reached, control the router device to perform a restart operation.
8. The method according to claim 7, characterized in that, The first feedback data frame includes a second identifier field, a second function field, a second verification number field, and a second device address field. The second identifier field is used to indicate that the first feedback data frame is an active feedback frame, and the second function field is used to indicate the function of the first feedback data frame. The method further includes: The second device address field is decrypted using the second decryption algorithm corresponding to the second verification number field to obtain the MAC address of the terminal device, and the MAC address of the terminal device is recorded.
9. The method according to claim 7, characterized in that, The method further includes: Receive a second data frame sent by the terminal device to be synchronized, the second data frame including a third verification number field, a third device address field and a key field; Determine the third decryption algorithm and the second application programming interface corresponding to the third verification number field and / or the key field; The MAC address of the terminal device to be synchronized is obtained by decrypting the third device address field using the third decryption algorithm through the second application interface. A second feedback data frame is sent to the terminal device to be synchronized based on the MAC address of the terminal device to be synchronized. The second feedback data frame contains the identifier of the router device and the new connection password of the router device. The new connection password and the router device identifier are used by the terminal device to be synchronized to establish a network connection with the router device.
10. The method according to claim 9, characterized in that, The second data frame also includes a third identifier field and a third function field; The third identifier field is used to indicate that the second data frame is a password request frame, and the third function field is used to indicate the function of the second data frame.
11. A cryptographic synchronization device, characterized in that, include: The receiving module is used to receive a first data frame sent by the router device. The first data frame includes a first verification number field, a first device identifier field, a first password field, and a time identifier field. The first data frame is sent after the router device modifies the connection password. The time identifier field stores the restart time of the router device. The processing module is used to determine the first decryption algorithm and the first application programming interface corresponding to the first verification number; The processing module is further configured to decrypt the first device identifier field using the first decryption algorithm through the first application interface to obtain the identifier of the router device, and to decrypt the first password field to obtain a new connection password. The feedback module is used to send a first feedback data frame to the router device, the first feedback data frame being used to notify the router device that the terminal device has successfully synchronized the new connection password; A connection module is used to establish a network connection with the router device using the router device identifier and the new connection password; The connection module is specifically used for: After the router's restart time is reached, a network connection is established with the router device using the router device identifier and the new connection password; The processing module is further configured to: If a network connection failure result is received from the router device, or if no network connection result is received from the router device within a preset time period, the signal strength of at least one first router device stored in the terminal device is obtained. The first router device is a router device in the terminal device that has a corresponding connection password pre-stored. If there is a first router device among the at least one first router devices with a signal strength greater than a signal strength threshold, then a connection request is sent to the first router device with the strongest signal strength among the at least one first router devices to establish a network connection with the first router device with the strongest signal strength. The connection request includes the connection password of the first router device with the strongest signal strength.
12. A cryptographic synchronization device, characterized in that, include: The modification module is used to change the connection password of the router device to a new connection password, which is used to establish a network connection with the terminal device. The sending module is configured to send a first data frame to at least one terminal device based on the LAN MAC address of at least one terminal device stored in the LAN MAC address list. The terminal device has established a network connection with the router device before the router device modifies the connection password. The first data frame includes a first verification number field, a first device identifier field, a first password field, and a time identifier field. The time identifier field stores the restart time of the router device, so that the terminal device can determine the first decryption algorithm and the first application interface corresponding to the first verification number field. Through the first application interface, the terminal device uses the first decryption algorithm to decrypt the first device identifier field to obtain the router device identifier, and decrypts the first password field to obtain the new connection password, and sends a first feedback data frame to the router device. The processing module is configured to receive a first feedback data frame sent by the at least one terminal device, wherein the first feedback data frame is used to indicate that the terminal device has successfully synchronized the new connection password. A connection module is used to establish a network connection with the terminal device according to the new connection password; Before establishing a network connection with the terminal device, the following is also included: When the router device's restart time is reached, control the router device to perform a restart operation.
13. An electronic device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-6, or to implement the method as described in any one of claims 7-10.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-6, or to implement the method as described in any one of claims 7-10.
Citation Information
Patent Citations
Wireless network access method and device
CN106376057A
Method and system for automatically updating Wi-Fi (wireless fidelity) passwords
CN107613492A