Network access method, electronic equipment and storage medium

Through dynamic code verification and automatic access mechanism, the problem of complex terminal access of smart home systems after gateway replacement is solved, automated access is realized, and user experience and operation efficiency are improved.

CN119629626APending Publication Date: 2025-03-14ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311185088.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

After the smart home system is replaced, the terminal needs to manually configure the access to the new gateway, which is complex in operation and requires high user operation level, which affects the user experience.

Method used

By receiving the dynamic code sent by the new gateway and comparing the pre-stored old gateway dynamic code, the legitimacy of the new gateway is automatically verified and the new gateway is automatically accessed when consistent.

Benefits of technology

Without manual configuration from users, the terminal is automatically accessed to a new gateway, reducing operational complexity, and improving access efficiency and user experience after gateway replacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629626A_ABST
    Figure CN119629626A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a network access method, electronic equipment and a storage medium, relates to the technical field of communication, and is at least used for reducing the operation complexity of accessing a new gateway after the gateway is replaced. The method is applied to a first terminal, and comprises the following steps: receiving a first dynamic code sent by a first gateway, the first dynamic code being used for verifying the legality of the first gateway; comparing 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 a gateway accessed by the first terminal most recently; and accessing the first gateway under the condition that the first dynamic code is consistent with the second dynamic code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a network access method, an electronic device, and a storage medium. Background Art

[0002] With the development of the Internet of Things (IOT) technology, the smart home system derived from IOT technology has gradually attracted the attention and favor of users due to its versatility and convenience. The smart home system mainly includes a gateway (server) and multiple terminals arranged at home. When the gateway is replaced due to iterative updates, it is necessary to configure each terminal to reconnect to the new gateway. At present, some terminals (such as sensors) require users to manually contact the terminal to configure the terminal to connect to the new gateway. The operation is relatively complicated, and some sensors are installed in locations that cannot be moved or touched, such as being installed on the roof, which requires a high level of user operation and affects the user experience. Summary of the invention

[0003] The present disclosure provides a network access method, an electronic device and a storage medium, which are used to at least reduce the complexity of the operation of accessing a new gateway after replacing the gateway.

[0004] In order to at least achieve the above-mentioned purpose, the present disclosure adopts the following technical solutions:

[0005] In a first aspect, a network access method is provided, which is applied to a first terminal, and the 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 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 accessing the first gateway when the first dynamic code and the second dynamic code are consistent.

[0006] In a second aspect, a network access method is provided, which is applied to a first gateway, and the method includes: when the first gateway is powered on, monitoring a first dynamic code, 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; the access request is used to request access to the first gateway; in response to the access request, sending an access response to the first terminal, the access response is used to indicate successful access to the first gateway.

[0007] In a third aspect, a network access method is provided, which is applied to a second gateway, and includes: receiving multiple second dynamic codes sent by multiple first terminals, the multiple first terminals corresponding one to the multiple second dynamic codes; sending a second response message to each first terminal, the second response message indicating that the second dynamic code has been received; determining whether the multiple second dynamic codes are consistent; in the case that 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 a fourth aspect, a communication device is provided, where the device is applied to a first terminal, and the 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 used to: 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 last accessed; when the first dynamic code and the second dynamic code are consistent, access the first gateway.

[0011] In a fifth aspect, a communication device is provided, the device being applied to a first gateway, the device comprising:

[0012] An acquisition unit, used 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;

[0013] A sending unit, configured to send a first dynamic code based on a broadcast channel;

[0014] The acquiring unit is further used 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 used 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 a sixth aspect, a communication device is provided, where the device is applied to a second gateway, including:

[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] A sending unit is used to send a second response message to each first terminal, the second response message indicating that the second dynamic code has been received; a processing unit is used to determine whether multiple second dynamic codes are consistent; and a sending unit is used to send third indication information to multiple first terminals when there are inconsistent second dynamic codes among the multiple second dynamic codes, the third indication information is used to indicate feedback of the updated second dynamic code.

[0019] In the seventh aspect, an electronic device is provided, comprising: one or more processors and a memory; 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 provided in the first aspect, the second aspect or the third aspect above.

[0020] In an eighth 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 method provided in the first aspect, the second aspect or the third aspect.

[0021] In a ninth aspect, a computer program product comprising computer instructions is provided. When the computer instructions are executed on a computer, the computer executes the method provided in the first aspect, the second aspect or the third aspect.

