A method and device for logging into a home intelligent gateway

By managing the login status according to the maintenance account ID in the home smart gateway, it is ensured that only one maintenance account is allowed to log in at the same time, which solves the problem of data inconsistency caused by multiple accounts logging in at the same time, and improves the security and data consistency of the gateway.

CN112532663BActive Publication Date: 2024-09-06HISENSE BROADBAND MULTIMEDIA TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910880429.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-18
Publication Date
2024-09-06
Estimated Expiration
2039-09-18

AI Technical Summary

Technical Problem

Home gateways can easily cause data inconsistencies when multiple maintenance accounts are logged in at the same time, affecting the maintenance and diagnostic operations of the gateway.

Method used

By receiving the maintenance login request sent by the terminal, the login status of the gateway is determined based on the maintenance account ID, and only one maintenance account is allowed to log in at the same time to prevent multiple terminals from modifying data at the same time. The heartbeat packet mechanism is used to monitor the login status and ensure data consistency. .

Benefits of technology

It effectively avoids data inconsistency problems caused by multiple terminals logging in at the same time, and improves the security and data integrity of the gateway.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112532663B
    Figure CN112532663B
Patent Text Reader

Abstract

The embodiment of the present invention relates to the field of communication technology, and in particular to a method and device for logging in to a home smart gateway, which is used to solve the problem of inconsistent gateway data. The embodiment of the present invention includes: the gateway receives a maintenance login request sent by a terminal, and the maintenance login request includes a maintenance account identifier; according to the maintenance account identifier, it is determined that the maintenance login state of the gateway is a non-logged-in state; a login success response is sent to the terminal; and the maintenance login state is changed to a logged-in state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method and device for logging into a home smart gateway. Background Art

[0002] Gateway is also called network connector or protocol converter. Gateway realizes network interconnection above the network layer and is a computer system or device that acts as a converter. Gateway is used between two systems with different communication protocols, data formats or languages, or even completely different architectures. Unlike a bridge that simply transmits information, a gateway repackages the received information to meet the needs of the destination system.

[0003] With the promotion of fiber-to-the-home and the substantial increase in home gateway bandwidth, smart gateways are becoming more and more popular, and remote maintenance of home gateways is becoming more and more frequent. Among them, home gateway refers to the intelligent gateway between networked information devices in the home and the intelligent broadband access network. The home gateway can receive communication signals from different external networks and send the communication signals to one or more smart devices through the home network.

[0004] Remote maintenance, configuration and diagnosis of home gateways require users to log in to a maintenance account to perform operations. For example, important information of the gateway, such as configuring WAN connections, logical ID registration, ITMS management configuration, etc., needs to be set using a maintenance account. For another example, when a device in a home gateway fails, the home gateway is usually required to open a port on the Wide Area Network (WAN) side and allow the Internet Protocol (IP) address on the WAN side to log in to the World Wide Web (WEB) of the home gateway through the port. After that, maintenance operations such as configuration check, status check and fault diagnosis are performed on each device in the home gateway to locate the fault of the home gateway. If multiple maintenance accounts log in to the home gateway at the same time to set or modify the same information, data inconsistency will occur. Summary of the invention

[0005] The present application provides a method and device for logging into a home smart gateway, which are used to solve the problem of inconsistent gateway data.

[0006] An embodiment of the present invention provides a method for logging into a home smart gateway, comprising:

[0007] The gateway receives a maintenance login request sent by the terminal, wherein the maintenance login request includes a maintenance account identifier;

[0008] Determining, according to the maintenance account identifier, that the maintenance login state of the gateway is a non-logged-in state;

[0009] Sending a login success response to the terminal;

[0010] The maintenance login state is changed to a logged in state.

[0011] In an optional embodiment, determining that the maintenance login state is a non-logged-in state according to the maintenance account identifier includes:

[0012] According to the maintenance account identifier, obtaining a maintenance login status identifier;

[0013] It is determined that the state corresponding to the maintenance login state identifier is a non-logged-in state.

[0014] In an optional embodiment, after the gateway receives the maintenance login request sent by the terminal, the method further includes:

[0015] Determining the maintenance login state as a logged-in state according to the maintenance account identifier;

[0016] Send a login failure response to the terminal.

[0017] In an optional embodiment, after changing the maintenance login state to the logged-in state, the method further includes:

