Device control method, device, electronic device and storage medium

By storing network information of old access devices and re-connecting, the control stability problem caused by mistaken deletion of smart devices is solved, the anti-error deletion function and stability of the device are improved, and maintenance costs are reduced.

CN115484296BActive Publication Date: 2024-11-19SHENZHEN LUMIUNITED TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202210898662.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-28
Publication Date
2024-11-19
Estimated Expiration
2042-07-28

AI Technical Summary

Technical Problem

As the number of smart devices increases, users are prone to accidentally delete devices, resulting in poor device control stability and unable to perform corresponding actions through gateways or access devices, increasing maintenance costs and affecting stability.

Method used

By obtaining the networking request, the network information of the old access device is stored and the network detection is carried out with the new access device. If no new access device is detected, the network information of the old access device is re-connected, so as to Make sure that the device is always controlled by the access device to perform the corresponding actions.

Benefits of technology

It effectively solves the problem of poor device control stability, realizes the anti-error deletion function of smart devices, avoids the cumbersome manual operation of users, ensures that the device can resume connection even if offline, and reduces the risk of error deletion and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484296B_ABST
    Figure CN115484296B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a device control method, apparatus, electronic device and storage medium, which relate to the field of Internet of Things technology. Among them, the method includes: obtaining a networking request, the networking request is used to indicate that the device requests to disconnect the connected old access device and connect to a new access device; in response to the networking request, storing the first network information about the old access device, and performing a networking detection related to the new access device; if the new access device is not detected in the networking detection, re-accessing the old access device according to the first network information, so that the device is controlled by the connected old access device and performs corresponding actions. The embodiments of the present application solve the problem of poor stability of device control in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and specifically, to a device control method, apparatus, electronic device and storage medium. Background Art

[0002] With the rapid development of Internet of Things technology, smart devices are gradually and widely used in smart home scenarios. Users can configure smart devices through the client running in the user terminal (such as a smart phone), so that the smart devices can access the gateway or other access devices, and then control the smart devices to perform corresponding actions through the gateway or other access devices.

[0003] However, as the number of connected smart devices increases, users may accidentally delete smart devices. Once a smart device is deleted by a user, the user will not be able to control the smart device to perform corresponding actions through the gateway or other connected devices. The user can only reconfigure the smart device on the client, which not only greatly increases the maintenance cost, but also affects the stability of device control.

[0004] From the above, we can see that how to improve the stability of equipment control still needs to be solved. Summary of the invention

[0005] The embodiments of the present application provide a device control method, apparatus, electronic device and storage medium, which can solve the problem of poor stability of device control in related technologies. The technical solution is as follows:

[0006] According to one aspect of an embodiment of the present application, a device control method includes: obtaining a networking request, the networking request is used to indicate that the device requests to disconnect an old access device that has been connected and connect to a new access device; in response to the networking request, storing first network information about the old access device, and performing a networking detection related to the new access device; if the new access device is not detected in the networking detection, re-accessing the old access device according to the first network information, so that the device is controlled by the connected old access device and performs corresponding actions.

[0007] According to one aspect of an embodiment of the present application, a device control device includes: a request acquisition module, used to obtain a networking request, the networking request is used to indicate that the device requests to disconnect the connected old access device and connect to a new access device; an information storage module, used to store first network information about the old access device in response to the networking request, and perform networking detection related to the new access device; a device control module, used to re-access the old access device according to the first network information if the new access device is not detected in the networking detection, so that the device is controlled by the connected old access device and performs corresponding actions.

[0008] In an exemplary embodiment, the apparatus further includes: a second device control module, configured to connect the new access device if the new access device is detected in the networking detection, so that the device is controlled by the connected new access device and performs corresponding actions.

[0009] In an exemplary embodiment, the device further includes: an information deleting module, configured to delete the first network information.

[0010] In an exemplary embodiment, the apparatus further includes: a notification module, configured to notify the old access device to delete device information related to the device.

[0011] In an exemplary embodiment, the notification module includes: an access device verification unit, used to request the cloud to perform access device verification for the device based on the device information related to the device reported by the new access device; the access device verification is used to indicate whether the device is allowed to access the new access device; a cloud notification unit, used to request the cloud to notify the old access device to delete the device information related to the device based on the consistency of the first account and the second account if the device passes the access device verification; the first account is the account associated with the device accessing the old access device, and the second account is the account associated with the device accessing the new access device.

[0012] In an exemplary embodiment, the notification module includes: a message sending unit, used to re-access the old access device according to the first network information, and send an off-network message to the old access device; the off-network message is used to notify the old access device to disconnect from the device, and / or, the off-network message is used to notify the old access device to delete device information related to the device; a gateway access unit, used to access the new access device according to the second network information about the new access device.

