Data communication method and device applied to universal remote controller, equipment and medium
By sending Bluetooth key values to the set-top box in the universal remote control, obtaining infrared waveform code values and using preset compression algorithms to extract features, the problem of high storage capacity of the universal remote control is solved, efficient data transmission and compatibility are achieved, and resources are reduced Overhead.
Patent Information
- Application Number
- CN202411679084.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The existing universal remote control has high storage capacity requirements, poor response speed and brand compatibility, especially the Bluetooth infrared remote control has high requirements for storage space and data analysis, and has a large resource overhead.
By sending Bluetooth key values to the set-top box, obtaining infrared waveform code values, and using preset infrared compression algorithms to extract waveform data characteristics, combine them into target infrared waveform code values, reduce data transmission volume, improve efficiency, and achieve storage compatibility and analytical compatibility .
It greatly reduces the storage capacity requirements of universal remote control, improves data transmission efficiency, and realizes storage and parsing compatibility of different infrared protocol code values.
Smart Images

Figure CN119181231A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of universal remote controllers, and in particular to a data communication method, device, equipment and medium applied to a universal remote controller. Background Art
[0002] At present, universal remote controls on the market mainly include pure infrared universal remote controls and Bluetooth infrared remote controls. Ordinary pure infrared universal remote controls use a multi-code simultaneous transmission method, which requires the storage of a large number of code values to meet the remote control needs of multiple devices. They have many disadvantages, such as high storage capacity requirements, insufficient response speed, poor brand compatibility, and poor anti-interference ability. Bluetooth infrared remote controls can improve brand compatibility and response speed, but the inherent infrared code value and encoding format storage put forward higher requirements on the storage space, Bluetooth data capacity, and unpacking operations of the receiving end. In addition, the RAM space required for single-packet processing and data analysis of the remote control also generates greater resource overhead due to the different infrared encoding formats. Summary of the invention
[0003] The present application provides a data communication method, device, equipment and medium applied to a universal remote control to solve the technical problem that the current universal remote control has high requirements for storage capacity.
[0004] In order to solve the above technical problems, in a first aspect, the present application provides a data communication method applied to a universal remote controller, wherein the universal remote controller is communicatively connected with a set-top box and a controlled device, and the method comprises: Sending a Bluetooth key value to the set-top box to obtain an infrared waveform code value returned by the set-top box; Using a preset infrared compression algorithm, extracting waveform data features of the infrared waveform code value, the waveform data features including the number of waveform data, a waveform data dictionary, the number of data code waveforms, a data code waveform description, a data repetition description bit and a repetition code waveform description; Combining the waveform data features to obtain a target infrared waveform code value; The target infrared waveform code value is sent to the controlled device.
[0005] In some embodiments, the extracting of the waveform data features of the infrared waveform code value by using a preset infrared compression algorithm includes: Extracting a waveform data dictionary of the infrared waveform code value based on the waveform value of the infrared waveform code value; According to a first preset data format, based on the waveform data dictionary, counting the number of waveform data of the infrared waveform code value; According to a second preset data format, based on the waveform data dictionary and the number of bits and the continuous relationship of the waveform value, the infrared waveform code value is waveform described to obtain a data code waveform description and a repetition code waveform description of the infrared waveform code value; Generating the number of data code waveforms of the infrared waveform code value based on the data code waveform description and the preset data protocol according to a third preset data format; According to a fourth preset data format, based on the repetitive code waveform description, a data repetition description bit of the infrared waveform code value is generated.
[0006] In some embodiments, the waveform value based on the infrared waveform code value, extracting the waveform data dictionary of the infrared waveform code value, includes: From all waveform values of the infrared waveform code value, two first waveform values with a first preset number of bytes and the highest frequency of use are selected as the front section of the waveform data dictionary; Using a second waveform value having a byte number equal to a first preset byte number and a usage frequency subsequent to the first waveform value as the middle section of the waveform data dictionary; The third waveform value having a byte number equal to the second preset byte number is used as the latter part of the waveform data dictionary.
[0007] In some embodiments, counting the number of waveform data of the infrared waveform code value according to the first preset data format and based on the waveform data dictionary includes: Classifying the waveform data dictionary based on the waveform length of the waveform value in the waveform data dictionary to obtain multiple waveform types; Counting the number of waveform values corresponding to each waveform type in the waveform data dictionary; According to the first preset data format, the number of waveform values is generated as the number of waveform data.
[0008] In some embodiments, the infrared waveform code value is waveform described according to the second preset data format based on the waveform data dictionary and the number of bits and the continuous relationship of the waveform value to obtain the data code waveform description and the repetition code waveform description of the infrared waveform code value, including: Determine the binary number of each waveform value in the infrared waveform code value based on the waveform data dictionary and the number of bits of the waveform value according to the second preset data format; Based on the continuous relationship between the waveform data, the continuous binary numbers are spliced to obtain a plurality of binary codes, wherein the continuous relationship is the continuous relationship preset in the second preset data format; Each of the binary codes is converted to obtain a data code waveform description and a repetition code waveform description.
[0009] In some embodiments, the generating the number of data code waveforms of the infrared waveform code value according to the third preset data format based on the data code waveform description and the preset data protocol includes: Determine the number of bytes corresponding to the data code waveform description; Based on the data code waveform description, determining a data code repetition state of the infrared waveform code value; Based on the preset data protocol, determining a repetition code state of the infrared waveform code value; According to the third preset data format, data conversion is performed on the number of bytes described by the data code waveform, the data code repetition state and the repetition code state to obtain the number of data code waveforms.
[0010] In some embodiments, generating the data repetition description bit of the infrared waveform code value based on the repetition code waveform description according to the fourth preset data format includes: Based on the repetitive code waveform description, determining the number of bytes corresponding to the repetitive code waveform description, and determining the data code repetition state of the infrared waveform code value; According to the fourth preset data format, data conversion is performed on the number of bytes described by the repetition code waveform and the data code repetition state to obtain the data repetition description bit.
[0011] In a second aspect, the present application further provides a data communication device applied to a universal remote controller, wherein the universal remote controller is communicatively connected with a set-top box and a controlled device, and the device comprises: A first sending module, used for sending a Bluetooth key value to the set-top box to obtain an infrared waveform code value returned by the set-top box; An extraction module, used to extract waveform data features of the infrared waveform code value by using a preset infrared compression algorithm, wherein the waveform data features include the number of waveform data, a waveform data dictionary, the number of data code waveforms, a data code waveform description, a data repetition description bit, and a repetition code waveform description; A combination module, used for combining the waveform data features to obtain a target infrared waveform code value; The second sending module is used to send the target infrared waveform code value to the controlled device.
[0012] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the data communication method applied to the universal remote control as described above is implemented.
[0013] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the data communication method applied to a universal remote controller as described above.
[0014] Compared with the prior art, this application has at least the following beneficial effects: By acquiring the infrared waveform code value of the controlled device from the set-top box, the receiving end only needs to store a set of code values of the controlled device, and the universal remote control does not need to store the code value, which greatly reduces the requirement for storage capacity; at the same time, the infrared waveform code value is feature extracted and feature combined through a preset infrared compression algorithm, so that data compression can be performed using data features such as the number of waveform data of the infrared waveform code value, the waveform data dictionary, the number of data code waveforms, the data code waveform description, the data repetition description bit and the repetition code waveform description, etc., to effectively reduce the data transmission amount required for the data communication process of the universal remote control, improve data transmission efficiency, and use a set of preset infrared compression algorithms to achieve storage compatibility and parsing compatibility of different infrared protocol code values. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic flow chart of a data communication method applied to a universal remote controller according to an embodiment of the present application; Figure 2 A schematic diagram of a specific process of step S102 shown in an embodiment of the present application; Figure 3 A schematic diagram of a first preset data format shown in an embodiment of the present application; Figure 4 A schematic diagram of a second preset data format shown in an embodiment of the present application; Figure 5 A schematic diagram of a third preset data format shown in an embodiment of the present application; Figure 6 A schematic diagram of a fourth preset data format shown in an embodiment of the present application; Figure 7 A schematic diagram of the data format of the target infrared waveform code value shown in an embodiment of the present application; Figure 8 This is a schematic diagram of the structure of a data communication device applied to a universal remote controller according to an embodiment of the present application; Fig. 9 This is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0016] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0017] Please refer to Figure 1 , Figure 1 The flowchart of a data communication method applied to a universal remote controller provided in an embodiment of the present application is shown in FIG. The universal remote controller in an embodiment of the present application is connected to a set-top box and a controlled device, and the controlled device is a television or other device that communicates with the set-top box. Figure 1 As shown, the data communication method applied to the universal remote controller of this embodiment includes steps S101 to S104, which are described in detail as follows: Step S101, sending a Bluetooth key value to the set-top box to obtain an infrared waveform code value returned by the set-top box.
[0018] In this step, the set-top box stores the infrared waveform code value of the controlled device. Taking a television as an example, the controlled device is a set of infrared waveform code values of the television set a. The universal remote control is connected to the set-top box A via Bluetooth, and sends a Bluetooth key value to the set-top box A to obtain the infrared waveform code value returned by the set-top box A according to the Bluetooth key value, thereby performing infrared communication with the television set a according to the infrared waveform code value; when the universal remote control controls the television set b, the universal remote control obtains a set of infrared waveform code values of the television set b stored by the set-top box B. It can be seen that the universal remote control does not need to store multiple infrared protocol code values, but only needs to have enough storage capacity to store a set of infrared waveform code values. The set-top box as a receiving end only needs to store a set of infrared waveform code values of the television set it controls, thereby greatly reducing the storage capacity requirements of the remote control and the receiving end.
[0019] Step S102, using a preset infrared compression algorithm to extract waveform data features of the infrared waveform code value, the waveform data features include waveform data number, waveform data dictionary, data code waveform number, data code waveform description, data repetition description bit and repetition code waveform description.
[0020] In this embodiment, the waveform data dictionary is used to characterize the types of waveform values used in the infrared waveform code value, the number of waveform data is used to characterize the number of waveform value types recorded in the waveform data dictionary, the data code waveform description is used to characterize the data code waveform after the infrared waveform code value is compressed, the repetition code waveform description is used to characterize the repetition code waveform after the infrared waveform code value is compressed, the number of data code waveforms is used to characterize the length of the data code waveform and whether it is repeated, and the data repetition description bit is used to characterize the length of the repetition code waveform and whether it is repeated. This embodiment extracts features from the infrared waveform code value by using a preset infrared compression algorithm, so that data compression and data encryption can be performed during feature extraction, thereby reducing the amount of data and improving data security.
[0021] Step S103, combining the waveform data features to obtain a target infrared waveform code value.
[0022] In this step, the number of waveform data, the waveform data dictionary, the number of data code waveforms, the data code waveform description, the data repetition description bit and the repetition code waveform description are sequentially spliced to obtain the target infrared waveform code value.
[0023] Step S104: sending the target infrared waveform code value to the controlled device.
[0024] In this step, the universal remote controller sends the compressed infrared waveform code value to the controlled device, and the controlled device parses the target infrared waveform code value to perform a corresponding operation.
[0025] In some embodiments, Figure 2 As shown, the step 102 includes steps S1021 to S1025, which are described in detail as follows: Step S1021 , extracting a waveform data dictionary of the infrared waveform code value based on the waveform value of the infrared waveform code value.
[0026] In this step, the waveform data dictionary is extracted to extract all waveform values used by the infrared waveform code value, so as to facilitate further feature extraction of the infrared waveform code value by other data features.
[0027] Optionally, from all waveform values of the infrared waveform code value, two first waveform values whose byte number is the first preset byte number and whose usage frequency is the highest are screened out as the front part of the waveform data dictionary; the second waveform value whose byte number is the first preset byte number and whose usage frequency is after the first waveform value is used as the middle part of the waveform data dictionary; and the third waveform value whose byte number is the second preset byte number is used as the back part of the waveform data dictionary.
[0028] In this optional embodiment, the preset infrared compression algorithm for the waveform data dictionary is: fill in all waveform values to be used for the infrared waveform code value; place the waveform value with the highest frequency of use and 2Bytes in the first two digits of the waveform data dictionary, represented by 2bits (00 / 01), and other dictionaries are represented by 4bits, with the highest bit marking position 1, 0B10, 0B11 and 0B1111 are all invalid dictionary identifiers.
[0029] For example, taking the NEC waveform value uPD6121G (hereinafter referred to as sample data) as an example, its waveform data is as follows: 9000,4500,560,1680,560,560,560,560,560,560,560,560,560,560,1680,560,560,560,560,560,560,560,560,1680,560,560,560,560,1680,560,1680,560,1680,560,560,1680,560,1680,560,560,1680,560,560,1680,560,5 60,560,560,1680,560,1680,560,560,560,560,560,560,560,560,560,560,560,560,560,560,1680,560,560,560,560,560,1680,560,560,1680,560,1680,560,40180,9000,2250,560,96190.
[0030] Place the two 2-Byte waveform values with the highest frequency (560, 1680) at the front, followed by other 2-Byte waveform values (2250, 4500, 9000, 40180), and finally the 3-Byte waveform value (96190). The waveform data dictionary is: 560, 1680, 2250, 4500, 9000, 40180, 96190.
[0031] Step S1022: counting the number of waveform data of the infrared waveform code value based on the waveform data dictionary in accordance with a first preset data format.
[0032] In this step, since the waveform length of some waveform values is greater than 65535 and requires 3Bytes to support the waveform length, the waveform values are classified into 2Bytes waveform type (bit0-bit3: 0-9) and 3Bytes (bit4-bit7: 0-7) waveform type, and the total number of the two types of waveform types does not exceed 9. The first preset data format is as follows Figure 3 As shown, it includes reserved bits, the number of 2-Bytes waveform values, and the number of 3-Bytes waveform values.
[0033] Optionally, based on the waveform length of the waveform values in the waveform data dictionary, the waveform data dictionary is classified to obtain multiple waveform types; the number of waveform values corresponding to each waveform type in the waveform data dictionary is counted; and according to the first preset data format, the number of waveform values is generated as the number of waveform data.
[0034] In this optional embodiment, taking the above sample data as an example, the waveform data dictionary (560, 1680, 2250, 4500, 9000, 40180, 96190) is classified according to the waveform length of the waveform value, wherein 560, 1680, 2250, 4500, 9000, 40180 are all less than 65535, so they are classified as 2Bytes waveform type, a total of 6 2Bytes waveform types, that is, bit0-bit3 is 6 (binary number is 0b0110); 96190 is greater than 65535, so it is classified as 3Bytes waveform type, a total of 1 3Bytes waveform type, that is, bit4-bit6 is 1 (binary number is 0b0001), and the preset bit is 0. Therefore, according to the first preset data format, the number of waveform data is 22 (0d00010110).
[0035] Step S1023, in accordance with a second preset data format, based on the waveform data dictionary and the number of bits and the continuity relationship of the waveform value, the infrared waveform code value is waveform described to obtain a data code waveform description and a repetition code waveform description of the infrared waveform code value.
[0036] In this step, each 2-bit dictionary occupies two bits of space, and each 3-bit dictionary will take up four bits of space with the header "1"; when the 2-bit dictionary is used continuously, no bit padding is required; when the 2-bit dictionary is used discontinuously, a 0B11 low-bit padding operation is required; when the 3-bit dictionary is placed at the low address of the end byte as the end bit, a 0B1111 bit padding operation is required. The second preset data format is as follows Figure 4 As shown, waveform descriptions corresponding to different bit numbers and continuous relationships are included.
[0037] Optionally, according to the second preset data format, based on the waveform data dictionary and the number of bits of the waveform value, the binary number of each waveform value in the infrared waveform code value is determined; based on the continuous relationship between the waveform data, the continuous binary numbers are spliced to obtain multiple binary codes, and the continuous relationship is the continuous relationship preset in the second preset data format; each of the binary codes is converted to obtain a data code waveform description and a repetition code waveform description.
[0038] In this optional embodiment, taking the above sample data as an example, the first 12 bytes of the sample data are: 9000, 4500, 560, 1680, 560, 560. According to the waveform data dictionary and the second preset data format, 9000 is 0b1010, 4500 is 0b1001, 560 is 0b00, and 1680 is 0b01. Therefore, in combination with the second preset data format, 9000 and 4500 are 3 bits continuous. Bytes0 is 154 (binary number is 0b1001-1010), 560, 1680, 560, 560 are 2 bits continuous, then Bytes0 is 4 (binary number is 0b00-00-01-00), and so on. The complete data code waveform of the above sample data is described as: 154, 4, 0, 64, 0, 64, 68, 4, 68, 4, 68, 0, 0, 64, 0, 68, 68, 179.
[0039] The last 9 bytes of the above sample data are the waveform values of the repetition code 9000, 2250, 560, 96190. Similarly, the waveform description of the repetition code is 138, 195.
[0040] Step S1024: generating the number of data code waveforms of the infrared waveform code value according to a third preset data format based on the data code waveform description and a preset data protocol.
[0041] In this step, the third preset data format is as follows Figure 5 As shown, the number of bytes occupied by the data code waveform (bit0-bit5: 0-63Bytes); data code repeat enable bit (bit6): if this bit is 1, the data repetition description bit data code repetition count bit field is valid; if this bit is 0, the data repetition description bit data code repetition count bit field is invalid; repeat code enable flag bit (bit7): if this bit is 1, the data repetition description bit repeated waveform occupied byte number bit field is valid, and there is a repeated code waveform description segment; if this bit is 0, the data repetition description bit repeated waveform occupied byte number bit field is invalid, and there is no repeated code waveform description segment; if the above two bits are both 0, there is no data repetition description bit.
[0042] Optionally, determine the number of bytes corresponding to the data code waveform description; based on the data code waveform description, determine the data code repetition state of the infrared waveform code value; based on the preset data protocol, determine the repetition code state of the infrared waveform code value; and according to the third preset data format, perform data conversion on the number of bytes of the data code waveform description, the data code repetition state and the repetition code state to obtain the number of data code waveforms.
[0043] In this optional embodiment, taking the above-mentioned sample data as an example, according to the complete data code waveform description of the sample data, the data code waveform occupies 18 bytes, that is, bit0-bit5 is 18 (binary number is 0b010010), and according to the preset data protocol, if the data code in the sample data is not repeated, then bit6 is 0, and if there is a repeated code in the sample data, then bit7 is 1, so the number of data code waveforms is 146 (binary number is 0b10010010).
[0044] Step S1025: generating data repetition description bits of the infrared waveform code value based on the repetition code waveform description in accordance with a fourth preset data format.
[0045] In this step, the fourth preset data format is as follows Figure 6 As shown, data repetition times (3 bits): defines the number of times the data code waveform is repeated, with a minimum of 0 times and a maximum of 7 times; number of bytes occupied by the repeated code waveform (3 bits): the number of bytes occupied by the repeated code waveform, with a maximum of 7 bytes.
[0046] Optionally, based on the repetition code waveform description, the number of bytes corresponding to the repetition code waveform description and the data code repetition status of the infrared waveform code value are determined; according to the fourth preset data format, the number of bytes of the repetition code waveform description and the data code repetition status are converted to obtain the data repetition description bit.
[0047] In this optional embodiment, taking the above-mentioned sample data as an example, according to the repetition code waveform description of the sample data, the number of bytes occupied by the repetition code waveform is 2, that is, bit0-bit2 is 0b010, and the data code is not repeated, that is, bit3-bit5 is 0, and the reserved bit is 0, then the data repetition description bit is 2 (the binary number is 0b00000010).
[0048] For example, using Figure 7 The data format shown combines the data features to obtain the target infrared waveform code value: 22,560,1680,2250,4500,9000,40180,96190,146,154,4,0,64,0,64,68,4,68,4,68,0,0,64,0,68,68,179,2,138,195.
[0049] Obviously, compared with the sample data before compression (72Bytes), the compressed sample data (38Bytes) can greatly reduce the data volume of the infrared waveform code value.
[0050] As an example but not a limitation, take the waveform value M50560 as an example, before compression (114Bytes): 8500,4250,530,530,530,530,530,1590,530,530,530,1590,530,530,530,530,530,530,530,530,4250,530,1590,530,1590,530,1590,530,1590,530,1590,530 ,1590,530,530,530,530,530,530,530,17560,8500,4250,530,530,530,530,530,1590,530,530,530,1590,530,530,530,530,530,530,530,530,4250 ,530,1590,530,1590,530,1590,530,1590,530,1590,530,530,530,530,530,530,530,530,17560,8500,4250,530,530,530,530,530,530,1590,530,530,530 30,1590,530,530,530,530,530,530,530,4250,530,1590,530,1590,530,1590,530,1590,530,1590,530,530,530,530,530,530,530,530,17560,60000 After compression (24Bytes): As an example but not a limitation, take the waveform value DVB / Pan 7051 / SAMSUNG as an example, before compression (200Bytes): 3640,1800,380,380,380,1350,380,380,380,380,1350,380,380,380,380,380,1350,380,380,380,380,1350,380,380,380,1350,380,380,380,380,1350,380,380,380,380,1350,380,380,380,380,1 350,380,380,380,380,380,135 ... 0,380,380,380,380,1350,380,380,380,1350,380,380,380,1350,380,380,1350,380,380,380,1350,380,380,380,1350,380,380,380,380,1350,380,380,380,50000,3640,1800,380,380,380,1 350,380,380,380,1350,380,380,380,380,380,1350,380,380,380,380,1350,380,380,380,380,1350,380,380,380,380,380,1350,380,380,380,380,380,1350,380,380,380,380,380,380,1350,380,380,380,380,380,380 ,1350,380,1350,380,1350,380,1350,380,380,380,380,380,380,380,380,380,380,380,1350,380,1350,380,1350,380,1350,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380,380 0,380,380,380,380,1350,380,380,380,1350,380,380,380,1350,380,380,1350,380,380,380,1350,380,380,380,1350,380,380,380,380,1350,380,380,380,50000.
[0051] After compression (39Bytes): 5,380,1350,1800,3640,50000,26,137,64,64,0,4,4,68,0,4,4,64,68,4,0,64,68,4,0,0,4,4,68,4,4,4,163,8.
[0052] In order to execute the data communication method applied to the universal remote controller corresponding to the above method embodiment, so as to achieve the corresponding functions and technical effects. Figure 8 , Figure 8 The structural block diagram of a data communication device applied to a universal remote controller provided by an embodiment of the present application is shown. For the convenience of explanation, only the parts related to the present embodiment are shown. The data communication device applied to a universal remote controller provided by an embodiment of the present application includes: The first sending module 801 is used to send a Bluetooth key value to the set-top box to obtain an infrared waveform code value returned by the set-top box; An extraction module 802 is used to extract waveform data features of the infrared waveform code value by using a preset infrared compression algorithm, wherein the waveform data features include the number of waveform data, a waveform data dictionary, the number of data code waveforms, a data code waveform description, a data repetition description bit, and a repetition code waveform description; A combining module 803 is used to combine the waveform data features according to a preset data format to obtain a target infrared waveform code value; The second sending module 804 is used to send the target infrared waveform code value to the controlled device.
[0053] In some embodiments, the extraction module 802 includes: An extraction unit, configured to extract a waveform data dictionary of the infrared waveform code value based on the waveform value of the infrared waveform code value; A statistical unit, configured to count the number of waveform data of the infrared waveform code value based on the waveform data dictionary in accordance with a first preset data format; A description unit, configured to perform waveform description on the infrared waveform code value according to a second preset data format based on the waveform data dictionary and the number of bits and the continuous relationship of the waveform value, to obtain a data code waveform description and a repetition code waveform description of the infrared waveform code value; A first generating unit, configured to generate the number of data code waveforms of the infrared waveform code value according to a third preset data format, based on the data code waveform description and a preset data protocol; The second generating unit is used to generate a data repetition description bit of the infrared waveform code value based on the repetition code waveform description in accordance with a fourth preset data format.
[0054] In some embodiments, the extraction unit is specifically used to: From all waveform values of the infrared waveform code value, two first waveform values with a waveform length of a first preset number of bytes and the highest frequency of use are selected as the front section of the waveform data dictionary; Using a second waveform value having a waveform length of a first preset number of bytes and a usage frequency subsequent to the first waveform value as the middle section of the waveform data dictionary; A third waveform value whose waveform length is a second preset number of bytes is used as the latter part of the waveform data dictionary.
[0055] In some embodiments, the statistical unit is specifically used to: Classifying the waveform data dictionary based on the waveform length of the waveform value in the waveform data dictionary to obtain multiple waveform types; Counting the number of waveform values corresponding to each waveform type in the waveform data dictionary; According to the first preset data format, the number of waveform values is generated as the number of waveform data.
[0056] In some embodiments, the description unit is specifically used to: Determine the binary number of each waveform value in the infrared waveform code value based on the waveform data dictionary and the number of bits of the waveform value according to the second preset data format; Based on the continuous relationship between the waveform data, the continuous binary numbers are spliced to obtain a plurality of binary codes, wherein the continuous relationship is the continuous relationship preset in the second preset data format; Each of the binary codes is converted to obtain a data code waveform description and a repetition code waveform description.
[0057] In some embodiments, the first generating unit is specifically configured to: Determine the number of bytes corresponding to the data code waveform description; Based on the data code waveform description, determining a data code repetition state of the infrared waveform code value; Based on the preset data protocol, determining a repetition code state of the infrared waveform code value; According to the third preset data format, data conversion is performed on the number of bytes described by the data code waveform, the data code repetition state and the repetition code state to obtain the number of data code waveforms.
[0058] In some embodiments, the second generating unit is specifically configured to: Based on the repetitive code waveform description, determining the number of bytes corresponding to the repetitive code waveform description, and determining the data code repetition state of the infrared waveform code value; According to the fourth preset data format, data conversion is performed on the number of bytes described by the repetition code waveform and the data code repetition state to obtain the data repetition description bit.
[0059] The above-mentioned data communication device applied to a universal remote controller can implement the data communication method applied to a universal remote controller of the above-mentioned method embodiment. The optional items in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of the present application can refer to the contents of the above-mentioned method embodiment and will not be described in detail in this embodiment.
[0060] Fig. 9 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Fig. 9 As shown, the electronic device 9 of this embodiment includes: at least one processor 90 ( Fig. 9 Only one is shown in the figure), a memory 91, and a computer program 92 stored in the memory 91 and executable on the at least one processor 90, wherein the processor 90 implements the steps of any of the above method embodiments when executing the computer program 92.
[0061] The electronic device 9 may be a computing device such as a universal remote controller. The electronic device may include but is not limited to a processor 90 and a memory 91. Those skilled in the art will appreciate that Fig. 9 It is only an example of the electronic device 9 and does not constitute a limitation on the electronic device 9. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0062] The processor 90 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0063] In some embodiments, the memory 91 may be an internal storage unit of the electronic device 9, such as a hard disk or memory of the electronic device 9. In other embodiments, the memory 91 may also be an external storage device of the electronic device 9, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 9. Further, the memory 91 may also include both an internal storage unit of the electronic device 9 and an external storage device. The memory 91 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory 91 may also be used to temporarily store data that has been output or is to be output.
[0064] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0065] An embodiment of the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device implements the steps in the above-mentioned method embodiments when executing the computer program product.
[0066] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
[0067] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for an electronic device to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0068] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. A data communication method applied to a universal remote controller, characterized in that: The universal remote controller is communicatively connected with a set-top box and a controlled device, and the method comprises: Sending a Bluetooth key value to the set-top box to obtain an infrared waveform code value returned by the set-top box; Using a preset infrared compression algorithm, extracting waveform data features of the infrared waveform code value, the waveform data features including the number of waveform data, a waveform data dictionary, the number of data code waveforms, a data code waveform description, a data repetition description bit and a repetition code waveform description; Combining the waveform data features to obtain a target infrared waveform code value; The target infrared waveform code value is sent to the controlled device.
2. The data communication method applied to a universal remote controller according to claim 1, characterized in that: The method of extracting the waveform data features of the infrared waveform code value by using a preset infrared compression algorithm includes: Extracting a waveform data dictionary of the infrared waveform code value based on the waveform value of the infrared waveform code value; According to a first preset data format, based on the waveform data dictionary, counting the number of waveform data of the infrared waveform code value; According to a second preset data format, based on the waveform data dictionary and the number of bits and the continuous relationship of the waveform value, the infrared waveform code value is waveform described to obtain a data code waveform description and a repetition code waveform description of the infrared waveform code value; Generating the number of data code waveforms of the infrared waveform code value based on the data code waveform description and the preset data protocol according to a third preset data format; According to a fourth preset data format, based on the repetitive code waveform description, a data repetition description bit of the infrared waveform code value is generated.
3. The data communication method applied to a universal remote controller as claimed in claim 2, characterized in that: The waveform value based on the infrared waveform code value, extracting the waveform data dictionary of the infrared waveform code value, comprises: From all waveform values of the infrared waveform code value, two first waveform values with a first preset number of bytes and the highest frequency of use are selected as the front section of the waveform data dictionary; Using a second waveform value having a byte number equal to a first preset byte number and a usage frequency subsequent to the first waveform value as the middle section of the waveform data dictionary; The third waveform value having a byte number equal to the second preset byte number is used as the latter part of the waveform data dictionary.
4. The data communication method applied to a universal remote controller as claimed in claim 2, characterized in that: The step of counting the number of waveform data of the infrared waveform code value according to the first preset data format and based on the waveform data dictionary includes: Classifying the waveform data dictionary based on the waveform length of the waveform value in the waveform data dictionary to obtain multiple waveform types; Counting the number of waveform values corresponding to each waveform type in the waveform data dictionary; According to the first preset data format, the number of waveform values is generated as the number of waveform data.
5. The data communication method applied to a universal remote controller as claimed in claim 2, characterized in that: The step of performing waveform description on the infrared waveform code value according to the second preset data format based on the waveform data dictionary and the number of bits and the continuous relationship of the waveform value to obtain a data code waveform description and a repetition code waveform description of the infrared waveform code value includes: Determine the binary number of each waveform value in the infrared waveform code value based on the waveform data dictionary and the number of bits of the waveform value according to the second preset data format; Based on the continuous relationship between the waveform data, the continuous binary numbers are spliced to obtain a plurality of binary codes, wherein the continuous relationship is the continuous relationship preset in the second preset data format; Each of the binary codes is converted to obtain a data code waveform description and a repetition code waveform description.
6. The data communication method applied to a universal remote controller as claimed in claim 2, characterized in that: The step of generating the number of data code waveforms of the infrared waveform code value according to the third preset data format based on the data code waveform description and the preset data protocol includes: Determine the number of bytes corresponding to the data code waveform description; Based on the data code waveform description, determining a data code repetition state of the infrared waveform code value; Based on the preset data protocol, determining a repetition code state of the infrared waveform code value; According to the third preset data format, data conversion is performed on the number of bytes described by the data code waveform, the data code repetition state and the repetition code state to obtain the number of data code waveforms.
7. The data communication method applied to a universal remote controller as claimed in claim 2, characterized in that: The step of generating the data repetition description bit of the infrared waveform code value based on the repetition code waveform description according to the fourth preset data format includes: Based on the repetitive code waveform description, determining the number of bytes corresponding to the repetitive code waveform description, and determining the data code repetition state of the infrared waveform code value; According to the fourth preset data format, data conversion is performed on the number of bytes described by the repetition code waveform and the data code repetition state to obtain the data repetition description bit.
8. A data communication device applied to a universal remote controller, characterized in that: The universal remote controller is communicatively connected with a set-top box and a controlled device, and the device comprises: A first sending module, used for sending a Bluetooth key value to the set-top box to obtain an infrared waveform code value returned by the set-top box; An extraction module, used to extract waveform data features of the infrared waveform code value by using a preset infrared compression algorithm, wherein the waveform data features include the number of waveform data, a waveform data dictionary, the number of data code waveforms, a data code waveform description, a data repetition description bit, and a repetition code waveform description; A combination module, used for combining the waveform data features to obtain a target infrared waveform code value; The second sending module is used to send the target infrared waveform code value to the controlled device.
9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the data communication method applied to a universal remote controller is implemented as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It stores a computer program, and when the computer program is executed by a processor, the data communication method applied to a universal remote controller as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Set top box control method and system, television and storage medium
CN114257853A
Set top box control system
CN202353739U
Remote control transceiver and data communication system using the same
US20030027518A1