[0018] Sending a heartbeat packet to the terminal at a set frequency;

[0019] Determine whether a heartbeat response sent by the terminal is received within a set time period;

[0020] If yes, keep the maintenance login state as logged in state;

[0021] If not, the maintenance login state is changed to a non-logged in state.

[0022] In an optional embodiment, the maintenance login request further includes a maintenance account password; after the gateway receives the maintenance login request sent by the terminal, before determining that the maintenance login state of the gateway is a non-logged-in state according to the maintenance account identifier, it also includes:

[0023] Verifying the maintenance account password;

[0024] If the verification is successful, the step of determining that the maintenance login state of the gateway is a non-logged-in state according to the maintenance account identifier is executed;

[0025] Otherwise, a login failure response is sent to the terminal.

[0026] The embodiment of the present invention further provides a home smart gateway login device, comprising:

[0027] A transceiver unit, configured to receive a maintenance login request sent by a terminal, wherein the maintenance login request includes a maintenance account identifier;

[0028] A status unit, configured to determine, according to the maintenance account identifier, that the maintenance login status of the gateway is a non-logged-in status;

[0029] The transceiver unit is further configured to send a login success response to the terminal;

[0030] The state unit is further used to change the maintenance login state to a logged-in state.

[0031] In an optional embodiment, the state unit is specifically used to:

[0032] According to the maintenance account identifier, obtaining a maintenance login status identifier;

[0033] It is determined that the state corresponding to the maintenance login state identifier is a non-logged-in state.

[0034] In an optional embodiment, the state unit is further used to determine that the maintenance login state is a logged-in state according to the maintenance account identifier;

[0035] The transceiver unit is further used to send a login failure response to the terminal.

[0036] In an optional embodiment, a heartbeat unit is further included, which is used to:

[0037] Sending a heartbeat packet to the terminal at a set frequency;

[0038] Determine whether a heartbeat response sent by the terminal is received within a set time period;

[0039] If yes, keep the maintenance login state as logged in state;

[0040] If not, the maintenance login state is changed to a non-logged in state.

[0041] In an optional embodiment, the maintenance login request also includes a maintenance account password;

[0042] Also included is a verification unit, for verifying the maintenance account password;

[0043] If the verification is successful, the state unit executes the step of determining that the maintenance login state of the gateway is a non-logged-in state according to the maintenance account identifier;

[0044] Otherwise, the transceiver unit sends a login failure response to the terminal.

[0045] An embodiment of the present invention further provides an electronic device, including:

[0046] at least one processor; and,

[0047] a memory communicatively connected to the at least one processor; wherein,

[0048] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described above.

[0049] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method as described above.

[0050] In an embodiment of the present invention, the terminal sends a maintenance login request to the gateway, and the maintenance login request includes a maintenance account identifier. The gateway determines the maintenance login status according to the maintenance account identifier. If the maintenance login status is determined to be a non-logged-in state, it indicates that no other terminal has logged in to the gateway using the maintenance account before, and no terminal has logged in using other maintenance accounts, that is, the gateway has only this maintenance account to apply for login, so the maintenance login request can be approved and a successful login response can be replied to the terminal. At the same time, the maintenance login status is changed to a logged-in state to prevent other terminals from using the maintenance account to log in to the gateway during the login process of the terminal. In the embodiment of the present invention, at most only one terminal can log in to the gateway using the maintenance account at the same time, and more terminals are not allowed to log in using the maintenance account, and only one maintenance account can log in at the same time, which effectively solves the problem of multiple terminals using maintenance accounts to log in to the gateway at the same time and modify the same data causing data inconsistency, avoids data confusion in the gateway, and improves the security of the gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0052] Figure 1 A schematic diagram of a possible system architecture provided by an embodiment of the present invention;

[0053] Figure 2 A schematic diagram of a flow chart of a method for logging into a home smart gateway provided by an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of a flow chart of a method for logging into a home smart gateway provided by a specific embodiment of the present invention;

[0055] Figure 4 A schematic diagram of the structure of a home smart gateway login device provided by an embodiment of the present invention;