[0022] In the disclosed embodiment, the first gateway can be understood as a new gateway that has been replaced, the second gateway is the gateway that the first terminal last accessed, and can be understood as an old gateway, and the second dynamic code is obtained by the interaction between the first terminal and the second gateway. Therefore, when it is detected that the first dynamic code sent by the first gateway is consistent with the pre-stored second dynamic code, it means that the first gateway is a legal gateway, so the first terminal accesses the first gateway. In this way, the first terminal can automatically access the new gateway without manual configuration by the user, which reduces the complexity of the operation of accessing the new gateway after replacing the gateway, improves the efficiency of accessing the new gateway after the gateway is replaced, and helps to improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings are used to provide further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0024] Figure 1 A schematic diagram of the structure of a smart home system provided by an embodiment of the present disclosure;

[0025] Figure 2 A flowchart of a network access method provided by an embodiment of the present disclosure;

[0026] Figure 3A flowchart of another network access method provided by an embodiment of the present disclosure;

[0027] Figure 4 A flowchart of another network access method provided by an embodiment of the present disclosure;

[0028] Figure 5 A flowchart of another network access method provided by an embodiment of the present disclosure;

[0029] Figure 6 A flowchart of another network access method provided by an embodiment of the present disclosure;

[0030] Figure 7 A flowchart of another network access method provided by an embodiment of the present disclosure;

[0031] Figure 8 A schematic diagram of the overall process of a network access method provided by an embodiment of the present disclosure;

[0032] Fig. 9 A schematic diagram of the composition of a communication device provided in an embodiment of the present disclosure;

[0033] Fig.10 A schematic diagram of another communication device provided in an embodiment of the present disclosure;

[0034] Fig.11 A schematic diagram of another communication device provided in an embodiment of the present disclosure;

[0035] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions 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 in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0037] Unless the context requires otherwise, throughout the specification and claims, the term "comprise" and other forms thereof, such as the third person singular form "comprises" and the present participle form "comprising", are to be interpreted as open, inclusive, 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" and the like are intended to indicate that specific 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 specific features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner.

[0038] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present disclosure, unless otherwise specified, "plurality" means two or more.

[0039] In the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present disclosure should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0040] 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.

[0041] With the rapid development of network technology, network speed and stability are no longer the main bottlenecks restricting the development of Internet business. The fifth-generation mobile communication technology (5G) mobile network and fixed-line fiber-to-the-home have spawned many practical needs, and the smart home industry has also achieved remarkable development on this basis. At present, many fine-decorated houses will install some sensors in advance to connect to personal home gateways, such as smoke sensors, curtain controllers, lighting controllers, etc.

[0042] Currently, when the gateway is updated, users need to manually configure each node in the smart home system to join the new gateway. However, manual configuration requires a high level of user operation and poses security risks. For example, smoke sensors (smoke sensors for short) are generally installed on the roof, which is difficult for users to operate and will bring security risks, affecting the user experience. Therefore, how to reduce the complexity of connecting to a new gateway after replacing the gateway is a technical problem that needs to be solved urgently.

[0043] 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 a 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 legal gateway, and the first terminal accesses the first gateway. In this way, the first terminal can automatically access the new gateway without manual configuration by the user, which reduces the complexity of the operation of accessing the new gateway after the gateway is replaced, improves the efficiency of accessing the new gateway after the gateway is replaced, and helps to improve the user experience.

[0044] The following describes the solutions of the embodiments of the present disclosure in conjunction with the accompanying drawings.

[0045] Figure 1 This is a schematic diagram of the structure of a smart home system provided by an embodiment of the present disclosure. Figure 1 The smart home system includes a gateway 11, a plurality of first terminals (eg, a first terminal 21, a first terminal 22, and a first terminal 23), and a plurality of second terminals 31.

[0046] The gateway 11 is also called an internetwork connector or a protocol converter. The gateway 11 is a network interconnection device that realizes network interconnection at the transport layer and is only used for interconnection of two networks with different high-level protocols. The gateway 11 can be used for wide area network interconnection as well as local area network interconnection. The gateway 11 is a computer system or device that performs the important task of conversion. The gateway 11 is a translator between two systems that use different communication protocols, data formats or languages, or even completely different architectures. Unlike a bridge that simply transmits information, the gateway 11 repackages the received information to meet the needs of the destination system.

[0047] 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.

[0048] As an example, the gateway 11 communicates and connects via a short-range communication method such as ZigBee, wireless fidelity (WIFI), or Bluetooth.

[0049] 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.

[0050] In some embodiments, the sensor may 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 an example, Figure 1 As shown, a plurality of second terminals 31 connected to the first terminal 21 can access the first gateway 11 through the first terminal 21 .

[0051] In some embodiments, the first terminal may also have other names, for example, a routing node.

[0052] 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.

[0053] In some embodiments, for each second terminal 31 in the plurality of second terminals 31, the second terminal 31 may be a device with a wireless transceiver function, which may be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted. The second terminal 31 may be a mobile phone, a tablet computer, a computer with a wireless transceiver function, 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, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. 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.

