CN111880446A - Control instruction sending method and control instruction receiving method - Google Patents

Control instruction sending method and control instruction receiving method Download PDF

Info

Publication number
CN111880446A
CN111880446A CN202010700102.XA CN202010700102A CN111880446A CN 111880446 A CN111880446 A CN 111880446A CN 202010700102 A CN202010700102 A CN 202010700102A CN 111880446 A CN111880446 A CN 111880446A
Authority
CN
China
Prior art keywords
control instruction
attribute
instruction
standard
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010700102.XA
Other languages
Chinese (zh)
Inventor
贾姗姗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Uplus Intelligent Technology Beijing Co Ltd
Original Assignee
Haier Uplus Intelligent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haier Uplus Intelligent Technology Beijing Co Ltd filed Critical Haier Uplus Intelligent Technology Beijing Co Ltd
Priority to CN202010700102.XA priority Critical patent/CN111880446A/en
Publication of CN111880446A publication Critical patent/CN111880446A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The embodiment of the invention provides a method for sending a control command and a method for receiving the control command, wherein the method for sending the control command comprises the following steps: receiving a control request, and generating a standard control instruction according to the control request, wherein the standard control instruction indicates an attribute to be controlled of a controlled end and an operation target of the attribute to be controlled; converting the format of the standard control instruction according to a pre-configured mapping file to obtain an adaptation control instruction, wherein the mapping file is used for indicating the format mapping relationship between the standard control instruction and the adaptation control instruction, and the format of the adaptation control instruction is a format which can be recognized by the controlled terminal; the adaptation control instruction is sent to the controlled terminal, and by the embodiment of the invention, the problem of resource consumption caused by different interfaces of different Internet of things access devices in the related technology is solved, and the technical effects of simplifying the device management logic and reducing the resource consumption are achieved.

Description