[0013] In an exemplary embodiment, the apparatus further includes: an update request module, configured to request the cloud to update device information regarding the device switching from the old access device to the new access device based on device information related to the device reported by the new access device.

[0014] In an exemplary embodiment, the request acquisition module includes: a request initiating unit, configured to initiate the networking request in response to a trigger operation on the device; or a request receiving unit, configured to receive the networking request sent by a user terminal.

[0015] According to one aspect of an embodiment of the present application, an electronic device includes: at least one processor, at least one memory, and at least one communication bus, wherein a computer program is stored in the memory, and the processor reads the computer program in the memory through the communication bus; when the computer program is executed by the processor, the device control method as described above is implemented.

[0016] According to one aspect of an embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor, the device control method as described above is implemented.

[0017] According to one aspect of an embodiment of the present application, a computer program product includes a computer program, the computer program is stored in a storage medium, a processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the computer device implements the device control method as described above when executing the computer program.

[0018] The beneficial effects of the technical solution provided by this application are:

[0019] In the above technical solution, a networking request for indicating a request to access a new access device is obtained, and in response to the networking request, first network information about the old access device that has been disconnected is stored, and networking detection related to the new access device is performed. If the new access device is not detected in the networking detection, the old access device is re-accessed according to the first network information, so that the device is controlled by the connected old access device and performs corresponding actions. Otherwise, the new access device is accessed, so that the device is controlled by the connected new access device and performs corresponding actions. It can be seen that for smart devices, through the storage of the first network information, even if the new access device cannot be accessed, the connection with the old access device can be restored, ensuring that the smart device can always be controlled by the access device to perform corresponding actions, thereby effectively solving the problem of poor stability of device control in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0021] Figure 1 It is a schematic diagram of the implementation environment involved in this application;

[0022] Figure 2 is a flow chart of a device control method according to an exemplary embodiment;

[0023] Figure 3 is a flow chart of another device control method according to an exemplary embodiment;

[0024] Figure 4 is a flow chart of another device control method according to an exemplary embodiment;

[0025] Figure 5 is a schematic diagram of deleting device information according to an exemplary embodiment;

[0026] Figure 6 is a flow chart of another device control method according to an exemplary embodiment;

[0027] Figure 7 is a schematic diagram of an off-network message sending process according to an exemplary embodiment;

[0028] Figure 8 It is a schematic diagram of a specific implementation of a device control method in an application scenario;

[0029] Fig. 9 is a structural block diagram of a device control apparatus according to an exemplary embodiment;

[0030] Fig.10 is a hardware structure diagram of an electronic device according to an exemplary embodiment;

[0031] Fig.11 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0032] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0033] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0034] As mentioned above, once a smart device is deleted by a user by mistake, the user will not be able to control the smart device to perform corresponding actions through the access device, and can only reconfigure the smart device on the client.

[0035] Specifically, for the client, if the user configures the smart device on the client, the device identification of the smart device can be displayed in the client. Then, if the user deletes the device identification of the smart device from the client, it is deemed that the smart device is deleted by the user.

[0036] For smart devices, after confirming that the user has deleted their device identification from the client, the old access device that has been connected will be disconnected. Since the user does not know whether the smart device can access the new access device when deleting the smart device, if the smart device cannot access the new access device and is disconnected from the old access device, the smart device will not be able to be controlled by the access device to perform corresponding actions. At this time, it can be considered that the smart device has been deleted by the user by mistake.

[0037] In order to prevent the smart device from being unable to be controlled by the access device and perform corresponding actions due to accidental deletion, an anti-accidental deletion solution is proposed, which specifically refers to pre-setting an anti-accidental deletion function in the access device that can be turned on by the user. If the user turns on the anti-accidental deletion function, when the smart device is deleted by the user, the access device will be asked whether the smart device is allowed to be deleted. Accordingly, due to the activation of the anti-accidental deletion function, the access device will reply with a message that the smart device is not allowed to be deleted, thereby preventing the smart device from being accidentally deleted by the user.

[0038] However, the above-mentioned anti-accidental deletion solution also has some shortcomings, including: 1. The user needs to manually turn on the anti-accidental deletion function; 2. If the user turns on the anti-accidental deletion function, before deleting the smart device, the user needs to turn off the anti-accidental deletion function through the client or other operations before deleting the smart device in the network environment; 3. The smart device cannot automatically determine whether the anti-accidental deletion function is turned on; 4. The anti-accidental deletion function does not work when the smart device is offline, which will still cause the smart device to be accidentally deleted. In other words, the above-mentioned anti-accidental deletion solution not only has the problem of too cumbersome user operations, but also still has the risk of accidental deletion.