[0054] It should be understood that Figure 1 is an exemplary structural diagram, Figure 1 The number of devices included in the smart home system shown is not limited, for example, the number of first terminals and the number of second terminals are not limited. Figure 1 In addition to the equipment shown, Figure 1 The smart home system shown may also include other devices, which is not limited to this.

[0055] Next, if Figure 2 As shown, the embodiment of the present disclosure provides a network access method, which is applied to a first terminal, and the first terminal may be the above Figure 1 For any one of the multiple first terminals shown, for example, the first terminal 21, the method comprises the following steps:

[0056] S101. Receive a first dynamic code sent by a first gateway.

[0057] 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.

[0058] 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.

[0059] In some embodiments, after the first gateway is powered on, in order to allow other nodes in the smart home system to access the first gateway, the first gateway obtains the first dynamic code, and then the first gateway sends the first dynamic code. Correspondingly, the first terminal receives the first dynamic code sent by the first gateway.

[0060] As an example, the first terminal receives the first dynamic code sent by the first gateway, which may be the first terminal receiving the first dynamic code sent by the first gateway based on a broadcast channel. It should be understood that since the first gateway is a new gateway replaced by the smart home system, other nodes in the smart home system have not yet accessed the first gateway, and the first gateway cannot directly communicate with other nodes in the smart home system, the first gateway sends the first dynamic code based on 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.

[0061] In some embodiments or, 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, the second terminal is a terminal accessing the first terminal. For a detailed description of the first gateway obtaining the first dynamic code, please refer to the following description of step S501, which will not be repeated here.

[0062] In some embodiments, the first dynamic code sent by the first gateway is encrypted, for example, the first gateway is encrypted based on an RSA encryption 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.

[0063] S102: Compare the first dynamic code with a pre-stored second dynamic code.

[0064] Among them, 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, which can be understood as the old gateway before the smart home system was replaced.

[0065] In some embodiments, the first terminal stores the second dynamic code in advance. To verify the legitimacy of the first gateway, that is, to verify whether the first gateway is a legal gateway, after receiving the first dynamic code sent by the first gateway, the first terminal compares the first dynamic code with the second dynamic code of the second gateway.

[0066] S103: When the first dynamic code and the second dynamic code are consistent, access the first gateway.

[0067] It should be understood that the first dynamic code is obtained by the first gateway based on the user's voice configuration information or based on 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.

[0068] In this way, when the first dynamic code and the second dynamic code are consistent, the first terminal accesses the first gateway.

[0069] based on Figure 2 In the embodiment shown, after the gateway is replaced, the first terminal receives the first dynamic code sent by the first gateway, and 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. When it is detected that the first dynamic code is consistent with the pre-stored second dynamic code, it means that the first gateway is a legal gateway, and the first terminal accesses the first gateway. In this way, the first terminal can automatically access the new gateway without manual configuration by the user, which reduces the complexity of the operation of accessing the new gateway after the gateway is replaced, improves the efficiency of accessing the new gateway after the gateway is replaced, and helps to improve the user experience.

[0070] The above embodiments are described in 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.

[0071] 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.

[0072] As an example, Figure 3 As shown, the first terminal accesses the first gateway, that is, step S103, which may include the following steps:

[0073] S201: Obtain an identifier of a first gateway.

[0074] In some embodiments, when the first dynamic code and the second dynamic code are consistent, since the first terminal has not yet accessed the first gateway and cannot directly communicate with the first gateway, the first terminal obtains the identifier of the first gateway.

[0075] 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, it 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.

[0076] S202: Send an access request to the first gateway based on the identifier of the first gateway.

[0077] The access request is used to request access to the first gateway.

[0078] 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.

[0079] 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 according to the identifier of the first terminal, and sends an access response to the first terminal based on the identifier of the first terminal if the first terminal is allowed to access. The identifier of the first terminal is used to uniquely indicate the first terminal, for example, it can be the network address of the first terminal.

[0080] S203: Receive an access response to the access request sent by the first gateway.

[0081] In some embodiments, after receiving the access request sent by the first terminal, the first gateway determines to allow the first terminal to access in response to the access request, and then sends an access response to the first terminal based on the identifier of the first terminal included in the access request, where the access response is used to indicate successful access to the first gateway. Correspondingly, the first terminal receives the access response and determines to successfully access the first gateway based on the access response.

[0082] 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.

[0083] In some embodiments, Figure 4 As shown, after the first terminal accesses the first gateway, that is, after step S103, the method further includes the following steps:

[0084] S301: Obtain the local time of the first terminal.

[0085] 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.

