Network access method, electronic device, and storage medium
Through the network access method using dynamic code verification in smart home systems, the complexity and security problems of terminal access after gateway updates are solved, and automated access and security improvement are achieved.
Patent Information
- Application Number
- PCT/CN2024/113126
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-13
- Filing Date
- 2024-08-19
- Publication Date
- 2025-03-20
AI Technical Summary
In smart home systems, after the gateway is iteratively updated, users need to manually configure each terminal to access the new gateway, which is complex in operation and security risks.
A network access method is provided, by receiving dynamic codes sent by a new gateway and comparing them with pre-stored dynamic codes, the gateway legitimacy is automatically verified and the terminal's automated access is realized.
No manual configuration is required for users, which reduces the complexity of accessing a new gateway after replacing the gateway, improves the access efficiency after the gateway is replaced, improves the user experience and enhances system security.
Smart Images

Figure CN2024113126_20032025_PF_FP_ABST
Abstract
Description
Network access method, electronic device, and storage medium
[0001] This disclosure claims priority to Chinese patent application No. 202311185088.4, filed on September 13, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present disclosure relates to the field of communication technologies, and in particular to a network access method, electronic device, and storage medium. Background Art
[0003] With the development of the Internet of Things (IoT), smart home systems based on IoT are gaining increasing attention and favor due to their versatility and convenience. A smart home system primarily consists of a gateway (server) and multiple terminals deployed throughout the home. When a gateway is replaced due to an iterative update, each terminal needs to be reconfigured to connect to the new gateway.
[0004] Summary of the Invention
[0005] In one aspect, a network access method is provided, applied to a first terminal. The network access method includes: receiving a first dynamic code sent by a first gateway, the first dynamic code being used to verify the legitimacy of the first gateway; comparing the first dynamic code with a pre-stored second dynamic code, the second dynamic code being a dynamic code generated by interaction with a second gateway, the second gateway being the gateway most recently accessed by the first terminal; and accessing the first gateway if the first dynamic code and the second dynamic code are consistent.
[0006] In another aspect, a network access method is provided, which is applied to a first gateway. The network access method includes: when the first gateway is powered on, monitoring a first dynamic code, the first dynamic code being used to verify the legitimacy of the first gateway; sending the first dynamic code over a broadcast channel; receiving an access request from a first terminal, the access request being used to request access to the first gateway; and, in response to the access request, sending an access response to the first terminal, the access response being used to indicate successful access to the first gateway.
[0007] In another aspect, a network access method is provided, applied to a second gateway. The network access method includes: receiving multiple second dynamic codes sent by multiple first terminals, the multiple first terminals corresponding one-to-one to the multiple second dynamic codes; sending a second response message to each first terminal, the second response message indicating receipt of the second dynamic code; determining whether the multiple second dynamic codes are consistent; and if there are inconsistent second dynamic codes among the multiple second dynamic codes, sending a third indication message to the multiple first terminals, the third indication message being used to indicate feedback of an updated second dynamic code.
[0008] In another aspect, a communication device is provided, which is applied to a first terminal. The communication device includes:
[0009] A receiving unit, configured to receive a first dynamic code sent by the first gateway, wherein the first dynamic code is used to verify the legitimacy of the first gateway;
[0010] The processing unit is configured to compare a first dynamic code with a pre-stored second dynamic code; the second dynamic code is a dynamic code generated by interaction with a second gateway, and the second gateway is the gateway most recently accessed by the first terminal; and access the first gateway if the first dynamic code and the second dynamic code are consistent.
[0011] In another aspect, a communication device is provided, which is applied to a first gateway. The communication device includes:
[0012] an acquiring unit, configured to monitor a first dynamic code when the first gateway is powered on, the first dynamic code being used to verify the legitimacy of the first gateway;
[0013] A sending unit, configured to send a first dynamic code based on a broadcast channel;
[0014] The acquiring unit is further configured to receive an access request sent by the first terminal; the access request is used to request access to the first gateway;
[0015] The sending unit is further configured to send an access response to the first terminal in response to the access request, where the access response is used to indicate successful access to the first gateway.
[0016] In another aspect, a communication device is provided for use in a second gateway. The communication device includes:
[0017] a receiving unit, configured to receive a plurality of second dynamic codes sent by a plurality of first terminals, wherein the plurality of first terminals correspond to the plurality of second dynamic codes in a one-to-one manner;
[0018] The sending unit is configured to send second response information to each first terminal, where the second response information indicates receipt of the second dynamic code; the processing unit is configured to determine whether multiple second dynamic codes are consistent; and the sending unit is configured to send third indication information to the multiple first terminals if there are inconsistent second dynamic codes among the multiple second dynamic codes, where the third indication information is used to indicate feedback of an updated second dynamic code.
[0019] In another aspect, an electronic device is provided. The electronic device includes: one or more processors and a memory; the memory stores instructions executable by the processor; and when the one or more processors are configured to execute the instructions, the electronic device implements the network access method provided in any of the above aspects.
[0020] In another aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer executes the network access method provided in any one of the above aspects.
[0021] In yet another aspect, a computer program product comprising computer instructions is provided. When the computer instructions are executed on a computer, the computer is caused to execute the network access method provided in any one of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings are used to provide a further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation to the technical solution of the present disclosure.
[0023] FIG1 is a schematic structural diagram of a smart home system according to some embodiments of the present disclosure.
[0024] FIG2 is a flow chart of a network access method according to some embodiments of the present disclosure.
[0025] FIG3 is a flowchart of another network access method according to some embodiments of the present disclosure.
[0026] FIG4 is a flowchart of another network access method according to some embodiments of the present disclosure.
[0027] FIG5 is a flowchart of another network access method according to some embodiments of the present disclosure.
[0028] FIG6 is a flowchart of another network access method according to some embodiments of the present disclosure.
[0029] FIG7 is a flowchart of another network access method according to some embodiments of the present disclosure.
[0030] FIG8 is a schematic diagram of the overall flow of a network access method according to some embodiments of the present disclosure.
[0031] FIG9 is a schematic diagram showing the composition of a communication device according to some embodiments of the present disclosure.
[0032] FIG10 is a schematic diagram showing the composition of another communication device according to some embodiments of the present disclosure.
[0033] FIG11 is a schematic diagram showing the composition of yet another communication device according to some embodiments of the present disclosure.
[0034] FIG12 is a schematic structural diagram of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION
[0035] To enable those skilled in the art to better understand the technical solutions of the embodiments of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those of ordinary skill in the art without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0036] Unless the context requires otherwise, throughout the specification and claims, the term "comprise" and its other forms, such as the third person singular form "comprises" and the present participle form "comprising", are to be interpreted as meaning "open", "including", that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" are intended to indicate that the particular features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the particular features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner.
[0037] The terms "first," "second," and the like are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature qualified by the terms "first," "second," and the like may explicitly or implicitly include one or more of such features. Throughout this disclosure, unless otherwise specified, "plurality" means two or more.
[0038] In the embodiments of the present disclosure, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present disclosure should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0039] Additionally, the use of “based on” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” one or more stated conditions or values may, in practice, be based on additional conditions or values beyond those stated.
[0040] With the rapid development of network technology, network speed and stability are no longer the main bottlenecks hindering the development of internet services. Fifth-generation mobile communication technology (5G) and fixed-line fiber-to-the-home (FTTH) have generated a wide range of practical needs, paving the way for significant growth in the smart home industry. Currently, many fully furnished homes have pre-installed sensors connected to personal home gateways, such as smoke detectors, curtain controllers, and lighting controllers.
[0041] Currently, after a gateway is updated, users are required to manually configure each node in the smart home system to join the new gateway. However, manual configuration requires a high level of user experience and poses security risks. For example, smoke sensors are typically installed on rooftops, making them difficult to operate and posing security risks, impacting the user experience. Therefore, reducing the operational complexity of connecting to a new gateway after a gateway replacement is a pressing technical issue.
[0042] Based on this, an embodiment of the present disclosure provides a network access method. After the gateway is replaced, the first terminal receives a first dynamic code sent by the first gateway. The first dynamic code is used to verify the legitimacy of the first gateway. The first gateway can be understood as the new gateway that has been replaced. Detection that the first dynamic code and the pre-stored second dynamic code are consistent represents that the first gateway is a legal gateway, and the first terminal accesses the first gateway. In this way, the first terminal automatically accesses the new gateway without the need for manual configuration by the user, reducing the operational complexity of accessing the new gateway after replacing the gateway, improving the efficiency of accessing the new gateway after the gateway is replaced, and helping to improve the user experience.
[0043] The following describes the solutions of the embodiments of the present disclosure in conjunction with the accompanying drawings.
[0044] FIG1 is a schematic diagram of the structure of a smart home system provided by an embodiment of the present disclosure. Referring to FIG1 , the smart home system includes a gateway 11 , multiple first terminals (eg, a first terminal 21 , a first terminal 22 , and a first terminal 23 ), and multiple second terminals 31 .
[0045] Gateway 11, also known as a gateway or protocol converter, implements network interconnection at the transport layer. It is a network interconnection device used only to connect two networks with different high-level protocols. It can be used to interconnect both wide area networks and local area networks. It is a computer system or device that performs the conversion task. It acts as a translator between two systems using different communication protocols, data formats, languages, or even completely different architectures. Unlike a bridge, which simply transmits information, gateway 11 repackages the received information to meet the needs of the destination system.
[0046] In some embodiments, the gateway 11 is communicatively connected to a plurality of first terminals, and is communicatively connected to a plurality of second terminals 31 through the plurality of first terminals.
[0047] As an example, the gateway 11 establishes a communication connection through a short-range communication method such as ZigBee, wireless fidelity (WIFI), or Bluetooth.
[0048] In some embodiments, for each first terminal among the multiple first terminals, such as the first terminal 21, the first terminal can be a sensor, such as a smoke sensor (abbreviated as: smoke sensor), a curtain controller, a light controller, a water level sensor, etc.
[0049] In some embodiments, the sensor can be a sensor with a routing function or a relay function. For example, taking the first terminal 21 as a sensor with a relay function, as shown in Figure 1, multiple second terminals 31 connected to the first terminal 21 can access the first gateway 11 through the first terminal 21.
[0050] In some embodiments, the first terminal may also have other names, for example, a routing node.
[0051] In some embodiments, a first terminal may also be used to enable other first terminals to access the gateway 11 through the first terminal. For example, the first terminal 22 and the first terminal 23 may also access the gateway 11 through the first terminal 21.
[0052] In some embodiments, for each of the multiple second terminals 31, the second terminal 31 can be a device with wireless transceiver capabilities, which can be deployed on land, including indoors or outdoors, handheld, wearable, or vehicle-mounted. The second terminal 31 can be a mobile phone, a tablet computer, a computer with wireless transceiver capabilities, a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical care, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, and the like. The embodiments of the present disclosure do not limit the application scenarios. The second terminal may sometimes also be referred to as a user, user equipment (UE), access terminal, UE unit, UE station, mobile station, mobile station, remote station, remote terminal, mobile device, UE terminal, wireless communication equipment, UE agent or UE device, etc., which is not limited to the embodiments of the present disclosure.
[0053] It should be understood that FIG1 is an exemplary structural diagram, and the number of devices included in the smart home system shown in FIG1 is not limited. For example, the number of first terminals and the number of second terminals are not limited. Furthermore, in addition to the devices shown in FIG1 , the smart home system shown in FIG1 may also include other devices, which are not limited in this regard.
[0054] Next, as shown in FIG2 , an embodiment of the present disclosure provides a network access method, which is applied to a first terminal. The first terminal may be any one of the multiple first terminals shown in FIG1 , for example, the first terminal 21 . The method includes the following S101 - S103 .
[0055] S101: Receive a first dynamic code sent by a first gateway.
[0056] The first gateway is a new gateway replaced by the smart home system, and the first dynamic code is used to verify the legitimacy of the first gateway.
[0057] In some embodiments, the first gateway may be a gateway that is powered on for the first time, that is, a gateway that is powered on for the first time after manufacturing is completed.
[0058] In some embodiments, after the first gateway is powered on, in order to enable other nodes in the smart home system to connect to the first gateway, the first gateway obtains a first dynamic code and then sends the first dynamic code. Correspondingly, the first terminal receives the first dynamic code sent by the first gateway.
[0059] As an example, the first terminal receiving the first dynamic code sent by the first gateway may be the first terminal receiving the first dynamic code sent by the first gateway via a broadcast channel. It should be understood that because the first gateway is a new gateway replaced by the smart home system, other nodes in the smart home system have not yet connected to the first gateway, and the first gateway cannot yet communicate directly with other nodes in the smart home system. Therefore, the first gateway sends the first dynamic code via the broadcast channel so that other nodes in the smart home system can receive the first dynamic code and then verify whether the first gateway is a legitimate gateway based on the first dynamic code.
[0060] In some embodiments, the first dynamic code is obtained by the first gateway based on at least one of the following methods: based on the user's voice configuration information, based on the configuration information sent by the second terminal, and the second terminal is a terminal that accesses the first terminal. For a detailed description of how the first gateway obtains the first dynamic code, please refer to the following description of S501 and will not be repeated here.
[0061] In some embodiments, the first dynamic code sent by the first gateway is encrypted, for example, encrypted by the first gateway based on an RSA algorithm. After receiving the encrypted first dynamic code, the first terminal decrypts the encrypted first dynamic code based on a locally stored RSA private key to obtain the first dynamic code.
[0062] S102: Compare the first dynamic code with a pre-stored second dynamic code.
[0063] The second dynamic code is a dynamic code generated by the interaction between the first terminal and the second gateway. The second gateway is the gateway that the first terminal accessed most recently, and can be understood as the old gateway before the smart home system was replaced.
[0064] In some embodiments, the first terminal pre-stores a second dynamic code. To verify the legitimacy of the first gateway, that is, to verify whether the first gateway is a legitimate gateway, the first terminal compares the first dynamic code with the second dynamic code of the second gateway after receiving the first dynamic code sent by the first gateway.
[0065] S103: Access the first gateway when the first dynamic code and the second dynamic code are consistent.
[0066] It should be understood that the first dynamic code is obtained by the first gateway based on the user's voice configuration information or the configuration information sent by the second terminal. It can be understood that the first dynamic code is obtained by the first gateway based on user input, and the second dynamic code is related to the second gateway that the first terminal last accessed. Therefore, when the first dynamic code and the second dynamic code are consistent, it means that the first gateway is a gateway that has passed user authentication, that is, the first gateway is a legal gateway, and the first terminal can access the first gateway.
[0067] In this way, when the first dynamic code and the second dynamic code are consistent, the first terminal accesses the first gateway.
[0068] Based on the embodiment shown in FIG2 , after the gateway is replaced, the first terminal receives the first dynamic code sent by the first gateway. The first dynamic code is used to verify the legitimacy of the first gateway, and the first gateway can be understood as the new gateway that has been replaced. When it is detected that the first dynamic code is consistent with the pre-stored second dynamic code, it represents that the first gateway is a legitimate gateway, and the first terminal accesses the first gateway. In this way, the first terminal automatically accesses the new gateway without the need for manual configuration by the user, reducing the complexity of accessing the new gateway after the gateway is replaced, improving the efficiency of accessing the new gateway after the gateway is replaced, and helping to improve the user experience.
[0069] The above embodiment is described based on the case where the first dynamic code and the second dynamic code are consistent. In some embodiments, when the first dynamic code and the second dynamic code are inconsistent, the first terminal refuses to access the first gateway.
[0070] It should be understood that when the first dynamic code and the second dynamic code are inconsistent, it means that the first gateway is not a legitimate gateway. In order to ensure the security of the smart home system, the first terminal refuses to access the first gateway.
[0071] As an example, as shown in FIG3 , the first terminal accesses the first gateway, that is, S103 , which may include the following S201 - S203 .
[0072] S201: Obtain an identifier of a first gateway.
[0073] In some embodiments, when the first dynamic code and the second dynamic code are consistent, the first terminal obtains an identifier of the first gateway because the first terminal has not yet connected to the first gateway and cannot directly communicate with the first gateway.
[0074] As an example, when the first gateway sends the first dynamic code based on the broadcast channel, the first gateway will also send the identifier of the first gateway through the broadcast channel, so that the first terminal that subsequently receives the first dynamic code can interact with the first gateway based on the identifier of the first gateway. In some exemplary embodiments, when the first gateway sends the first dynamic code, the identifier of the first gateway can be carried in the message carrying the first dynamic code. The identifier of the first gateway is used to uniquely indicate the first gateway. For example, the identifier of the first gateway can be the network address of the first gateway. Accordingly, the first terminal receives the identifier of the first gateway sent by the first gateway based on the broadcast channel.
[0075] S202: Send an access request to the first gateway based on the identifier of the first gateway.
[0076] The access request is used to request access to the first gateway.
[0077] Exemplarily, taking the identifier of the first gateway as the network address of the first gateway as an example, the first terminal may send an access request to the first gateway based on the network address of the first gateway.
[0078] In some embodiments, the access request includes an identifier of the first terminal, so that the first gateway determines whether to allow the first terminal to access the first gateway based on the identifier of the first terminal, and if the first terminal is allowed to access, sends an access response to the first terminal based on the identifier of the first terminal. The identifier of the first terminal is used to uniquely identify the first terminal. For example, the identifier of the first terminal can be the network address of the first terminal.
[0079] S203: Receive an access response to the access request sent by the first gateway.
[0080] In some embodiments, after receiving an access request sent by a first terminal, the first gateway determines, in response to the access request, that access by the first terminal is permitted. The gateway then sends an access response to the first terminal based on an identifier of the first terminal included in the access request, where the access response indicates successful access to the first gateway. Accordingly, the first terminal receives the access response and, based on the access response, determines successful access to the first gateway.
[0081] It should be understood that since the first gateway is a new gateway that has been replaced, the node that sends the access request to the first gateway is the node that authenticates the first gateway as a legitimate gateway in the smart home system. Therefore, after receiving the access request sent by the first terminal, the first gateway determines to allow the first terminal to access.
[0082] In some embodiments, as shown in FIG4 , after the first terminal accesses the first gateway, that is, after S103 , the method further includes the following S301 - S304 .
[0083] S301: Obtain the local time of the first terminal.
[0084] In some embodiments, after the first terminal accesses the first gateway, in order to update the locally stored dynamic code to ensure the security of the smart home system, the first terminal obtains the local time of the first terminal.
[0085] As an example, the first terminal is configured with a local clock, and obtaining the local time of the first terminal may be obtaining the time of the local clock of the first terminal. The local clock configured in the first terminal may be a crystal oscillator (abbreviated as: crystal oscillator), which is used to record the current local time and can be accurate to the minute. For example, 202307271530 represents 3:30 pm on July 27, 2023.
[0086] S302: Generate a third dynamic code based on the local time.
[0087] As an example, generating the third dynamic code based on the local time may include the following S1-S2.
[0088] S1. Generate an initial third dynamic code based on local time and a first encryption algorithm.
[0089] The first encryption algorithm includes message digest algorithm 5 (MD5).
[0090] S2. Extract N bits from the initial third dynamic code as the third dynamic code.
[0091] N is a positive integer. The third dynamic code can be the first N bits of the initial third dynamic code, or the last N bits of the initial third dynamic code, which is not limited in the embodiment of the present disclosure.
[0092] For example, taking the first encryption algorithm as MD5, after the first terminal obtains the local time, it calculates an MD5 value based on the local time and MD5, and the MD5 value is the initial third dynamic code, and then the first N bits of the MD5 value are taken as the third dynamic code.
[0093] S303: Send a third dynamic code to the first gateway.
[0094] In some embodiments, in order to ensure that the dynamic code stored in the first gateway is consistent with the dynamic code stored locally in the first terminal, thereby ensuring the security of the smart home system, after the first terminal generates a third dynamic code, it sends the third dynamic code to the first gateway.
[0095] As an example, in order to improve the security of the smart home system, the third dynamic code sent by the first terminal to the first gateway may be an encrypted third dynamic code. For example, S303 may include the following X1-X2.
[0096] X1. Encrypt the third dynamic code based on the second encryption algorithm to obtain an encrypted third dynamic code.
[0097] The second encryption algorithm includes an RSA encryption algorithm.
[0098] Exemplarily, taking the RSA encryption algorithm as the second encryption algorithm, after the first terminal generates the third dynamic code, it encrypts the third dynamic code based on the RSA private key stored by itself to obtain the encrypted third dynamic code.
[0099] X2. Send the encrypted third dynamic code to the first gateway.
[0100] S304: When a first response message to the third dynamic code is received from the first gateway within a preset time period, the third dynamic code is stored and the locally stored second dynamic code is deleted.
[0101] It should be understood that if the first response message to the third dynamic code is received from the first gateway within the preset time period, it means that the first gateway has correctly received the third dynamic code. The dynamic code stored by the first gateway and the dynamic code stored locally on the first terminal can be consistent. Therefore, if the first response message is received within the preset time period, the first terminal stores the third dynamic code and deletes the locally stored second dynamic code, thus updating the locally stored dynamic code. In this way, the locally stored dynamic code is updated, which helps to improve the security of the smart home system.
[0102] The preset duration is pre-set by a network administrator. For example, the preset duration is 10 milliseconds, which is not limited in the embodiment of the present disclosure.
[0103] Based on the embodiment shown in Figure 4, after accessing the first gateway, the first terminal generates a third dynamic code and sends the third dynamic code to the first gateway. When a first response information for the third dynamic code is received within a preset time period, the third dynamic code is stored and the locally saved second dynamic code is deleted, thereby realizing the update of the locally saved dynamic code, which helps to improve the security of the smart home system.
[0104] The above embodiment is described based on the case where a first response message to the third dynamic code is received from the first gateway within a preset time period. In some embodiments, if the first response message is not received within the preset time period, the first terminal sends the third dynamic code to the first gateway again until the first response message is received.
[0105] It should be understood that if the first response message for the third dynamic code is not received from the first gateway within the preset time period, it may be due to poor wireless link quality, etc., which may cause the first gateway to not receive the third dynamic code and, in turn, not send the first response message to the first terminal. If the third dynamic code is saved at this time, the dynamic code saved by the first gateway will not be consistent with the dynamic code locally saved by the first terminal, thereby affecting the security of the smart home system. Therefore, if the first response message is not received within the preset time period, the first terminal will send the third dynamic code to the first gateway again until the first response message is received, so that the dynamic code saved by the first gateway and the dynamic code locally saved by the first terminal can be consistent, thereby ensuring the security of the smart home system.
[0106] The above embodiments illustrate a network access method provided by the embodiments of the present disclosure from the perspective of a first terminal. In some embodiments and technologies, when a new gateway accesses a smart home system, the user completes network access of the new gateway using a specific voice message. However, in daily life, specific voice messages can be mistakenly spoken by users, initiating network access and affecting the user experience. Furthermore, specific voice messages can be eavesdropped on by others, leading to illegal access and affecting the security of the smart home system. Based on this, as shown in FIG5 , the embodiments of the present disclosure further provide a network access method, which is applied to a first gateway, which can be gateway 11 shown in FIG1 . The method includes the following steps S401-S404.
[0107] S401: When a first gateway is powered on, monitor a first dynamic code.
[0108] As can be seen from the above description of the first gateway, it is a new gateway for the smart home system. When the first gateway is powered on, it monitors the first dynamic code to automatically connect other nodes in the smart home system to the first gateway. The first dynamic code is used to verify the legitimacy of the first gateway.
[0109] As an example, when the first gateway is powered on, the first dynamic code is monitored. This can be when the first gateway is powered on for the first time, that is, when the first gateway is powered on for the first time after being manufactured.
[0110] In some embodiments, before monitoring the first dynamic code, the first gateway sends a prompt message, where the prompt message is used to prompt the user to enter the first dynamic code.
[0111] In some embodiments, a plurality of indicator lights are provided on the housing of the first gateway. When the first gateway issues a prompt message, the first gateway may control the plurality of indicator lights to light up and display red to prompt the user to enter the first dynamic code.
[0112] In some embodiments, the first gateway is equipped with a voice device, exemplarily a microphone (MIC), and the first gateway issues a prompt message, which may be played by the first gateway through the MIC, to prompt the user to enter the first dynamic code. Exemplarily, the prompt message is "Please enter the dynamic code."
[0113] As an example, the first dynamic code may be obtained based on voice configuration information. Exemplarily, monitoring the first dynamic code may include the following A1-A2.
[0114] A1. Monitor voice configuration information.
[0115] The first dynamic code indicated by the voice configuration information is obtained by the user based on the second terminal, and the second terminal is a terminal connected to the first terminal.
[0116] In some embodiments, after the first gateway issues a prompt, the user confirms that they need to enter the first dynamic code. The user then checks the dynamic code currently stored on the second terminal on the second terminal and reads it out to the first gateway, thereby sending the voice configuration information to the first gateway. Accordingly, the first gateway monitors the voice configuration information based on the voice device.
[0117] A2. Analyze the voice configuration information to obtain a first dynamic code.
[0118] After monitoring the user's voice configuration information, the first gateway parses the voice configuration information to obtain the first dynamic code. The first gateway parses the voice configuration information by performing voice recognition on the voice configuration information to obtain the first dynamic code.
[0119] As another example, the first dynamic code may also be obtained based on configuration information sent by the second terminal.
[0120] For example, if the second terminal is a mobile phone, after the first gateway issues a prompt, the user confirms that they need to enter the first dynamic code. The user then establishes a communication connection between the first gateway and the mobile phone via Wi-Fi, Bluetooth, or other communication methods. The user then uses the mobile phone to send configuration information to the first gateway. The configuration information includes the dynamic code stored locally on the mobile phone, which is also known as the first dynamic code. The first gateway then receives the configuration information sent by the mobile phone and parses it to obtain the first dynamic code.
[0121] For example, if the terminal is a personal computer (PC), after the first gateway issues a prompt, the user confirms that they need to enter the first dynamic code. The user then establishes a communication connection between the first gateway and the PC via a network cable. The user then opens the PC's web interface and sends the first dynamic code displayed on the PC's web interface as configuration information to the first gateway via the PC. The first gateway then receives the configuration information sent by the PC and parses it to obtain the first dynamic code.
[0122] It should be understood that the above-mentioned manner in which the first gateway obtains the first dynamic code is merely exemplary, and those skilled in the art may make adaptive adjustments according to actual application scenarios, and the embodiments of the present disclosure do not limit this.
[0123] S402: Send a first dynamic code based on a broadcast channel.
[0124] S403: Receive an access request sent by the first terminal.
[0125] The access request is used to request access to the first gateway, and the second gateway is the gateway that the first terminal accessed most recently.
[0126] S404: In response to the access request, send an access response to the first terminal.
[0127] The access response is used to indicate successful access to the first gateway.
[0128] For the description of S402-S404, please refer to the corresponding description of S101-S103 above, which will not be repeated here.
[0129] Based on the embodiment shown in FIG5 , in some technologies, network access is completed by using specific voice information, which may cause illegal access after being eavesdropped. In the embodiment of the present disclosure, the first dynamic code indicated by the voice configuration information is obtained by the user based on the second terminal, that is, in the embodiment of the present disclosure, the first dynamic code obtained by the user each time is different. In this way, on the one hand, the dynamic code is constantly changing, which can prevent the problem of initiating network access due to accidental speaking by the user in life. On the other hand, the "burn after reading" feature of the dynamic code can prevent the problem of illegal access due to eavesdropping by others, which helps to improve the security of the smart home system.
[0130] In some embodiments, as shown in FIG6 , the method further includes the following S501 - S504 .
[0131] S501: Receive multiple third dynamic codes sent by multiple first terminals.
[0132] In some embodiments, when the first gateway is a legitimate gateway, multiple first terminals in the smart home system are connected to the first gateway. After the multiple first terminals are connected to the first gateway, to ensure the security of the smart home system, each of the multiple first terminals obtains a third dynamic code and then sends the third dynamic code to the first gateway. Accordingly, the first gateway receives the multiple third dynamic codes sent by the multiple first terminals. The multiple first terminals are first terminals connected to the first gateway, and the first terminal is one of the multiple first terminals. The multiple first terminals correspond one-to-one to the multiple third dynamic codes.
[0133] S502: Send first response information to each first terminal.
[0134] In some embodiments, upon receiving a third dynamic code sent by a first terminal, the first gateway sends a first response message to the first terminal, where the first response message indicates receipt of the third dynamic code, so that the first terminal can store the third dynamic code.
[0135] S503: Determine whether the multiple third dynamic codes are consistent.
[0136] It should be understood that in a smart home system, the third dynamic code stored in each first terminal should be consistent. This ensures that all first terminals can properly access the new gateway if the gateway is replaced. To avoid the situation where the third dynamic code stored in a first terminal is inconsistent with the third dynamic code stored in other first terminals, resulting in the first terminal being unable to properly access the new gateway after the gateway is replaced again, thereby affecting the user experience, the first gateway determines whether the multiple third dynamic codes are consistent after receiving them.
[0137] S504: When there are inconsistent third dynamic codes among the multiple third dynamic codes, send first indication information to multiple first terminals.
[0138] The first indication information is used to indicate feedback of the updated third dynamic code.
[0139] As an example, the second indication information includes network time, so that multiple first terminals can update the third dynamic code based on the network time, thereby generating multiple consistent updated third dynamic codes. The network time can be obtained by the first gateway based on the Internet.
[0140] It should be understood that a third dynamic code is generated by a first terminal based on its own local time. If there are inconsistent third dynamic codes among multiple third dynamic codes, it means that the local time of the first terminal corresponding to the inconsistent third dynamic code is inconsistent with the local time of other first terminals. Therefore, the first indication information includes the network time to facilitate time synchronization among multiple first terminals based on the network time, thereby generating a consistent updated third dynamic code and providing feedback on the consistent updated third dynamic code.
[0141] Based on the embodiment shown in Figure 6, when there are inconsistent third dynamic codes among multiple third dynamic codes, first indication information is sent to multiple first terminals to instruct each first terminal to feedback the updated third dynamic code, so that the dynamic codes locally stored by each first terminal are consistent, so that after the smart home system replaces the gateway, each first terminal can successfully access the new gateway, which helps to ensure the user experience.
[0142] The above embodiment is described using an example in which multiple third dynamic codes are inconsistent. In some embodiments, when the multiple third dynamic codes are consistent, the first gateway sends second instruction information to the second terminal. The second instruction information includes the third dynamic code and is used to instruct the storage of the third dynamic code.
[0143] It should be understood that the first gateway sends the second instruction information to the second terminal to instruct the second terminal to store the third dynamic code. This allows the user to automatically connect the first terminal in the smart home system to the new gateway based on the dynamic code stored in the second terminal when the smart home system replaces the gateway. This reduces the operational complexity of connecting to the new gateway after the gateway is replaced, improves the efficiency of connecting to the new gateway after the gateway is replaced, and helps to improve the user experience. The second terminal is the terminal that connects to the first terminal. The first terminal is already connected to the first gateway, so the first gateway can send the second instruction information to the second terminal.
[0144] In some embodiments, as shown in FIG7 , an embodiment of the present disclosure further provides a network access method, which is applied to a second gateway. The second gateway may be the gateway 11 shown in FIG1 . The method includes the following S601 - S604 .
[0145] S601: Receive multiple second dynamic codes sent by multiple first terminals.
[0146] As can be seen from the above description, the second gateway is the old gateway before the smart home system was replaced. During the operation of the old gateway (i.e., the second gateway), when a first terminal reports data to the second gateway, the first terminal generates a second dynamic code and sends the second dynamic code to the second gateway. Accordingly, the second gateway receives multiple second dynamic codes sent by multiple first terminals. Each first terminal corresponds to one second dynamic code.
[0147] S602: Send second response information to each first terminal.
[0148] The second response information is used to indicate that the second dynamic code has been received.
[0149] S603: Determine whether the multiple second dynamic codes are consistent.
[0150] S604: When there are inconsistent second dynamic codes among the multiple second dynamic codes, send third indication information to the multiple first terminals.
[0151] The third indication information is used to indicate feedback of the updated second dynamic code.
[0152] For the description of S601 to S604 , reference may be made to the corresponding description of S501 to S504 , which will not be repeated here.
[0153] Based on the embodiment shown in Figure 7, during the operation of the old gateway (second gateway), when there are inconsistent second dynamic codes among the multiple second dynamic codes sent by multiple first terminals, third indication information is sent to the multiple first terminals to instruct the multiple first terminals to feedback the updated second dynamic code, so that the dynamic codes saved by each first terminal are consistent, so that when the smart home system replaces the gateway subsequently, each first terminal can successfully access the new gateway based on the consistent dynamic code, which helps to ensure the user experience.
[0154] In some embodiments, when the plurality of second dynamic codes are consistent, the second gateway sends fourth indication information to the second terminal. The fifth indication information includes the second dynamic code, and the fifth indication information is used to instruct to store the second dynamic code.
[0155] For the description of the second gateway sending the fourth indication information to the second terminal, reference may be made to the above description of the first gateway sending the third indication information to the second terminal, which is not described in detail here.
[0156] The following describes a network access method provided by an embodiment of the present disclosure with reference to an example.
[0157] For example, the first terminal is composed of a time module, an encryption and decryption module, and a functional module, wherein the time module is used to record the current local time through an internal crystal oscillator (accurate to the minute, for example: 202307271530 represents 15:30 on July 27, 2023); the encryption and decryption module includes an RSA private key and a dynamic code generator, and the dynamic code generator is used to calculate an MD5 value based on the local time obtained from the time module and take the first several digits as the dynamic code. Take the gateway as an example, which is composed of an encryption and decryption module, a time module, a voice analysis module, and a functional module, wherein the encryption and decryption module includes an RSA public key (matching the RSA private key of the first terminal), the time module is responsible for obtaining the network time and regularly synchronizing it to the first terminal, and the voice analysis module is connected to a MIC, which is responsible for receiving and parsing voice configuration information to obtain a dynamic code. Two channels can be set for information exchange between the first terminal and the gateway according to different frequencies, one is a broadcast channel and the other is a service channel. The broadcast channel does not transmit business data, but is only responsible for transmitting RSA encrypted messages between the gateway and each first terminal. For example, the content of the RSA encrypted message sent by the gateway to the first terminal is: message identity document (ID) + dynamic code + gateway identification information, or message ID + time information. After receiving the broadcast message, each first terminal immediately decrypts the RSA encrypted message and parses the relevant content according to the message header, such as the dynamic code.
[0158] The following describes a network access method provided by an embodiment of the present disclosure using the interaction between nodes. For example, the first terminal is a sensor and the second terminal is a mobile phone. FIG8 is a schematic diagram of the overall flow of a network access method provided by an embodiment of the present disclosure. Referring to FIG8 , the method includes the following steps Y1-Y9.
[0159] Y1. The sensor sends the second dynamic code to the gateway.
[0160] In some embodiments, during the operation of the smart home system, each time the sensor reports data to the gateway, the sensor controls the dynamic code generator to obtain the current local time from the time module, encrypts the local time based on the MD5 algorithm, and takes the first several digits to generate an initial second dynamic code, and then encrypts the initial second dynamic code based on the RSA private key of the encryption and decryption module to obtain an encrypted second dynamic code, and sends the encrypted second dynamic code to the gateway.
[0161] Y2. The gateway determines whether the multiple second dynamic codes are consistent.
[0162] In some embodiments, after the gateway receives multiple second dynamic codes sent by multiple sensors, the gateway's functional module controls the RSA public key in the encryption and decryption module to decrypt the second dynamic codes reported by each sensor and compare them one by one. If the multiple second dynamic codes are consistent, the following Y3 is executed. If there are inconsistent second dynamic codes, the following Y4 is executed.
[0163] Y3. The gateway sends a fourth instruction message to the mobile phone.
[0164] The fourth indication information includes the second dynamic code, and the fourth indication information is used to instruct to store the second dynamic code.
[0165] Y4. The gateway sends third instruction information to the sensor.
[0166] In some embodiments, if there is an inconsistent second dynamic code, the gateway triggers the time module to obtain the network time and then sends a third indication message to each sensor via a broadcast channel. The third indication message is used to indicate the feedback of the updated second dynamic code, and the fifth indication message includes the network time.
[0167] After receiving the third indication, the sensor parses it, obtains the network time, and synchronizes it. The sensor then generates an updated second dynamic code upon the next information report and sends it to the gateway. The gateway then compares the updated second dynamic codes received from each sensor until all updated codes are consistent.
[0168] Y5. The gateway obtains the first dynamic code and sends the first dynamic code to the sensor.
[0169] After replacing a gateway, all indicators light up red when the new gateway is powered on for the first time, prompting the user to enter the first dynamic code by voice. After the user retrieves the last received first dynamic code from their phone and reads it out to the new gateway's MIC, the new gateway receives the voice message and waits for the user's voice to stop. The voice parsing module then parses the first dynamic code, encrypts it along with the new gateway's identification information using the RSA public key in the encryption and decryption module, and generates the encrypted first dynamic code. The encrypted code is then transmitted to each sensor via a broadcast channel.
[0170] The new gateway can be a product of the same brand as the old gateway. When the sensor is not connected to the new gateway, the indicator light of the new gateway keeps flashing red to remind the user that it is currently in the process of joining the network.
[0171] In some embodiments, after all indicator lights on the new gateway light up and display red at the same time to prompt the user to input the first dynamic code by voice, the user can also transmit the first dynamic code directly to the new gateway through a mobile phone, or, when the second terminal is a PC, based on the PC's web interface, transmit the first dynamic code to the new gateway via a network cable according to the page prompts. The embodiments of the present disclosure do not limit the form of transmitting the first dynamic code to the new gateway.
[0172] Y6. The sensor detects whether the first dynamic code is consistent with the second dynamic code stored locally.
[0173] After receiving the encrypted first dynamic code, the sensor first decrypts it using the RSA private key to obtain the gateway's identification information and the first dynamic code. The sensor then checks whether the first dynamic code matches the locally stored second dynamic code. If the first and second dynamic codes are inconsistent, execute Y7 below. If the first and second dynamic codes are consistent, execute Y8 below.
[0174] Y7. The sensor refuses to access the gateway.
[0175] Y8. The sensor sends an access request to the gateway.
[0176] If the first dynamic code is consistent with the second dynamic code, it means that the new gateway is a legitimate gateway and the sensor can access the new gateway. Then, the sensor sends an access request to the gateway based on the gateway's identification information. The access request is used to request access to the new gateway.
[0177] Y9. The gateway sends an access response to the sensor.
[0178] The access response is used to indicate successful access to a new gateway.
[0179] In this way, the sensor is successfully connected to the new gateway, completing the sensor's secondary networking process.
[0180] In some embodiments, after the sensor is successfully connected to the new gateway, all indicator lights of the new gateway are green and flashing to prompt the user that the secondary network connection is completed.
[0181] In some embodiments, after the sensor successfully connects to the new gateway, the above Y1-Y4 are executed again to update the locally stored dynamic code to improve the security of the smart home system.
[0182] The above mainly introduces the solution provided by the present disclosure from the perspective of the interaction between each node. It is understandable that each node, such as the first terminal, includes a hardware structure and / or software module corresponding to the execution of each function in order to realize the above functions. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware 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 the present disclosure.
[0183] FIG9 is a schematic diagram showing the composition of a communication device according to an embodiment of the present disclosure. As shown in FIG9 , the communication device 70 includes a receiving unit 701 and a processing unit 702. In some embodiments, the communication device 70 may further include a sending unit 703.
[0184] The communication device 70 may be the first terminal or a chip in the first terminal. When the communication device 70 is used to implement the functions of the first terminal in the above embodiment, each unit is used to implement the following functions.
[0185] The receiving unit 701 is configured to receive a first dynamic code sent by a first gateway, where the first dynamic code is used to verify the legitimacy of the first gateway.
[0186] Processing unit 702 is used to: check whether the first dynamic code is consistent with a pre-stored second dynamic code; the second dynamic code is a dynamic code generated by interaction with a second gateway, and the second gateway is the gateway most recently accessed by the first terminal; if the first dynamic code and the second dynamic code are consistent, access the first gateway.
[0187] In some embodiments, the receiving unit 701 is configured to receive a first dynamic code sent by a first gateway based on a broadcast channel.
[0188] In some embodiments, the receiving unit 701 is further configured to obtain the local time of the first terminal.
[0189] The processing unit 702 is further configured to generate a third dynamic code based on the local time.
[0190] The sending unit 703 is configured to send a third dynamic code to the first gateway.
[0191] The processing unit 702 is further configured to store the third dynamic code and delete the locally stored second dynamic code when receiving a first response message to the third dynamic code from the first gateway within a preset time period.
[0192] The sending unit 703 is further configured to, if the first response information is not received within a preset time period, send the third dynamic code to the first gateway again until the first response information is received.
[0193] In some embodiments, the processing unit 702 is configured to: generate an initial third dynamic code based on the local time and the first encryption algorithm; and extract N bits of the initial third dynamic code as the third dynamic code, where N is a positive integer.
[0194] The sending unit 703 is configured to: encrypt the third dynamic code based on the second encryption algorithm to obtain an encrypted third dynamic code; and send the encrypted third dynamic code to the first gateway.
[0195] In some embodiments, the receiving unit 701 is configured to obtain an identifier of the first gateway.
[0196] A sending unit 703 is configured to send an access request to the first gateway based on the identifier of the first gateway, where the access request is used to request access to the first gateway;
[0197] The receiving unit 701 is configured to receive an access response to an access request sent by a first gateway, where the access response is used to indicate successful access to the first gateway.
[0198] FIG10 is a schematic diagram showing the composition of another communication device provided by an embodiment of the present disclosure. As shown in FIG10 , the communication device 80 includes an acquisition unit 801 and a sending unit 802. In some embodiments, the communication device 80 may further include a processing unit 803.
[0199] The communication device 80 may be the first gateway or a chip in the first gateway. When the communication device 80 is used to implement the function of the first gateway in the above embodiment, each unit is used to implement the following functions.
[0200] The acquiring unit 801 is configured to monitor a first dynamic code when the first gateway is powered on, where the first dynamic code is used to verify the legitimacy of the first gateway.
[0201] The sending unit 802 is configured to send a first dynamic code based on a broadcast channel;
[0202] The acquiring unit 801 is further configured to receive an access request sent by the first terminal; the access request is used to request access to the first gateway.
[0203] The sending unit 802 is further configured to send an access response to the first terminal in response to the access request, where the access response is used to indicate successful access to the first gateway.
[0204] In some embodiments, the acquiring unit 801 is configured to: monitor voice configuration information; and parse the voice configuration information to obtain a first dynamic code.
[0205] In some embodiments, the acquiring unit 801 is further configured to receive multiple third dynamic codes sent by multiple first terminals, and the multiple first terminals correspond to the multiple third dynamic codes in a one-to-one manner.
[0206] The sending unit 802 is further configured to send first response information to each first terminal, where the first response information is used to indicate that the third dynamic code has been received;
[0207] The processing unit 803 is configured to determine whether the plurality of third dynamic codes are consistent.
[0208] The sending unit 802 is further configured to send first indication information to the multiple first terminals when there are inconsistent third dynamic codes among the multiple third dynamic codes, where the first indication information is used to indicate feedback of the updated third dynamic code.
[0209] In some embodiments, the sending unit 802 is further used to send second indication information to the second terminal when multiple third dynamic codes are consistent, the second indication information includes the third dynamic code, and the second indication information is used to indicate the storage of the third dynamic code. The second terminal is a terminal that accesses the first terminal.
[0210] FIG11 is a schematic diagram showing the composition of another communication device provided by an embodiment of the present disclosure. As shown in FIG11 , the communication device 90 includes a receiving unit 901 and a sending unit 902. In some embodiments, the communication device 90 may further include a processing unit 903.
[0211] The communication device 90 may be the second gateway or a chip in the second gateway. When the communication device 90 is used to implement the function of the second gateway in the above embodiment, each unit is used to implement the following functions.
[0212] In some embodiments, the receiving unit 901 is configured to receive multiple second dynamic codes sent by multiple first terminals, and the multiple first terminals correspond to the multiple second dynamic codes in a one-to-one manner.
[0213] The sending unit 902 is configured to send second response information to each first terminal, where the second response information indicates that the second dynamic code has been received.
[0214] The processing unit 903 is configured to determine whether the multiple second dynamic codes are consistent.
[0215] The sending unit 902 is configured to send third indication information to the multiple first terminals when there are inconsistent second dynamic codes among the multiple second dynamic codes, where the third indication information is used to indicate feedback of an updated second dynamic code.
[0216] In some embodiments, the sending unit 902 is further used to send fourth indication information to the second terminal when multiple second dynamic codes are consistent, the fourth indication information includes the second dynamic code, and the fourth indication information is used to indicate the storage of the second dynamic code. The second terminal is a terminal that accesses the first terminal.
[0217] It should be noted that the units in Figures 9, 10, and 11 may also be referred to as modules. For example, the sending unit may be referred to as a sending module. In addition, in the embodiments shown in Figures 9, 10, and 11, the names of the units may not be those shown in the figures. For example, the receiving unit may also be referred to as a communication unit.
[0218] If the various units in Figures 9, 10 and 11 are implemented in the form of software function modules 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 embodiment of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, which includes a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present disclosure. The storage medium for storing computer software products includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0219] When the communication device 70, the communication device 80, or the communication device 90 implements the functions of the integrated modules in the form of hardware, the embodiment of the present disclosure provides a schematic diagram of the structure of an electronic device. As shown in Figure 12, the electronic device 100 includes: a memory 1001, a processor 1002, a communication interface 1003, and a bus 1004.
[0220] The memory 1001 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store dynamic information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0221] Processor 1002 may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. Processor 1002 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Processor 1002 may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. Processor 1002 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
[0222] The communication interface 1003 is used to connect to other devices via a communication network, such as Ethernet, wireless access network, or wireless local area network (WLAN).
[0223] In some embodiments, the memory 1001 may exist independently of the processor 1002. The memory 1001 may be connected to the processor 1002 via a bus 1004 and used to store instructions or program codes. When the processor 1002 calls and executes the instructions or program codes stored in the memory 1001, the network access method provided in the embodiments of the present disclosure can be implemented.
[0224] In some embodiments, the memory 1001 may also be integrated with the processor 1002 .
[0225] Bus 1004 can be an Extended Industry Standard Architecture (EISA) bus, for example. Bus 1004 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG12 shows bus 1004 using only a single thick solid line. This does not imply that there is only one bus or only one type of bus.
[0226] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and conciseness of the description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal can be divided into different functional modules to complete all or part of the functions described above.
[0227] The present disclosure also provides a computer-readable storage medium. All or part of the processes in the above-mentioned method embodiments can be completed by computer instructions to the relevant hardware, and the program can be stored in the above-mentioned computer-readable storage medium. When the program is executed, it may include the processes of the above-mentioned method embodiments. The computer-readable storage medium can be an internal storage unit of the electronic device of any of the above-mentioned embodiments, such as a hard disk or memory of a computer device. The above-mentioned computer-readable storage medium can also be an external storage device of the above-mentioned electronic device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the above-mentioned electronic device. Further, the above-mentioned computer-readable storage medium can also include both the internal storage unit of the above-mentioned electronic device and an external storage device. The above-mentioned computer-readable storage medium is used to store the above-mentioned computer program and other programs and data required by the above-mentioned electronic device. The above-mentioned computer-readable storage medium can also be used to temporarily store data that has been output or is to be output. The above-mentioned computer-readable storage medium also includes a non-transient computer-readable storage medium.
[0228] An embodiment of the present disclosure further provides a computer program product, which includes a computer program. When the computer program product is run on a computer, the computer is enabled to execute any one of the network access methods provided in the above embodiments.
[0229] Although the present disclosure is described herein in conjunction with various embodiments, in the process of implementing the disclosure for which protection is sought, those skilled in the art may understand and implement other variations of the disclosed embodiments by reviewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple components. A single processor or other unit may implement several functions listed in the claims. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0230] Although the present disclosure has been described with reference to specific features and embodiments thereof, it will be apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present disclosure. Accordingly, this specification and the drawings are merely illustrative of the present disclosure as defined by the appended claims and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present disclosure. Obviously, those skilled in the art may make various modifications and variations to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, the present disclosure is intended to encompass such modifications and variations if they fall within the scope of the claims of the present disclosure and their equivalents.
[0231] The above is only a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or replacements within the technical scope disclosed in the present disclosure should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.
Claims
1. A network access method, applied to a first terminal, wherein: The method comprises: Receiving a first dynamic code sent by a first gateway, where the first dynamic code is used to verify the legitimacy of the first gateway; Compare the first dynamic code with a pre-stored second dynamic code; the second dynamic code is a dynamic code generated by interaction with a second gateway, and the second gateway is the gateway that the first terminal accessed most recently; When the first dynamic code and the second dynamic code are consistent, access is made to the first gateway.
2. The method according to claim 1, wherein: The receiving a first dynamic code sent by a first gateway includes: A first dynamic code is received which is sent by the first gateway based on a broadcast channel.
3. The method according to claim 1, wherein: After accessing the first gateway, the method further includes: Acquire the local time of the first terminal; Based on the local time, generate a third dynamic code; Sending the third dynamic code to the first gateway; When the first response information to the third dynamic code is received from the first gateway within a preset time period, the third dynamic code is stored, and the second dynamic code stored locally is deleted.
4. The method according to claim 3, further comprising: If the first response information is not received within the preset time period, the third dynamic code is sent to the first gateway again until the first response information is received.
5. The method according to claim 3, wherein: The generating a third dynamic code based on the local time includes: Generate an initial third dynamic code based on the local time and the first encryption algorithm; Extracting N bits of the initial third dynamic code as the third dynamic code, where N is a positive integer; The sending the third dynamic code to the first gateway includes: Encrypting the third dynamic code based on a second encryption algorithm to obtain an encrypted third dynamic code; Send the encrypted third dynamic code to the first gateway.
6. The method according to claim 1, wherein: The accessing the first gateway includes: Obtaining an identifier of the first gateway; Sending an access request to the first gateway based on the identifier of the first gateway, where the access request is used to request access to the first gateway; An access response to the access request sent by the first gateway is received, where the access response is used to indicate successful access to the first gateway.
7. A network access method, the method being applied to a first gateway, wherein: The method comprises: When the first gateway is powered on, monitoring a first dynamic code, where the first dynamic code is used to verify the legitimacy of the first gateway; Sending the first dynamic code based on a broadcast channel; receiving an access request sent by a first terminal, wherein the access request is used to request access to the first gateway; In response to the access request, an access response is sent to the first terminal, where the access response is used to indicate successful access to the first gateway.
8. The method according to claim 7, wherein: The monitoring of the first dynamic code includes: Monitor voice configuration information; The voice configuration information is parsed to obtain the first dynamic code.
9. The method according to claim 7, further comprising: receiving a plurality of third dynamic codes sent by a plurality of first terminals, wherein the plurality of first terminals correspond one to one with the plurality of third dynamic codes; Sending first response information to each of the first terminals, where the first response information is used to indicate that the third dynamic code has been received; Determining whether the plurality of third dynamic codes are consistent; In the case where there are inconsistent third dynamic codes among the multiple third dynamic codes, sending first indication information to the multiple first terminals, where the first indication information is used to indicate feedback of an updated third dynamic code; or, When the multiple third dynamic codes are all consistent, second indication information is sent to a second terminal, the second indication information includes the third dynamic code, the second indication information is used to indicate storing the third dynamic code, and the second terminal is a terminal accessing the first terminal.
10. A network access method, applied to a second gateway, wherein: The method comprises: receiving a plurality of second dynamic codes sent by a plurality of first terminals, wherein the plurality of first terminals correspond one to one with the plurality of second dynamic codes; Sending second response information to each of the first terminals, where the second response information is used to indicate that the second dynamic code has been received; Determining whether the plurality of second dynamic codes are consistent; In the case that there are inconsistent second dynamic codes among the multiple second dynamic codes, third indication information is sent to the multiple first terminals, where the third indication information is used to indicate feedback of an updated second dynamic code.
11. The method according to claim 10, further comprising: When the multiple second dynamic codes are all consistent, fourth indication information is sent to the second terminal, the fourth indication information includes the second dynamic code, the fourth indication information is used to indicate storing the second dynamic code, and the second terminal is a terminal accessing the first terminal.
12. An electronic device comprising: one or more processors and memory; in The memory stores instructions executable by the processor; When the one or more processors are configured to execute the instructions, the electronic device implements the method according to any one of claims 1 to 6, 7 to 9 or 10 to 11.
13. A computer-readable storage medium, wherein: The computer-readable storage medium comprises computer instructions, which, when executed on a computer, cause the computer to perform the method according to any one of claims 1 to 6, 7 to 9 or 10 to 11.
Citation Information
Patent Citations
Voice equipment binding method and device, storage medium and electronic device
CN111224785A
Multi-gateway network switching method, device and system, electronic equipment and storage medium
CN113709839A
Data transmission method and device and electronic equipment
CN115915116A
Gateway authentication method and device and storage medium
CN116156497A
Communication method, internet of things terminal, gateway device and internet of things system
US20220131841A1