[0039] It can be seen that the related technology still has the defect of poor stability of device control.

[0040] To this end, the device control method provided in the present application can effectively improve the stability of device control. Accordingly, the device control method is applicable to a device control device, which can be deployed in a smart device. For example, the smart device can be various types of sensors, etc.

[0041] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0042] Figure 1 The schematic diagram of an implementation environment involved in a device control method includes a user terminal 110 , a smart device 130 , an access device 150 , and a server 170 .

[0043] Specifically, the user terminal 110, which can also be considered as a user end or terminal, can deploy (also understood as install) the client associated with the smart device 130. This user terminal 110 can be an electronic device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart control panel, other devices with display and control functions, etc., which are not limited here.

[0044] Among them, the client is associated with the smart device 130, which essentially means that the user registers an account in the client and configures the smart device 130 in the client. For example, the configuration includes adding a device identifier to the smart device 130, so that when the client is run in the user terminal 110, it can provide the user with functions such as device display and device control of the smart device 130. This client can be in the form of an application or a web page. Accordingly, the interface for device display / control of the client can be in the form of a program window or a web page, which is not limited here.

[0045] The smart device 130 is deployed in the access device 150 (such as a gateway), and communicates with the access device 150 through its own configured communication module, and is then controlled by the access device 150. It should be understood that the smart device 130 generally refers to one of the multiple smart devices 130, and the embodiment of the present application only takes the smart device 130 as an example, that is, the embodiment of the present application does not limit the number and device type of smart devices deployed in the access device 150. In an application scenario, the smart device 130 accesses the access device 150 through a local area network, and is thus deployed in the access device 150. The process of the smart device 130 accessing the access device 150 through the local area network includes: the access device 150 first establishes a local area network, and the smart device 130 joins the local area network established by the access device 150 by connecting to the access device 150. This local area network includes but is not limited to: ZIGBEE or Bluetooth. Among them, the smart device 130 can be a smart printer, a smart fax machine, a smart camera, a smart air conditioner, a smart door lock, a smart light, or an electronic device equipped with a communication module, such as a human body sensor, a door and window sensor, a temperature and humidity sensor, a water immersion sensor, a natural gas alarm, a smoke alarm, a wall switch, a wall socket, a wireless switch, a wireless wall sticker switch, a magic cube controller, a curtain motor, etc.

[0046] The interaction between the user terminal 110 and the smart device 130 can be achieved through a local area network or a wide area network. In one application scenario, a communication connection is established between the user terminal 110 and the access device 150 in a wired or wireless manner. For example, the wired or wireless manner includes but is not limited to WIFI, so that the user terminal 110 and the access device 150 are deployed in the same local area network, so that the user terminal 110 can interact with the smart device 130 through the local area network path. In another application scenario, the user terminal 110 establishes a communication connection between the user terminal 110 and the access device 150 through the server 170 in a wired or wireless manner. For example, the wired or wireless manner includes but is not limited to 2G, 3G, 4G, 5G, WIFI, etc., so that the user terminal 110 and the access device 150 are deployed in the same wide area network, so that the user terminal 110 can interact with the smart device 130 through the wide area network path.

[0047] The server end 170 may also be considered as a cloud, a cloud platform, a platform end, a service end, etc. The server end 170 may be a server, a server cluster consisting of multiple servers, or a cloud computing center consisting of multiple servers, so as to better provide background services to a large number of user terminals 110. For example, the background service includes a device control service.

[0048] As the user terminal 110 interacts with the smart device 130, if the user expects the smart device 130 to disconnect from the connected old access device 150, the user terminal 110 will send a networking request to the smart device 130 to request the smart device 130 to disconnect from the connected old access device 150 and connect to the new access device.

[0049] For the smart device 130, after obtaining the networking request sent by the user terminal 110, it will respond to the networking request, store the first network information about the old access device 150, disconnect from the old access device 150, and perform networking detection related to the new access device at the same time, so that when the new access device is not detected in the networking detection, it can re-access the old access device 150 according to the first network information.

[0050] Then, the old access device 150 can continue to control the re-accessed smart device 130 to perform corresponding actions.

[0051] See also Figure 2 The present application embodiment provides a device control method, which is applicable to an electronic device, which may be Figure 1 A smart device 130 is shown in an implementation environment.

[0052] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.

[0053] like Figure 2 As shown, the method may include the following steps:

[0054] Step 310: Obtain a networking request.