[0086] 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 by the first terminal may be a crystal oscillator (abbreviated as: crystal oscillator), which is used to record the current local time, which may be accurate to the minute, for example, 202307271530 represents 15:30 on July 27, 2023.

[0087] S302: Generate a third dynamic code based on the local time.

[0088] As an example, generating the third dynamic code based on the local time may include the following steps:

[0089] S1. Generate an initial third dynamic code based on local time and a first encryption algorithm.

[0090] The first encryption algorithm includes message digest algorithm 5 (MD5).

[0091] S2. Extract N bits of the initial third dynamic code as the third dynamic code.

[0092] Wherein, N is a positive integer. The third dynamic code may 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.

[0093] Exemplarily, taking the first encryption algorithm as MD5 as an example, 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.

[0094] S303: Send a third dynamic code to the first gateway.

[0095] In some embodiments, in order to make the dynamic code stored in the first gateway 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 the third dynamic code, it sends the third dynamic code to the first gateway.

[0096] 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. Exemplarily, step S303 may include the following steps:

[0097] X1. Encrypt the third dynamic code based on the second encryption algorithm to obtain the encrypted third dynamic code.

[0098] The second encryption algorithm includes an RSA encryption algorithm.

[0099] Exemplarily, taking the second encryption algorithm as the RSA encryption algorithm as an example, 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.

[0100] X2. Send the encrypted third dynamic code to the first gateway.

[0101] S304: When receiving the first response information to the third dynamic code sent by the first gateway within the preset time period, store the third dynamic code and delete the second dynamic code stored locally.

[0102] It should be understood that if the first response information for the third dynamic code sent by the first gateway is received within the preset time, it means that the first gateway has correctly received the third dynamic code, and the dynamic code stored by the first gateway can be consistent with the dynamic code stored locally by the first terminal. Therefore, if the first response information is received within the preset time, the first terminal stores the third dynamic code and deletes the second dynamic code stored locally, that is, updates the dynamic code stored locally. In this way, the update of the locally stored dynamic code is completed, which helps to improve the security of the smart home system.

[0103] 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.

[0104] based on Figure 4 In the embodiment shown, after the first terminal accesses the first gateway, the first terminal generates a third dynamic code and sends the third dynamic code to the first gateway, and when a first response information to the third dynamic code is received within a preset time period, the third dynamic code is stored and the second dynamic code saved locally is deleted, thereby realizing the update of the locally saved dynamic code, which helps to improve the security of the smart home system.

[0105] The above embodiment is an explanation of the case where the first response information for the third dynamic code sent by the first gateway is received within a preset time. In some embodiments, if the first response information is not received within the preset time, the first terminal sends the third dynamic code to the first gateway again until the first response information is received.

[0106] It should be understood that if the first response information for the third dynamic code sent by the first gateway is not received within the preset time, it means that the first gateway may not receive the third dynamic code due to poor wireless link quality and other reasons, and then fail to send the first response information to the first terminal. If the third dynamic code is saved at this time, the dynamic code saved by the first gateway may not be consistent with the dynamic code saved locally by the first terminal, thereby affecting the security of the smart home system. Therefore, if the first response information is not received within the preset time, the first terminal sends the third dynamic code to the first gateway again until the first response information is received, so that the dynamic code saved by the first gateway is consistent with the dynamic code saved locally by the first terminal, thereby ensuring the security of the smart home system.

[0107] The above embodiments use the perspective of the first terminal as an example to illustrate a network access method provided by the embodiments of the present disclosure. In some embodiments, in the related art, when a new gateway accesses the smart home system, the user completes the network access of the new gateway with a specific voice message. However, in daily life, the specific voice message may be mistakenly spoken by the user to initiate network access, affecting the user experience. In addition, the specific voice message may be eavesdropped by others and illegally accessed, affecting the security of the smart home system. Based on this, Figure 5 As shown, the embodiment of the present disclosure also provides a network access method, which is applied to a first gateway, and the first gateway can be the above Figure 1 The gateway 11 shown, the method comprises the following steps:

[0108] S401. When a first gateway is powered on, monitor a first dynamic code.

[0109] From the above description of the first gateway, it can be seen that the first gateway is a new gateway replaced by the smart home system. When the first gateway is powered on, in order to enable other nodes in the smart home system to automatically access the first gateway, the first gateway monitors the first dynamic code. The first dynamic code is used to verify the legitimacy of the first gateway.

[0110] As an example, when the first gateway is powered on, the first dynamic code is monitored. This may 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.

[0111] In some embodiments, before the first gateway monitors the first dynamic code, the first gateway sends a prompt message, where the prompt message is used to prompt the user to input the first dynamic code.

[0112] As a possible example, a plurality of indicator lights are provided on the housing of the first gateway, and the first gateway sends a prompt message, which may be that the first gateway controls the plurality of indicator lights to light up and display red, so as to prompt the user to enter the first dynamic code.