[0056] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] Please refer to Figure 1 , which shows a system architecture diagram of gateway login provided in an embodiment of the present application, and the gateway login system includes a terminal 101 and a gateway 102. The terminal 101 can be an electronic device with wireless communication function such as a mobile phone, a tablet computer or a dedicated handheld device. The gateway 102 can be a device that connects two different networks such as a router, a switch or a PC. Further, the gateway can be a home smart gateway. The network between the terminal 101 and the gateway 102 can be any one of the communication networks such as a local area network, a wide area network or a mobile Internet.

[0059] Terminal 101 logs in to gateway 102 through a common account, sends common data to gateway 102, and gateway 102 forwards the common data to one or more devices. When gateway 102 needs maintenance, configuration, and diagnosis, terminal 101 can log in to gateway 102 through a maintenance account, send maintenance data to gateway 102, gateway 102 executes the maintenance data, and feeds back the result to terminal 101. Here, the main difference between common accounts and maintenance accounts is that they have different permissions, and multiple common accounts can log in to a gateway at the same time, while only one maintenance account can log in to the gateway at the same time.

[0060] It should be noted that although Figure 1 Only one terminal is shown in the figure, but in the embodiment of the present invention, multiple terminals can be connected to the gateway 102. If the gateway 102 is provided with a maintenance account, multiple terminals connected to the gateway 102 can log in to the gateway 102 through the maintenance account, but only one terminal can log in using the maintenance account at the same time. If the gateway 102 is provided with more than one maintenance account, multiple terminals can log in to the gateway 102 through different maintenance accounts, but only one terminal can log in using the maintenance account at the same time, and can only log in using one of the maintenance accounts.

[0061] based on Figure 1 The present invention provides a method for logging into a home smart gateway. Figure 2 As shown, the gateway login method provided by the embodiment of the present invention includes the following steps:

[0062] Step 201: The gateway receives a maintenance login request sent by a terminal, wherein the maintenance login request includes a maintenance account identifier.

[0063] The maintenance account identifier may be the account number of the maintenance account.

[0064] To increase the security of maintenance login, the maintenance login request also includes the maintenance account password.

[0065] After the gateway receives the maintenance login request sent by the terminal in step 201, the following steps are further performed:

[0066] Verify the maintenance account password;

[0067] If the verification is successful, execute step 202;

[0068] If the verification fails, a login failure response is fed back to the terminal.

[0069] Step 202: The gateway determines, based on the maintenance account identifier, that the maintenance login state of the gateway is a non-logged-in state.

[0070] Specifically, the gateway may be configured with a variety of ways to indicate the maintenance login status. For example, when the maintenance login status is the logged-in status, the maintenance account identifier is associated with a special identifier and stored; if the maintenance login status is the unlogged-in status, the special identifier corresponding to the maintenance account identifier is deleted. For another example, when the maintenance login status is the logged-in status, the maintenance account identifier is stored in a special location; when the maintenance login status is the unlogged-in status, the maintenance account identifier in the special location is deleted.

[0071] Preferably, the step of determining that the maintenance login state is a non-logged-in state according to the maintenance account identifier includes:

[0072] According to the maintenance account identifier, obtaining a maintenance login status identifier;

[0073] It is determined that the state corresponding to the maintenance login state identifier is a non-logged-in state.

[0074] During the specific implementation process, a maintenance login status identifier is set corresponding to the maintenance login status. Different characters of the maintenance login status identifier correspond to different states. For example, corresponding to the non-logged-in state, the maintenance login status identifier is 0, and corresponding to the logged-in state, the maintenance login status identifier is 1. After the gateway receives the maintenance login request, it can determine whether the current state is the logged-in state or the non-logged-in state according to the content of the maintenance login status identifier.

[0075] Step 203: The gateway sends a login success response to the terminal.

[0076] Step 204: The gateway changes the maintenance login state to a logged-in state.

[0077] It should be noted that there is no necessary order relationship between the above step 203 and step 204.

[0078] In an embodiment of the present invention, the terminal sends a maintenance login request to the gateway, and the maintenance login request includes a maintenance account identifier. The gateway determines the maintenance login status according to the maintenance account identifier. If the maintenance login status is determined to be a non-logged-in state, it indicates that no other terminal has logged in to the gateway using the maintenance account before, and no terminal has logged in using other maintenance accounts, that is, the gateway has only this maintenance account to apply for login, so the maintenance login request can be approved and a successful login response can be replied to the terminal. At the same time, the maintenance login status is changed to a logged-in state to prevent other terminals from using the maintenance account to log in to the gateway during the login process of the terminal. In the embodiment of the present invention, at most only one terminal can log in to the gateway using the maintenance account at the same time, and more terminals are not allowed to log in using the maintenance account, and only one maintenance account can log in at the same time, which effectively solves the problem of multiple terminals using maintenance accounts to log in to the gateway at the same time and modify the same data causing data inconsistency, avoids data confusion in the gateway, and improves the security of the gateway.