[0055] The networking request is used to indicate that the device requests to disconnect the old access device that has been connected and connect to the new access device. In short, the networking request is used to indicate that the device requests to leave the network. It should be noted that the device here refers to a smart device. For the convenience of description below, the smart device is referred to as a device.

[0056] The acquisition of the networking request may be generated autonomously by the device or received by the device, which is not limited here.

[0057] In a possible implementation, the device autonomously generates a networking request, which specifically refers to: initiating a networking request in response to a triggering operation on the device.

[0058] Taking the device as an example of a smart switch, if the user wants the smart switch to connect to a new device, the user can long press the button configured by the smart switch, then the smart switch can detect the instruction corresponding to the button by responding to the long press operation of the button, and then initiate a networking request based on the instruction. Among them, the long press operation of the button by the user is regarded as a trigger operation for the device.

[0059] In a possible implementation manner, the device receives the networking request, which specifically refers to: receiving the networking request sent by the user terminal.

[0060] For example, if the user wants the device to be disconnected from the old access device that has been connected, the user can send a networking request to the device through the client running in the user terminal. Then, the device can receive the networking request sent by the user terminal.

[0061] Step 330: In response to the networking request, store the first network information about the old access device, and perform a networking detection related to the new access device.

[0062] First of all, it should be noted that the first network information refers to information related to the old access device connected. It can be considered that the first network information is a description of the identity of the old access device connected, that is, the first network information uniquely identifies the identity of the old access device connected to the device. It should be understood that the first network information is different for different old access devices connected to the device. For example, the first network information can be a PAN ID (Personal Area Network ID, network identifier) ​​or a channel identifier, etc.

[0063] For the device, in response to the networking request, the first network information will be stored, and the connection with the old access device will be disconnected, and then the networking detection related to the new access device will be entered, in order to be able to access the new access device.

[0064] Secondly, the purpose of network detection is to detect whether there are access devices around the device that can be accessed by the device. Taking the device as a smart switch as an example, after the button configured by the smart switch is pressed for 5 seconds by the user, the smart switch will automatically enter the networking mode to perform network detection related to the new access device.

[0065] If no new access device is detected during the networking detection, indicating that there is no new access device available for the device to access, then step 350 is executed.

[0066] On the contrary, if a new access device is detected during the network detection, indicating that there is a new access device available for the device to access, step 370 is executed, such as Figure 3 shown.

[0067] It should be noted that the new access device available for device access can be any access device different from the old access device, or it can refer to the old access device itself that enters the networking mode. In other words, any access device that enters the networking mode can be regarded as a new access device available for device access, and this is not limited here.

[0068] In this way, the device can be deleted only if there is an access device that enters the networking mode. For example, if there is an access device that enters the networking mode, the device disconnects from the old access device and is deemed to be deleted, and connects to the access device that enters the networking mode. Otherwise, if there is no access device that enters the networking mode, the device reconnects to the old access device and is deemed not to be deleted.

[0069] Step 350: re-access the old access device according to the first network information, so that the device is controlled by the accessed old access device and performs corresponding actions.

[0070] That is to say, even if there is no new access device for the device to access, the device will not be deleted by mistake, but will be able to reconnect with the old access device based on the first network information, so that the old access device reconnected to the device can still send device control instructions to the device, thereby controlling the device to perform corresponding actions.

[0071] Step 370: connect a new access device so that the device is controlled by the connected new access device and performs corresponding actions.

[0072] That is to say, when the network detection finds a new access device, the device can connect to the new access device, and then the new access device sends a device control instruction to the device, thereby controlling the device to perform corresponding actions.

[0073] Through the above process, the device's anti-accidental deletion function is realized, that is, for the device, through the storage of the first network information, even if it cannot access the new access device, the connection with the old access device can be restored, ensuring that the device can always be controlled by the access device and perform corresponding actions, thereby effectively solving the problem of poor stability of device control existing in related technologies.

[0074] In addition, the automation of the anti-accidental deletion function is realized, which not only avoids the tedious manual operation of the user, but also because the first network information is stored, even if the device is offline, it can still restore the connection with the old access device, effectively avoiding the failure of the anti-accidental deletion function. It should be noted that the device is offline, which means that the connection between the device and the access device is disconnected, but the device and the access device are still in the same local area network.

[0075] In an exemplary embodiment, after step 370, the method may further include the following steps:

[0076] Delete the first network information.

[0077] The first network information may be automatically deleted by the device or may be controlled by the device, which is not limited here.

[0078] In a possible implementation, the device automatically deletes the first network information, specifically, after the device accesses the new access device, it automatically deletes the first network information. In this way, after the device accesses the new access device, it generates the second network information about the new access device.