[0113] As another possible example, the first gateway is configured with a voice device, exemplarily, the voice device is a microphone (MIC), and the first gateway issues a prompt message, which may be the first gateway playing the prompt message through the MIC to prompt the user to enter the first dynamic code. Exemplarily, the prompt message is "Please enter the dynamic code".

[0114] 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 steps:

[0115] A1. Monitor voice configuration information.

[0116] 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.

[0117] In some embodiments, after the first gateway sends a prompt message, the user determines that the first dynamic code needs to be entered, and then the user checks the dynamic code currently stored in the second terminal from the second terminal, and then reads it out in front of the first gateway to send the voice configuration information to the first gateway. Accordingly, the first gateway monitors the voice configuration information based on the voice device.

[0118] A2. Analyze the voice configuration information to obtain a first dynamic code.

[0119] After the first gateway monitors the user's voice configuration information, it analyzes the voice configuration information to obtain the first dynamic code. The first gateway analyzes the voice configuration information by performing voice recognition on the voice configuration information to obtain the first dynamic code.

[0120] As another example, the first dynamic code may also be obtained based on configuration information sent by the second terminal.

[0121] Taking the second terminal as a mobile phone as an example, after the first gateway sends a prompt message, the user determines that the first dynamic code needs to be entered. The user can establish a communication connection between the first gateway and the mobile phone through a communication method based on WIFI, Bluetooth, etc., and then the user sends configuration information to the first gateway through the mobile phone. The configuration information includes the dynamic code locally stored in the mobile phone, that is, the first dynamic code. Correspondingly, the first gateway receives the configuration information sent by the mobile phone, and then parses the configuration information to obtain the first dynamic code.

[0122] Taking a personal computer (PC) as an example, after the first gateway sends a prompt message, the user determines that the first dynamic code needs to be entered, and the user can establish a communication connection between the first gateway and the PC through a network cable. After that, the user opens the web page interface of the PC and sends the first dynamic code displayed on the web page interface of the PC as configuration information to the first gateway through the PC. Correspondingly, the first gateway receives the configuration information sent by the PC, and then parses the configuration information to obtain the first dynamic code.

[0123] 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 are not limited thereto.

[0124] S402: Send a first dynamic code based on a broadcast channel.

[0125] S403: Receive an access request sent by the first terminal.

[0126] 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.

[0127] S404: In response to the access request, send an access response to the first terminal.

[0128] The access response is used to indicate successful access to the first gateway.

[0129] For the description of step S402 to step S404 , reference may be made to the corresponding description of step S101 to step S103 above, which will not be repeated here.

[0130] based on Figure 5 In the embodiment shown, compared with the prior art that uses specific voice information to complete network access and has the problem of 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 in the user's life. On the other hand, the "read and burn" 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.

[0131] In some embodiments, Figure 6 As shown, the method also includes the following steps:

[0132] S501. Receive multiple third dynamic codes sent by multiple first terminals.

[0133] In some embodiments, when the first gateway is a legitimate gateway, multiple first terminals in the smart home system are all connected to the first gateway. After the multiple first terminals are all connected to the first gateway, in order 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. Correspondingly, the first gateway receives multiple third dynamic codes sent by the multiple first terminals. Among them, the multiple first terminals are first terminals connected to the first gateway, the first terminal is one of the multiple first terminals, and the multiple first terminals correspond to the multiple third dynamic codes one by one.

[0134] S502: Send first response information to each first terminal.

[0135] 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 is used to indicate that the third dynamic code has been received, so that the first terminal can store the third dynamic code.

[0136] S503: Determine whether the multiple third dynamic codes are consistent.

[0137] It should be understood that in the smart home system, the third dynamic code saved by each first terminal should be consistent, so as to ensure that all first terminals can normally access the new gateway when the gateway is replaced. In order to avoid the situation where the third dynamic code saved by a first terminal is inconsistent with the third dynamic code saved by other first terminals, resulting in the first terminal being unable to normally access the new gateway after the gateway is replaced again, affecting the user's experience, the first gateway determines whether the multiple third dynamic codes are consistent after receiving multiple third dynamic codes sent by multiple first terminals.

[0138] S504: When there are inconsistent third dynamic codes among the multiple third dynamic codes, send first indication information to multiple first terminals.

[0139] The first indication information is used to indicate feedback of the updated third dynamic code.

[0140] As an example, the second indication information includes network time, so that multiple first terminals update the third dynamic code based on the network time, thereby generating multiple consistent updated third dynamic codes. The network time may be obtained by the first gateway based on the Internet.