[0079] Further, if the gateway determines that the maintenance login state is the logged-in state according to the maintenance account identifier, a login failure response is sent to the terminal.

[0080] There are two situations here. One is that, in the above step 201, after the gateway receives the maintenance login request sent by the terminal, the gateway determines that the maintenance login state of the gateway is logged in according to the maintenance account identifier. That is, before the terminal sends the maintenance login request to the gateway, there is already a maintenance account logged in in the gateway. Since only one maintenance account can be logged in at the same time, the maintenance login request is rejected and a login failure response is sent to the terminal.

[0081] Another situation is that, in the above step 204, after the gateway changes the maintenance login state to the logged-in state, the gateway determines that the maintenance login state of the gateway is the logged-in state according to the maintenance account identifier. That is, after the terminal sends a maintenance login request to the gateway, and the terminal has logged in to the gateway using the maintenance account, if the gateway receives a maintenance login request sent by another terminal. Since the gateway already has a maintenance account logged in, and only one maintenance account can be logged in at the same time, the maintenance login request after this maintenance login request is rejected, and a login failure response is sent for the subsequent maintenance login request.

[0082] Furthermore, when a logged-in maintenance account logs out, in order to ensure that the maintenance account can log in again later, the gateway will change the maintenance login status from the logged-in status to the unlogged-in status.

[0083] Specifically, in response to the user's request, the terminal sends a maintenance exit request to the gateway, where the maintenance exit request includes a maintenance account identifier.

[0084] The gateway sends a login and logout response to the terminal, and queries the corresponding maintenance login status identifier based on the maintenance account identifier, and changes the status corresponding to the maintenance login status identifier to the non-logged-in status.

[0085] The above logout process of the maintenance account login status is a normal logout process. If the maintenance account logs out abnormally, the gateway cannot determine that the maintenance account has been logged out according to the logout request. Therefore, the gateway needs to monitor the login status of the maintenance account after the maintenance account logs in.

[0086] That is, after changing the maintenance login state to the logged-in state, the method further includes:

[0087] Sending a heartbeat packet to the terminal at a set frequency;

[0088] Determine whether a heartbeat response sent by the terminal is received within a set time period;

[0089] If yes, keep the maintenance login state as logged in state;

[0090] If not, the maintenance login state is changed to a non-logged in state.

[0091] During the specific implementation process, after the gateway maintains the login status as logged in, it starts the heartbeat link, that is, it uses the process to send heartbeat packets to the terminal at a set frequency, and monitors whether the heartbeat response sent by the terminal is received within the set time. If it is received, it is considered that the login status of the maintenance account is normal, and the maintenance login status remains unchanged. If it is not received within the set time, it is considered that the login status of the maintenance account is abnormal, and the maintenance login status is changed to the unlogged state, so as to ensure that the subsequent maintenance account can log in normally.

[0092] In order to more clearly understand the present invention, the above process is described in detail with specific embodiments below. Figure 3 As shown, including:

[0093] Step S301: The gateway receives a maintenance login request sent by a terminal, wherein the maintenance login request includes a maintenance account identifier and a maintenance account password.

[0094] Step S302: The gateway verifies the maintenance account password. If the verification is successful, step S303 is executed, otherwise step S311 is executed.

[0095] Step S303: The gateway queries the maintenance login status identifier according to the maintenance account identifier. For example, when the maintenance login status identifier is 0, it indicates that the maintenance login status is not logged in, and when the maintenance login status identifier is 1, it indicates that the maintenance login status is logged in.

[0096] Step S304: The gateway determines the state corresponding to the maintenance login state identifier. If it is a non-logged-in state, that is, the maintenance login state identifier is 0, then execute step S305; if it is a logged-in state, that is, the maintenance login state identifier is 1, then execute step S311.

[0097] Step S305: The gateway sends a login success response to the terminal.

[0098] Step S306: the gateway changes the state corresponding to the maintenance login state identifier to the logged-in state, that is, changes the maintenance login state identifier from 0 to 1.