[0079] In a possible implementation, the device automatically deletes the first network information, specifically, after the device reconnects to the old access device, it automatically deletes the first network information. In this way, after the device reconnects to the old access device, it will generate third network information about the old access device. It should be noted that the third network information is basically the same as the first network information, so after deleting the first network information, it will not affect the connection between the device and the old access device.

[0080] In a possible implementation, the device is controlled by the cloud to delete the first network information, specifically, receiving an information deletion instruction sent by the cloud based on confirming that the device has connected to the new access device; and deleting the first network information in response to the information deletion instruction. In this way, after receiving the information deletion instruction sent by the cloud, the device can delete the first network information from the local storage area.

[0081] With the help of the above embodiment, the first network information is deleted, thus avoiding excessive consumption of storage resources in the device.

[0082] In an exemplary embodiment, after step 370, the method may further include the following steps:

[0083] Notify the old access device to delete the device information related to the device.

[0084] Among them, the device information can be used to uniquely identify the identity of the device, that is, the device information is a description of the identity of the device. It should be understood that different devices have different device information. For example, the device information at least includes: device identification. The device information can also be used to indicate the connection relationship between the device and the access device to which it is connected.

[0085] In a possible implementation, the old access device is indirectly notified through the cloud to delete the device information related to the device.

[0086] Specifically, if Figure 4 As shown, the process of deleting device information related to the device may include the following steps:

[0087] Step 410: Based on the device information related to the device reported by the newly accessed device, request the cloud to perform access device verification for the device.

[0088] The access device check is used to indicate whether the device is allowed to access a new access device.

[0089] After the cloud initiates access device verification for the device, based on the relevant information of each device accessing its own gateway reported by each access device connected to the cloud, the cloud can learn the connection relationship between each device and each gateway, and then determine whether each device is allowed to access each gateway with which it has a connection relationship.

[0090] When the cloud determines that the device allows access to the new access device, indicating that the device has passed the access device verification, it can notify the old access device of the device to delete the device information related to the device, that is, execute step 430, so as to reduce the loss of storage resources in the old access device.

[0091] On the contrary, if the cloud determines that the device is not allowed to access a new access device, indicating that the device has not passed the access device verification, the old access device of the device will not be notified to delete the device information related to the device to avoid the old access device from repeatedly storing the device information related to the device when the device re-accesses the old access device.

[0092] Step 430: If the device passes the access device verification, the cloud is requested to notify the old access device to delete the device information related to the device according to the consistency between the first account and the second account.

[0093] The first account is an account associated with the device when it is connected to the old access device, and the second account is an account associated with the device when it is connected to the new access device.

[0094] Figure 5 A schematic diagram showing the process of deleting device information is shown below. Figure 5 As shown, when the device is connected to the new access device, the new access device reports an updated device list to the cloud, and the updated device list at least includes device information related to the device newly connected to the new access device; the cloud determines that the device has been connected to the new access device by updating the device list, and further determines the consistency of the accounts associated with the new and old access devices connected to the device; if the first account is consistent with the second account, it means that the client associated with the device is consistent, and it can also be understood that the user requesting to delete the device and the user requesting the device to access the new access device are the same person, then there will be no accidental deletion, at this time, the old access device is directly notified to delete the device information related to the device disconnected from it; if the first account is inconsistent with the second account, it means that the client associated with the device is inconsistent, that is, the user requesting to delete the device and the user requesting the device to access the new access device are not the same person, that is, the user requesting to delete the device may be someone else, then there may still be accidental deletion, then, after the user requesting to delete the device confirms, the old access device can be notified to delete the device information related to the device disconnected from it.

[0095] In a possible implementation, the device directly notifies the old access device to delete the device information related to the device.

[0096] See also Figure 6 In an exemplary embodiment, after step 370, the method may further include the following steps:

[0097] Step 510: re-access the old access device according to the first network information, and send an off-network message to the old access device.

[0098] The off-network message is used to notify the old access device to disconnect from the device, and / or the off-network message is used to notify the old access device to delete device information related to the device.

[0099] In a possible implementation, the network leaving message is a leave message.

[0100] Then, for the old access device, after receiving the off-network message, the connection with the device can be disconnected and the device information related to the device can be deleted.

[0101] Step 530: Access the new access device according to the second network information about the new access device.

[0102] Figure 7 The following is a schematic diagram showing the process of sending an off-network message, taking the off-network message as a leave message as an example. Figure 7 As shown, after the device triggers to leave the network, it first backs up the first network information of the old access device currently connected, and temporarily does not send a leave message to the old access device, so as to re-access the old access device; after the device accesses the new access device, the device loads the first network information to reconnect with the old access device, and sends a leave message to the old access device, that is, notifies the old access device that the device can be connected to the new access device, so that the old access device disconnects from the device, which can also be considered as notifying the old access device that the device information related to the device can be deleted; at the same time, the device will access the new access device again according to the second network information about the new access device.

[0103] In this way, the second network information is used to access the new access device, while the first network information is used to re-access the old access device, thereby avoiding network information conflicts.

[0104] Under the effect of the above-mentioned embodiment, the device information is deleted, which not only enables the access device to timely obtain the device information related to the device having a connection relationship with it, but also avoids excessive consumption of storage resources in the access device.

[0105] In an exemplary embodiment, after step 370, the method may further include the following steps:

[0106] Based on the device information related to the device reported by the new access device, request the cloud to update the device information about the device switching from the old access device to the new access device.

[0107] Among them, the device information can be used to uniquely identify the identity of the device, that is, the device information is a description of the identity of the device. It should be understood that different devices have different device information. For example, the device information at least includes: device identification. The device information can also be used to indicate the connection relationship between the device and the access device to which it is connected.

[0108] As for devices, after a new device is connected, the cloud can be notified through the new device to update the device information related to the device.

[0109] For newly connected devices, device information related to the device is reported to the cloud so that the cloud can promptly learn about each device and the access devices it connects to, and then send relevant messages to each device through the access devices to which each device connects, such as device control instructions.

[0110] Through the cooperation of the above embodiments, the device information in the cloud is updated, ensuring that the device information in the old access device will not be lost due to accidental deletion of the device, which is further beneficial to improving the stability of device control.