[0141] It should be understood that a third dynamic code is generated by a first terminal based on its own local time. When there is an inconsistent third dynamic code 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, so that multiple first terminals can complete time synchronization based on the network time, thereby generating a consistent updated third dynamic code, and then feeding back a consistent updated third dynamic code.

[0142] based on Figure 6 In the embodiment shown, 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 an updated third dynamic code, so that the dynamic codes locally stored in 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.

[0143] The above embodiment is described by taking the inconsistent third dynamic code among the multiple third dynamic codes as an example. In some embodiments, when the multiple third dynamic codes are consistent, the first gateway sends the second indication information to the second terminal. 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.

[0144] It should be understood that the first gateway sends the second indication information to the second terminal to instruct the second terminal to store the third dynamic code, so that when the smart home system replaces the gateway, the user can input the dynamic code to the new gateway based on the dynamic code stored in the second terminal to complete the first terminal in the smart home system to automatically access the new gateway, which reduces the complexity of the operation of accessing the new gateway after replacing the gateway, improves the efficiency of accessing the new gateway after the gateway is replaced, and helps to improve the user experience. The second terminal is a terminal that accesses the first terminal, and the first terminal has been connected to the first gateway, so the first gateway can send the second indication information to the second terminal.

[0145] In some embodiments, Figure 7 As shown, the embodiment of the present disclosure also provides a network access method, which is applied to a second gateway, and the second gateway can be the above Figure 1 The gateway 11 shown, the method comprises the following steps:

[0146] S601. Receive multiple second dynamic codes sent by multiple first terminals.

[0147] It can be seen from the above description that the second gateway is the old gateway before the smart home system is 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. Correspondingly, the second gateway receives multiple second dynamic codes sent by multiple first terminals. Among them, one first terminal corresponds to one second dynamic code.

[0148] S602: Send second response information to each first terminal.

[0149] The second response information is used to indicate that the second dynamic code is received.

[0150] S603: Determine whether the multiple second dynamic codes are consistent.

[0151] S604: When there are inconsistent second dynamic codes among the multiple second dynamic codes, send third indication information to the multiple first terminals.

[0152] The third indication information is used to indicate feedback of the updated second dynamic code.

[0153] For the specific description of steps S601 to S604 , reference may be made to the corresponding description of steps S501 to S504 , which will not be repeated here.

[0154] based on Figure 7 In the illustrated embodiment, during the operation of the old gateway (second gateway), when there are inconsistent second dynamic codes among the multiple second dynamic codes sent by the multiple first terminals, a third indication information is sent to the multiple first terminals to instruct the multiple first terminals to feed back updated second dynamic codes, so that the dynamic codes saved by the various first terminals are consistent, so that when the gateway of the subsequent smart home system is replaced, the various first terminals can successfully access the new gateway based on the consistent dynamic code, which helps to ensure the user experience.

[0155] 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 indicate storing the second dynamic code.

[0156] For the description of the second gateway sending the fourth indication information to the second terminal, reference may be made to the description of the first gateway sending the third indication information to the second terminal, which is not described in detail herein.

[0157] A network access method provided by an embodiment of the present disclosure is described below with reference to a specific example.

[0158] Exemplarily, 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 bits 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 the 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. Exemplarily, 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 related content according to the message header, such as the dynamic code.

[0159] The following describes a network access method provided by an embodiment of the present disclosure in the form of node interaction. For example, the first terminal is a sensor and the second terminal is a mobile phone. Figure 8 FIG. 1 is a schematic diagram of the overall process of a network access method provided by an embodiment of the present disclosure, see Figure 8 , the method comprises the following steps:

[0160] Y1. The sensor sends the second dynamic code to the gateway.

[0161] In some embodiments, during the operation of the smart home system, each time the sensor reports data to the gateway, the sensor will control the dynamic code generator to obtain the current local time from the time module, encrypt the local time based on the MD5 algorithm, and take the first few bits to generate an initial second dynamic code, and then encrypt the initial second dynamic code based on the RSA private key of the encryption and decryption module to obtain the encrypted second dynamic code, and send the encrypted second dynamic code to the gateway.

[0162] Y2. The gateway determines whether multiple second dynamic codes are consistent.

[0163] In some embodiments, after the gateway receives multiple second dynamic codes sent by multiple sensors, the function module of the gateway 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.

[0164] Y3. The gateway sends a fourth instruction message to the mobile phone.

[0165] The fourth indication information includes the second dynamic code, and the fourth indication information is used to indicate storing the second dynamic code.

[0166] Y4. The gateway sends the third indication information to the sensor.

[0167] In some embodiments, when there is an inconsistent second dynamic code, the gateway triggers the time module to obtain the network time and then sends the third indication information to each sensor through the broadcast channel. The third indication information is used to indicate the updated second dynamic code, and the fifth indication information includes the network time.