[0099] Step S307: The gateway sends a heartbeat packet to the terminal at a set frequency.

[0100] Step S308: The gateway determines whether a heartbeat response fed back by the terminal is received within a set time period. If so, execute step S309; ​​otherwise, execute step S310.

[0101] Step S309: the gateway maintains the maintenance login status as the logged-in status, that is, maintains the maintenance login status flag as 1.

[0102] Step S310: the gateway changes the maintenance login state to the non-logged-in state, that is, changes the maintenance login state flag from 1 to 0.

[0103] Step S311: the gateway sends a login failure response to the terminal.

[0104] The embodiment of the present invention also provides a home intelligent gateway login device, such as Figure 4 As shown, including:

[0105] The transceiver unit 401 is used to receive a maintenance login request sent by a terminal, wherein the maintenance login request includes a maintenance account identifier;

[0106] A state unit 402, configured to determine, according to the maintenance account identifier, that the maintenance login state of the gateway is a non-logged-in state;

[0107] The transceiver unit 401 is further configured to send a login success response to the terminal;

[0108] The state unit 402 is further used to change the maintenance login state to a logged-in state.

[0109] In an optional embodiment, the state unit 402 is specifically used to:

[0110] According to the maintenance account identifier, obtaining a maintenance login status identifier;

[0111] It is determined that the state corresponding to the maintenance login state identifier is a non-logged-in state.

[0112] In an optional embodiment, the state unit 402 is further used to determine that the maintenance login state is a logged-in state according to the maintenance account identifier;

[0113] The transceiver unit 401 is further configured to send a login failure response to the terminal.

[0114] In an optional embodiment, a heartbeat unit 403 is further included, which is used to:

[0115] Sending a heartbeat packet to the terminal at a set frequency;

[0116] Determine whether a heartbeat response sent by the terminal is received within a set time period;

[0117] If yes, keep the maintenance login state as logged in state;

[0118] If not, the maintenance login state is changed to a non-logged in state.

[0119] In an optional embodiment, the maintenance login request also includes a maintenance account password;

[0120] Also included is a verification unit 404, for verifying the maintenance account password;

[0121] If the verification is successful, the state unit executes the step of determining that the maintenance login state of the gateway is a non-logged-in state according to the maintenance account identifier;

[0122] Otherwise, the transceiver unit sends a login failure response to the terminal.

[0123] Based on the same principle, the present invention also provides an electronic device, such as Figure 5 As shown, including:

[0124] The device comprises a processor 501, a memory 502, a transceiver 503, and a bus interface 504, wherein the processor 501, the memory 502 and the transceiver 503 are connected via the bus interface 504;

[0125] The processor 501 is configured to read the program in the memory 502 and execute the following method:

[0126] Receiving a maintenance login request sent by a terminal, wherein the maintenance login request includes a maintenance account identifier;

[0127] Determining, according to the maintenance account identifier, that the maintenance login state of the gateway is a non-logged-in state;

[0128] Sending a login success response to the terminal;

[0129] The maintenance login state is changed to a logged in state.

[0130] Further, the processor 501 is configured to execute:

[0131] According to the maintenance account identifier, obtaining a maintenance login status identifier;

[0132] It is determined that the state corresponding to the maintenance login state identifier is a non-logged-in state.

[0133] Further, the processor 501 is configured to execute:

[0134] Determining the maintenance login state as a logged-in state according to the maintenance account identifier;

[0135] Send a login failure response to the terminal.

[0136] Further, the processor 501 is configured to execute:

[0137] Sending a heartbeat packet to the terminal at a set frequency;

[0138] Determine whether a heartbeat response sent by the terminal is received within a set time period;

[0139] If yes, keep the maintenance login state as logged in state;

[0140] If not, the maintenance login state is changed to a non-logged in state.

[0141] Furthermore, the maintenance login request also includes a maintenance account password; the processor 501 is used to execute:

[0142] Verifying the maintenance account password;

[0143] If the verification is successful, the step of determining that the maintenance login state of the gateway is a non-logged-in state according to the maintenance account identifier is executed;

[0144] Otherwise, a login failure response is sent to the terminal.