[0111] Figure 8 This is a schematic diagram of a specific implementation of a device control device in an application scenario. This application scenario is suitable for Figure 1 The implementation environment shown, in this application scenario, involves sub-devices (i.e., devices in the aforementioned embodiments, Figure 1 The new gateway is used as a new access device, and the old gateway is used as an old access device ( Figure 1 Access device 150 in the cloud ( Figure 1 The server side 170 in the example.

[0112] like Figure 8 As shown, as far as the sub-device is concerned, after the sub-device is disconnected from the old gateway, the first network information about the old gateway is backed up, and a networking detection related to the new gateway is initiated at the same time. If the network detection detects the existence of a new gateway, the sub-device accesses the new gateway, otherwise, if the network detection detects the absence of a new gateway, the sub-device re-accesses the old gateway based on the first network information, thereby always maintaining the connection between the sub-device and the gateway.

[0113] For a new gateway, after a sub-device is connected, it sends an updated device list to the cloud to request the cloud to update the device information of the sub-device.

[0114] For the cloud, the cloud determines that the sub-device is connected to the new gateway based on the updated device list sent by the new gateway, and then notifies the old gateway to delete the device information about the sub-device.

[0115] The above application scenario realizes "automatic" prevention of accidental deletion, that is, the device can be deleted only when the gateway enters the networking mode. If there is no gateway entering the networking mode, the device cannot be deleted, which effectively reduces the probability of accidental deletion of the device. As the number of devices increases, it is more conducive to improving the stability of device control, which can greatly reduce maintenance costs.

[0116] The following is an embodiment of the device of the present application, which can be used to execute the device control method involved in the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the device control method involved in the present application.

[0117] See also Fig. 9 In an embodiment of the present application, a device control apparatus 900 is provided, including but not limited to: a request acquisition module 910, an information storage module 930, and a device control module 950.

[0118] The request acquisition module 910 is used to acquire a networking request, where the networking request is used to indicate that the device requests to disconnect the old access device that has been connected and to connect to a new access device.

[0119] The information storage module 930 is used to store the first network information about the old access device in response to the networking request, and perform networking detection related to the new access device.

[0120] The device control module 950 is used to re-access the old access device according to the first network information if no new access device is detected during the networking detection, so that the device is controlled by the accessed old access device and performs corresponding actions.

[0121] In an exemplary embodiment, the device control apparatus 900 further includes: a second device control module, configured to connect the new access device if a new access device is detected during the networking detection, so that the device is controlled by the connected new access device and performs corresponding actions.

[0122] In an exemplary embodiment, the device control apparatus 900 further includes: an information deleting module, configured to delete the first network information.

[0123] In an exemplary embodiment, the device control apparatus 900 further includes: a notification module, configured to notify the old access device to delete the device information related to the device.

[0124] In an exemplary embodiment, the notification module includes: an access device verification unit, which is used to request the cloud to perform access device verification for the device based on the device information related to the device reported by the new access device; the access device verification is used to indicate whether the device is allowed to access the new access device; a cloud notification unit, which is used to request the cloud to notify the old access device to delete the device information related to the device based on the consistency of the first account and the second account if the device passes the access device verification; the first account is the account associated with the device accessing the old access device, and the second account is the account associated with the device accessing the new access device.

[0125] In an exemplary embodiment, the notification module includes: a message sending unit, used to re-access the old access device according to the first network information, and send an off-network message to the old access device; the off-network message is used to notify the old access device to disconnect from the device, and / or, the off-network message is used to notify the old access device to delete device information related to the device; a gateway access unit, used to access the new access device according to the second network information about the new access device.

[0126] In an exemplary embodiment, the device control apparatus 900 further includes: an update request module for requesting the cloud to update device information regarding the device switching from the old access device to the new access device based on the device information related to the device reported by the new access device.

[0127] In an exemplary embodiment, the request acquisition module 910 includes: a request initiating unit, configured to initiate a networking request in response to a trigger operation on a device; or a request receiving unit, configured to receive a networking request sent by a user terminal.

[0128] It should be noted that the device control device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when performing device control. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device control device will be divided into different functional modules to complete all or part of the functions described above.

[0129] In addition, the device control apparatus and the device control method provided in the above embodiments belong to the same concept, wherein the specific manner in which each module performs operations has been described in detail in the method embodiments and will not be repeated here.

[0130] Fig.10 A schematic diagram of the structure of an electronic device according to an exemplary embodiment. The electronic device is suitable for Figure 1 A smart device 130 is shown in an implementation environment.

[0131] It should be noted that the electronic device is only an example adapted to the present application and cannot be considered to provide any limitation on the scope of use of the present application. The electronic device cannot be interpreted as requiring dependence on or having Fig.10 One or more components of exemplary electronic device 2000 are shown.

[0132] The hardware structure of the electronic device 2000 may vary greatly due to differences in configuration or performance, such as Fig.10 As shown, the electronic device 2000 includes: a power supply 210 , an interface 230 , at least one memory 250 , and at least one central processing unit (CPU) 270 .

[0133] Specifically, the power supply 210 is used to provide operating voltage for each hardware device on the electronic device 2000 .

[0134] The interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Figure 1 The interaction between the user terminal 110 and the smart device 130 in the implementation environment is shown.

[0135] Of course, in other examples adapted by the present application, the interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input-output interface 235, and at least one USB interface 237, etc. Fig.10 As shown, this is not intended to be a specific limitation.

[0136] The memory 250 is a carrier for storing resources, which may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 251, an application 253 and data 255, etc. The storage method may be temporary storage or permanent storage.

[0137] Among them, the operating system 251 is used to manage and control various hardware devices and application programs 253 on the electronic device 2000 to enable the central processor 270 to calculate and process the massive data 255 in the memory 250. It can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0138] The application program 253 is a computer program that performs at least one specific task based on the operating system 251, and may include at least one module ( Fig.10 (not shown), each module may respectively include a computer program for the electronic device 2000. For example, the device control apparatus may be regarded as an application 253 deployed on the electronic device 2000.

[0139] The data 255 may be photos, pictures, etc. stored in a disk, or may be first network information, etc., stored in the memory 250 .

[0140] The central processor 270 may include one or more processors and is configured to communicate with the memory 250 through at least one communication bus to read the computer program stored in the memory 250, thereby realizing the operation and processing of the mass data 255 in the memory 250. For example, the device control method is completed in the form of the central processor 270 reading a series of computer programs stored in the memory 250.

[0141] In addition, the present application can also be implemented through hardware circuits or hardware circuits combined with software. Therefore, the implementation of the present application is not limited to any specific hardware circuits, software, or a combination of the two.

[0142] See also Fig.11 In an embodiment of the present application, an electronic device 4000 is provided, and the electronic device 400 may be a smart device. The smart device may specifically include: a smart printer, a smart fax machine, a smart camera, a smart air conditioner, a smart door lock, a smart light, or a human body sensor equipped with a communication module, a door and window sensor, a temperature and humidity sensor, a water immersion sensor, a natural gas alarm, a smoke alarm, a wall switch, a wall socket, a wireless switch, a wireless wall sticker switch, a magic cube controller, a curtain motor, etc.

[0143] exist Fig.11 In the embodiment, the electronic device 4000 includes at least one processor 4001, at least one communication bus 4002 and at least one memory 4003.

[0144] The processor 4001 and the memory 4003 are connected, such as through a communication bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0145] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 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, etc.

[0146] The communication bus 4002 may include a path to transmit information between the above components. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 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.

[0147] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.

[0148] The memory 4003 stores a computer program, and the processor 4001 reads the computer program stored in the memory 4003 through the communication bus 4002 .

[0149] When the computer program is executed by the processor 4001, the device control method in the above-mentioned embodiments is implemented.

[0150] In addition, a storage medium is provided in an embodiment of the present application, on which a computer program is stored. When the computer program is executed by a processor, the device control method in the above embodiments is implemented.

[0151] A computer program product is provided in an embodiment of the present application, the computer program product includes a computer program, and the computer program is stored in a storage medium. A processor of a computer device reads the computer program from the storage medium, and the processor executes the computer program, so that the computer device executes the device control method in each of the above embodiments.

[0152] Compared with related technologies, on the one hand, through the storage of the first network information, even if the new access device cannot be accessed, the connection with the old access device can be restored, ensuring that the smart device can always be controlled by the gateway and perform corresponding actions, thereby improving the stability of device control. As the number of devices increases, it is more conducive to improving the stability of device control, thereby greatly reducing maintenance costs. On the other hand, it realizes "automatic" prevention of accidental deletion, avoiding users' overly cumbersome manual operations, and can effectively improve users' device control experience.

[0153] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0154] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A device control method, characterized in that: The method comprises: Obtaining a networking request, where the networking request is used to indicate that the device requests to disconnect an old access device that has been connected and connect to a new access device; In response to the networking request, storing first network information about the old access device and performing networking detection related to the new access device; If the new access device is not detected in the networking detection, re-accessing the old access device according to the first network information, so that the device is controlled by the accessed old access device and performs corresponding actions; If the new access device is detected during the networking detection, the new access device is connected so that the device is controlled by the connected new access device and performs corresponding actions. When the device allows access to the new access device and the accounts associated with the new access device and the old access device are consistent, the cloud notifies the old access device to delete the device information related to the device.

2. The method according to claim 1, characterized in that After accessing the new access device, the method further includes: The first network information is deleted.

3. The method according to claim 1, characterized in that The cloud notifying the old access device to delete the device information related to the device includes: Based on the device information related to the device reported by the new access device, request the cloud to perform access device verification for the device; the access device verification is used to indicate whether the device is allowed to access the new access device; If the device passes the access device verification, the cloud is requested to notify the old access device to delete the device information related to the device based on the consistency of the first account and the second account; the first account is the account associated with the device accessing the old access device, and the second account is the account associated with the device accessing the new access device.

4. The method according to claim 1, characterized in that After the new access device is accessed, the method further includes: the device notifying the old access device to delete device information related to the device; The device notifying the old access device to delete device information related to the device includes: Re-accessing the old access device according to the first network information, and sending an off-network message to the old access device; the off-network message is used to notify the old access device to disconnect from the device, and / or the off-network message is used to notify the old access device to delete device information related to the device; Access the new access device according to the second network information about the new access device.

5. The method according to any one of claims 1 to 4, characterized in that: After accessing the new access device, the method further includes: Based on the device information related to the device reported by the new access device, request the cloud to update the device information about the device switching from the old access device to the new access device.

6. The method according to any one of claims 1 to 4, characterized in that: The obtaining of the networking request includes: In response to a triggering operation on the device, initiating the networking request; or The networking request sent by the user terminal is received.

7. A device control device, characterized in that: The device comprises: A request acquisition module, used to acquire a networking request, wherein the networking request is used to indicate that the device requests to disconnect the old access device that has been connected and connect to the new access device; An information storage module, configured to store first network information about the old access device in response to the networking request, and perform networking detection related to the new access device; A device control module is used to re-access the old access device according to the first network information if the new access device is not detected in the networking detection, so that the device is controlled by the connected old access device and performs corresponding actions; if the new access device is detected in the networking detection, access the new access device so that the device is controlled by the connected new access device and performs corresponding actions, and when the device allows access to the new access device and the accounts associated with the new access device and the old access device are consistent, the cloud notifies the old access device to delete the device information related to the device.

8. An electronic device, characterized in that: include: at least one processor, at least one memory, and at least one communication bus, wherein: The memory stores a computer program, and the processor reads the computer program in the memory through the communication bus; When the computer program is executed by the processor, the device control method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Control method for access of intelligent terminal equipment to intelligent point network

    CN107465580A

  • Network connection method and device, intelligent equipment and user terminal

    CN108848015A

  • Equipment control method and device, Internet of Things system, electronic equipment and storage medium

    CN110167043A

  • Method and device for replacing gateway

    CN110519366A

  • Equipment linkage control method and device and storage medium

    CN112511393A