[0168] After receiving the third indication information, the sensor parses the third indication information, obtains the network time and performs time synchronization, and then generates an updated second dynamic code when reporting the next information and sends the updated second dynamic code to the gateway. After receiving the updated second dynamic code sent by each sensor, the gateway compares them until all updated second dynamic codes are consistent.

[0169] Y5. The gateway obtains the first dynamic code and sends the first dynamic code to the sensor.

[0170] After replacing the gateway, when the new gateway is powered on for the first time, all indicators light up at the same time and display red to prompt the user to input the first dynamic code by voice. When the user obtains the first dynamic code received by the mobile phone for the last time from the mobile phone, and reads the first dynamic code in front of the MIC of the new gateway, the new gateway receives the voice and waits for the user's voice to end, and then parses the first dynamic code through the voice parsing module, encrypts it together with the identification information of the new gateway through the RSA public key of the encryption and decryption module, and obtains the encrypted first dynamic code, and then sends the encrypted first dynamic code to each sensor through the broadcast channel.

[0171] The new gateway may 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 the network is currently being added.

[0172] In some embodiments, after all indicator lights of 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 web interface of the PC, transmit the first dynamic code to the new gateway through a network cable according to the page prompt. The embodiment of the present disclosure does not limit the form of transmitting the first dynamic code to the new gateway.

[0173] Y6. The sensor detects whether the first dynamic code is consistent with the second dynamic code stored locally.

[0174] After the sensor receives the encrypted first dynamic code, it first decrypts it using the RSA private key to obtain the gateway identification information and the first dynamic code. Then it detects whether the first dynamic code is consistent with the second dynamic code stored locally. If the first dynamic code is inconsistent with the second dynamic code, execute the following Y7. If the first dynamic code is consistent with the second dynamic code, execute the following Y8.

[0175] Y7. The sensor refuses to access the gateway.

[0176] Y8. The sensor sends an access request to the gateway.

[0177] When the first dynamic code is consistent with the second dynamic code, it means that the new gateway is a legal gateway and the sensor can access the new gateway, then the sensor sends an access request to the gateway based on the identification information of the gateway. The access request is used to request access to the new gateway.

[0178] Y9. The gateway sends an access response to the sensor.

[0179] The access response is used to indicate successful access to the new gateway.

[0180] In this way, the sensor is successfully connected to the new gateway, completing the sensor's secondary networking process.

[0181] In some embodiments, after the sensor is successfully connected to the new gateway, all indicator lights of the new gateway are displayed green and flashing to prompt the user that the secondary network connection is completed.

[0182] 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.

[0183] The above mainly introduces the solution provided by the present disclosure from the perspective of interaction between various nodes. 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. It should be easily appreciated by those skilled in the art that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present invention 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 exceed the scope of the present invention.

[0184] Fig. 9 FIG. 1 is a schematic diagram showing the composition of a communication device provided by an embodiment of the present disclosure. Fig. 9 As shown, 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.

[0185] 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 function of the first terminal in the above embodiment, each unit is specifically used to implement the following functions.

[0186] 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.

[0187] 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 that the first terminal last accessed; if the first dynamic code and the second dynamic code are consistent, access the first gateway.

[0188] In some embodiments, the receiving unit 701 is specifically configured to receive a first dynamic code sent by the first gateway based on a broadcast channel.

[0189] In some embodiments, the receiving unit 701 is further configured to obtain the local time of the first terminal.

[0190] The processing unit 702 is further configured to generate a third dynamic code based on the local time.

[0191] The sending unit 703 is configured to send a third dynamic code to the first gateway.

[0192] The processing unit 702 is further configured to store the third dynamic code and delete the locally stored second dynamic code when receiving the first response information to the third dynamic code sent by the first gateway within a preset time period.

[0193] 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.

[0194] In some embodiments, the processing unit 702 is specifically 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.

[0195] The sending unit 703 is specifically configured to: encrypt the third dynamic code based on the second encryption algorithm to obtain the encrypted third dynamic code; and send the encrypted third dynamic code to the first gateway.

[0196] In some embodiments, the receiving unit 701 is specifically configured to obtain an identifier of the first gateway.

[0197] The sending unit 703 is specifically 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;

[0198] The receiving unit 701 is specifically 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.

[0199] Fig.10 FIG. 2 is a schematic diagram showing the composition of another communication device provided by an embodiment of the present disclosure. Fig.10 As shown, 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.

[0200] 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 specifically used to implement the following functions.

[0201] The acquiring unit 801 is used 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.

[0202] The sending unit 802 is configured to send a first dynamic code based on a broadcast channel;

[0203] 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.

[0204] 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.