[0145] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0148] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0149] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for logging into a home smart gateway. It is characterized in that include: The gateway receives a maintenance login request sent by the terminal, wherein the maintenance login request includes a maintenance account identifier; wherein the maintenance login request includes the account number of the maintenance account and the password of the maintenance account, and the maintenance account is used to log in when the gateway needs maintenance, configuration, and diagnosis; multiple ordinary accounts can log in to a gateway at the same time, but only one maintenance account can log in to the gateway at the same time, and the terminal can only log in using one maintenance account; multiple terminals log in to the gateway through different maintenance accounts; Determining, according to the maintenance account identifier, that the maintenance login state of the gateway is a non-logged-in state; wherein the non-logged-in state indicates that no other terminal has logged in to the gateway using the maintenance account, and no other terminal has logged in using other maintenance accounts; Sending a login success response to the terminal; The maintenance login state is changed to the logged-in state, and a heartbeat packet is sent to the terminal at a set frequency.

2. The method according to claim 1, It is characterized in that The determining, according to the maintenance account identifier, that the maintenance login state is a non-logged-in state includes: According to the maintenance account identifier, obtaining a maintenance login status identifier; It is determined that the state corresponding to the maintenance login state identifier is a non-logged-in state.

3. The method according to claim 1, It is characterized in that After the gateway receives the maintenance login request sent by the terminal, the method further includes: Determining the maintenance login state as a logged-in state according to the maintenance account identifier; Send a login failure response to the terminal.

4. The method according to claim 1 or 2, It is characterized in that The sending of a heartbeat packet to the terminal at a set frequency also includes: Determine whether a heartbeat response sent by the terminal is received within a set time period; If yes, keep the maintenance login state as logged in state; If not, the maintenance login state is changed to a non-logged in state.

5. The method according to any one of claims 1 to 3, It is characterized in that The maintenance login request also includes a maintenance account password; after the gateway receives the maintenance login request sent by the terminal, before determining that the maintenance login state of the gateway is a non-logged-in state according to the maintenance account identifier, it also includes: Verifying the maintenance account password; If the verification is successful, the step of determining that the maintenance login state of the gateway is a non-logged-in state according to the maintenance account identifier is executed; Otherwise, a login failure response is sent to the terminal.

6. A home smart gateway login device, It is characterized in that include: A transceiver unit, configured to receive a maintenance login request sent by a terminal, wherein the maintenance login request includes a maintenance account identifier; wherein the maintenance login request includes an account number of the maintenance account and a password of the maintenance account, and the maintenance account is used to log in when the gateway needs maintenance, configuration, and diagnosis; multiple ordinary accounts can log in to a gateway at the same time, but only one maintenance account can log in to the gateway at the same time, and the terminal can only log in using one maintenance account; multiple terminals log in to the gateway through different maintenance accounts; A status unit, configured to determine, according to the maintenance account identifier, that the maintenance login status of the gateway is a non-logged-in status; wherein the non-logged-in status indicates that no other terminal has logged in to the gateway using the maintenance account, and no other terminal has logged in using other maintenance accounts; The transceiver unit is further configured to send a login success response to the terminal; The state unit is further used to change the maintenance login state to a logged-in state, and send a heartbeat packet to the terminal at a set frequency.

7. The device according to claim 6, It is characterized in that The state unit is specifically used for: According to the maintenance account identifier, obtaining a maintenance login status identifier; It is determined that the state corresponding to the maintenance login state identifier is a non-logged-in state.

8. The device according to claim 6, It is characterized in that The status unit is further used to determine that the maintenance login status is a logged-in status according to the maintenance account identifier; The transceiver unit is further used to send a login failure response to the terminal.

9. The device according to claim 6 or 7, It is characterized in that Also included is a heartbeat unit for: Sending a heartbeat packet to the terminal at a set frequency; and determining whether a heartbeat response sent by the terminal is received within a set time period; if so, maintaining the maintenance login state as a logged-in state; if not, changing the maintenance login state to a non-logged-in state.

10. The device according to any one of claims 6 to 8, It is characterized in that The maintenance login request also includes a maintenance account password; Also included is a verification unit, for verifying the maintenance account password; If the verification is successful, the state unit executes the step of determining that the maintenance login state of the gateway is a non-logged-in state according to the maintenance account identifier; Otherwise, the transceiver unit sends a login failure response to the terminal.

11. An electronic device, It is characterized in that include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium, It is characterized in that The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 5.