Control instruction sending method and control instruction receiving method
Technical Field
The present invention relates to the field of communications, and in particular, to a method for sending a control instruction and a method for receiving a control instruction.
Background
In the related art, each manufacturer makes various devices according to its own specification, and after accessing the internet of things, the devices perform data flow with different protocol types with a cloud (which is a service end). If the server side issues the instruction to the access device, the server side needs to encapsulate the instruction in the format recognizable by the access device and issue the instruction through the interface corresponding to the access device after the instruction encapsulation is completed, that is, if the server side issues the instruction to different access devices, the server side needs to encapsulate the instruction in different formats and issue the instruction through different interfaces, which results in heavier load of the server side, more interfaces in the internet of things, and more service resources. Moreover, when new equipment needs to be accessed in the internet of things, due to the difference between protocols and data formats, only more new interfaces can be developed to meet the requirements of different equipment, so that the management of the equipment of the internet of things is complex and more resources are consumed.
For the problem of resource consumption caused by different interfaces of different internet of things access devices in the related art, no solution exists yet.
Disclosure of Invention
The embodiment of the invention provides a sending method and a receiving method of a control instruction, and aims to at least solve the problem that the management of equipment of the Internet of things is complex in the related art.
According to an embodiment of the present invention, a method for sending a control instruction is provided, which is applied to a server, and includes:
receiving a control request, and generating a standard control instruction according to the control request, wherein the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates an attribute to be controlled of a controlled terminal and an operation target of the attribute to be controlled;
carrying out format conversion on the standard control instruction according to a pre-configured mapping file to obtain an adaptive control instruction, wherein the mapping file is used for indicating a format mapping relation between the standard control instruction and the adaptive control instruction, and the format of the adaptive control instruction is a format which can be recognized by the controlled terminal;
and sending the adaptation control instruction to the controlled terminal, wherein the adaptation control instruction is used for instructing the controlled terminal to execute the operation corresponding to the operation target on the control target attribute.
In an exemplary embodiment, before performing format conversion on the standard control instruction according to a pre-configured mapping file to obtain an adapted control instruction, the method further includes:
performing command compensation on the standard control command, wherein performing the command compensation comprises: and compensating a correlation instruction for the standard control instruction, wherein the correlation instruction is an instruction which has a preset first correlation relation with the standard control instruction.
In an exemplary embodiment, the association instructions include the following:
a compensation attribute, and an operation target of the compensation attribute; the compensation attribute is an attribute having a preset second association relationship with the attribute to be controlled indicated in the standard control instruction in the attributes of the controlled end.
In an exemplary embodiment, before performing the command compensation on the standard control command, the sending method of the control command further includes: and acquiring the current attribute value of the compensation attribute, and taking the current attribute value of the compensation attribute as an operation target of the compensation attribute.
In an exemplary embodiment, before obtaining the current attribute value of the compensation attribute, the sending method of the control instruction further includes: receiving and caching current state information reported by the controlled terminal to obtain caching information, wherein the current state information comprises an attribute of the controlled terminal and a current attribute value of the attribute;
obtaining a current attribute value of the compensation attribute, including: and acquiring the current attribute value of the compensation attribute from the cache information.
In an exemplary embodiment, before the format converting the standard control instruction according to the pre-configured mapping file to obtain the adaptive control instruction, the method further includes: and performing logic correction on the standard control instruction according to preset logic correction information.
According to another embodiment of the present invention, there is also provided a control instruction receiving method, including:
receiving an adaptation control instruction sent by a server, wherein the format of the adaptation control instruction is a format recognizable by a controlled terminal, the adaptation control instruction is obtained by the server through format conversion of a standard control instruction according to a pre-configured mapping file, the mapping file is used for indicating a format mapping relation between the standard control instruction and the adaptation control instruction, the standard control instruction is generated by the server after receiving a control request according to the control request, the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates an attribute to be controlled of the controlled terminal and an operation target of the attribute to be controlled;
and executing the operation corresponding to the operation target on the control target attribute according to the adaptive control instruction.
In an exemplary embodiment, the adaptive control command is obtained by performing, by the server, command compensation on the standard control command and then performing the format conversion, where performing the command compensation includes: and compensating a correlation instruction for the standard control instruction, wherein the correlation instruction is an instruction which has a preset first correlation relation with the standard control instruction.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to carry out the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the embodiment of the invention, as the control request is received, and the standard control instruction is generated according to the control request, wherein the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates the attribute to be controlled of the controlled terminal and the operation target of the attribute to be controlled; carrying out format conversion on the standard control instruction according to a pre-configured mapping file to obtain an adaptive control instruction, wherein the mapping file is used for indicating a format mapping relation between the standard control instruction and the adaptive control instruction, and the format of the adaptive control instruction is a format which can be recognized by the controlled terminal; sending the adaptive control instruction to the controlled terminal, wherein the adaptive control instruction is used for instructing the controlled terminal to execute the operation corresponding to the operation target on the control target attribute, that is, the instruction format adapted by the server is set at the server, if the server needs to issue an instruction to the access device (that is, the controlled terminal), the server only needs to uniformly package the control instruction in the standard format, and then performs format conversion on the standard control instruction of the server, and converts the standard control instruction into the instruction format of the adaptive access device, so that the server does not need to package instructions in different formats, and the load of the server is reduced; only one interface can exist between the server and the controlled end, so that resource consumption is reduced, and even if new access equipment needs to communicate with the server, a new adaptive interface does not need to be added, so that the problem of resource consumption caused by different interfaces of the access equipment of the internet of things in the related art can be solved, and the technical effects of simplifying equipment management logic and reducing resource consumption are achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a method of transmitting a control instruction according to an embodiment of the present invention;
fig. 2 is a flowchart of a method of receiving a control instruction according to an embodiment of the present invention;
fig. 3 is a block diagram of a hardware structure of an intelligent home device for receiving a control instruction according to an embodiment of the present invention;
fig. 4 is a block diagram of a configuration of a control instruction transmission apparatus according to an embodiment of the present invention;
fig. 5 is a block diagram of a configuration of a control instruction receiving apparatus according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating a process of issuing a control instruction according to an exemplary embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
In this embodiment, a method for sending a control instruction running on a server is provided, and fig. 1 is a flowchart of the method for sending a control instruction according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S101, receiving a control request, and generating a standard control instruction according to the control request, wherein the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates an attribute to be controlled of a controlled terminal and an operation target of the attribute to be controlled;
step S103, converting the format of the standard control instruction according to a pre-configured mapping file to obtain an adaptation control instruction, wherein the mapping file is used for indicating the format mapping relationship between the standard control instruction and the adaptation control instruction, and the format of the adaptation control instruction is a format recognizable by the controlled terminal;
step S105, sending the adaptive control instruction to the controlled end, where the adaptive control instruction is used to instruct the controlled end to execute the operation corresponding to the operation target on the control target attribute.
According to the embodiment of the invention, as the control request is received, and the standard control instruction is generated according to the control request, wherein the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates the attribute to be controlled of the controlled terminal and the operation target of the attribute to be controlled; converting the format of the standard control instruction according to a pre-configured mapping file to obtain an adaptation control instruction, wherein the mapping file is used for indicating the format mapping relationship between the standard control instruction and the adaptation control instruction, and the format of the adaptation control instruction is a format which can be recognized by the controlled terminal; sending the adaptive control instruction to the controlled terminal, wherein the adaptive control instruction is used for instructing the controlled terminal to execute the operation corresponding to the operation target on the control target attribute, namely, the instruction format adapted by the server is set at the server, if the server needs to issue an instruction to the access device (namely, the controlled terminal), the server only needs to uniformly package the control instruction in a standard format, and then the standard control instruction of the server is subjected to format conversion and converted into the instruction format of the adaptive access device, so that the server does not need to package instructions in different formats, and the load of the server is reduced; only one interface can exist between the server and the controlled end, so that resource consumption is reduced, and even if new access equipment needs to communicate with the server, a new adaptive interface does not need to be added, so that the problem of resource consumption caused by different interfaces of the access equipment of the internet of things in the related art can be solved, and the technical effects of simplifying equipment management logic and reducing resource consumption are achieved.
In an exemplary embodiment, the control request may be sent by a control end (e.g., a terminal) to a service end, where the control request indicates an attribute to be controlled of a controlled end and an operation target of the attribute to be controlled, for example, the control end may be a mobile terminal such as a mobile phone, the controlled end may be a smart home device, and the service end may be a cloud end. The mobile terminal sends a control request to the cloud end, and the cloud end sends a control instruction to the intelligent household equipment according to the control request.
It should be noted that, in the case that there are multiple different controlled terminals, the control instruction received by each controlled terminal may be obtained by converting a standard control instruction by the service terminal.
In an exemplary embodiment, before converting the standard control command into a format according to a pre-configured mapping file to obtain an adaptive control command, the method further includes: performing command compensation on the standard control command, wherein performing the command compensation comprises: and compensating a correlation instruction for the standard control instruction, wherein the correlation instruction is an instruction which has a preset first correlation with the standard control instruction.
The standard control command may be a simple command, and when the control target is to be achieved, other related commands need to be linked, so that the related commands need to be compensated for the standard control command in order to achieve the control target.
In an exemplary embodiment, the association instructions include the following: a compensation attribute, and an operation target for the compensation attribute; the compensation attribute is an attribute having a preset second association relationship with the attribute to be controlled indicated in the standard control instruction in the attributes of the controlled end.
It should be noted that the standard control instruction generated by the server may be a simple control instruction, and may include only one or a small number of attributes, for example, which may be used to directly instruct the controlled end to perform a specified operation on the specified attribute to achieve the operation target. For example, the standard control command may be a wider command, for example, a command for controlling (e.g., switching) the operation mode of the controlled terminal. For example, the server may generate a standard control command indicating a "washing mode", and if the controlled terminal wants to achieve the control target, it may need to perform coordinated control on multiple attributes, so that the server needs to perform control command compensation on the standard control command, such as compensation on specific attributes associated with "washing", for example, attributes of washing time, washing speed and the like of the washing machine, and also needs to compensate operation target information of the control command, for example, washing time value, speed value and the like of the washing machine. For another example, if the controlled terminal is an air conditioner, and if the control request indicates to switch heating to the cooling mode, it means that the electric heating state of the air conditioner is turned off, and there may also be a change in wind speed and wind swing direction, which means that the function of switching modes, the air conditioner executes a set of control instructions. In this case, the server may generate only one simple standard control instruction for indicating the switching mode, and other linkage attributes, such as the electrical heating state, the wind speed, the temperature, and the like, are automatically assembled by the server, and the attribute value may be obtained from the state reported by the device.
In an exemplary embodiment, before performing the command compensation on the standard control command, the sending method of the control command further includes: and acquiring the current attribute value of the compensation attribute, and taking the current attribute value of the compensation attribute as an operation target of the compensation attribute. It should be noted that, if in some cases, the attribute value of some compensation attribute does not need to be changed, the current value of the compensation attribute can be directly compensated to the standard control command.
In an exemplary embodiment, before obtaining the current attribute value of the compensation attribute, the sending method of the control instruction further includes: receiving and caching current state information reported by the controlled terminal to obtain caching information, wherein the current state information comprises an attribute of the controlled terminal and a current attribute value of the attribute;
obtaining a current attribute value of the compensation attribute, including: and obtaining the current attribute value of the compensation attribute from the cache information.
It should be noted that the compensation attribute may be some attribute information of the controlled terminal reported in advance, and may be directly reported to the server or reported to a device of a third party, and may be obtained from the device of the third party when the server needs the information.
In an exemplary embodiment, before the format converting the standard control command according to the pre-configured mapping file to obtain the adaptive control command, the method further includes: and performing logic correction on the standard control instruction according to preset logic correction information.
The logic correction information may correct the logic of the standard control command, for example, correct a control command having a logic error. For example, when the air conditioner is switched from a heating mode to cooling, the temperature range is changed from 20-30 degrees to 15-25 degrees. In the case that only switching to the cooling mode is indicated in the control request, assuming that the current state of the controlled device is 26 degrees, the cloud (i.e., a server) will modify the temperature to a temperature value within the value range of the cooling mode, and this value may be defined as a default value in the configuration file.
For example, the server in this embodiment may be a single server, or a server cluster composed of multiple servers, or a cloud server, such as a cloud.
According to another embodiment of the present invention, there is also provided a method for receiving a control instruction, which may be applied to a terminal, and fig. 2 is a flowchart of the method for receiving a control instruction according to the embodiment of the present invention, as shown in fig. 2, the method includes:
step S202, receiving an adaptation control instruction sent by a server, wherein the format of the adaptation control instruction is a format recognizable by the controlled terminal, the adaptation control instruction is obtained by the server performing format conversion on a standard control instruction according to a pre-configured mapping file, the mapping file is used for indicating a format mapping relationship between the standard control instruction and the adaptation control instruction, the standard control instruction is generated by the server according to a control request after receiving the control request, the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates an attribute to be controlled of the controlled terminal and an operation target of the attribute to be controlled;
step S204, executing the operation corresponding to the operation target on the control target attribute according to the adaptive control instruction.
Through the steps, as the server is provided with the instruction format adapted to the server, if the server needs to issue an instruction to the access device (namely, the controlled terminal), the server only needs to uniformly package the control instruction into a standard format, and then performs format conversion on the standard control instruction of the server to convert the standard control instruction into the instruction format adapted to the access device, so that the server does not need to package instructions with different formats, and the load of the server is reduced; only one interface can exist between the server and the controlled end, so that resource consumption is reduced, and even if new access equipment needs to communicate with the server, a new adaptive interface does not need to be added, so that the problem of resource consumption caused by different interfaces of the access equipment of the internet of things in the related art can be solved, and the technical effects of simplifying equipment management logic and reducing resource consumption are achieved.
In an exemplary embodiment, the adaptive control command is obtained by performing the format conversion after the server performs command compensation on the standard control command, where performing the command compensation includes: and compensating a correlation instruction for the standard control instruction, wherein the correlation instruction is an instruction having a preset first correlation with the standard control instruction.
In an exemplary embodiment, the association instructions include the following: a compensation attribute, and an operation target of the compensation attribute; the compensation attribute is an attribute having a preset second association relationship with an attribute to be controlled indicated in the standard control instruction in the attributes of the controlled end.
In an exemplary embodiment, the operation target of the compensation attribute is determined by the server side obtaining the current attribute value of the compensation attribute, and the current attribute value can be used as the attribute value of the compensation attribute.
In an exemplary embodiment, the current attribute value of the compensation attribute is obtained by the server from cache information reported by the controlled end, where the cache information includes current state information of the controlled end, and for example, the current state information includes the attribute of the controlled end and the current attribute value of the attribute.
In an exemplary embodiment, the adaptive control instruction is obtained by performing logic modification on a standard control instruction according to preset logic modification information and then performing format conversion on the standard control instruction by the server.
The method provided by the embodiment of the application can be executed in smart home equipment, a computer terminal or a similar operation device. Taking the operation on the smart home device as an example, fig. 3 is a block diagram of a hardware structure of the smart home device according to the method for receiving a control instruction in the embodiment of the present invention. As shown in fig. 3, the smart home device may include one or more processors 102 (only one is shown in fig. 3) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, and optionally, the smart home device may further include a transmission device 106 for communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 3 is only an illustration, and does not limit the structure of the smart home device. For example, smart home devices may also include more or fewer components than shown in fig. 3, or have a different configuration than shown in fig. 3.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the receiving methods of the control instructions in the embodiments of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned methods. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the smart home devices via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the smart home device 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a sending apparatus of a control instruction is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of a configuration of a control instruction transmission apparatus according to an embodiment of the present invention, and as shown in fig. 4, the apparatus includes:
a generating module 42, configured to receive a control request, and generate a standard control instruction according to the control request, where the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates an attribute to be controlled of the controlled terminal and an operation target of the attribute to be controlled;
a conversion module 44, configured to perform format conversion on the standard control instruction according to a pre-configured mapping file to obtain an adaptation control instruction, where the mapping file is used to indicate a format mapping relationship between the standard control instruction and the adaptation control instruction, and the format of the adaptation control instruction is a format that can be recognized by the controlled terminal;
a sending module 46, configured to send the adaptive control instruction to the controlled end, where the adaptive control instruction is used to instruct the controlled end to execute, on the control target attribute, an operation corresponding to the operation target.
Through the steps, as the server is provided with the instruction format adapted to the server, if the server needs to issue an instruction to the access device (namely, the controlled terminal), the server only needs to uniformly package the control instruction into a standard format, and then performs format conversion on the standard control instruction of the server to convert the standard control instruction into the instruction format adapted to the access device, so that the server does not need to package instructions with different formats, and the load of the server is reduced; only one interface can exist between the server and the controlled end, so that resource consumption is reduced, and even if new access equipment needs to communicate with the server, a new adaptive interface does not need to be added, so that the problem of resource consumption caused by different interfaces of the access equipment of the internet of things in the related art can be solved, and the technical effects of simplifying equipment management logic and reducing resource consumption are achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
In this embodiment, a receiving device of a control instruction is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a configuration of a control instruction receiving apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes:
a receiving module 51, configured to receive an adaptation control instruction sent by a server, where a format of the adaptation control instruction is a format that can be recognized by the controlled end, the adaptation control instruction is obtained by format conversion, performed by the server, on a standard control instruction according to a pre-configured mapping file, where the mapping file is used to indicate a format mapping relationship between the standard control instruction and the adaptation control instruction, the standard control instruction is generated by the server after receiving a control request according to the control request, the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates an attribute to be controlled of the controlled end and an operation target of the attribute to be controlled;
and the executing module 53 is configured to execute, according to the adaptive control instruction, an operation corresponding to the operation target on the control target attribute.
Through the steps, as the server is provided with the instruction format adapted to the server, if the server needs to issue an instruction to the access device (namely, the controlled terminal), the server only needs to uniformly package the control instruction into a standard format, and then performs format conversion on the standard control instruction of the server to convert the standard control instruction into the instruction format adapted to the access device, so that the server does not need to package instructions with different formats, and the load of the server is reduced; only one interface can exist between the server and the controlled end, so that resource consumption is reduced, and even if new access equipment needs to communicate with the server, a new adaptive interface does not need to be added, so that the problem of resource consumption caused by different interfaces of the access equipment of the internet of things in the related art can be solved, and the technical effects of simplifying equipment management logic and reducing resource consumption are achieved.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example embodiments
The following further explains the embodiments of the present invention with reference to specific scenarios:
after the access device accesses the internet of things, the data flow of the cloud (equivalent to the server in the above embodiment) may be rich and diverse. The access device may refer to a device accessing to the internet of things, for example, various terminals in the home internet of things. The control commands to access the cloud end network device can be numbers with different lengths, can be meaningful English words or simple English translations. That is, the control instruction formats supported by different access devices may be different.
For example, in the present embodiment, the 6-bit code device may be a device that instructs 6-bit numbers. The standard device is a device with instructions for english words. In the related art, the operation of the 6-bit code device is realized through one set of interface, and the standard device is realized through another set of different interface. In the actual use process, the processing logic is relatively complex. In addition, when the device is newly accessed, if the existing service does not support the newly accessed device, a new interface needs to be developed, which is not beneficial to expansion.
The present embodiment provides a technical solution for controlling a device, which can be operated in the following scenario, for example: the scene comprises a server, an access device to be controlled and a controller (also called a service side). The control party can send a control instruction to the server to realize the control of the access equipment to be controlled through the server; after receiving the control command of the control party, the server may perform some compensation or modification processing on the control command to form a complete command, and then convert the processed control command into a command format suitable for the access device to be controlled, and send the command format to the access device to be controlled.
For example, the controller may be a software application with a control function, for example, an application with a control function (such as a client), through which an instruction is sent to the server to implement control of other devices; the controller may also be a terminal with a control function, such as a terminal carrying an application with a control function, and the terminal sends an instruction to the server to implement control of other devices. The terminal in this embodiment may be a terminal device configured with a target client, and may include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), notebook computers, tablet computers, palm computers, MID (Mobile Internet Devices), PAD, desktop computers, smart televisions, etc. The target client may be an instant messaging client, a browser client, a control client, etc. Such networks may include, but are not limited to: a wired network, a wireless network, wherein the wired network comprises: a local area network, a metropolitan area network, and a wide area network, the wireless network comprising: bluetooth, WIFI, and other networks that enable wireless communication.
For example, the access device to be controlled may be a smart home device in a home internet of things, such as a refrigerator, an air conditioner, a washing machine, and the like.
Illustratively, the server may be a single server, or a server cluster composed of a plurality of servers, or a cloud server.
The scheme provided by the embodiment designs a control instruction in a standard format (hereinafter referred to as a standard control instruction), and the control instruction in the standard format is generated by assistance of a configuration file. The control instruction with the standard format is used for interaction and circulation of the internal information of the server. The configuration file comprises a logic constraint file corresponding to the standard control instruction and a mapping file used for converting the standard control instruction and the control instructions with different protocols and different formats. The logic constraint file is used for compensating and correcting the standard control command, and the mapping file is used for converting the format of the standard control command into a command suitable for the access equipment to be controlled.
For example, if the air conditioner (i.e., an access device to be controlled) is a 6-bit code device, only 6-bit digital commands can be recognized. And after receiving the control instruction, the cloud end matches the logic constraint file to find the group control instruction, and fills attributes such as modes, wind degrees, wind pendulum and the like according to a group control instruction list and the current state of the equipment to obtain a complete group control instruction. Then, it is determined whether the group control command needs to be modified in the current state according to a mutex condition (a logic modification information, which is also a part of the logic constraint file), for example, when the current air conditioner is in pmv mode, the temperature cannot be set, and if the group control command includes the content of the temperature control command, the group control command needs to be modified, that is, the content of the temperature control command in the group control command needs to be deleted. If the control instruction can be issued after correction, the group control instruction is converted according to the mapping file, the group control instruction in the standard format is adapted to be the 6-bit code control instruction, and finally the group control instruction is issued to the air conditioner through the control channel. And (5) the air conditioner responds normally and is adjusted to the target temperature.
The embodiment of the invention supports the issuing of the standard model control instruction (equivalent to the standard control instruction) in a configuration file form by defining a set of standards. At least one of the following may be defined in the configuration file: mapping information, logic constraint information and the like, wherein the logic constraint information can comprise attribute information of the equipment, group control instruction operation information, logic correction information and the like. The control instructions issued in the attribute information correspond to the control instructions actually supported by the device one to one. The logical constraint information specifies a change in the attribute information in the current device state. The new interface of the domain model service aims at 6-bit codes and standard equipment, and the standard model is used for controlling and acquiring the equipment state interface.
Fig. 6 is a flowchart illustrating a process of issuing a control command according to an exemplary embodiment of the present invention, as shown in fig. 6:
both the resource server and the application server (App server) in the figure can provide services and act as a server side. The resource server can store configuration files;
a shadow device: standard model data of the device (i.e., data that can be used to generate standard commands) is provided externally, and the shadow (i.e., cache) of the device in the cloud is provided. After the device reports its own state or attribute to the shadow device, because the device reports the state or attribute by using its own instruction and command format, the shadow device needs to convert the instruction of the state or attribute reported by the device into a standard instruction, for example, perform an operation of converting a 6-bit code instruction into the standard instruction, and provide standard model data (i.e., data of the standard instruction) to the outside; thus, the developer will only obtain device data in the standard model manner.
A domain model: the method can be a service of a server side, and can complete conversion from a standard code to a 6-bit code, automatic compensation of equipment attribute values, completion of group control instructions and logic operation according to constraints. Other attributes and attribute values need to be supplemented by the domain model service, and the attribute values are obtained from the shadow device, so that a developer does not need to care whether the numerical values are repaired or not. In which constraints are used to describe logical modifications formed during operation of the device, for example, when the air conditioner is switched from heating mode to cooling, the temperature range may become smaller.
When the application server (App server) issues the operation control instruction of the standard model, a single attribute or a part of attributes can be sent, so that a developer can directly send the operation control instruction without acquiring the equipment state. Wherein the device comprises a 6-bit code and a standard device. The App server issues the standard control command to the domain model, the domain model completes control command encapsulation, and the control command is issued to the equipment through the gateway.
The embodiment of the invention has the following beneficial effects: the development requirement is reduced, and the development cost is reduced; the reliability and the expansibility of the system are improved, and the access of new equipment is facilitated.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-mentioned method embodiments when executed. Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for sending a control instruction is applied to a server and comprises the following steps:
receiving a control request, and generating a standard control instruction according to the control request, wherein the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates an attribute to be controlled of a controlled terminal and an operation target of the attribute to be controlled;
carrying out format conversion on the standard control instruction according to a pre-configured mapping file to obtain an adaptive control instruction, wherein the mapping file is used for indicating a format mapping relation between the standard control instruction and the adaptive control instruction, and the format of the adaptive control instruction is a format which can be recognized by the controlled terminal;
and sending the adaptation control instruction to the controlled terminal, wherein the adaptation control instruction is used for instructing the controlled terminal to execute the operation corresponding to the operation target on the control target attribute.
2. The method according to claim 1, wherein before performing format conversion on the standard control command according to a pre-configured mapping file to obtain an adaptive control command, the method further comprises:
performing command compensation on the standard control command, wherein performing the command compensation comprises: and compensating a correlation instruction for the standard control instruction, wherein the correlation instruction is an instruction which has a preset first correlation relation with the standard control instruction.
3. The method according to claim 2, wherein the association command comprises:
a compensation attribute, and an operation target of the compensation attribute; the compensation attribute is an attribute having a preset second association relationship with the attribute to be controlled indicated in the standard control instruction in the attributes of the controlled end.
4. The method of claim 2, wherein prior to performing command compensation on the standard control command, the method further comprises:
and acquiring the current attribute value of the compensation attribute, and taking the current attribute value of the compensation attribute as an operation target of the compensation attribute.
5. The method according to claim 4, wherein before the obtaining of the current attribute value of the compensation attribute, the method further comprises: receiving and caching current state information reported by the controlled terminal to obtain caching information, wherein the current state information comprises an attribute of the controlled terminal and a current attribute value of the attribute;
obtaining a current attribute value of the compensation attribute, including: and acquiring the current attribute value of the compensation attribute from the cache information.
6. The method according to claim 1, wherein before the format conversion is performed on the standard control command according to the pre-configured mapping file to obtain the adaptive control command, the method further comprises:
and performing logic correction on the standard control instruction according to preset logic correction information.
7. A method for receiving a control command, comprising:
receiving an adaptation control instruction sent by a server, wherein the format of the adaptation control instruction is a format recognizable by a controlled terminal, the adaptation control instruction is obtained by the server through format conversion of a standard control instruction according to a pre-configured mapping file, the mapping file is used for indicating a format mapping relation between the standard control instruction and the adaptation control instruction, the standard control instruction is generated by the server after receiving a control request according to the control request, the standard control instruction is an instruction adapted to the server, and the standard control instruction indicates an attribute to be controlled of the controlled terminal and an operation target of the attribute to be controlled;
and executing the operation corresponding to the operation target on the control target attribute according to the adaptive control instruction.
8. The method according to claim 7, wherein the adaptive control command is obtained by performing, by the server, command compensation on the standard control command and then performing the format conversion, and wherein performing the command compensation includes: and compensating a correlation instruction for the standard control instruction, wherein the correlation instruction is an instruction which has a preset first correlation relation with the standard control instruction.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute a sending method of the control instruction in any one of claims 1 to 6 when executed, or the computer program is configured to execute a receiving method of the control instruction in any one of claims 7 to 8 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to execute the method for transmitting the control instruction according to any one of claims 1 to 6, or the processor is configured to execute the computer program to execute the method for receiving the control instruction according to any one of claims 7 to 8.
CN202010700102.XA 2020-07-20 2020-07-20 Control instruction sending method and control instruction receiving method Pending CN111880446A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010700102.XA CN111880446A (en) 2020-07-20 2020-07-20 Control instruction sending method and control instruction receiving method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010700102.XA CN111880446A (en) 2020-07-20 2020-07-20 Control instruction sending method and control instruction receiving method

Publications (1)

Publication Number Publication Date
CN111880446A true CN111880446A (en) 2020-11-03

Family

ID=73155945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010700102.XA Pending CN111880446A (en) 2020-07-20 2020-07-20 Control instruction sending method and control instruction receiving method

Country Status (1)

Country Link
CN (1) CN111880446A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112856779A (en) * 2021-01-29 2021-05-28 海尔(深圳)研发有限责任公司 Method and device for monitoring air conditioner and monitoring equipment
CN112925219A (en) * 2021-02-03 2021-06-08 青岛海尔科技有限公司 Method and device for executing smart home scene
CN113467832A (en) * 2021-06-29 2021-10-01 青岛海尔科技有限公司 Equipment control processing method, device, storage medium and electronic device
CN115314329A (en) * 2022-06-30 2022-11-08 青岛海尔科技有限公司 Attribute value conversion method and device, storage medium and electronic device
CN115373283A (en) * 2022-07-29 2022-11-22 青岛海尔科技有限公司 Control instruction determination method and device, storage medium and electronic device
CN115685769A (en) * 2021-07-23 2023-02-03 青岛海尔科技有限公司 Intelligent household equipment control method and device, electronic equipment and storage medium
CN116300510A (en) * 2023-05-11 2023-06-23 深圳开鸿数字产业发展有限公司 Device control method, edge computing device, and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130003549A1 (en) * 2011-06-30 2013-01-03 Broadcom Corporation Resilient Hashing for Load Balancing of Traffic Flows
CN104038414A (en) * 2013-08-21 2014-09-10 江南大学 Multiprotocol intelligent household gateway apparatus and system thereof
CN104865906A (en) * 2014-06-27 2015-08-26 广东美的环境电器制造有限公司 Environmental regulation device control system, method, server and mobile terminal
CN105068428A (en) * 2015-06-24 2015-11-18 深圳市兰丁科技有限公司 Equipment control method and equipment control device
US20180004852A1 (en) * 2014-08-04 2018-01-04 Alibaba Group Holding Limited Method and system for facilitating terminal identifiers
CN109474633A (en) * 2018-12-28 2019-03-15 深圳和而泰数据资源与云技术有限公司 Method for converting protocol, calculates equipment and computer storage medium at device
CN109976173A (en) * 2019-03-18 2019-07-05 中国联合网络通信集团有限公司 Control method, device, equipment and the readable storage medium storing program for executing of smart home device
CN110513769A (en) * 2019-08-23 2019-11-29 郑州海尔空调器有限公司 A kind of air conditioner, control device and control method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130003549A1 (en) * 2011-06-30 2013-01-03 Broadcom Corporation Resilient Hashing for Load Balancing of Traffic Flows
CN104038414A (en) * 2013-08-21 2014-09-10 江南大学 Multiprotocol intelligent household gateway apparatus and system thereof
CN104865906A (en) * 2014-06-27 2015-08-26 广东美的环境电器制造有限公司 Environmental regulation device control system, method, server and mobile terminal
US20180004852A1 (en) * 2014-08-04 2018-01-04 Alibaba Group Holding Limited Method and system for facilitating terminal identifiers
CN105068428A (en) * 2015-06-24 2015-11-18 深圳市兰丁科技有限公司 Equipment control method and equipment control device
CN109474633A (en) * 2018-12-28 2019-03-15 深圳和而泰数据资源与云技术有限公司 Method for converting protocol, calculates equipment and computer storage medium at device
CN109976173A (en) * 2019-03-18 2019-07-05 中国联合网络通信集团有限公司 Control method, device, equipment and the readable storage medium storing program for executing of smart home device
CN110513769A (en) * 2019-08-23 2019-11-29 郑州海尔空调器有限公司 A kind of air conditioner, control device and control method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王忠民: "《金融科技前沿》", 31 July 2019 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112856779A (en) * 2021-01-29 2021-05-28 海尔(深圳)研发有限责任公司 Method and device for monitoring air conditioner and monitoring equipment
WO2022160642A1 (en) * 2021-01-29 2022-08-04 海尔(深圳)研发有限责任公司 Method and apparatus for monitoring air conditioner, and monitoring device
CN112925219A (en) * 2021-02-03 2021-06-08 青岛海尔科技有限公司 Method and device for executing smart home scene
CN113467832A (en) * 2021-06-29 2021-10-01 青岛海尔科技有限公司 Equipment control processing method, device, storage medium and electronic device
CN115685769A (en) * 2021-07-23 2023-02-03 青岛海尔科技有限公司 Intelligent household equipment control method and device, electronic equipment and storage medium
CN115314329A (en) * 2022-06-30 2022-11-08 青岛海尔科技有限公司 Attribute value conversion method and device, storage medium and electronic device
CN115373283A (en) * 2022-07-29 2022-11-22 青岛海尔科技有限公司 Control instruction determination method and device, storage medium and electronic device
CN116300510A (en) * 2023-05-11 2023-06-23 深圳开鸿数字产业发展有限公司 Device control method, edge computing device, and storage medium

Similar Documents

Publication Publication Date Title
CN111880446A (en) Control instruction sending method and control instruction receiving method
AU2021277736B2 (en) Pdu type setting method, ue policy setting method, and related entity
CN108696575B (en) Method and system for generating adapter template in Internet of things platform
JP6076480B2 (en) Service processing method and apparatus
US20140007076A1 (en) Separate upgrade/modification of remote software in machine to machine communication
WO2017040636A1 (en) Management of multi-radio gateway device using virtual gateway device
CN105471686A (en) Terminal control method, terminal control apparatus and system
EP3720189A1 (en) Data routing method and terminal
CN103281373A (en) Home gateway intelligent upgrading device and upgrading method
CN104185253A (en) Method for accessing wireless router, related device and system thereof
CN113783831B (en) Internet of things information processing method, device and system
WO2011076146A1 (en) Method for downloading application data, digital television reception terminal and system
CN107592367A (en) Resource share method, device and the computer-readable recording medium of home appliance
US10495336B2 (en) Energy operations across domains
WO2015000379A1 (en) Method for remotely controlling air conditioner and remote control system for air conditioner
WO2017143743A1 (en) Heterogeneous protocol communication method and controller
CN104424036A (en) Synchronous operation method and device of smart terminal
CN115314540A (en) Request response timeout processing method, device, equipment and medium
CN113467832A (en) Equipment control processing method, device, storage medium and electronic device
CN113994649A (en) Method, device, equipment and storage medium for accessing BLE Mesh equipment
EP3082302A1 (en) Remote home gateway controller, home gateway, terminal and terminal control method
WO2020253330A1 (en) Method and apparatus for customer premise equipment configuration management
CN105207811B (en) Method and device for replacing non-AllJoyn equipment
CN113625586A (en) Method and system for controlling smart home based on gateway
CN113630298A (en) Intelligent control system, method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201103