CN111757157B - Processing method of infrared codes, television and system - Google Patents
Processing method of infrared codes, television and system Download PDFInfo
- Publication number
- CN111757157B CN111757157B CN202010617192.6A CN202010617192A CN111757157B CN 111757157 B CN111757157 B CN 111757157B CN 202010617192 A CN202010617192 A CN 202010617192A CN 111757157 B CN111757157 B CN 111757157B
- Authority
- CN
- China
- Prior art keywords
- code
- infrared
- information
- encoding
- key
- 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.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 13
- 238000000034 method Methods 0.000 claims abstract description 26
- 230000006870 function Effects 0.000 claims description 6
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 230000001960 triggered effect Effects 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 5
- 229910002056 binary alloy Inorganic materials 0.000 description 2
- 230000000295 complement effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/422—Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
- H04N21/42204—User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
- H04N21/42206—User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor characterized by hardware details
- H04N21/4222—Remote control device emulator integrated into a non-television apparatus, e.g. a PDA, media center or smart toy
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/422—Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
- H04N21/42204—User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
- H04N21/42206—User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor characterized by hardware details
- H04N21/42221—Transmission circuitry, e.g. infrared [IR] or radio frequency [RF]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/41—Structure of client; Structure of client peripherals
- H04N21/422—Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
- H04N21/42204—User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
- H04N21/42226—Reprogrammable remote control devices
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Selective Calling Equipment (AREA)
- Details Of Television Systems (AREA)
Abstract
The invention discloses an infrared coding processing method, a television and a system. The invention obtains the infrared coding information of the remote controller; encoding the infrared encoding information to obtain a first character string in a preset format; encoding the first character string to obtain identification information for reading by application software; the identification information corresponds to the infrared coding information one by one. The method comprises the steps of encoding infrared coding information of remote control keys in a preset format, converting the obtained first character string into identification information which can be identified by application software, directly obtaining the infrared coding information through analysis after the application software identifies the identification information, and solving the problem of low efficiency of the application software in obtaining the remote control infrared coding information.
Description
Technical Field
The present invention relates to the field of electrical equipment control, and in particular, to an infrared encoding processing method, a television, and a system.
Background
Along with the increasing of household remote control equipment, the demands of people for universal remote control application software based on mobile terminals are increasing, and if the universal remote control application software is to realize control of electrical equipment, the remote control infrared codes corresponding to the electrical equipment need to be obtained.
At present, two main modes for acquiring remote control infrared coding information by using universal remote control application software are as follows: one way is to search through the model from the network, which is often difficult to gather the correct information due to the very large number of devices in the network; the other mode is to store remote control infrared coding information after carrying out infrared code matching with a remote controller of the electrical equipment one by one, and the mode is very low in efficiency of acquiring the remote control infrared coding information by application software at present because the number of keys of the remote controller is more, usually dozens of keys are needed, and a long time is required for the code matching.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide an infrared coding processing method, a television and a system, and aims to solve the technical problem that in the prior art, the efficiency of acquiring remote control infrared coding information by application software is low.
To achieve the above object, the present invention provides a processing method of infrared encoding, the method comprising the steps of:
acquiring infrared coding information of a remote controller;
encoding the infrared encoding information to obtain a first character string with a preset format;
encoding the first character string to obtain identification information for reading by application software; wherein the identification information corresponds to the infrared coding information one by one.
Preferably, the step of encoding the infrared encoded information to obtain a first character string in a preset format includes:
analyzing the infrared coding information to obtain a guide code, data bits and an end code;
establishing a coding rule according to the guide code, the data bit and the end code;
and coding according to the coding rule to obtain the JSON character string.
Preferably, the step of establishing a coding rule according to the pilot code, the data bits and the end code includes:
creating a rule field, a guide code field, an end code field, a logic field and an address code field according to the guide code, the end code, the address code, the instruction code and the instruction code in the data bits;
acquiring a host name corresponding to the remote controller, and creating a host name field according to the host name;
and acquiring a key name of the remote controller, and creating a key field according to the key name and the instruction code.
Preferably, the step of creating rule fields, boot code fields, end code fields, logic fields and address code fields according to the boot code, the end code, the address code in the data bits, the address code, the instruction code and the instruction code, includes:
creating a rule field according to the ordering sequence of the guide code, the end code, the address code, the instruction code and the instruction code;
creating a boot code field according to the value of the boot code;
creating an end code field according to the value of the end code;
acquiring the logic level of the data bit, and creating a logic field according to the value of the logic level;
and creating an address code field according to the value of the address code.
Preferably, the step of creating a key field according to the key name and the instruction code includes:
searching an instruction corresponding to each key name from the instruction code;
carrying out the binary conversion on the instruction corresponding to each key name to obtain a second character string corresponding to each key name;
and creating a key field according to each key name and the second character string corresponding to each key name.
Preferably, the step of encoding the first string to obtain identification information for reading by application software includes:
and encoding the first character string according to a two-dimensional code encoding rule to obtain a two-dimensional code for reading by application software.
In addition, in order to achieve the above object, the present invention also provides a television set, including: the system comprises a memory, a processor and an infrared code processing program stored in the memory and capable of running on the processor, wherein the infrared code processing program is configured to realize the steps of the infrared code processing method.
In addition, in order to achieve the above purpose, the present invention also provides an infrared coding processing system, where the infrared coding processing system includes application software and the television set as described above; wherein,,
the application software is used for obtaining the first character string by reading the identification information, decoding the first character string to obtain the infrared coding information and the key name information, and storing the infrared coding information and the key name information correspondingly.
Preferably, the application software is further configured to generate a virtual remote control interface corresponding to the remote controller according to the key name information.
Preferably, the application software is further configured to output infrared coding information corresponding to a key when the key of the virtual remote control interface is triggered externally, so that the television realizes a function corresponding to the key according to the infrared coding information.
The invention obtains the infrared coding information of the remote controller; encoding the infrared encoding information to obtain a first character string in a preset format; encoding the first character string to obtain identification information for reading by application software; the identification information corresponds to the infrared coding information one by one. The method comprises the steps of encoding infrared coding information of remote control keys in a preset format, converting the obtained first character string into identification information which can be identified by application software, directly obtaining the infrared coding information through analysis after the application software identifies the identification information, and solving the problem of low efficiency of the application software in obtaining the remote control infrared coding information.
Drawings
FIG. 1 is a schematic diagram of a television set in a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flow chart of an embodiment of a processing method of infrared encoding according to the present invention;
FIG. 3 is a schematic diagram of a refinement flow chart of an embodiment of the step S20 in FIG. 2;
FIG. 4 is a functional diagram of an embodiment of an IR encoding processing system according to the invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a television set structure of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the television set may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 1 is not limiting and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and an infrared-encoded processing program may be included in the memory 1005, which is a type of computer storage medium.
In the television set shown in fig. 1, the network interface 1004 is mainly used for data communication with an external network; the user interface 1003 is mainly used for receiving an input instruction of a user; the television calls the infrared-encoded processing program stored in the memory 1005 through the processor 1001, and performs the following operations:
acquiring infrared coding information of a remote controller;
encoding the infrared encoding information to obtain a first character string with a preset format;
encoding the first character string to obtain identification information for reading by application software; wherein the identification information corresponds to the infrared coding information one by one.
Further, the processor 1001 may call the infrared-encoded processing program stored in the memory 1005, and further perform the following operations:
analyzing the infrared coding information to obtain a guide code, data bits and an end code;
establishing a coding rule according to the guide code, the data bit and the end code;
and coding according to the coding rule to obtain the JSON character string.
Further, the processor 1001 may call the infrared-encoded processing program stored in the memory 1005, and further perform the following operations:
creating a rule field, a guide code field, an end code field, a logic field and an address code field according to the guide code, the end code, the address code, the instruction code and the instruction code in the data bits;
acquiring a host name corresponding to the remote controller, and creating a host name field according to the host name;
and acquiring a key name of the remote controller, and creating a key field according to the key name and the instruction code.
Further, the processor 1001 may call the infrared-encoded processing program stored in the memory 1005, and further perform the following operations:
creating a rule field, a guide code field, an end code field, a logic field and an address code field according to the guide code, the end code, the address code, the instruction code and the instruction code in the data bits;
acquiring a host name corresponding to the remote controller, and creating a host name field according to the host name;
and acquiring a key name of the remote controller, and creating a key field according to the key name and the instruction code.
Further, the processor 1001 may call the infrared-encoded processing program stored in the memory 1005, and further perform the following operations:
searching an instruction corresponding to each key name from the instruction code;
carrying out the binary conversion on the instruction corresponding to each key name to obtain a second character string corresponding to each key name;
and creating a key field according to each key name and the second character string corresponding to each key name.
Further, the processor 1001 may call the infrared-encoded processing program stored in the memory 1005, and further perform the following operations:
and encoding the first character string according to a two-dimensional code encoding rule to obtain a two-dimensional code for reading by application software.
According to the embodiment, through the scheme, the infrared coding information of the remote controller is obtained; encoding the infrared encoding information to obtain a first character string in a preset format; encoding the first character string to obtain identification information for reading by application software; the identification information corresponds to the infrared coding information one by one. The method comprises the steps of encoding infrared coding information of remote control keys in a preset format, converting the obtained first character string into identification information which can be identified by application software, directly obtaining the infrared coding information through analysis after the application software identifies the identification information, and solving the problem of low efficiency of the application software in obtaining the remote control infrared coding information.
Based on the hardware structure, the embodiment of the infrared coding processing method is provided.
Referring to fig. 2, fig. 2 is a flow chart illustrating an embodiment of an infrared encoding processing method according to the present invention.
In one embodiment, the infrared encoding processing method includes the following steps:
s10: acquiring infrared coding information of a remote controller;
it should be understood that the remote controller may be a remote controller of a television, a remote controller of an air conditioner, or a remote controller of other electrical equipment, which is not limited in this embodiment.
The infrared coding information refers to infrared coding information corresponding to keys of a remote controller, each key corresponds to an infrared code, and each infrared code generally comprises three parts, namely a guide code, data bits and an end code. The data bits include address code, instruction code and instruction code.
The infrared code information of the remote controller is usually stored in a memory of an electrical device such as a television or a dedicated remote control chip, and the infrared code information of the remote controller can be obtained by reading the information from the memory or the remote control chip.
S20: encoding the infrared encoding information to obtain a first character string with a preset format;
it should be understood that the preset format refers to a preset data exchange format, and may be JSON (JavaScript Object Notation) format, XML (eXtensible Markup Language ) format, or other data exchange format. The JSON is a lightweight data exchange format, and is an ideal data exchange format due to the adoption of a text format completely independent of language, so that the JSON is easy to read and write by people and easy to analyze and generate by machines.
It should be noted that, after the electrical device obtains the infrared coding information, the infrared coding information may be coded into the first character string with the preset format and stored in the device configuration item.
S30: encoding the first character string to obtain identification information for reading by application software; wherein the identification information corresponds to the infrared coding information one by one.
It should be understood that the application software refers to a collection of application programs that can implement infrared intelligent control of the electrical device. The identification information corresponds to the infrared coding information one by one, after the identification information is obtained by coding the first character string, the application software can obtain the first character string by reading the identification information, and the corresponding infrared coding information is obtained by decoding.
As an embodiment, the first character string and the two-dimensional code encoding rule may be encoded, so as to obtain a two-dimensional code for reading by application software.
Taking the electrical equipment as a television, when the television stores the first character string into the equipment configuration item, the television sets the option of the application related to the equipment information, and can increase the equipment infrared remote control two-dimensional code display interface, and the interface reads the first character string stored in the equipment configuration item and codes the first character string into a two-dimensional code for display. Of course, after the two-dimensional code is formed, the two-dimensional code can be stored in a specification of the television, so that a user can conveniently scan and read the two-dimensional code through application software.
In addition, after the application software obtains the first character string by reading the identification information, the application software can decode the first character string to obtain the infrared coding information and the key name information, and correspondingly store the infrared coding information and the key name information. The application software can also generate a virtual remote control interface corresponding to the remote controller according to the key name information, and when the keys of the virtual remote control interface are triggered externally, the infrared coding information corresponding to the keys is output, so that the television can realize the functions corresponding to the keys according to the infrared coding information.
The embodiment obtains the infrared coding information of the remote controller; encoding the infrared encoding information to obtain a first character string in a preset format; encoding the first character string to obtain identification information for reading by application software; the identification information corresponds to the infrared coding information one by one. The method comprises the steps of encoding infrared coding information of remote control keys in a preset format, converting the obtained character string into identification information which can be identified by application software, directly obtaining the infrared coding information through analysis after the application software identifies the identification information, and solving the problem of low efficiency of the application software in obtaining the remote control infrared coding information.
Further, as shown in fig. 3, fig. 3 is a detailed flow chart of an embodiment of step S20 in fig. 2, and in this embodiment, step S20 includes the following steps:
s21: analyzing the infrared coding information to obtain a guide code, data bits and an end code;
it should be understood that the infrared coding information of the remote controllers of different electrical equipment is different, but the coding modes are not very different, and the guide code, the data bit and the end code of each key of the remote controller can be obtained by analyzing the infrared coding information.
Taking infrared coding information of a remote controller of a television of a certain brand as an example, the remote controller is coded in the following way: guide code: 4000us signal (high level), 4000us space (low level); data bits: length 24bit, according to the following rules: 4-bit address code+8-bit instruction code+4-bit address code complement+8-bit instruction code complement; end code: 500us signal (high level). A complete infrared code consists of the following parts: the method comprises the steps of leading codes, 4-bit address codes, 8-bit instruction codes, 4-bit address counter codes, 8-bit instruction counter codes and ending codes, wherein the address counter codes are generated by reversing the address codes, the instruction counter codes are generated by reversing the instruction codes, the address codes are of fixed values 1111, and the 16-system is F; logic 1:500us signal (high level), 1900us space (low level); logic 0:500us signal (high level), 900us space (low level).
Assuming that the remote control UP arrow key command is 0x59 (its binary number is 01011001), its remote control code is as follows:
boot code 4000 (high level), 4000 (low level)
Address code {1111}:1[500 (high level), 1900 (low level) ];1[500 (high level), 1900 (low level) ];1[500 (high level), 1900 (low level) ];1[500 (high level), 1900 (low level) ]
Instruction code {01011001}:0[500 (high level), 900 (low level) ];1[500 (high level), 1900 (low level) ];0[500 (high level), 900 (low level) ];1[500 (high level), 1900 (low level) ];1[500 (high level), 1900 (low level) ];0[500 (high level), 900 (low level) ];0[500 (high level), 900 (low level) ];1[500 (high level), 1900 (low level) ]
Address inversion {0000 }; 0[500 (high level), 900 (low level) ];0[500 (high level), 900 (low level) ];0[500 (high level), 900 (low level) ]
Instruction inversion {10100110}:1[500 (high level), 1900 (low level) ];0[500 (high level), 900 (low level) ];1[500 (high level), 1900 (low level) ];0[500 (high level), 900 (low level) ];0[500 (high level), 900 (low level) ];1[500 (high level), 1900 (low level) ];1[500 (high level), 1900 (low level) ];0[500 (high level), 900 (low level) ]
End code 500 (high level)
S22: establishing a coding rule according to the guide code, the data bit and the end code;
specifically, a rule field, a guide code field, an end code field, a logic field and an address code field are created according to the guide code, the end code, the address code, the instruction code and the instruction code; acquiring a host name corresponding to the remote controller, and creating a host name field according to the host name; and acquiring a key name of the remote controller, and creating a key field according to the key name and the instruction code.
Further, creating a rule field according to the ordering sequence of the guide code, the end code, the address inverse code, the instruction code and the instruction inverse code; creating a boot code field according to the value of the boot code; creating an end code field according to the value of the end code; acquiring the logic level of the data bit, and creating a logic field according to the value of the logic level; and creating an address code field according to the value of the address code.
Further, searching an instruction corresponding to each key name from the instruction code; carrying out the binary conversion on the instruction corresponding to each key name to obtain a second character string corresponding to each key name; and creating a key field according to each key name and the second character string corresponding to each key name.
Taking the brand remote controller code as an example, the coding rule of each field is described as follows:
1. rule field (rule): the system consists of a guide code (start), a 4-bit address code (add), a 4-bit address inverse code (comadd), an 8-bit instruction code (cmd), an 8-bit instruction inverse code (comcmd) and an end code (end), and mainly comprises the following two modes according to different ordering sequences:
a. boot code (start) +4-bit address (add) +8-bit instruction (cmd) +4-bit address counter code (comadd) +8-bit instruction counter code (comcmd) +end code (end), which may be stored as: "springs" start+add+cmd+comadd+comcmd+end "
b. Boot code (start) +4-bit address (add) +4-bit address inverse (comadd) +8-bit instruction (cmd) +8-bit instruction inverse (comcmd) +end code (end), which may be stored as: "rules" start+add+comadd+cmd+comcmd+end ".
2. Guide code field: "start": { "h": n, "l": m }, where n fills out the high level duration in us; wherein m fills in the low level duration in us; the pilot code is 4000us signal (high level) +4000us space (low level) in the remote control as described above, which stores "start": { "h":4000, "l":4000}.
3. End code field: "end" is k, where k fills in the high-level duration in us; the end code is 500us signal (high level) in the remote control, and the stored information is "end" 500.
4. Logical field: logic 1: "1": { "h": n ":" l ": m }, where n fills out the high level duration in us; wherein m fills in the low level duration in us; as in the remote control described above, a logic 1 is a 500us signal (high) +1900us space (low), which stores "1": { "h":500, "l":1900}; logic 0: "0": { "h": n ":" l ": m }, where n fills out the high level duration in us; wherein m fills in the low level duration in us; the logic 1 in the remote control as described above is a 500us signal (high) +900us space (low), which stores "0": { "h":500, "l":900}.
5. Address code field: the fixed value is "add" to x, wherein x is a character string converted from hexadecimal value, and if the address code in the remote control is 1111 and the hexadecimal value is F, the stored information is "add" to "F".
6. Key field: the remote controller comprises key names supported by the remote controller and character strings corresponding to the key names, wherein [ { "key X": "key CodeX" }, { "key Y": "key CodeY" }, …, { "key Z": "key CodeZ" }, keyX, keyY, keyZ and the like are key names, keyCodeX, keyCodeY, keyCodeZ is a character string converted by hexadecimal instruction values corresponding to the key names, for example, an UP key is 0x59, a DOWN key is 0x58, … and a POWER key is 0x2A, and codes are "key": { "UP": "59" }, { "DOWN": "58" }, …, { "POWER": "2A" } ].
7. Hostname field to distinguish remote control of different televisions: "name": xxxx, where xxxx corresponds to the name of the model, such as "name": RT51-EU-TV ".
S23: and coding according to the coding rule to obtain the JSON character string.
It is easy to understand that the JSON string refers to a string in JSON format, and the above fields are encoded into the JSON string, examples are as follows:
correspondingly, after the application software scans the identification information, a JSON string can be obtained and parsed according to the coding rules agreed above:
the field name is analyzed, and the host name can be displayed on a display interface;
analyzing a field 'rule' to obtain a coding rule of start+add+cmd+comadd+comcmd+end;
analyzing a field 'start' to obtain a guide code of 4000us high level and 4000us low level;
resolving the field end to obtain the end code of 500us high level;
resolving a field '1', and obtaining a logic 1 code of 500us high level and 1900us low level;
resolving a field '0', and obtaining a logic 0 code of 500us high level and 900us low level;
resolving the field 'add', obtaining the 16-system code of the address code as F, and converting the 16-system code into the 1111-system code;
the field 'key' is analyzed to obtain a key list, the 16-system value of the instruction of each key is obtained, a display interface of the corresponding remote controller is generated, and the display interface contains the information of the supported key names. Such as those supporting UP, DOWN, POWER, an interface for these several keys is generated on the application software.
When the user clicks the button, the application software sends an infrared signal according to the infrared code corresponding to the button, for example, when the user clicks the UP button, an infrared code signal with a command of 59 (converted into a binary system of 01011001) is sent, so that the television can realize the function corresponding to the UP button according to the infrared code signal with the command of 59.
In the embodiment, the guide code, the data bit and the end code are obtained by analyzing the infrared coding information; establishing a coding rule according to the guide code, the data bit and the end code; and coding according to the coding rule to obtain the JSON character string. The method has the advantages that information loss is effectively avoided by encoding according to specific elements of the infrared encoding information, the infrared encoding information is converted into the JSON character string, the implementation mode is simple, and the recognition cost of the infrared encoding information is reduced.
The invention further provides an infrared encoding processing system.
Referring to fig. 4, fig. 4 is a functional schematic diagram of an embodiment of an infrared encoding processing system according to the present invention.
In this embodiment, the infrared encoding processing system includes the application software 10 and the television 20 as described above; the application software 10 is configured to obtain the first string by reading the identification information, decode the first string to obtain the infrared coding information and key name information, and store the infrared coding information and the key name information in correspondence.
Further, the application software 10 is further configured to generate a virtual remote control interface corresponding to the remote controller according to the key name information.
Further, the application software 10 is further configured to output infrared coding information corresponding to a key when the key of the virtual remote control interface is triggered externally, so that the television 20 realizes the function corresponding to the key according to the infrared coding information.
It should be understood that the application software 10 automatically generates the corresponding virtual remote control interface by scanning the identification information of the electrical equipment 20, analyzing the supported keys, and storing the infrared coding information corresponding to the keys. After the user clicks the button of the interface, the infrared code is sent according to the stored infrared code information to finish the infrared remote control transmitting operation.
As an embodiment, after the application software 10 reads the identification information, JSON strings may be obtained and parsed according to the coding rules agreed above:
the field name is analyzed, and the host name can be displayed on a display interface;
analyzing a field 'rule' to obtain a coding rule of start+add+cmd+comadd+comcmd+end;
analyzing a field 'start' to obtain a guide code of 4000us high level and 4000us low level;
resolving the field end to obtain the end code of 500us high level;
resolving a field '1', and obtaining a logic 1 code of 500us high level and 1900us low level;
resolving a field '0', and obtaining a logic 0 code of 500us high level and 900us low level;
resolving the field 'add', obtaining the 16-system code of the address code as F, and converting the 16-system code into the 1111-system code;
the field 'key' is analyzed to obtain a key list, the 16-system value of the instruction of each key is obtained, a display interface of the corresponding remote controller is generated, and the display interface contains the information of the supported key names. Such as those supporting UP, DOWN, POWER, an interface for these several keys is generated on the application software.
When the user clicks the button, the application software 10 sends an infrared signal according to the infrared code corresponding to the button, for example, when clicking the UP button, an infrared code signal with a command of 59 (converted into a binary system of 01011001) is sent, so that the television 20 realizes the function corresponding to the UP button according to the infrared code signal with the command of 59.
According to the embodiment, the infrared coding information of the remote controller is coded in the preset format, the finally generated first character string in the preset format is embodied in the form of the identification information which can be identified by the application software, the application software can directly acquire the infrared coding information and control the electrical equipment by scanning and analyzing the identification information, the technical problem that the efficiency of acquiring the remote control infrared coding information by the application software is low is solved, the implementation cost is low, the operability is high, and the user experience is enhanced.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores an infrared coding processing program, and the infrared coding processing program realizes the following operations when being executed by a processor:
acquiring infrared coding information of a remote controller;
encoding the infrared encoding information to obtain a first character string with a preset format;
encoding the first character string to obtain identification information for reading by application software; wherein the identification information corresponds to the infrared coding information one by one.
Further, the infrared encoding process, when executed by the processor, further performs the following operations:
analyzing the infrared coding information to obtain a guide code, data bits and an end code;
establishing a coding rule according to the guide code, the data bit and the end code;
and coding according to the coding rule to obtain the JSON character string.
Further, the infrared encoding process, when executed by the processor, further performs the following operations:
creating a rule field, a guide code field, an end code field, a logic field and an address code field according to the guide code, the end code, the address code, the instruction code and the instruction code in the data bits;
acquiring a host name corresponding to the remote controller, and creating a host name field according to the host name;
and acquiring a key name of the remote controller, and creating a key field according to the key name and the instruction code.
Further, the infrared encoding process, when executed by the processor, further performs the following operations:
creating a rule field according to the arrangement sequence of the guide code, the end code, the address code, the instruction code and the instruction code;
creating a boot code field according to the value of the boot code;
creating an end code field according to the value of the end code;
acquiring the logic level of the data bit, and creating a logic field according to the value of the logic level;
and creating an address code field according to the value of the address code.
Further, the infrared encoding process, when executed by the processor, further performs the following operations:
searching an instruction corresponding to each key name from the instruction code;
carrying out the binary conversion on the instruction corresponding to each key name to obtain a second character string corresponding to each key name;
and creating a key field according to each key name and the second character string corresponding to each key name.
Further, the infrared encoding process, when executed by the processor, further performs the following operations:
and encoding the first character string according to a two-dimensional code encoding rule to obtain a two-dimensional code for reading by application software.
The embodiment obtains the infrared coding information of the remote controller; encoding the infrared encoding information to obtain a first character string in a preset format; encoding the first character string to obtain identification information for reading by application software; the identification information corresponds to the infrared coding information one by one. The method comprises the steps of encoding infrared coding information of remote control keys in a preset format, converting the obtained character string into identification information which can be identified by application software, directly obtaining the infrared coding information through analysis after the application software identifies the identification information, and solving the problem of low efficiency of the application software in obtaining the remote control infrared coding information.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (9)
1. The infrared coding processing method is characterized by comprising the following steps of:
acquiring infrared coding information of a remote controller;
encoding the infrared encoding information to obtain a first character string with a preset format;
the step of encoding the infrared encoding information to obtain a first character string in a preset format includes:
analyzing the infrared coding information to obtain a guide code, data bits and an end code;
establishing a JSON coding rule according to the guide code, the data bit and the end code, wherein rule fields of the JSON coding rule are sequentially ordered according to the sequence of the guide code, the data bit and the end code;
wherein the encoding rule includes: a guide code coding rule, an end code coding rule, a logic bit coding rule and an address code coding rule;
the step of establishing a JSON coding rule according to the pilot code, the data bit and the end code includes:
establishing the guide code coding rule: "start": { "h": n, "l": m }, wherein n fills in the high level duration of the pilot code in us units, and m fills in the low level duration of the pilot code in us units;
establishing the end code encoding rule: "end" k, wherein k fills in the high level duration of the end code in us;
establishing the logic bit coding rule: "1": { "h": n, "l": m } or "0": { "h": n, "l": m }, wherein n fills in the high level duration of the logical bits in the data bits, in us units, and m is the low level duration of the logical bits in the data bits, in us units;
establishing the address code coding rule: an "add" x, where x fills in a string that converts the address code to a hexadecimal value;
creating a rule field, a guide code field, an end code field, a logic field and an address code field according to the guide code, the end code, the address code, the instruction code and the instruction code in the data bits;
coding according to the JSON coding rule to obtain a JSON character string;
encoding the first character string to obtain identification information for reading by application software; wherein the identification information corresponds to the infrared coding information one by one.
2. The method of processing infrared codes according to claim 1, wherein said step of establishing a coding rule based on said pilot code, said data bits and said end code comprises:
acquiring a host name corresponding to the remote controller, and creating a host name field according to the host name;
and acquiring a key name of the remote controller, and creating a key field according to the key name and the instruction code.
3. The method of processing infrared codes according to claim 2, wherein said creating rule fields, boot code fields, end code fields, logical fields, and address code fields from said boot code, said end code, address codes in said data bits, address code, instruction codes, and instruction code, comprises:
creating a rule field according to the arrangement sequence of the guide code, the end code, the address code, the instruction code and the instruction code;
creating a boot code field according to the value of the boot code;
creating an end code field according to the value of the end code;
acquiring the logic level of the data bit, and creating a logic field according to the value of the logic level;
and creating an address code field according to the value of the address code.
4. The method of processing infrared codes according to claim 2, wherein said creating a key field from said key name and said instruction code comprises:
searching an instruction corresponding to each key name from the instruction code;
carrying out the binary conversion on the instruction corresponding to each key name to obtain a second character string corresponding to each key name;
and creating a key field according to each key name and the second character string corresponding to each key name.
5. The method of processing infrared codes according to any one of claims 1 to 4, wherein said step of encoding said first character string to obtain identification information for application software reading comprises:
and encoding the first character string according to a two-dimensional code encoding rule to obtain a two-dimensional code for reading by application software.
6. A television set, the television set comprising: a memory, a processor and an infrared-encoded processing program stored on the memory and executable on the processor, the infrared-encoded processing program configured to implement the steps of the infrared-encoded processing method of any of claims 1 to 5.
7. An infrared-encoded processing system, comprising application software and the television set of claim 6; wherein,,
the application software is used for obtaining the first character string by reading the identification information, decoding the first character string to obtain the infrared coding information and the key name information, and storing the infrared coding information and the key name information correspondingly.
8. The infrared-coded processing system of claim 7, wherein the application software is further configured to generate a virtual remote control interface corresponding to the remote control according to the key name information.
9. The infrared-coded processing system of claim 8, wherein the application software is further configured to output infrared-coded information corresponding to a key of the virtual remote control interface when the key is triggered externally, so that the television realizes a function corresponding to the key according to the infrared-coded information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010617192.6A CN111757157B (en) | 2020-06-30 | 2020-06-30 | Processing method of infrared codes, television and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010617192.6A CN111757157B (en) | 2020-06-30 | 2020-06-30 | Processing method of infrared codes, television and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111757157A CN111757157A (en) | 2020-10-09 |
CN111757157B true CN111757157B (en) | 2023-06-23 |
Family
ID=72678367
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010617192.6A Active CN111757157B (en) | 2020-06-30 | 2020-06-30 | Processing method of infrared codes, television and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111757157B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113938732A (en) * | 2021-10-18 | 2022-01-14 | 深圳创维-Rgb电子有限公司 | Remote controller command execution method, device, equipment and storage medium |
CN114120617B (en) * | 2021-11-29 | 2022-12-09 | 珠海格力电器股份有限公司 | Method and device for encoding infrared signal of remote controller |
CN115793518B (en) * | 2022-11-08 | 2024-03-19 | 深圳市矽昊智能科技有限公司 | Method, device, equipment and readable storage medium for obtaining universal remote control coding information |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN204087454U (en) * | 2014-04-02 | 2015-01-07 | 薛峻杰 | There is the mobile communication device of distant control function |
CN110992672A (en) * | 2019-09-25 | 2020-04-10 | 广州广日电气设备有限公司 | Infrared remote controller learning and encoding method, infrared remote controller system and storage medium |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100311483B1 (en) * | 1999-11-30 | 2001-10-18 | 구자홍 | remote control system and method of the same |
US8463128B2 (en) * | 2010-12-31 | 2013-06-11 | Openpeak Inc. | Translation of raw formatted infrared codes |
CN105404167A (en) * | 2015-09-30 | 2016-03-16 | 北京清川科技有限公司 | Cloud platform, two dimension-based intelligent household electrical appliance control system and method |
CN105812875A (en) * | 2016-03-18 | 2016-07-27 | 深圳Tcl数字技术有限公司 | Infrared self-adaptive remote control method and device |
CN106297264A (en) * | 2016-08-31 | 2017-01-04 | 杭州赫智电子科技有限公司 | The coded method of the multiple ultra-red order of a kind of compatibility and system |
CN106530669A (en) * | 2016-10-19 | 2017-03-22 | 青岛海信电器股份有限公司 | Centralized control method of electric equipment system, master control device and system |
CN106448128B (en) * | 2016-10-26 | 2020-03-06 | 青岛海信电器股份有限公司 | Infrared remote control data processing method and system |
CN111225258A (en) * | 2020-01-09 | 2020-06-02 | 京东方科技集团股份有限公司 | Display apparatus and control method thereof |
-
2020
- 2020-06-30 CN CN202010617192.6A patent/CN111757157B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN204087454U (en) * | 2014-04-02 | 2015-01-07 | 薛峻杰 | There is the mobile communication device of distant control function |
CN110992672A (en) * | 2019-09-25 | 2020-04-10 | 广州广日电气设备有限公司 | Infrared remote controller learning and encoding method, infrared remote controller system and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111757157A (en) | 2020-10-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111757157B (en) | Processing method of infrared codes, television and system | |
CN106598574B (en) | Page rendering method and device | |
CN103237058B (en) | The learning method of infrared control | |
KR101130201B1 (en) | Log-in method using a image-code, and terminal thereof | |
CN107562878B (en) | Household appliance control method, electronic device and computer readable storage medium | |
US20080165035A1 (en) | Method and System for Customizing Keyboard Map Variants | |
CN103596021A (en) | Account login method, device and system of intelligent television | |
US20170331492A1 (en) | Data Processing Method and Device | |
US11620469B2 (en) | Bar code generation scanning, and display method, apparatus, storage medium, and electronic device | |
CN111130958A (en) | Data transmission method and device, electronic equipment and storage medium | |
CN108039173B (en) | Voice information input method, mobile terminal, system and readable storage medium | |
CN111460849B (en) | Method compatible with multiple sets of code setting and code scanning equipment | |
CN108320740B (en) | Voice recognition method and device, electronic equipment and storage medium | |
CN111475785A (en) | Information acquisition method and device, computer equipment and storage medium | |
CN102486792B (en) | Method and system for reorganizing and displaying universal forum page | |
EP1936578A2 (en) | Terminal apparatus, electronic apparatus and multi-byte character code transmission system | |
KR20010100414A (en) | Method of connecting to internet contents provider by reading bar code | |
CN102087550B (en) | Hardware equipment as well as method and system for inputting therein | |
US20200293333A1 (en) | Electronic device, application execution system, and control method therefor | |
CN110765097A (en) | Data processing method and device, computer storage medium and electronic equipment | |
JP4773761B2 (en) | Information search server, information search method, information search program | |
CN105740343A (en) | Searching method and device | |
CN112380828A (en) | PDF document generation method and device, storage medium and electronic equipment | |
KR100946666B1 (en) | Method and apparatus for external input by using user device | |
CN110688859A (en) | Semantic analysis method, device, medium and electronic equipment based on machine learning |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |