CN111199637A - Infrared code updating method, terminal device and computer readable storage medium - Google Patents

Infrared code updating method, terminal device and computer readable storage medium Download PDF

Info

Publication number
CN111199637A
CN111199637A CN201911424454.0A CN201911424454A CN111199637A CN 111199637 A CN111199637 A CN 111199637A CN 201911424454 A CN201911424454 A CN 201911424454A CN 111199637 A CN111199637 A CN 111199637A
Authority
CN
China
Prior art keywords
communication protocol
protocol
remote control
control device
data
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
CN201911424454.0A
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.)
Goertek Inc
Original Assignee
Goertek Inc
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 Goertek Inc filed Critical Goertek Inc
Priority to CN201911424454.0A priority Critical patent/CN111199637A/en
Publication of CN111199637A publication Critical patent/CN111199637A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C23/00Non-electrical signal transmission systems, e.g. optical systems
    • G08C23/04Non-electrical signal transmission systems, e.g. optical systems using light waves, e.g. infrared
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C25/00Arrangements for preventing or correcting errors; Monitoring arrangements
    • 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/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Abstract

The invention provides an infrared code updating method, terminal equipment and a computer readable storage medium. The infrared code updating method provided by the invention comprises the following steps: the method comprises the steps that after a remote control device receives a communication protocol setting instruction sent by a mobile terminal, protocol information of a target communication protocol corresponding to the communication protocol setting instruction is obtained; sending response information to the mobile terminal, and receiving and storing the protocol data of the target communication protocol sent by the mobile terminal; and updating the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol. According to the technical scheme, the target communication protocol is used for updating the currently stored communication protocol of the remote control device, and a user can download or update the currently stored communication protocol of the remote control device in real time according to the current requirement, so that the function of controlling a plurality of electric appliances is realized under the condition of not increasing the memory capacity of the remote control device, the updating mode is flexible, and the use cost of the memory is reduced.

Description

Infrared code updating method, terminal device and computer readable storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to an infrared code updating method, a terminal device, and a computer-readable storage medium.
Background
The intelligent home is a networked intelligent home control system which integrates an automatic control system, a computer network system and a network communication technology into a whole by taking a house as a supported platform, organically combines various subsystems related to home life such as light control, curtain control, gas control, information household appliances, scene linkage, floor heating, security protection and the like on the basis of keeping the traditional living function, gets rid of a passive mode through networked comprehensive intelligent control and management, and provides a living environment with high efficiency, comfort, safety, convenience and environmental protection for people.
The infrared remote control is used as a control mode with a wide application range, has the characteristics of low cost, easiness in realization, mature technology and convenience in control, and most of the traditional household appliances support the use of the infrared remote control at present. As a basic component of the intelligent home system, the intelligent remote control device can be used for controlling electrical equipment which is remotely controlled by infrared rays, such as traditional household appliances like televisions, CD machines and air conditioners, while controlling other intelligent household appliances by means of Bluetooth, WIFI and the like in cooperation with a mobile phone. Therefore, starting from the existing large-storage market, the intelligent remote control device is used for realizing function integration and intelligent upgrading of the intelligent home system, and is more and more popular in the market, but the storage space of a Flash main chip adopted by the intelligent remote control device is limited, when the remote control device controls a plurality of devices, because the infrared coding protocol types of each device are different, the remote control device needs to be additionally provided with an independent Flash or use a built-in large-capacity Flash to store a plurality of different types of infrared coding protocols, and the adoption of the independent Flash or the use of the built-in large-capacity Flash is not beneficial to controlling the production cost.
Disclosure of Invention
The invention mainly aims to provide an infrared code updating method, terminal equipment and a computer readable storage medium, and aims to solve the problem that when an intelligent remote control device controls a plurality of pieces of equipment, independent Flash needs to be added or built-in high-capacity Flash needs to be used, so that the production cost is increased.
In order to achieve the above object, the present invention provides an infrared code updating method, which is applied to a device with a remote control device, and the infrared code updating method comprises the following steps:
the method comprises the steps that after a remote control device receives a communication protocol setting instruction sent by a mobile terminal, protocol information of a target communication protocol corresponding to the communication protocol setting instruction is obtained;
sending response information to the mobile terminal, and receiving and storing the protocol data of the target communication protocol sent by the mobile terminal;
and updating the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol, wherein the default communication protocol is the communication protocol used by the remote control device when the remote control device is currently communicated.
Optionally, before the step of sending the response message to the mobile terminal and receiving and storing the protocol data of the target communication protocol sent by the mobile terminal, the infrared coding updating method further includes:
acquiring the capacity of the target communication protocol according to the protocol information;
acquiring a storage mode of the target communication protocol according to the capacity and the residual capacity of a memory of the remote control device;
receiving and storing the protocol data of the target communication protocol sent by the mobile terminal:
receiving protocol data of the target communication protocol;
and storing the protocol data according to the storage mode.
Optionally, the step of obtaining the storage mode of the target communication protocol according to the capacity and the remaining capacity of the memory of the remote control device includes:
when the capacity is larger than the residual capacity of the memory of the remote control device, the storage mode is that the protocol data of the target communication protocol is adopted to cover the protocol data of the default communication protocol;
and when the capacity is less than or equal to the residual capacity of the memory of the remote control device, the protocol data is stored in a storage space corresponding to the residual capacity of the memory in a storage mode.
Optionally, before the step of sending a response message to the mobile terminal and receiving and storing the protocol data of the target communication protocol sent by the mobile terminal, the method for updating the infrared code further includes:
setting an update flag bit of the remote control device.
Optionally, the step of receiving and storing the protocol data of the target communication protocol sent by the mobile terminal includes:
receiving data frames sequentially sent by the mobile terminal;
buffering each of the data frames upon receipt;
checking the data frame and sending the checking result to the mobile terminal;
and when receiving the ending data frame, storing the data frame in the buffer to a memory.
In order to achieve the above object, the present invention further provides an infrared code updating method applied to a mobile terminal, where the infrared code updating method includes the following steps:
after receiving an operation instruction triggered through a communication protocol setting interface, acquiring protocol information of a target communication protocol corresponding to the operation instruction;
generating a communication protocol setting instruction according to the protocol information of the target communication protocol;
and sending the communication protocol setting instruction to the remote control device, and sending the protocol data of the target communication protocol to the remote control device when receiving response information returned by the remote control device, so that the remote control device can update the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol.
Optionally, after the step of obtaining the protocol information of the target communication protocol corresponding to the operation instruction, the infrared encoding updating method further includes:
sending a query instruction to the connected remote control device so that the remote control device can return the protocol information of the currently stored communication protocol;
and when the protocol information of the target communication protocol is different from the received protocol information of the currently stored communication protocol, executing the step of generating a communication protocol setting instruction according to the protocol information.
Optionally, the step of sending protocol data of the target communication protocol to the remote control device includes:
sequentially transmitting data frames to the remote control device;
after each data frame is sent, receiving a check result of the data frame fed back by the remote control device;
when the verification result is verification failure, the data frame is retransmitted;
and when the verification result is that the verification is successful, sending the next data frame to the remote control device until all the data frames are sent.
In order to achieve the above object, the present invention further provides a terminal device, where the terminal device includes a memory, a processor, and a control program of the ir coding updating method stored in the memory and executable on the processor, and the control program of the ir coding updating method implements the steps of the ir coding updating method when executed by the processor.
In order to achieve the above object, the present invention further provides a computer-readable storage medium, on which a control program of an infrared code updating method is stored, and when the control program of the infrared code updating method is executed by a processor, the steps of the infrared code updating method are implemented as described above.
According to the technical scheme, the target communication protocol is used for updating the currently stored communication protocol of the remote control device, and a user can download or update the currently stored communication protocol of the remote control device in real time according to the current requirement, so that the function of controlling a plurality of electric appliances is realized under the condition of not increasing the memory capacity of the remote control device, the updating mode is flexible, and the use cost of the memory is reduced.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment at a remote control device end according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first exemplary embodiment of an IR coding update method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of an IR coding update method according to the present invention;
FIG. 4 is a flowchart illustrating an IR encoding update method according to a third embodiment of the present invention;
FIG. 5 is a flowchart illustrating a fourth exemplary embodiment of an IR coding update method according to the invention;
FIG. 6 is a flowchart illustrating a fifth exemplary embodiment of an IR coding update method according to the invention;
fig. 7 is a schematic terminal structure diagram of a mobile terminal hardware operating environment according to an embodiment of the present invention;
FIG. 8 is a flowchart illustrating a sixth exemplary embodiment of an IR coding update method according to the invention;
FIG. 9 is a flowchart illustrating an IR encoding update method according to a seventh embodiment of the invention;
fig. 10 is a flowchart illustrating an infrared code updating method according to an eighth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back) are involved in the embodiment of the present invention, the directional indications are only used for explaining the relative positional relationship, the motion situation, and the like between the components in a certain posture, and if the certain posture is changed, the directional indications are changed accordingly.
In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The main solution of the embodiment of the invention is as follows: after receiving a communication protocol setting instruction sent by a mobile terminal, equipment with a remote control device acquires protocol information of a target communication protocol corresponding to the communication protocol setting instruction; sending response information to the mobile terminal, and receiving and storing the protocol data of the target communication protocol sent by the mobile terminal; and updating the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol, wherein the default communication protocol is the communication protocol used by the remote control device when the remote control device is currently communicated.
Because the Flash main chip used by the remote control device in the prior art has limited storage space, when the remote control device controls a plurality of devices, if an independent Flash is added or a built-in high-capacity Flash is used, the control of the production cost is not facilitated.
The invention provides an infrared code updating method, which updates a communication protocol currently stored in a remote control device by a target communication protocol, so that a user can download or update the communication protocol currently stored in the remote control device in real time according to the current requirement, thereby realizing the function of controlling a plurality of electric appliances under the condition of not increasing the memory capacity of the remote control device, realizing flexible updating mode and reducing the use cost of a memory.
As shown in fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a remote controller, and also can be an intelligent terminal with a remote control device or a mobile communication function.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a button (Press Key), and the selectable user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard priority interface, a wireless interface (e.g., a WiFi interface). The memory 1005 may be a high-speed RAM memory, or may be an NVM (non-volatile memory), such as a disk memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer-readable storage medium, may include therein a control program of an operating system, a network communication module, and an infrared code updating method.
In the remote control device shown in fig. 1, the network interface 1004 is mainly used for connecting the mobile terminal and performing data communication with the mobile terminal; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the control program of the ir coding update method stored in the memory 1005, and perform the following operations:
the method comprises the steps that after a remote control device receives a communication protocol setting instruction sent by a mobile terminal, protocol information of a target communication protocol corresponding to the communication protocol setting instruction is obtained;
sending response information to the mobile terminal, and receiving and storing the protocol data of the target communication protocol sent by the mobile terminal;
and updating the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol, wherein the default communication protocol is the communication protocol used by the remote control device when the remote control device is currently communicated.
Further, the processor 1001 may call the control program of the ir coding update method stored in the memory 1005, and further perform the following operations:
acquiring the capacity of the target communication protocol according to the protocol information;
acquiring a storage mode of the target communication protocol according to the capacity and the residual capacity of a memory of the remote control device;
receiving and storing the protocol data of the target communication protocol sent by the mobile terminal:
receiving protocol data of the target communication protocol;
and storing the protocol data according to the storage mode.
Further, the processor 1001 may call the control program of the ir coding update method stored in the memory 1005, and further perform the following operations:
when the capacity is larger than the residual capacity of the memory of the remote control device, the storage mode is that the protocol data of the target communication protocol is adopted to cover the protocol data of the default communication protocol;
and when the capacity is less than or equal to the residual capacity of the memory of the remote control device, the protocol data is stored in a storage space corresponding to the residual capacity of the remote control device.
Further, the processor 1001 may call the control program of the ir coding update method stored in the memory 1005, and further perform the following operations:
setting an update flag bit of the remote control device.
Further, the processor 1001 may call the control program of the ir coding update method stored in the memory 1005, and further perform the following operations:
receiving data frames sequentially sent by the mobile terminal;
buffering each of the data frames upon receipt;
checking the data frame and sending the checking result to the mobile terminal;
and when receiving the ending data frame, storing the data frame in the buffer to a memory.
Based on the hardware architecture, the embodiment of the infrared code updating method is provided.
Referring to fig. 2, fig. 2 is a diagram of a first embodiment of an infrared code updating method according to the present invention, where the infrared code updating method includes the following steps:
step S10, after receiving a communication protocol setting instruction sent by the mobile terminal, the remote control device acquires protocol information of a target communication protocol corresponding to the communication protocol setting instruction;
in this embodiment, the mobile terminal is an intelligent terminal such as a mobile phone/PC that communicates with the remote control device, and the mobile terminal has application software related to the communication protocol that can be downloaded by the remote control device. The communication protocol is an infrared coding protocol used for communication between the remote control device and the household appliances, and different communication protocols can enable the remote control device to control different household appliances in the intelligent home system. The communication protocol setting instruction is an instruction corresponding to one of all communication protocols provided by the user in the application software, and the communication protocol corresponding to the instruction is taken as the target communication protocol. The protocol information includes a name of the target communication protocol and a file size of the target communication protocol. Thus, the remote control device may download the target communication protocol on the mobile terminal. Specifically, after the remote control device establishes communication connection with the mobile terminal, a user selects any one of communication protocols available for the mobile terminal as a target communication protocol, the communication protocol setting instruction is generated, and the remote control device acquires protocol information corresponding to the target communication protocol.
Step S20, sending response information to the mobile terminal, receiving and storing the protocol data of the target communication protocol sent by the mobile terminal;
in this embodiment, the response information is a response signal sent by the remote control device according to the protocol information to determine that the currently stored communication protocol does not include the target communication protocol, and in this case, the remote control device can continue to receive the protocol data corresponding to the target communication protocol for subsequent updating.
In this embodiment, if the remote control device determines that the currently stored communication protocol includes the target communication protocol according to the protocol information, the remote control device does not send the response signal, and directly sets the target communication protocol stored in the remote control device as the default communication protocol.
And step S30, updating the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol, wherein the default communication protocol is the communication protocol used by the remote control device when the remote control device is currently in communication.
In this embodiment, the default communication protocol is replaced by the target communication protocol, and the communication protocol stored in the remote control device is updated. By updating the communication protocol currently stored in the remote control device by the target communication protocol, a user can download or update the communication protocol currently stored in the remote control device in real time according to the current requirement, so that the function of controlling a plurality of electric appliances is realized under the condition of not increasing the memory capacity of the remote control device, the updating mode is flexible, and the use cost of the memory is reduced
Referring to fig. 3, fig. 3 is a diagram illustrating a second embodiment of the infrared coding updating method according to the present invention, and based on the first embodiment, before step S20, the method further includes:
step S40, acquiring the capacity of the target communication protocol according to the protocol information;
and step S50, acquiring the storage mode of the target communication protocol according to the capacity and the residual capacity of the memory of the remote control device. When the capacity is larger than the residual capacity of the memory of the remote control device, the storage mode is that the protocol data of the target communication protocol is adopted to cover the protocol data of the default communication protocol; and when the capacity is less than or equal to the residual capacity of the memory of the remote control device, the protocol data is stored in a storage space corresponding to the residual capacity of the memory in a storage mode.
In this embodiment, after the remote control device acquires the protocol information of the target communication protocol sent by the mobile terminal, since the protocol information includes the name of the target communication protocol and the file size of the target communication protocol, the storage mode of the target communication protocol can be determined according to the file size of the target communication protocol, that is, the capacity of the target communication protocol. Specifically, the capacity is compared with the current remaining capacity of a memory of the remote control device, and if the capacity is greater than the remaining capacity, the storage mode is to overwrite the protocol data of the target communication protocol with the protocol data of a default communication protocol, that is, delete the default communication protocol stored in the remote control device, store the protocol data of the target communication protocol in the remaining space of the memory, and set the target communication protocol as a new default communication protocol.
In this embodiment, if the capacity is less than or equal to the remaining capacity, the protocol data is directly stored in the storage space corresponding to the remaining capacity of the memory, but the default communication protocol existing in the remote control device is not changed at this time.
Referring to fig. 4, fig. 4 is a third embodiment of the infrared code updating method of the present invention, and based on the second embodiment, step S20 includes:
step S21, receiving protocol data of the target communication protocol;
and step S22, storing the protocol data according to the storage mode.
In this embodiment, the remote control device stores the received protocol data of the target communication protocol according to the storage manner. The storage modes are two, and no matter which storage mode is adopted, although the capacities of the protocol data of different target communication protocols are different, the space of the memory of the remote control device can be utilized to the maximum extent by adopting a mode of combining coverage updating and direct storage.
Referring to fig. 5, fig. 5 is a diagram illustrating a fourth embodiment of the infrared coding updating method according to the present invention, and based on any one of the first to third embodiments, before step S20, the method further includes:
and step S60, setting the update flag bit of the remote control device.
In this embodiment, the update flag is the default communication protocol in the remote control device, before the remote control device updates the communication protocol, the memory of the remote control device stores a plurality of communication protocols, and the user can select one of the plurality of communication protocols as the default communication protocol, that is, if the subsequent capacity is greater than the remaining capacity, the default communication protocol stored in the remote control device needs to be deleted, and the user can specify the protocol data of a deleted communication protocol.
Referring to fig. 6, fig. 6 is a fifth embodiment of the infrared encoding updating method according to the present invention, and based on any one of the first to fourth embodiments, step S30 includes:
step S31, receiving data frames sent by the mobile terminal in sequence;
step S32, buffering the data frames when receiving each of the data frames;
step S33, the data frame is verified and the verification result is sent to the mobile terminal;
step S34, when receiving the end data frame, stores the data frame in the buffer memory to the memory.
In this embodiment, the Data frames are a Config frame and a Data frame related to the target communication protocol, where the Config frame mainly includes basic configurations such as a timer clock frequency value for generating PWM, a threshold value of a timer, and a pulse duty ratio, so as to implement infrared protocol PWM configuration of the remote control unit MCU; the Data frame mainly analyzes generated information by taking the pulse of the PWM wave expected to be transmitted by a certain action or command (such as a single pressing and releasing of a certain key, continuous pressing and non-holding, received voice command and the like) of the remote control device as a basic unit.
In this embodiment, each time a remote control device receives a data frame, the remote control device caches the data frame, checks the data frame, and then sends a check result to the mobile terminal, the mobile terminal determines whether the current data frame is successfully sent according to the check result, if the current data frame is successfully sent, the mobile terminal directly enters the receiving and checking process of the next data frame, if the sending fails, the current data frame sent by the mobile terminal is received again, and the caching of the data frame is executed again, the data frame is checked, and then the check result is sent to the mobile terminal, the mobile terminal determines whether the current data frame is successfully sent according to the check result, in order to avoid the remote control device and the mobile terminal from repeatedly sending data on a certain data frame, a user can set a designated number of times, and when the sending failure exceeds the designated number of times, and directly exiting the process of updating the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol.
In this embodiment, if the remote control device receives the end data frame of the protocol data of the target communication protocol, that is, the remote control device has already received the corresponding configuration data of the target communication protocol. At this time, the data frame in the cache is stored in a memory of the remote control device, so that power failure loss is prevented, and the current updating process is ended.
As shown in fig. 7, fig. 7 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be a smart phone, a tablet, or an intelligent mobile terminal with a data transmission function.
As shown in fig. 7, the terminal may include: a processor 2001 such as a CPU, a network interface 2004, a user interface 2003, a memory 2005, a communication bus 2002. The communication bus 2002 is used to implement connection communication between these components. The user interface 2003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 2003 may also include a standard wired interface, a wireless interface. The network interface 2004 may optionally include a standard priority interface, a wireless interface (e.g., a WiFi interface). The memory 2005 can be a high-speed RAM memory, or can be an NVM (non-volatile memory), such as a disk memory. The memory 2005 may alternatively be a storage device separate from the aforementioned processor 2001.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 7, a memory 2005 as one of computer-readable storage media may include therein control programs of an operating system, a network communication module, and an infrared code updating method.
In the mobile terminal shown in fig. 7, the network interface 2004 is mainly used for connecting a remote control device, and performing data communication with the remote control device; the user interface 2003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 2001 may be configured to call a control program of the infrared code updating method stored in the memory 2005, and perform the following operations:
after receiving an operation instruction triggered through a communication protocol setting interface, acquiring protocol information of a target communication protocol corresponding to the operation instruction;
generating a communication protocol setting instruction according to the protocol information;
and sending the communication protocol setting instruction to the remote control device, and sending the protocol data of the target communication protocol to the remote control device when receiving response information returned by the remote control device, so that the remote control device can update the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol.
The processor 2001 may also be configured to call a control program of the infrared code updating method stored in the memory 2005, and perform the following operations:
sending a query instruction to the connected remote control device so that the remote control device can return the protocol information of the currently stored communication protocol;
and when the protocol information of the target communication protocol is different from the received protocol information of the currently stored communication protocol, executing the step of generating a communication protocol setting instruction according to the protocol information of the target communication protocol.
The processor 2001 may also be configured to call a control program of the infrared code updating method stored in the memory 2005, and perform the following operations:
sequentially transmitting data frames to the remote control device;
after each data frame is sent, receiving a check result of the data frame fed back by the remote control device;
when the verification result is verification failure, the data frame is retransmitted;
and when the verification result is that the verification is successful, sending the next data frame to the remote control device until all the data frames are sent.
Based on the hardware architecture, the embodiment of the infrared code updating method is provided.
Referring to fig. 8, fig. 8 is a sixth embodiment of the infrared code updating method of the present invention, where the infrared code updating method includes the following steps:
step S70, after receiving an operation instruction triggered by a communication protocol setting interface, acquiring protocol information of a target communication protocol corresponding to the operation instruction;
step S80, generating a communication protocol setting instruction according to the protocol information of the target communication protocol;
step S90, sending the communication protocol setting instruction to the remote control device, and sending the protocol data of the target communication protocol to the remote control device when receiving the response information returned by the remote control device, so that the remote control device updates the protocol data of the default communication protocol of the remote control device by using the protocol data of the target communication protocol.
In this embodiment, the mobile terminal provides the communication protocol setting interface, after the remote control device establishes communication connection with the mobile terminal, the user selects any one of the communication protocols as the target communication protocol according to the communication protocol setting interface, and the mobile terminal automatically retrieves protocol information corresponding to the target communication protocol, generates the communication protocol setting instruction, and sends the communication protocol setting instruction to the remote control device. The remote control device judges whether the current residual space meets the storage capacity of the protocol data according to the protocol information to send a response signal, if the residual space of a remote control device memory is smaller than the storage space required by the protocol data, the response signal is sent to the mobile terminal, and when the mobile terminal receives the response information returned by the remote control device, the mobile terminal sends the protocol data of the target communication protocol to the remote control device, so that the remote control device updates the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol.
Referring to fig. 9, fig. 9 is a seventh embodiment of the infrared code updating method according to the present invention, and based on the sixth embodiment, after step S70, the method further includes:
step S100, sending a query instruction to the connected remote control device so that the remote control device can return the protocol information of the currently stored communication protocol;
step S110, when the protocol information of the target communication protocol is different from the received protocol information of the currently stored communication protocol, executing the step of generating a communication protocol setting instruction according to the protocol information of the target communication protocol.
In this embodiment, after acquiring the protocol information of the target communication protocol, the mobile terminal sends an inquiry instruction to the connected remote control device, the remote control device determines whether the currently stored communication protocol includes the target communication protocol according to the protocol information, if the currently stored communication protocol does not include the target communication protocol, the remote control device returns a determination result that the currently stored communication protocol does not include the target communication protocol, that is, response information, to the mobile terminal, and after receiving the response information, the mobile terminal generates a communication protocol setting instruction according to the protocol information, so that the remote control device determines again whether the current remaining space of the remote control device memory satisfies the storage capacity of the protocol data.
In this embodiment, if the currently stored communication protocol of the remote control device includes the target communication protocol, the response message is not returned, and the mobile terminal does not receive the response message within a preset time interval, so as to directly remind the user that the update is not needed.
Referring to fig. 10, fig. 10 is a diagram of an eighth embodiment of the infrared encoding updating method according to the present invention, and based on the sixth or seventh embodiment, step S90 includes:
step S91, sequentially transmitting data frames to the remote control device;
step S92, after each data frame is sent, receiving the check result of the data frame fed back by the remote control device;
step S93, when the verification result is a verification failure, resending the data frame;
and step S94, when the verification result is that the verification is successful, sending the next data frame to the remote control device until all the data frames are sent.
In this embodiment, the mobile terminal sequentially sends the data frames to the remote control device according to the sequence of the protocol data frames, the remote control device caches the data frames and checks the data frames each time the remote control device receives one data frame, and then sends a check result to the mobile terminal, the mobile terminal judges whether the current data frame is successfully sent according to the check result, and if the current data frame is successfully sent, the mobile terminal sends the next data frame of the current data frame to the remote control device; and if the transmission fails, the current data frame is transmitted to the remote control device again until the current data frame is successfully transmitted. In order to avoid repeated data transmission between the mobile terminal and the remote control device on a certain data frame, the user can set a specified number of times, and when the transmission failure exceeds the specified number of times, the current process of updating the default communication protocol is directly exited.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution 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) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. An infrared code updating method is applied to equipment with a remote control device, and is characterized by comprising the following steps:
the remote control device acquires protocol information of a target communication protocol corresponding to a communication protocol setting instruction after receiving the communication protocol setting instruction sent by the mobile terminal;
sending response information to the mobile terminal, and receiving and storing the protocol data of the target communication protocol sent by the mobile terminal;
and updating the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol, wherein the default communication protocol is the communication protocol used by the remote control device when the remote control device is currently communicated.
2. The ir-coding updating method according to claim 1, wherein before the step of sending the response message to the mobile terminal, receiving and storing the protocol data of the target communication protocol sent by the mobile terminal, the ir-coding updating method further comprises:
acquiring the capacity of the target communication protocol according to the protocol information;
acquiring a storage mode of the target communication protocol according to the capacity and the residual capacity of a memory of the remote control device;
receiving and storing the protocol data of the target communication protocol sent by the mobile terminal:
receiving protocol data of the target communication protocol;
and storing the protocol data according to the storage mode.
3. The ir code updating method according to claim 2, wherein the step of obtaining the storage mode of the target communication protocol based on the capacity and the remaining capacity of the memory of the remote control device comprises:
when the capacity is larger than the residual capacity of the memory of the remote control device, the storage mode is that the protocol data of the target communication protocol is adopted to cover the protocol data of the default communication protocol;
and when the capacity is less than or equal to the residual capacity of the memory of the remote control device, the protocol data is stored in a storage space corresponding to the residual capacity of the memory in a storage mode.
4. The ir-coding updating method according to claim 1, wherein before the step of sending the response message to the mobile terminal, receiving and storing the protocol data of the target communication protocol sent by the mobile terminal, the ir-coding updating method further comprises:
setting an update flag bit of the remote control device.
5. The ir-encoded update method according to claim 1, wherein the step of receiving and storing the protocol data of the target communication protocol transmitted by the mobile terminal comprises:
receiving data frames sequentially sent by the mobile terminal;
buffering each of the data frames upon receipt;
checking the data frame and sending the checking result to the mobile terminal;
and when receiving the ending data frame, storing the data frame in the buffer to a memory.
6. An infrared code updating method is applied to a mobile terminal, and is characterized by comprising the following steps:
after receiving an operation instruction triggered through a communication protocol setting interface, acquiring protocol information of a target communication protocol corresponding to the operation instruction;
generating a communication protocol setting instruction according to the protocol information of the target communication protocol;
and sending the communication protocol setting instruction to the remote control device, and sending the protocol data of the target communication protocol to the remote control device when receiving response information returned by the remote control device, so that the remote control device can update the protocol data of the default communication protocol of the remote control device by adopting the protocol data of the target communication protocol.
7. The ir-code updating method according to claim 6, wherein after the step of acquiring the protocol information of the target communication protocol corresponding to the operation instruction, the ir-code updating method further comprises:
sending a query instruction to the connected remote control device so that the remote control device can return the protocol information of the currently stored communication protocol;
and when the protocol information of the target communication protocol is different from the received protocol information of the currently stored communication protocol, executing the step of generating a communication protocol setting instruction according to the protocol information of the target communication protocol.
8. The ir-coded update method of claim 6, wherein the step of transmitting the protocol data of the target communication protocol to the remote control device comprises:
sequentially transmitting data frames to the remote control device;
after each data frame is sent, receiving a check result of the data frame fed back by the remote control device;
when the verification result is verification failure, the data frame is retransmitted;
and when the verification result is that the verification is successful, sending the next data frame to the remote control device until all the data frames are sent.
9. A terminal device, characterized in that the terminal device comprises a memory, a processor and a control program of an ir coding updating method stored on the memory and executable on the processor, the control program of the ir coding updating method realizing the steps of the ir coding updating method according to any one of claims 1 to 8 when executed by the processor.
10. A computer-readable storage medium, characterized in that a control program of an infrared code updating method is stored on the computer-readable storage medium, which when executed by a processor implements the steps of the infrared code updating method according to any one of claims 1 to 8.
CN201911424454.0A 2019-12-31 2019-12-31 Infrared code updating method, terminal device and computer readable storage medium Pending CN111199637A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911424454.0A CN111199637A (en) 2019-12-31 2019-12-31 Infrared code updating method, terminal device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911424454.0A CN111199637A (en) 2019-12-31 2019-12-31 Infrared code updating method, terminal device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111199637A true CN111199637A (en) 2020-05-26

Family

ID=70747361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911424454.0A Pending CN111199637A (en) 2019-12-31 2019-12-31 Infrared code updating method, terminal device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111199637A (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWM324350U (en) * 2007-07-16 2007-12-21 Guo-Jen Li Remote controller with update capability
CN101707662A (en) * 2009-11-13 2010-05-12 深圳市中美鹏实业有限公司 Electronic equipment, mobile communication equipment and remote control device
CN101859198A (en) * 2009-04-10 2010-10-13 Tcl集团股份有限公司 Remote controller with griping recognition function and method thereof
CN102546943A (en) * 2011-12-31 2012-07-04 湖南科技学院 Universal home appliance concentrated remote control system based on Bluetooth and intelligent cellphone
CN202551154U (en) * 2012-02-08 2012-11-21 于晓晖 Wireless handset intelligent remote controller
CN103295383A (en) * 2013-07-11 2013-09-11 张平洲 Touch waterproof universal remote control with keys and functions capable of being edited freely
TW201421432A (en) * 2012-11-30 2014-06-01 Professional Comp Technology Ltd Remote controller with cloud data transmission function and data transmission method thereof
CN103984647A (en) * 2013-02-08 2014-08-13 上海芯豪微电子有限公司 Storage list replacing method
CN104766465A (en) * 2015-03-18 2015-07-08 康佳集团股份有限公司 General remote controller
CN104809865A (en) * 2014-01-26 2015-07-29 红板凳科技股份有限公司 Intelligent home remote control system
CN105513336A (en) * 2016-01-27 2016-04-20 四川长虹电器股份有限公司 Infrared remote controller device and local upgrading method thereof
US9578140B2 (en) * 2003-01-07 2017-02-21 Microsoft Technology Licensing, Llc Legacy device bridge for residential or non-residential networks

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9578140B2 (en) * 2003-01-07 2017-02-21 Microsoft Technology Licensing, Llc Legacy device bridge for residential or non-residential networks
TWM324350U (en) * 2007-07-16 2007-12-21 Guo-Jen Li Remote controller with update capability
CN101859198A (en) * 2009-04-10 2010-10-13 Tcl集团股份有限公司 Remote controller with griping recognition function and method thereof
CN101707662A (en) * 2009-11-13 2010-05-12 深圳市中美鹏实业有限公司 Electronic equipment, mobile communication equipment and remote control device
CN102546943A (en) * 2011-12-31 2012-07-04 湖南科技学院 Universal home appliance concentrated remote control system based on Bluetooth and intelligent cellphone
CN202551154U (en) * 2012-02-08 2012-11-21 于晓晖 Wireless handset intelligent remote controller
TW201421432A (en) * 2012-11-30 2014-06-01 Professional Comp Technology Ltd Remote controller with cloud data transmission function and data transmission method thereof
CN103984647A (en) * 2013-02-08 2014-08-13 上海芯豪微电子有限公司 Storage list replacing method
CN103295383A (en) * 2013-07-11 2013-09-11 张平洲 Touch waterproof universal remote control with keys and functions capable of being edited freely
CN104809865A (en) * 2014-01-26 2015-07-29 红板凳科技股份有限公司 Intelligent home remote control system
CN104766465A (en) * 2015-03-18 2015-07-08 康佳集团股份有限公司 General remote controller
CN105513336A (en) * 2016-01-27 2016-04-20 四川长虹电器股份有限公司 Infrared remote controller device and local upgrading method thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张洋 等: "《正点原子教你学嵌入式系统丛书 STM32F7原理与应用 HAL库版 下》", 30 June 2017 *
陈景波 等: "《51单片机实战指南》", 28 February 2019 *

Similar Documents

Publication Publication Date Title
EP2840455B1 (en) Method, apparatus and system for intelligently controlling device, and plug-and-play device
JP6543719B2 (en) Apparatus control method and apparatus, program, and recording medium
CN110213102B (en) Device control method, device, electronic device and storage medium
CN106408923A (en) A remote wireless infrared transponding control system based on cloud infrared code base data
JP6545897B2 (en) Intelligent terminal remote control device functionalization control system and control method
CN108366005A (en) The interlock method and device of electric room
CN108234562B (en) Equipment control method, control equipment and controlled equipment
CN108156058B (en) Method and device for accessing intelligent gateway equipment and readable storage medium
AU2013388030B2 (en) Method, apparatus, and system for intelligently controlling device, and plug-and-play device
US20220417052A1 (en) Network configuration terminal, network configuration method for home appliance, and computer-readable storage medium
WO2022001039A1 (en) Method for updating key value in remote controller, remote controller, and computer-readable storage medium
CN112255926A (en) Method for managing contextual model of smart home system
CN104217560A (en) All-purpose remote controller module used for smartphone and operation method thereof
CN106152386B (en) A kind of processing method and processing device of AIR COND SIG Air Conditioner Singnal
CN109709880B (en) Control method and control system of projector
CN111245689B (en) Intelligent bathroom system based on convergence gateway and control method thereof
CN111199637A (en) Infrared code updating method, terminal device and computer readable storage medium
CN114095295B (en) Intelligent doorbell information inheritance method, intelligent doorbell and computer readable storage medium
CN108900586B (en) Household appliance, WIFI module, communication method between household appliance and WIFI module and terminal and readable storage medium
CN106817371B (en) Radio frequency equipment control method, terminal, radio frequency host and radio frequency equipment control system
CN110149254B (en) Wireless switch control method, wireless switch and computer readable storage medium
CN112988211B (en) Equipment upgrading method and control device based on Zigbee
CN106850786B (en) Radio frequency equipment control method, server, radio frequency host and radio frequency equipment control system
CN111722869A (en) Control panel configuration method, control panel and storage medium
CN110149253B (en) Gateway connection method, gateway and computer readable storage medium

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: 20200526