Intelligent Device Control Method, Device, Computer-Readable Medium, and Electronic Device
By receiving and mapping control instructions on the edge server and controlling smart devices through long-distance radio networks, the delay, complex rule mapping and long-distance radio support problems of smart device management services in the prior art are solved, and the availability and timeliness of equipment management services are improved.
Patent Information
- Application Number
- CN202010218868.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-25
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2040-03-25
AI Technical Summary
The device management services of existing smart devices have problems such as not being able to support smart devices with low message latency requirements, not being able to support complex rule mapping scenarios, and not being able to support smart devices based on long-distance radio technology.
The control instructions from the control terminal are received through the edge-end server, mapped according to the control message format of the long-distance radio device, device control messages are generated, and sent to the smart device through the long-distance radio network to perform corresponding operations.
It improves the support capabilities of smart device management services for smart device types, enhances the availability of device management services, and reduces message latency through a longer-distance radio network with higher stability, and supports control scenarios with smaller message latency.
Smart Images

Figure CN111489540B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things technology. Specifically, it relates to a method and device for controlling intelligent devices, a computer-readable medium, and an electronic device. Background Art
[0002] In the field of the Internet of Things, a cloud server can provide device management services for the connected intelligent devices. Currently, when implementing the device management service for intelligent devices, generally, the cloud server needs to control the intelligent devices through the operator network, which may easily be affected by the operator network service. As a result, there is a problem that the device management service cannot be provided for intelligent devices with low message delay requirements. Since the current device management service for intelligent devices only supports simple device message parsing, it cannot support complex rule mapping scenarios that require database operations. In addition, the current device management service also has the problem of limited types of supported intelligent devices. For example, it cannot support intelligent devices based on Long Range Radio (LoRa) technology. Summary of the Invention
[0003] Embodiments of this application provide a method and device for controlling intelligent devices, a computer-readable medium, and an electronic device, which can solve at least one technical problem existing in the current device management service for intelligent devices.
[0004] Other features and advantages of this application will become apparent through the following detailed description, or will be partially learned through the practice of this application.
[0005] According to one aspect of the embodiments of this application, a method for controlling an intelligent device is provided, including: receiving a first control instruction for a first long-range radio device from a control terminal; performing mapping processing on the first control instruction according to the control message format of the first long-range radio device to generate a first device control message; and sending the first device control message to the first long-range radio device so that the first long-range radio device performs corresponding operations according to the first device control message.
[0006] According to one aspect of the embodiments of this application, a device for controlling an intelligent device is provided, including: a first receiving unit configured to receive a first control instruction for a first long-range radio device from a control terminal; a first generating unit configured to perform mapping processing on the first control instruction according to the control message format of the first long-range radio device to generate a first device control message; and a first sending unit configured to send the first device control message to the first long-range radio device so that the first long-range radio device performs corresponding operations according to the first device control message.
[0007] In some embodiments of the present application, based on the foregoing solution, the first control instruction includes the device identifier of the first long-range radio device and control information, and the first generation unit is configured to: determine a device message parsing function for mapping processing according to the device identifier of the first long-range radio device; perform mapping processing on the control information according to the device message parsing function for mapping processing to generate the first device control message.
[0008] In some embodiments of the present application, based on the foregoing solution, the first generation unit is configured to: perform mapping processing on the control information according to the device message parsing function for mapping processing to obtain mapping information; determine a target device control code according to the mapping information and the correspondence between the mapping information and the device control code in the database.
[0009] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a second acquisition unit for acquiring a target configuration file, where the target configuration file includes the device type of the long-range radio device to be configured and the device message parsing function to be configured; a first association unit for associatively storing the device type of the long-range radio device to be configured and the device message parsing function to be configured.
[0010] In some embodiments of the present application, based on the foregoing solution, the target configuration file further includes a database to be associated, where the database to be associated includes the correspondence between the parsing information and the device control code, and the intelligent device control device further includes: a second association unit for associating the device type of the long-range radio device to be configured, the device message parsing function to be configured with the database to be associated.
[0011] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a third acquisition unit for acquiring an update request, where the update request includes the resource address of the updated configuration file; a download unit for downloading the updated configuration file according to the resource address; an update unit for updating the target configuration file based on the updated configuration file.
[0012] In some embodiments of the present application, based on the foregoing solution, the update unit is configured to: if the version number of the updated configuration file is higher than the version number of the target configuration file, update the target configuration file based on the updated configuration file.
[0013] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a fourth acquisition unit configured to acquire a registration request, where the registration request includes the device identifier and device type of the long-range radio device to be registered; a third association unit configured to associate the device identifier of the long-range radio device to be registered in the registration request with the device message parsing function corresponding to the device type.
[0014] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a first reception unit configured to receive the device attribute detection value reported by the second long-range radio device; a second generation unit configured to parse the reported device attribute detection value according to the device message parsing function corresponding to the second long-range radio device to generate a parsed device attribute detection value; a fourth association unit configured to store the parsed device attribute detection value as a target device attribute value and associate it with the device identifier corresponding to the second long-range radio device in the device attribute database corresponding to the second long-range radio device.
[0015] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a fifth acquisition unit configured to acquire a query request from a control terminal, where the query request includes the device identifier corresponding to the second long-range radio device; a sixth acquisition unit configured to, based on the device identifier corresponding to the second long-range radio device, acquire the target device attribute value of the second long-range radio device from the device attribute database corresponding to the second long-range radio device; a second transmission unit configured to transmit the target device attribute value to the control terminal so that the control terminal can perform a display according to the target device attribute value.
[0016] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a third generation unit configured to, if the parsed device attribute detection value reaches a predetermined condition, generate a third device control message according to the control message format of the third long-range radio device; a distribution unit configured to distribute the third device control message to the third long-range radio device so that the third long-range radio device can perform corresponding operations according to the third device control message.
[0017] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a fourth generation unit configured to, if the parsed device attribute detection value reaches a predetermined condition, generate an alarm message; a third transmission unit configured to transmit the alarm message to the control terminal.
[0018] According to one aspect of the embodiments of the present application, a computer-readable medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the intelligent device control method described in the above embodiments is implemented.
[0019] According to one aspect of the embodiments of the present application, an electronic device is provided, including: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the intelligent device control method described in the above embodiments.
[0020] In the technical solutions provided by some embodiments of the present application, the edge server maps the first control instruction from the control terminal to generate a first device control message that matches the control message format of the first long-range radio device, so that the device management service of the edge server for intelligent devices can support intelligent devices based on long-range radio technology, improving the types of intelligent devices that the device management service of intelligent devices can support, and further improving the availability of the device management service of intelligent devices provided by the edge server; in addition, the edge server controls the accessed intelligent devices through the long-range radio network. Since the long-range radio network is more stable, the messages sent and received are less affected by network fluctuations, improving the timeliness of control responses, and enabling the device management service of intelligent devices provided by the edge server to support control scenarios with less message delay.
[0021] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.
[0023] In the drawings:
[0024] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied is shown.
[0025] Figure 2 A flowchart of an intelligent device control method according to an embodiment of the present application is shown.
[0026] Figure 3Shows a specific flowchart of step S220 of the intelligent device control method according to an embodiment of the present application.
[0027] Figure 4 Shows a specific flowchart of step S320 of the intelligent device control method according to an embodiment of the present application.
[0028] Figure 5 Shows a flowchart of the intelligent device control method according to an embodiment of the present application.
[0029] Figure 6 Shows a flowchart of the intelligent device control method according to an embodiment of the present application.
[0030] Figure 7 Shows a flowchart of the intelligent device control method according to an embodiment of the present application.
[0031] Figure 8 Shows a flowchart of the intelligent device control method according to an embodiment of the present application.
[0032] Figure 9 Shows a flowchart of the intelligent device control method according to an embodiment of the present application.
[0033] Figure 10 Shows a flowchart of the intelligent device control method according to an embodiment of the present application.
[0034] Figure 11 Shows the flowchart of registering a long-range radio intelligent device in a conference room scenario according to an embodiment of the present application. Shows a flowchart of the intelligent device control method according to an embodiment of the present application.
[0035] Figure 12 Shows a block diagram of the intelligent device control device according to an embodiment of the present application.
[0036] Figure 13 Shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. Detailed implementation manners
[0037] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art.
[0038] In addition, the described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present application. However, those skilled in the art will realize that the technical solutions of the present application may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the present application.
[0039] The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0040] The flowcharts shown in the drawings are only exemplary illustrations and do not necessarily include all the contents and operations / steps, nor are they necessarily executed in the described order. For example, some operations / steps may be decomposed, while some operations / steps may be combined or partially combined, so the actual execution order may change according to the actual situation.
[0041] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solutions of the embodiments of the present application can be applied is shown.
[0042] As Figure 1 shown, the system architecture 100 may include a control terminal 101, a cloud server 102, an edge server 103, a network 104, and a long-range radio device 105. The network 104 is used as a medium to provide a communication link between the control terminal 101, the cloud server 102, the edge server 103, and the long-range radio device 105. For example, the network 104 between the cloud server 102 and the long-range radio device 105 or between the edge server 103 and the long-range radio device 105 may be a long-range radio wireless communication link, etc. The long-range radio device 105 is an intelligent device with long-range radio (LoRa) communication function, and the cloud server 102 and the edge server 103 are servers with long-range radio communication function.
[0043] It should be understood that Figure 1The numbers of the control terminal 101, the cloud server 102, the edge server 103, the network 104, and the long range radio device 105 are merely illustrative. According to the implementation requirements, there can be any number of control terminals 101, cloud servers 102, edge servers 103, networks 104, and long range radio devices 105. For example, the edge server 103 can be a server cluster composed of multiple servers, etc.
[0044] The edge server 103 is a server connected to the cloud server 102 and is used to cooperate with the cloud server 102 to perform the device management function of intelligent devices. When the control terminal 101 interacts with the edge server 103, it generally sends a message to the cloud server 102 through the network 104 first, and then the cloud server 102 forwards the message to the edge server 103. Of course, the control terminal 101 can also directly interact with the edge server 103 through the network 104.
[0045] For example, the control terminal 10 sends a first control instruction for the first long range radio device to the cloud server 102, and the cloud server 102 forwards the first control instruction to the edge server 103. The edge server 103 receives the first control instruction for the first long range radio device from the control terminal, and maps and processes the first control instruction according to the control message format of the first long range radio device to generate a first device control message; the first device control message is sent to the first long range radio device so that the first long range radio device performs corresponding operations according to the first device control message. By mapping and processing the first control instruction from the control terminal by the edge server 103 to generate a first device control message that matches the control message format of the first long range radio device, the device management service of the edge server 103 for intelligent devices can support intelligent devices based on long range radio technology, improving the types of intelligent devices that the device management service of intelligent devices can support, and thus improving the availability of the device management service of intelligent devices provided by the edge server 103; in addition, the edge server 103 controls the connected intelligent devices through the long range radio network. Since the long range radio network is more stable, the messages sent and received are less affected by network fluctuations, improving the timeliness of the control response, and enabling the device management service of intelligent devices provided by the edge server 103 to support control scenarios with less message delay.
[0046] It should be noted that the intelligent device control method provided by the embodiments of the present application is generally executed by the edge server 103. Correspondingly, the intelligent device control device is generally disposed in the edge server 103. However, in other embodiments of the present application, the cloud server 102 may also have similar functions as the edge server 103, so as to execute the solution of the intelligent device control method provided by the embodiments of the present application.
[0047] The implementation details of the technical solutions of the embodiments of the present application are elaborated in detail below:
[0048] Figure 2 The flowchart of the intelligent device control method according to an embodiment of the present application is shown. The intelligent device control method can be executed by a server, and the server can be Figure 1 the edge server 103 shown in Figure 2 As shown, the intelligent device control method at least includes steps S210 to S230, which are introduced in detail as follows:
[0049] In step S210, a first control instruction for a first long-range radio device is received from a control terminal.
[0050] The control terminal is a terminal used by a user that can send control instructions. The control terminal can directly send a control instruction to the edge server, or can first send a control instruction to the cloud server, and then the cloud server forwards it to the edge server. The control instruction is a control instruction for each type of long-range radio device pre-agreed between the control terminal and the server side. It should be noted that the control message format of this control instruction is different from the control message format corresponding to the device control message of the long-range radio device. The first long-range radio device is a long-range radio device accessed to the edge server through a long-range radio network, and can send and receive messages with the edge server through the long-range radio network.
[0051] Optionally, the above control instruction may specifically be a shutdown instruction for the long-range radio device, and the control instruction may be triggered by a physical button or a virtual control provided by the control terminal.
[0052] In step S220, the first control instruction is mapped according to the control message format of the first long-range radio device to generate a first device control message.
[0053] After receiving the control instruction from the control terminal, in order to send the corresponding device control message to the first long-range radio device according to the control information included in the control instruction and thus control the first long-range radio device, the edge server performs mapping processing on the first control instruction according to the control message format of the first long-range radio device to generate the first device control message for initiating the corresponding control to the first long-range radio device. Specifically, the edge server maps to obtain the first device control message that matches the control message format of the first long-range radio device according to the specific control information included in the control instruction, so that the edge server sends the first device control message to the first long-range radio device through the long-range radio network.
[0054] The first device control message is sent to the first long-range radio device through the long-range radio network. Compared with the way of sending and receiving messages through the network deployed by the network operator, since the long-range radio network is more stable, it is less affected by network fluctuations, has less latency in sending and receiving messages, improves the timeliness of controlling the corresponding intelligent device, and enables the device management service of the intelligent device provided by the edge server to support control scenarios with less message latency.
[0055] Reference Figure 3 , Figure 3 shows a specific flowchart of step S220 of the intelligent device control method according to an embodiment of the present application. As Figure 3 shown, this step S220 includes step S310 to step S320, which are described in detail as follows.
[0056] In step S310, according to the device identifier of the first long-range radio device, a device message parsing function for mapping processing is determined.
[0057] In one embodiment, the first control instruction includes the device identifier of the first long-range radio device and control information. The device identifier of the first long-range radio device indicates the long-range radio device that needs to execute the corresponding control instruction. This device identifier can be the device number of the long-range radio device. Of course, it can also be other information used to uniquely identify each long-range radio device, which is not limited here.
[0058] The control information is the specific control information for the first long-range radio device included in the first control instruction. For example, it can be the device shutdown instruction information for notifying the first long-range radio device to shut down.
[0059] The device message parsing function is a function pre-stored in the edge server. This function is used to perform mapping processing on the control information in the first control instruction, and then generate a first device control message corresponding to the control message format of the first long-range radio device. It should be noted that the edge server can pre-store the correspondence between the device identifier of the long-range radio device and the device message parsing function for mapping processing. Then, after receiving the first control instruction, it is convenient to determine the device message parsing function for mapping processing according to the device identifier in the first control instruction and the correspondence between the device identifier of the long-range radio device and the device message parsing function for mapping processing.
[0060] In step S320, perform mapping processing on the control information according to the device message parsing function for mapping processing to generate the first device control message.
[0061] After determining the device message parsing function for mapping processing, perform mapping processing on the control information included in the first control instruction according to the device message parsing function for mapping processing to generate a first device control message corresponding to the control message format of the first long-range radio device.
[0062] Reference Figure 4 , Figure 4 shows a specific flowchart of step S320 of the intelligent device control method according to an embodiment of the present application. As Figure 3 shown, this step S320 includes steps S410 to S430, which are described in detail as follows.
[0063] In step S410, perform mapping processing on the control information according to the device message parsing function for mapping processing to obtain mapping information.
[0064] In one embodiment, the device message parsing function may include a mapping function. This mapping function is used to parse and process the control information included in the first control instruction, identify the specific semantic information corresponding to the control information, and then facilitate mapping to generate a mapping message corresponding to the control message format of the first long-range radio device according to the identified specific semantic information corresponding to the control information.
[0065] In step S420, determine the target device control code according to the mapping information and the correspondence between the mapping information and the device control code in the database.
[0066] In one embodiment, for long-range radio devices of certain device types, such as long-range radio devices for device types such as smart switches, the mapped message obtained after the mapping process through the device message parsing function can be directly used to generate a first device control message corresponding to the control message format of the first long-range radio device. However, for long-range radio devices of certain device types, such as long-range radio devices for device types such as infrared repeaters, when the mapped message obtained after the mapping process through the device message parsing function cannot be directly used to generate a first device control message corresponding to the control message format of the first long-range radio device, then after obtaining the mapped message, the target device control code can be determined according to the correspondence between the mapping information and the device control codes pre-stored in the database.
[0067] In step S430, the first device control message is generated according to the target device control code.
[0068] In one embodiment, after determining the corresponding target device control code, the target device control code is obtained from the pre-stored device control codes, and the obtained target device control code is used as the first device control message corresponding to the control message format of the first long-range radio device.
[0069] Figure 4 The technical solution in the illustrated embodiment can, through a pre-stored database containing device control codes, achieve complex rule mapping scenarios that require database operations, thereby enabling the device management service of the current intelligent device to be applicable to relatively complex control instruction parsing scenarios, and further realizing a more complex intelligent device control function, further improving the applicability of the current device management service, and thus supporting intelligent devices of more device types.
[0070] Please continue to refer to Figure 2 , in step S230, the first device control message is sent to the first long-range radio device so that the first long-range radio device performs corresponding operations according to the first device control message.
[0071] The edge server sends the first device control message to the first long-range radio device through the long-range radio network according to the device identifier corresponding to the first long-range radio device, so that the first long-range radio device performs corresponding operations according to the first device control message, and thus the control terminal can control the first long-range radio device.
[0072] As can be seen above, by mapping and processing the first control instruction from the control terminal through the edge server, a first device control message matching the control message format of the first long-range radio device is generated, thereby enabling the device management service of the edge server for intelligent devices to support intelligent devices based on long-range radio technology, improving the types of intelligent devices that the device management service of intelligent devices can support, and further improving the availability of the device management service of intelligent devices provided by the edge server; in addition, the edge server controls the connected intelligent devices through the long-range radio network. Since the long-range radio network is more stable, the messages sent and received are less affected by network fluctuations, improving the timeliness of control responses, and enabling the device management service of intelligent devices provided by the edge server to support control scenarios with less message delay.
[0073] Reference Figure 5 , Figure 5 shows a flowchart of an intelligent device control method according to an embodiment of the present application. The intelligent device control method further includes steps S510 to S520, which are described in detail as follows.
[0074] In step S510, a target configuration file is obtained. The target configuration file includes the device type of the long-range radio device to be configured and the device message parsing function to be configured.
[0075] In one embodiment, when configuring the device management service function of the edge server for intelligent devices of various device types, specifically, the edge server can be configured through the target configuration file for configuration. The target configuration file can be obtained by the edge server from the cloud server or uploaded by the user to the edge server through the control terminal. The above target configuration file includes the device type of the long-range radio device to be configured and the device message parsing function to be configured. The device message parsing function can be pre-developed by developers according to the specific device service functions required by long-range radio devices of different device types.
[0076] In step S520, the device type of the long-range radio device to be configured and the device message parsing function to be configured are associated and stored.
[0077] In one embodiment, after obtaining the target configuration file, the edge server associates and stores the device type of the long-distance radio device to be configured and the device message parsing function to be configured. Then, when a control instruction for a long-distance radio device of a certain device type is received, the corresponding mapping process can be performed on the control instruction according to the device message parsing function associated with the long-distance radio device of that device type, and then a device control message matching the control message format of the long-distance radio device of that device type is generated.
[0078] In one embodiment, the target configuration file may further include an associated database, and the associated database includes the correspondence between mapping information and device control codes. The intelligent device control method in this embodiment further includes: associating the device type of the long-distance radio device to be configured, the device message parsing function to be configured with the associated database.
[0079] In this embodiment, in order to enable the edge server to generate corresponding device control messages according to the mapping information and the correspondence between the mapping information and the device control codes, when configuring the device management service function of the edge server for intelligent devices of various device types, the target configuration file may further include an associated database.
[0080] After receiving the target configuration file, the edge server also associates the device type of the long-distance radio device to be configured, the device message parsing function to be configured with the associated database, so as to facilitate generating a device control message matching the control message format of the long-distance radio device of that device type according to the correspondence between the mapping information and the device control codes included in the associated database of the long-distance radio device of that device type.
[0081] Figure 5 The technical solution of the illustrated embodiment can configure the device management service function of the edge server for intelligent devices of various device types according to requirements, improve the scalability of the edge server to provide device management service functions for intelligent devices, and meet the personalized customization needs of users.
[0082] Reference Figure 6 , Figure 6 shows a flowchart of an intelligent device control method according to an embodiment of the present application. The intelligent device control method further includes steps S610 to S630, which are described in detail as follows.
[0083] In step S610, an update request is obtained, and the update request includes the resource address of the updated configuration file.
[0084] In one embodiment, when the edge server needs to provide device management services for a certain new type of long-distance radio device or needs to update the device management services provided for long-distance radio devices of the existing device type, the update can be achieved through the obtained update request.
[0085] The above update request can be actively sent by the cloud server to the edge server, or can be triggered by the edge server sending a request to the cloud server at specified periodic intervals. The above update request includes the resource address of the update configuration file for the update, so that the edge server can obtain the corresponding update configuration file according to the resource address in the update request.
[0086] In step S620, download the update configuration file according to the resource address.
[0087] In one embodiment, after receiving the update request, the edge server will download the corresponding update configuration file according to the resource address included in the update request.
[0088] In step S630, update the target configuration file based on the update configuration file.
[0089] In one embodiment, after downloading the corresponding update configuration file, the current target configuration file will be updated according to the update configuration file, thereby realizing the update of the device management service function currently provided by the edge server for smart devices.
[0090] Figure 6 The technical solution of the illustrated embodiment can realize the timely update of the device management service function provided by the edge server for smart devices, so as to facilitate the improvement and enhancement of the device management service function provided by the edge server for smart devices.
[0091] In one embodiment, step S630 may specifically further include: if the version number of the update configuration file is higher than the version number of the target configuration file, then update the target configuration file based on the update configuration file.
[0092] When updating the target configuration file based on the update configuration file, it is necessary to verify the version number of the update configuration file. If the version number of the update configuration file is the same as the version number of the target configuration file or the version number of the update configuration file is lower than the version number of the target configuration file, no update operation is performed; if the version number of the update configuration file is higher than the version number of the target configuration file, then update the target configuration file based on the update configuration file.
[0093] Optionally, if the version number of the updated configuration file is higher than that of the target configuration file, during the process of updating the target configuration file based on the updated configuration file, it is also necessary to verify the updated configuration file through the MD5 message-digest algorithm. When performing the verification, for the updated configuration file and the target configuration file, if the MD5 values generated according to the MD5 message-digest algorithm are the same, then perform the update of the target configuration file based on the updated configuration file; otherwise, do not perform the update operation. By verifying the updated configuration file through the MD5 message-digest algorithm, it can be ensured that the configuration file used for updating is complete, avoiding function loss and improving the success rate of the update.
[0094] Reference Figure 7 , Figure 7 shows a flowchart of an intelligent device control method according to an embodiment of the present application. The intelligent device control method further includes steps S710 to S720, which are described in detail as follows.
[0095] In step S710, obtain a registration request, where the registration request includes the device identifier and device type of the long-range radio device to be registered.
[0096] In one embodiment, before the edge server provides the device management service function for each connected long-range radio device, it is necessary to pre-register the device management service function in the edge server. Specifically, it can be implemented by the control terminal sending a corresponding registration request to the edge server, and the registration request can be triggered by the physical button or virtual control provided by the control terminal. The registration request carries the device identifier of the long-range radio device to be registered and the device type to which the long-range radio device belongs. It should be noted that the long-range radio devices to be registered are all long-range radio devices that have been registered for network access through the long-range radio network.
[0097] In step S720, associate the device identifier of the long-range radio device to be registered in the registration request with the device message parsing function corresponding to the device type.
[0098] In one embodiment, after the edge server receives the registration request, it will associate the device identifier of the long-range radio device to be registered in the registration request with the device message parsing function corresponding to the device type to which the long-range radio device belongs, thereby completing the registration of the long-range radio device. After the registration is completed, if a control instruction for the long-range radio device is received from the control terminal, the control instruction can be mapped through the device message parsing function corresponding to the device type to which the long-range radio device belongs to generate a device control message for controlling the long-range radio device.
[0099] Reference Figure 8 , Figure 8 shows a flowchart of a smart device control method according to an embodiment of the present application. The smart device control method further includes steps S810 to S830, which are described in detail as follows.
[0100] In step S810, the device attribute detection value reported by the second long-distance radio device is received.
[0101] In one embodiment, when the device types of the long-distance radio devices accessed to the edge server are smart devices such as temperature and humidity sensors, infrared projectors, or smart plugs, the edge server needs to monitor and manage the device attribute values of these long-distance radio devices.
[0102] For the temperature and humidity sensor, the device attribute detection values to be monitored are temperature or humidity; for the smart plug, the device attribute detection values to be monitored are current value or voltage value, etc. These long-distance radio devices can report the corresponding device attribute detection values to the edge server.
[0103] In step S820, the reported device attribute detection value is mapped according to the device message parsing function corresponding to the second long-distance radio device to generate a mapped device attribute detection value.
[0104] In one embodiment, since the device attribute detection values reported by the long-distance radio devices are generally binary instructions, it is necessary to map the device attribute detection values through the device message parsing function corresponding to the long-distance radio devices to generate the mapped device attribute detection values, so as to facilitate obtaining the specific information reported by the long-distance radio devices.
[0105] In step S830, the mapped device attribute detection value is used as the target device attribute value and associated with the device identifier corresponding to the second long-distance radio device and stored in the device attribute database corresponding to the second long-distance radio device.
[0106] In one embodiment, the edge server uses the mapped device attribute detection value as the target device attribute value for the long-distance radio device, and associates the target device attribute value with the device identifier corresponding to the second long-distance radio device and stores it in the device attribute database corresponding to the second long-distance radio device, which is convenient for monitoring the device attribute value of the long-distance radio device according to the device attribute database.
[0107] Reference Figure 9 , Figure 9The flowchart of the intelligent device control method according to an embodiment of the present application is shown. The intelligent device control method further includes steps S910 to S930, which are described in detail as follows.
[0108] In step S910, a query request from a control terminal is obtained. The query request includes the device identifier corresponding to the second long-range radio device.
[0109] In one embodiment, for the device attribute value corresponding to the long-range radio device under monitoring, it can be queried through the control terminal. Specifically, the user can select the long-range radio device to be queried through the query button or virtual query control provided by the control terminal, thereby triggering a query request. The query request carries the device identifier corresponding to the second long-range radio device that needs to be queried.
[0110] In step S920, based on the device identifier corresponding to the second long-range radio device, the target device attribute value of the second long-range radio device is obtained from the device attribute database corresponding to the second long-range radio device.
[0111] In one embodiment, after receiving the query request, the edge server will, based on the device identifier corresponding to the second long-range radio device carried in the query request, obtain the target device attribute value of the second long-range radio device from the device attribute database corresponding to the second long-range radio device. Specifically, the device identifier of the second long-range radio device can be used as an index to search in the device attribute database, and then the target device attribute value of the second long-range radio device is obtained from the device attribute database corresponding to the second long-range radio device.
[0112] In step S930, the target device attribute value is sent to the control terminal so that the control terminal can display according to the target device attribute value.
[0113] In one embodiment, the edge server sends the obtained target device attribute value to the control terminal so that the control terminal can display according to the target device attribute value, thereby facilitating the user to intuitively view the current device attribute value of the second long-range radio device under monitoring.
[0114] Figure 9 In the technical solution of the shown embodiment, the user can effectively query the current device attribute value of the second long-range radio device under monitoring through the control terminal, thereby realizing effective monitoring of the long-range radio device intuitively.
[0115] Reference Figure 10 , Figure 10The flowchart of the intelligent device control method according to an embodiment of the present application is shown. The intelligent device control method further includes steps S1010 to S1020, which are described in detail as follows.
[0116] In step S1010, if the detected value of the device attribute after mapping reaches a predetermined condition, a third device control message is generated according to the control message format of the third long-range radio device.
[0117] In an embodiment, for the second long-range radio device under monitoring, other long-range radio devices can also be intelligently controlled according to the detected value of the device attribute corresponding to the long-range radio device under monitoring. If the detected value of the device attribute after mapping is higher than a predetermined threshold or in a predetermined state, it can be considered that the detected value of the device attribute after mapping reaches a predetermined condition, and a third device control message is generated according to the control message format of the third long-range radio device, so as to facilitate sending the corresponding third device control message to the third long-range radio device.
[0118] In step S1020, the third device control message is sent to the third long-range radio device, so that the third long-range radio device performs corresponding operations according to the third device control message.
[0119] In an embodiment, the edge server sends the generated third device control message to the third long-range radio device, so that the third long-range radio device can perform corresponding operations according to the third device control message.
[0120] For example, in a conference room scenario, the conference room includes a second long-range radio device and a third long-range radio device. The second long-range radio device is an infrared detector for detecting whether the conference room is occupied or unoccupied, and the third long-range radio device is an infrared repeater for controlling the projector device to turn off.
[0121] The infrared detector will determine whether the meeting room is currently occupied or unoccupied based on the detected parameters. If it detects that the meeting room is currently unoccupied, it will send the device attribute detection value indicating the unoccupied state to the edge server. The edge server receives the device attribute detection value reported by the infrared detector indicating the unoccupied state, and performs mapping processing on the reported device attribute detection value indicating the unoccupied state according to the device message parsing function corresponding to the infrared detector to generate a mapped device attribute detection value. Since the mapped device attribute detection value is the device attribute detection value indicating that the meeting room is unoccupied, an instruction code for turning off the projector is generated according to the control message format of the infrared repeater, and the instruction code is sent to the infrared repeater so that the infrared repeater turns off the projector according to the instruction code for turning off the projector, and then the projector in the meeting room is intelligently controlled to be turned off by intelligently controlling the long-distance radio device in the meeting room.
[0122] Reference Figure 11 , Figure 11 FIG. shows a flowchart of an intelligent device control method according to an embodiment of the present application. The intelligent device control method further includes steps S1110 to S1120, which are described in detail as follows.
[0123] In step S1110, if the mapped device attribute detection value meets a predetermined condition, an alarm message is generated.
[0124] In one embodiment, if the mapped device attribute detection value is higher than a predetermined threshold or in a predetermined state, it can be considered that the mapped device attribute detection value meets the predetermined condition, and an alarm message for the monitoring information is generated.
[0125] In step S1120, the alarm message is sent to the control terminal.
[0126] In one embodiment, the edge server sends the alarm message to the control terminal so that the control terminal can obtain the alarm information in a timely manner. Specifically, the corresponding alarm information can be pushed to the control terminal by means of text messages or incoming calls, which is not limited here.
[0127] Figure 11 In the technical solution of the illustrated embodiment, when monitoring through a long-distance radio device, when the mapped device attribute detection value meets a predetermined condition, an alarm is generated in a timely manner, and then the user can be reminded in a timely manner in case of a failure or abnormal situation, reducing the risk.
[0128] The following introduces the device embodiment of the present application, which can be used to execute the intelligent device control method in the above embodiments of the present application. For details not disclosed in the device embodiment of the present application, please refer to the embodiments of the intelligent device control method described above in the present application.
[0129] Figure 12 The block diagram of the intelligent device control device according to an embodiment of the present application is shown.
[0130] Referring to Figure 12 As shown, the intelligent device control device 1200 according to an embodiment of the present application includes: a first receiving unit 1210, configured to receive a first control instruction for a first long-range radio device from a control terminal; a first generating unit 1220, configured to perform mapping processing on the first control instruction according to the control message format of the first long-range radio device to generate a first device control message; and a first sending unit 1230, configured to send the first device control message to the first long-range radio device, so that the first long-range radio device performs corresponding operations according to the first device control message.
[0131] In some embodiments of the present application, based on the foregoing solution, the first control instruction includes the device identifier and control information of the first long-range radio device, and the first generating unit 1220 is configured to: determine a device message parsing function for performing mapping processing according to the device identifier of the first long-range radio device; perform mapping processing on the control information according to the device message parsing function for performing mapping processing to generate the first device control message.
[0132] In some embodiments of the present application, based on the foregoing solution, the first generating unit 1220 is configured to: perform mapping processing on the control information according to the device message parsing function for performing mapping processing to obtain mapping information; determine a target device control code according to the mapping information and the correspondence between the mapping information and the device control codes in the database.
[0133] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a second obtaining unit, configured to obtain a target configuration file, where the target configuration file includes the device type of the long-range radio device to be configured and the device message parsing function to be configured; and a first associating unit, configured to associatively store the device type of the long-range radio device to be configured and the device message parsing function to be configured.
[0134] In some embodiments of the present application, based on the foregoing solution, the target configuration file further includes a database to be associated, where the database to be associated includes the correspondence between the parsing information and the device control codes, and the intelligent device control device further includes: a second associating unit, configured to associate the device type of the long-range radio device to be configured, the device message parsing function to be configured with the database to be associated.
[0135] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a third acquisition unit configured to acquire an update request, where the update request includes a resource address of an update configuration file; a download unit configured to download the update configuration file according to the resource address; and an update unit configured to update the target configuration file based on the update configuration file.
[0136] In some embodiments of the present application, based on the foregoing solution, the update unit is configured to: if the version number of the update configuration file is higher than the version number of the target configuration file, update the target configuration file based on the update configuration file.
[0137] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a fourth acquisition unit configured to acquire a registration request, where the registration request includes a device identifier and a device type of a long-distance radio device to be registered; and a third association unit configured to associate the device identifier of the long-distance radio device to be registered in the registration request with a device message parsing function corresponding to the device type.
[0138] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a first receiving unit configured to receive a device attribute detection value reported by a second long-distance radio device; a second generation unit configured to parse the reported device attribute detection value according to the device message parsing function corresponding to the second long-distance radio device to generate a parsed device attribute detection value; and a fourth association unit configured to store the parsed device attribute detection value as a target device attribute value in association with the device identifier of the second long-distance radio device in a device attribute database corresponding to the second long-distance radio device.
[0139] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a fifth acquisition unit configured to acquire a query request from a control terminal, where the query request includes the device identifier of the second long-distance radio device; a sixth acquisition unit configured to, based on the device identifier of the second long-distance radio device, acquire a target device attribute value of the second long-distance radio device from a device attribute database corresponding to the second long-distance radio device; and a second sending unit configured to send the target device attribute value to the control terminal so that the control terminal can perform a display according to the target device attribute value.
[0140] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a third generation unit, configured to generate a third device control message according to the control message format of a third long-range radio device if the parsed device attribute detection value reaches a predetermined condition; a sending unit, configured to send the third device control message to the third long-range radio device, so that the third long-range radio device performs corresponding operations according to the third device control message.
[0141] In some embodiments of the present application, based on the foregoing solution, the intelligent device control device further includes: a fourth generation unit, configured to generate alarm information if the parsed device attribute detection value reaches a predetermined condition; a third sending unit, configured to send the alarm information to the control terminal.
[0142] Figure 13 The structural schematic diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application is shown.
[0143] It should be noted that Figure 13 The computer system 1300 of the shown electronic device is only an example, and should not impose any limitation on the functions and usage scope of the embodiments of the present application.
[0144] As Figure 13 shown, the computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1302 or the program loaded from the storage section 1308 into the random access memory (RAM) 1303, such as executing the method described in the foregoing embodiments. In the RAM 1303, various programs and data required for system operation are also stored. The CPU 1301, ROM 1302, and RAM 1303 are connected to each other through a bus 1304. The input / output (I / O) interface 1305 is also connected to the bus 1304.
[0145] The following components are connected to the I / O interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed so that a computer program read therefrom is installed into the storage section 1308 as needed.
[0146] Specifically, according to an embodiment of the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product that includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1309, and / or installed from the removable medium 1311. When the computer program is executed by a central processing unit (CPU) 1301, various functions defined in the system of the present application are executed.
[0147] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable computer program is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0149] The units involved in the embodiments described in this application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not constitute a limitation on the unit itself in certain cases.
[0150] As another aspect, this application also provides a computer-readable medium, which can be included in the electronic device described in the above embodiments; or can exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the methods described in the above embodiments.
[0151] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of the two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0152] From the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the methods according to the embodiments of this application.
[0153] After considering the specification and practicing the embodiments disclosed herein, those skilled in the art will readily conceive of other embodiments of this application. This application is intended to cover any variations, uses, or adaptations of this application, which follow the general principles of this application and include common general knowledge or conventional technical means in the technical field not disclosed in this application.
[0154] It should be understood that this application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is only limited by the appended claims.
Claims
1. A method for controlling an intelligent device, characterized in that, An edge server applied to connect with a cloud server, including: Obtain a target configuration file, where the target configuration file includes the device type of a long-distance radio device to be configured and a device message parsing function to be configured; the message parsing function is used to implement mapping processing on the control information in the first control instruction; Associatively store the device type of the long-distance radio device to be configured and the device message parsing function to be configured; Receive a first control instruction for a first long-distance radio device from a control terminal; the first long-distance radio device is a long-distance radio device accessed to the edge server through a long-distance radio network; the first control instruction includes the device identifier and control information of the first long-distance radio device; According to the device identifier of the first long-distance radio device, determine a device message parsing function for mapping processing, where the parsing function includes a mapping function; parse the control information included in the first control instruction to identify the specific semantic information corresponding to the control information; map the specific semantic information corresponding to the control information through the mapping function to generate mapping information corresponding to the control message format of the first long-distance radio device; according to the mapping information and the corresponding relationship between the mapping information and the device control code in the database, determine the target device control code; generate the first long-distance radio device control message according to the target device control code; Send the first long-distance radio device control message to the first long-distance radio device, so that the first long-distance radio device performs corresponding operations according to the first long-distance radio device control message.
2. The intelligent device control method according to claim 1, wherein The target configuration file further includes a database to be associated, where the database to be associated includes the corresponding relationship between the mapping information and the device control code, and the intelligent device control method further includes: Associate the device type of the long-distance radio device to be configured, the device message parsing function to be configured with the database to be associated.
3. The intelligent device control method according to claim 1, wherein The intelligent device control method further includes: Obtain an update request, where the update request includes the resource address of the updated configuration file; Download the updated configuration file according to the resource address; Update the target configuration file based on the updated configuration file.
4. The intelligent device control method according to claim 3, characterized in that, The updating the target configuration file based on the updated configuration file includes: If the version number of the updated configuration file is higher than the version number of the target configuration file, update the target configuration file based on the updated configuration file.
5. The intelligent device control method according to claim 1, characterized in that, The intelligent device control method further includes: Obtain a registration request, where the registration request includes the device identifier and device type of a long-distance radio device to be registered; Associate the device identifier of the long-distance radio device to be registered in the registration request with the device message parsing function corresponding to the device type.
6. The intelligent device control method according to claim 1, wherein, The intelligent device control method further includes: Receive the device attribute detection value reported by the second long-distance radio device; Perform mapping processing on the reported device attribute detection value according to the device message parsing function corresponding to the second long-distance radio device to generate a mapped device attribute detection value; Use the mapped device attribute detection value as the target device attribute value and associate it with the device identifier corresponding to the second long-distance radio device and store it in the device attribute database corresponding to the second long-distance radio device.
7. The intelligent device control method according to claim 6, wherein The intelligent device control method further includes: Obtain a query request from a control terminal, where the query request includes the device identifier corresponding to the second long-distance radio device; Based on the device identifier corresponding to the second long-distance radio device, obtain the target device attribute value of the second long-distance radio device from the device attribute database corresponding to the second long-distance radio device; Send the target device attribute value to the control terminal so that the control terminal can perform display according to the target device attribute value.
8. The intelligent device control method according to claim 6, wherein The intelligent device control method further includes: If the mapped device attribute detection value meets a predetermined condition, generate a third device control message according to the control message format of the third long-distance radio device; Send the third device control message to the third long-distance radio device so that the third long-distance radio device can perform corresponding operations according to the third device control message.
9. The intelligent device control method according to claim 6, wherein, The intelligent device control method further includes: If the mapped device attribute detection value meets a predetermined condition, generate an alarm message; Send the alarm message to the control terminal.
10. An intelligent device control device, characterized in that, It includes: A first receiving unit, configured to obtain a target configuration file, where the target configuration file includes the device type of the long-distance radio device to be configured and the device message parsing function to be configured; the message parsing function is used to implement mapping processing on the control information in the first control instruction; associate and store the device type of the long-distance radio device to be configured and the device message parsing function to be configured; Receive a first control instruction for the first long-distance radio device from a control terminal; The first long-distance radio device is a long-distance radio device accessed to an edge server through a long-distance radio network; the first control instruction includes the device identifier and control information of the first long-distance radio device; A first generating unit, configured to determine, according to the device identifier of the first long-distance radio device, a device message parsing function for performing mapping processing, where the parsing function includes a mapping function; parse the control information included in the first control instruction to identify the specific semantic information corresponding to the control information; map the specific semantic information corresponding to the control information through the mapping function to generate mapping information corresponding to the control message format of the first long-distance radio device; determine a target device control code according to the mapping information and the corresponding relationship between the mapping information and the device control code in the database; Generate the first long-distance radio device control message according to the target device control code; A first sending unit, configured to send the first long-range radio device control message to the first long-range radio device, so that the first long-range radio device performs corresponding operations according to the first long-range radio device control message.
11. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the intelligent device control method according to any one of claims 1 to 9.
12. An electronic device, characterized in that, Comprising: One or more processors; A storage device, configured to store one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the intelligent device control method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The computer program product includes computer instructions, and the computer instructions are adapted to be loaded and executed by a processor to implement the intelligent device control method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Remote control system and method for portable terminals
CN101202766A
Device control method and apparatus
CN108683735A
Intelligent control method, device and system
CN109634249A
Intelligent power distribution robot and intelligent power distribution system
CN110738745A
Control method and control system of intelligent power taking switch
CN110798534A