[0205] In some embodiments, the acquisition unit 801 is specifically used to: monitor the voice configuration information; and parse the voice configuration information to obtain the first dynamic code.

[0206] In some embodiments, the acquiring unit 801 is further configured to receive a plurality of third dynamic codes sent by a plurality of first terminals, and the plurality of first terminals correspond to the plurality of third dynamic codes one by one.

[0207] 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;

[0208] The processing unit 803 is configured to determine whether the plurality of third dynamic codes are consistent.

[0209] 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.

[0210] In some embodiments, the sending unit 802 is also 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, the second indication information is used to indicate the storage of the third dynamic code, and the second terminal is a terminal accessing the first terminal.

[0211] Fig.11 FIG. 2 is a schematic diagram showing the composition of another communication device provided by an embodiment of the present disclosure. Fig.11 As shown, 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.

[0212] 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 specifically used to implement the following functions.

[0213] In some embodiments, the receiving unit 901 is used to receive multiple second dynamic codes sent by multiple first terminals, and the multiple first terminals correspond to the multiple second dynamic codes one by one.

[0214] 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.

[0215] The processing unit 903 is configured to determine whether the plurality of second dynamic codes are consistent.

[0216] The sending unit 902 is configured to send third indication information to 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.

[0217] In some embodiments, the sending unit 902 is also 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, the fourth indication information is used to indicate the storage of the second dynamic code, and the second terminal is a terminal accessing the first terminal.

[0218] It should be noted that Fig. 9 , Fig.10 and Fig.11 The units in the system may also be referred to as modules, for example, the sending unit may be referred to as a sending module. Fig. 9 , Fig.10 and Fig.11 In the illustrated embodiment, the names of the various units may not be the names shown in the figure. For example, the receiving unit may also be called a communication unit.

[0219] Fig. 9 , Fig.10 and Fig.11 If each unit in the embodiment is implemented in the form of a software function module and sold or used as an independent product, it 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. The computer software product is stored in a storage medium, including 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 methods of each embodiment of the present disclosure. The storage medium for storing computer software products includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0220] 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. Fig.12 As shown, the electronic device 100 includes: a processor 1002 , a communication interface 1003 , and a bus 1004 . Optionally, the electronic device 100 may further include a memory 1001 .

[0221] The processor 1002 may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The 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 devices, transistor logic devices, hardware components, or any combination thereof. It may be a processor that implements or executes various exemplary logic blocks, modules, and circuits described in conjunction with the present disclosure. The 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 with other devices via a communication network, such as Ethernet, wireless access network, wireless local area network (WLAN), etc.

[0223] The memory 1001 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or 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 codes in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0224] As a possible implementation, the memory 1001 may exist independently of the processor 1002, and the memory 1001 may be connected to the processor 1002 via the bus 1004 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 embodiment of the present disclosure can be implemented.

[0225] In another possible implementation, the memory 1001 may also be integrated with the processor 1002 .

[0226] The bus 1004 may be an extended industry standard architecture (EISA) bus, etc. The bus 1004 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0227] 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.

[0228] The disclosed embodiment also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be completed by computer instructions to instruct the relevant hardware, and the program can be stored in the above computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be the memory or memory of any of the above embodiments. The above computer-readable storage medium can also be an external storage device of the above 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 electronic device. Further, the above computer-readable storage medium can also include both the internal storage unit of the above electronic device and an external storage device. The above computer-readable storage medium is used to store the above computer program and other programs and data required by the above electronic device. The above computer-readable storage medium can also be used to temporarily store data that has been output or is to be output.

[0229] The embodiments of the present disclosure also provide 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.

[0230] Although the present disclosure is described herein in conjunction with various embodiments, in the process of implementing the claimed disclosure, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing 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 situations. 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.

[0231] Although the present disclosure has been described in conjunction with specific features and embodiments thereof, it is 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 exemplary illustrations of the present disclosure as defined by the appended claims, and are deemed to have covered 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, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalents, the present disclosure is also intended to include these modifications and variations.

[0232] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A network access method, characterized in that: The method is applied to a first terminal, and the method includes: 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, characterized in that 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, characterized in that 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 sent by the first gateway is received 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, characterized in that The method further comprises: 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, characterized in that: 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, characterized in that 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, characterized in that: The method is applied to a first gateway, and the method includes: 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, characterized in that 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, characterized in that: The method further comprises: 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, first indication information is sent 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, characterized in that: The method is applied to the second gateway, and the method includes: 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, characterized in that The method further comprises: 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, characterized in that: include: one or more processors and memory; 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 as claimed in any one of claims 1 to 6, 7 to 9 or 10 to 11.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes computer instructions, which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 6, 7 to 9, or 10 to 11.