Device control method, device, driver chip and storage medium
By detecting the voltage direction and proportional relationship of the power supply, the driver chip can efficiently control the LED equipment, solving the problems of low data transmission efficiency and poor quality in the prior art, and achieving more efficient and higher quality data transmission.
Patent Information
- Application Number
- CN202311788357.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2043-12-22
AI Technical Summary
The data transmission efficiency of existing driver chips is low, the data transmission quality is poor, and the logic is complex.
By real-time detection of the voltage direction of the power supply, the proportional relationship between the forward voltage duration and the negative voltage duration is obtained, the command value of the command data bit is determined, and the target lighting method is determined based on this value to control the operation of the device.
It improves the data transmission efficiency and quality of the driver chip, reduces the complexity of the data transmission logic, and avoids inefficiency and packet loss problems caused by performance defects in the data transmission module.
Smart Images

Figure CN118019172B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission and chip technology, and in particular to a device control method, device, driver chip and storage medium. Background Art
[0002] With the continuous development of science and technology, various functional chips have begun to appear in people's sight, and among them, driver chips for controlling LED (light-emitting diode) devices have also emerged.
[0003] The existing driver chip obtains the control instruction sent by the data sender through an independently configured data transmission module, and the main control unit then completes the function control of the LED device, such as the LED screen or LED lighting lamp, based on the control instruction.
[0004] However, the data transmission quality of such instruction transmission mode is limited by the performance of the data transmission module itself, and often has problems such as low transmission efficiency or high data packet loss rate, poor data transmission quality, and complex data transmission logic. Summary of the invention
[0005] The present invention provides a device control method, a device, a driver chip and a storage medium to solve the problems of low data transmission efficiency and poor data transmission quality of the driver chip.
[0006] According to one aspect of the present invention, there is provided a device control method, which is applied to a driver chip, comprising:
[0007] Detect the voltage direction of the power supply in real time, and obtain a first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle;
[0008] Determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship;
[0009] According to the instruction values of the first preset number of instruction data bits, a matching target lighting mode is determined, and a corresponding target device is operated according to the target lighting mode.
[0010] The method of determining a matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and operating the corresponding target device according to the target lighting mode, includes: determining a matching target lighting mode and a target device according to the instruction value of the first preset number of instruction data bits, and controlling the target device according to the target lighting mode. Compared with configuring the lighting modes of all devices connected to the current driver chip in the device control instruction, adding the device identification of the device to be controlled to the device control instruction realizes directional control of the specified device, avoids redundant control of devices that do not need to be operated, and reduces the amount of data transmitted.
[0011] Before determining the matching target lighting mode according to the instruction value of the first preset number of instruction data bits, it also includes: constructing a target chip identifier according to the instruction value of the second preset number of instruction data bits, and judging whether the target chip identifier is the same as the current driver chip identifier; the determination of the matching target lighting mode according to the instruction value of the first preset number of instruction data bits includes: if it is determined that the target chip identifier is the same as the current driver chip identifier, continuing to determine the matching target lighting mode according to the instruction value of the first preset number of instruction data bits. In this way, directional control for a specific driver chip is achieved, consistency of the instruction sending objects of the driver chip and the power supply is ensured, and the driver chip is prevented from responding incorrectly to irrelevant instructions.
[0012] The obtaining of the first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle specifically includes: obtaining the first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle, and the first numerical relationship between the positive voltage and the negative voltage; the determining of the matching target lighting mode according to the instruction value of the first preset number of instruction data bits specifically includes: determining the matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and determining the matching target device according to the first numerical relationship. In this way, directional control of different devices is achieved without increasing the instruction data bits, thereby improving the transmission efficiency of device control instructions.
[0013] The method of determining the matching target lighting mode according to the instruction value of the first preset number of instruction data bits also includes: determining the matching target data type according to the first numerical relationship; and determining the matching target lighting mode according to the target data type and the instruction value of the first preset number of instruction data bits. Compared with traditional binary data transmission, the multi-base data transmission method represented by the first numerical relationship between the positive voltage and the negative voltage greatly reduces the number of instruction data bits of the device control instruction and improves the transmission efficiency of the device control instruction.
[0014] After obtaining the voltage direction of the power supply in real time, the method further includes: obtaining the voltage waveform of the current detection cycle, and determining the matching target lighting mode according to the voltage waveform. The matching target lighting mode is determined by the voltage waveform, so that the transmission of the device control instruction is completed in only one detection cycle, which greatly improves the data transmission efficiency between the power supply and the driver chip.
[0015] After obtaining the voltage direction of the power supply in real time, it also includes: obtaining the voltage direction switching frequency in the current detection cycle, and determining the instruction value of the instruction data bit corresponding to the current detection cycle according to the voltage direction switching frequency. Compared with detecting the duration of the positive voltage and the negative voltage, for the detection of the voltage direction switching frequency, it is only necessary to detect the number of inflection points in the voltage change, which greatly reduces the amount of detection data of the driver chip and improves the efficiency of obtaining the instruction value.
[0016] According to one aspect of the present invention, there is provided a device control apparatus, which is applied to a driver chip, comprising:
[0017] A voltage direction acquisition module is used to detect the voltage direction of the power supply in real time and obtain a first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle;
[0018] An instruction value acquisition module, used to determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship;
[0019] The lighting mode acquisition module is used to determine a matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and operate the corresponding target device according to the target lighting mode.
[0020] According to another aspect of the present invention, a driver chip is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device control method described in any embodiment of the present invention.
[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device control method described in any embodiment of the present invention when executed.
[0022] The technical solution of the embodiment of the present invention, after obtaining the first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle, determines the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship, and then determines the matching target lighting mode, and controls the operation of the corresponding target device according to the target lighting mode, so that the driver chip realizes data transmission based on the change of the power supply voltage without the need to configure the data transmission module, avoids the performance defects of the data transmission module itself, and causes problems such as low data transmission efficiency or high data packet loss rate, thereby improving the data transmission efficiency and data transmission quality of the driver chip and reducing the complexity of the data transmission logic.
[0023] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1A is a schematic diagram of a scenario applicable to the device control method provided in an embodiment of the present invention;
[0026] Figure 1B is a flow chart of a device control method provided according to Embodiment 1 of the present invention;
[0027] Figure 1C is a schematic diagram of the direction of the positive voltage and the negative voltage provided according to the first embodiment of the present invention;
[0028] Figure 1D is a schematic diagram of a voltage waveform provided according to Embodiment 1 of the present invention;
[0029] Figure 1E is a schematic diagram of direction switching between a positive voltage and a negative voltage provided according to the first embodiment of the present invention;
[0030] Figure 2 is a flow chart of another device control method provided according to Embodiment 2 of the present invention;
[0031] Figure 3A is a flowchart of another device control method provided according to Embodiment 3 of the present invention;
[0032] Figure 3Bis another schematic diagram of the direction of the positive voltage and the negative voltage provided according to the third embodiment of the present invention;
[0033] Figure 3C is another schematic diagram of the direction of the positive voltage and the negative voltage provided according to the third embodiment of the present invention;
[0034] Figure 4 is a structural schematic diagram of a device control apparatus provided according to a fourth embodiment of the present invention;
[0035] Figure 5 It is a schematic diagram of the structure of a driver chip for implementing the device control method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] Figure 1A Schematic diagram of a scenario to which the device control method provided in an embodiment of the present invention is applicable; Figure 1AAs shown, the driver chip is connected to the power supply through two power interfaces based on a non-polarity wiring method, that is, the above two power interfaces are connected to the power supply through wires of the same color and without markings, so that the power supply and the driver chip are connected in series (or connected in parallel), so that the driver chip can work normally under both positive and reverse voltages, thereby avoiding safety hazards caused by incorrect power supply connection. The driver chip defines the voltage of the current flowing from one power interface to another power interface as a positive voltage, and the voltage of the current flowing from another current interface to the power interface is defined as a negative voltage.
[0039] When the power supply is supplying power to the outside, the power source of the energy storage device and the main control unit is the power supply; when the power supply transmits data by changing the voltage direction, during the interval time of the rising edge or falling edge, the power supply no longer supplies power to the driver chip, but the energy storage device supplies power to the main control unit; the power supply sends a device control instruction to the driver chip by changing the voltage direction, and the driver chip controls the operation of the target device in a target lighting mode according to the acquired device control instruction; wherein the driver chip can be connected to one or more devices, Figure 1A In the example, a driver chip is connected to four devices, namely device A, device B, device C and device D; the device may include LED devices such as LED screens or LED lighting lamps.
[0040] Embodiment 1
[0041] Figure 1B This is a flow chart of a device control method provided in the first embodiment of the present invention. This embodiment is applicable to the case where data is transmitted by changing the direction of voltage. The method can be executed by the device control device in the embodiment of the present invention. The device control device can be implemented in the form of hardware and / or software. The device control device can be configured in a driver chip. Figure 1B As shown, the method includes:
[0042] S101 , detecting the voltage direction of the power supply in real time, and obtaining a first proportional relationship between a positive voltage duration and a negative voltage duration in a current detection cycle.
[0043] The driver chip can configure one or more clock signals as a detection cycle, and detect the voltage direction of the power supply in each detection cycle; when the power supply is supplying power normally, since the size and direction of the alternating current change periodically with time, if it is detected in the current detection cycle that the power supply conforms to the above-mentioned periodic change law, it means that there is no transmission data in the current detection cycle, and there is no need to perform the acquisition operation of the first proportional relationship; if it is detected in the current detection cycle that the power supply does not conform to the above-mentioned periodic change law, it means that there is transmission data in the current detection cycle.
[0044] As shown in 1C, within a detection cycle T, the power supply first provides a forward voltage for time t1, and then provides a reverse voltage for time t2, and the ratio of the durations of t1 and t2 is two to one; or the power supply first provides a forward voltage for time t3, and then provides a reverse voltage for time t4, and the ratio of the durations of t3 and t4 is one to two; in particular, within a detection cycle, the voltage direction of the power supply may change multiple times, for example, from a positive voltage to a negative voltage, and then from a negative voltage to a positive voltage; therefore, within a detection cycle, the driver chip specifically records the cumulative duration of the forward voltage and the proportional relationship between the cumulative duration of the negative voltage.
[0045] S102: Determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship.
[0046] Different proportional relationships between the duration of the positive voltage and the duration of the negative voltage are configured in advance as different instruction values; and the driver chip can obtain an instruction value corresponding to an instruction data bit within a detection cycle; taking the transmission of binary data from the power supply to the driver chip as an example, for example, Figure 1C For example, if the ratio of the duration of the positive voltage to the duration of the negative voltage is two to one, it means that the instruction value of the current instruction data bit is "1"; if the ratio of the duration of the positive voltage to the duration of the negative voltage is one to two, it means that the instruction value of the current instruction data bit is "0". Therefore, the driver chip can determine the instruction value of the instruction data bit corresponding to the current detection cycle based on the mapping relationship between the above-mentioned ratio and the instruction value according to the first ratio relationship obtained.
[0047] In particular, there may be control errors when the power supply controls the change in voltage direction, and there may be detection errors when the driver chip detects the change in voltage direction. Therefore, the first proportional relationship between the positive voltage duration and the negative voltage duration in the current detection cycle may not be exactly equal to two to one or one to two, but there may be a certain calculation error. At this time, in the pre-configured proportional relationship, the instruction value corresponding to the proportional relationship closest to the first proportional relationship value is used as the instruction value obtained in the current detection cycle.
[0048] S103: Determine a matching target lighting mode according to the instruction values of the first preset number of instruction data bits, and operate a corresponding target device according to the target lighting mode.
[0049] The lighting mode may include at least one of brightness (for example, 0 to 255 levels, i.e., a total of 256 brightness levels), color (for example, red, orange, yellow, green, cyan, blue, purple or white, i.e., a total of 8 different colors) and state (for example, always on and flashing, i.e., a total of 2 different states); the first preset number is related to the number of optional parameters included in the lighting mode. The more optional parameters there are, the larger the value of the first preset number, i.e., a larger number of data bits are required to fully characterize the lighting mode of the device.
[0050] Taking the above technical solution as an example, 8 data bits can be used to represent 256 brightness levels, 4 data bits can be used to represent 8 colors, and 1 data bit can be used to represent the state, that is, a total of 13 data bits can be used to represent the lighting mode of a device. If the driver chip is connected to four devices in sequence, then by sequentially obtaining the instruction values of 52 (i.e., 13×4=52) instruction data bits, the complete device control instructions are obtained, and the operation of each device is completed sequentially or in parallel accordingly.
[0051] Taking the above technical solution as an example, for the device control instruction, a possible device control process includes the following operations: set device A to 120 levels of red light brightness, and display it in a flashing state; set device B to 112 levels of yellow light brightness, and display it in a constant light state; set device C to 150 levels of green light brightness, and display it in a flashing state; set device D to 220 levels of white light brightness, and display it in a constant light state.
[0052] Optionally, in an embodiment of the present invention, the matching target lighting mode is determined according to the instruction value of the first preset number of instruction data bits, and the corresponding target device is operated according to the target lighting mode, including: determining the matching target lighting mode and target device according to the instruction value of the first preset number of instruction data bits, and controlling the target device according to the target lighting mode.
[0053] Specifically, when the power supply issues a device control instruction, the device identification of the device to be controlled can be added to the device control instruction to achieve directional control of the specified device; taking the above technical solution as an example, if the driver chip is connected to four devices, the four devices can be distinguished by two data bits. At this time, 15 (i.e., 13+2=15) data bits are used to achieve directional control of the target device. Compared with configuring the lighting mode of all devices currently connected to the driver chip in the device control instruction, adding the device identification of the device to be controlled to the device control instruction achieves directional control of the specified device, avoids redundant control of devices that do not need to run, and reduces the amount of data transmitted.
[0054] Optionally, in an embodiment of the present invention, after obtaining the voltage direction of the power supply in real time, it also includes: obtaining the voltage waveform of the current detection cycle, and determining the matching target lighting mode according to the voltage waveform. Specifically, due to the diversity of voltage waveform changes, different voltage waveforms can be pre-configured for different lighting modes. The power supply can realize the transmission of device control instructions by continuously changing the voltage direction within a detection cycle. After the driver chip obtains the voltage waveform of the current detection cycle, it compares the similarity with each pre-configured voltage waveform to determine the device control instruction corresponding to the voltage waveform.
[0055] For example, Figure 1D The two voltage waveforms in the figure can be used to represent "red light with a brightness of 120 levels, displayed in a flashing state" and "yellow light with a brightness of 112 levels, displayed in a constantly lit state" respectively; the matching target lighting mode is determined by the voltage waveform, so that the transmission of device control instructions is completed within only one detection cycle, greatly improving the data transmission efficiency between the power supply and the driver chip.
[0056] Optionally, in an embodiment of the present invention, after obtaining the voltage direction of the power supply in real time, it also includes: obtaining the voltage direction switching frequency within the current detection cycle, and determining the instruction value of the instruction data bit corresponding to the current detection cycle according to the voltage direction switching frequency. Specifically, the switching frequency of the voltage direction, that is, the number of times the positive voltage is converted to the negative voltage, or the number of times the negative voltage is converted to the positive voltage, can compare the currently obtained voltage direction switching frequency with the preset frequency threshold. If the current voltage direction switching frequency is greater than or equal to the preset frequency threshold, the instruction value of the instruction data bit corresponding to the current detection cycle is determined to be "1"; if the current voltage direction switching frequency is greater than or less than the preset frequency threshold, the instruction value of the instruction data bit corresponding to the current detection cycle is determined to be "0".
[0057] by Figure 1E As shown in Figure 2, if the preset frequency threshold is set to 3 times, then Figure 1E The voltage switching frequencies obtained in the two detection cycles are 4 and 2 respectively. The instruction value corresponding to the former is "1" and the instruction value corresponding to the latter is "0". Compared with detecting the duration of positive and negative voltages, for the detection of the switching frequency of voltage direction, it is only necessary to detect the number of inflection points in the voltage change, which greatly reduces the amount of detection data of the driver chip and improves the efficiency of obtaining instruction values.
[0058] The technical solution of the embodiment of the present invention, after obtaining the first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle, determines the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship, and then determines the matching target lighting mode, and controls the operation of the corresponding target device according to the target lighting mode, so that the driver chip realizes data transmission based on the change of the power supply voltage without the need to configure the data transmission module, avoids the performance defects of the data transmission module itself, and causes problems such as low data transmission efficiency or high data packet loss rate, thereby improving the data transmission efficiency and data transmission quality of the driver chip and reducing the complexity of the data transmission logic.
[0059] Embodiment 2
[0060] Figure 2 This is a flow chart of a device control method provided in the second embodiment of the present invention. Based on the first embodiment, the driver chip first determines whether it is the recipient of the control instruction issued by the power supply before determining the matching target lighting mode according to the instruction value of the first preset number of instruction data bits. Figure 2 As shown, the method includes:
[0061] S201 , detecting the voltage direction of the power supply in real time, and obtaining a first proportional relationship between a positive voltage duration and a negative voltage duration in a current detection cycle.
[0062] S202: Determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship.
[0063] S203 , constructing a target chip identifier according to the instruction value of the second preset number of instruction data bits, and determining whether the target chip identifier is the same as the current driver chip identifier.
[0064] When the power supply is connected to multiple driver chips at the same time, it may send device control instructions to different driver chips in turn in a polling manner, or it may send device control instructions to only some of the driver chips according to actual needs; at this time, the power supply first sends the identification information of the target driver chip to be controlled this time, that is, the target chip identification by changing the voltage direction; the current driver chip first obtains the target chip identification according to the instruction value of the second preset number, and compares the target chip identification with the identification information of the current driver chip; wherein the second preset number is related to the number of driver chips connected to the power supply, and the more driver chips are connected, the larger the value of the second preset number, that is, a larger number of data bits are required to distinguish different driver chips.
[0065] In particular, for the chip identification and the lighting mode, the same instruction value can be configured as different proportional relationships, so that through the first proportional relationship currently obtained, it can also be determined whether the first proportional relationship represents the instruction value in the chip identification or the instruction value in the lighting mode; taking the above technical solution as an example, if the first proportional relationship is one to two, it means that the instruction value corresponding to the current detection cycle is "1", and the instruction value is the data bit value in the lighting mode; if the first proportional relationship is two to one, it means that the instruction value corresponding to the current detection cycle is "0", and the instruction value is the data bit value in the lighting mode; if the first proportional relationship is one to four, it means that the instruction value corresponding to the current detection cycle is "1", and the instruction value is the data bit value in the chip identification; if the first proportional relationship is four to one, it means that the instruction value corresponding to the current detection cycle is "0", and the instruction value is the data bit value in the chip identification.
[0066] If it is determined that the target chip identifier is different from the identifier information of the current driver chip, it means that the device control instruction issued by the power supply this time is irrelevant to the current driver chip, that is, the current driver chip is not the recipient of the control instruction issued by the power supply; at this time, within the next first preset number of detection cycles, the current driver chip can suspend the detection of the voltage direction of the power supply to reduce the detection load of the driver chip; after the first preset number of detection cycles, the detection of the voltage direction of the power supply is resumed.
[0067] S204: If it is determined that the target chip identifier is the same as the current driver chip identifier, continue to determine a matching target lighting mode according to the instruction values of the first preset number of instruction data bits.
[0068] If it is determined that the identification information of the target driver chip is the same as the identification information of the current driver chip, it means that the device control instruction issued by the power supply is related to the current driver chip, that is, the current driver chip is the receiving object of the control instruction issued by the power supply; at this time, the current driver chip continues to obtain the first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in each detection cycle, and determines the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship, and then determines the matching target lighting mode according to the instruction value of the first preset number of instruction data bits. In this way, directional control for a specific driver chip is achieved, the consistency of the instruction sending object of the driver chip and the power supply is ensured, and the driver chip is prevented from erroneously responding to irrelevant instructions.
[0069] S205: Run the corresponding target device according to the target lighting mode.
[0070] According to the technical solution of the embodiment of the present invention, before the driver chip determines the matching target lighting mode according to the instruction value of the first preset number of instruction data bits, it first constructs the target chip identification according to the instruction value of the second preset number of instruction data bits, and when it is determined that the target chip identification is the same as the current driver chip identification, it continues to determine the matching target lighting mode according to the instruction value of the first preset number of instruction data bits, thereby realizing directional control for a specific driver chip, ensuring the consistency of the instruction sending objects of the driver chip and the power supply, and avoiding the driver chip's erroneous response to irrelevant instructions.
[0071] Embodiment 3
[0072] Figure 3A This is a flow chart of a device control method provided by Embodiment 3 of the present invention. Based on Embodiment 1, this embodiment acquires a first numerical relationship between a positive voltage and a negative voltage while acquiring a first proportional relationship. Figure 3A As shown, the method includes:
[0073] S301, detecting the voltage direction of the power supply in real time, and obtaining a first proportional relationship between a positive voltage duration and a negative voltage duration in a current detection cycle, and a first numerical relationship between the positive voltage and the negative voltage.
[0074] The first numerical relationship can be a proportional relationship between the positive voltage value and the negative voltage value (i.e., a second proportional relationship), or it can be a size relationship between the positive voltage value and the negative voltage value, for example, whether the positive voltage is equal to the negative voltage, and both are 1V; whether the positive voltage is equal to the negative voltage, and both are 2V.
[0075] S302: Determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship.
[0076] S303: Determine a matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and determine a matching target device according to the first numerical relationship.
[0077] When determining the matching target lighting mode based on the instruction value of the first preset number of instruction data bits, if the identification information of the target device is added to the target lighting mode, it is necessary to add a new instruction data bit to record the identification information of the target device. For example, in the above technical solution, 13 data bits are originally used to represent lighting modes such as brightness, color and status. However, in order to distinguish different devices connected to the current driver chip, 2 data bits are needed to represent different devices. That is, 15 data bits are needed to achieve directional control of the target device.
[0078] In the embodiment of the present invention, the identification information of the target device can be represented by the first numerical relationship between the positive voltage and the negative voltage; Figure 3B As shown, for example, -1V and +1V can be used to represent device A, -2V and +2V can be used to represent device B, -3V and +3V can be used to represent device C, and -4V and +4V can be used to represent device D; Figure 3B In fact, the proportional relationship between the positive voltage duration and the negative voltage duration of the four is the same, indicating that device A, device B, device C and device D are lit in the same way, and when the driver chip obtains the first numerical relationship between the positive voltage and the negative voltage in the current detection cycle, it can determine which device the current device control instruction is issued for based on the first numerical relationship, thereby realizing directional control of different devices without increasing the instruction data bits, thereby improving the transmission efficiency of device control instructions.
[0079] S304: Run the corresponding target device according to the target lighting mode.
[0080] Optionally, in an embodiment of the present invention, determining the matching target lighting mode based on the instruction value of the first preset number of instruction data bits also includes: determining the matching target data type based on the first numerical relationship; determining the matching target lighting mode based on the target data type and the instruction value of the first preset number of instruction data bits.
[0081] Specifically, the first numerical relationship obtained above can also be used to represent different data types, such as Figure 3C As shown, for example, binary data, octal data, decimal data and hexadecimal data, etc. As described in the above technical solution, -1V and +1V can be used to represent binary data, -2V and +2V can be used to represent octal data, -3V and +3V can be used to represent decimal data, and -4V and +4V can be used to represent hexadecimal data; when the driver chip obtains the first numerical relationship between the positive voltage and the negative voltage in the current detection cycle, the data type of the instruction data of the current instruction data bit can be determined according to the first numerical relationship.
[0082] In particular, under different data types, the number of possible instruction values for an instruction data bit is different. For example, for the above-mentioned binary data, only two numerical relationships need to be configured, corresponding to the values "0" and "1" respectively, while for decimal data, 10 numerical relationships need to be configured, corresponding to the values "0" to "9" respectively; compared with traditional binary data transmission, the multi-base data transmission method represented by the first numerical relationship between the positive voltage and the negative voltage greatly reduces the number of instruction data bits of the device control instruction and provides high transmission efficiency of the device control instruction.
[0083] According to the technical solution of the embodiment of the present invention, when the driver chip obtains the first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle, it simultaneously obtains the first numerical relationship between the positive voltage and the negative voltage, and then determines the matching target device according to the first numerical relationship. In this way, directional control of different devices is achieved without increasing the instruction data bits, thereby improving the transmission efficiency of the device control instructions.
[0084] Embodiment 4
[0085] Figure 4 : is a structural block diagram of a device control device provided by Embodiment 4 of the present invention, and the device control device specifically includes:
[0086] The voltage direction acquisition module 401 is used to detect the voltage direction of the power supply in real time and obtain a first proportional relationship between the positive voltage duration and the negative voltage duration in the current detection cycle;
[0087] An instruction value acquisition module 402, used to determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship;
[0088] The lighting mode acquisition module 403 is used to determine a matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and operate the corresponding target device according to the target lighting mode.
[0089] The technical solution of the embodiment of the present invention, after obtaining the first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle, determines the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship, and then determines the matching target lighting mode, and controls the operation of the corresponding target device according to the target lighting mode, so that the driver chip realizes data transmission based on the change of the power supply voltage without the need to configure the data transmission module, avoids the performance defects of the data transmission module itself, and causes problems such as low data transmission efficiency or high data packet loss rate, thereby improving the data transmission efficiency and data transmission quality of the driver chip and reducing the complexity of the data transmission logic.
[0090] Optionally, the lighting mode acquisition module 403 is specifically used to determine a matching target lighting mode and a target device according to an instruction value of a first preset number of instruction data bits, and control the target device according to the target lighting mode.
[0091] Optionally, the equipment control device further includes:
[0092] The chip identification acquisition module is used to construct a target chip identification according to the instruction value of the second preset number of instruction data bits before determining the matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and to determine whether the target chip identification is the same as the current driver chip identification.
[0093] The lighting mode acquisition module 403 is specifically used to determine a matching target lighting mode according to the instruction values of the first preset number of instruction data bits if it is determined that the target chip identifier is the same as the current driver chip identifier.
[0094] Optionally, the voltage direction acquisition module 401 is further configured to acquire a first proportional relationship between a duration of a positive voltage and a duration of a negative voltage in a current detection cycle, and a first numerical relationship between the positive voltage and the negative voltage.
[0095] The lighting mode acquisition module 403 is further specifically used to determine a matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and to determine a matching target device according to the first numerical relationship.
[0096] Optionally, the lighting mode acquisition module 403 is further specifically used to determine a matching target data type according to the first numerical relationship; and determine a matching target lighting mode according to the target data type and an instruction value of a first preset number of instruction data bits.
[0097] Optionally, the device control device is further used to obtain a voltage waveform diagram of a current detection cycle, and determine a matching target lighting mode according to the voltage waveform diagram.
[0098] Optionally, the equipment control device is also used to obtain the voltage direction switching frequency in the current detection cycle, and determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the voltage direction switching frequency.
[0099] The device control apparatus provided by the present invention can execute the device control method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the device control method provided by any embodiment of the present invention.
[0100] Embodiment 5
[0101] Figure 5A schematic diagram of a driver chip 10 that can be used to implement an embodiment of the present invention is shown. The driver chip is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The driver chip can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0102] like Figure 5 As shown, the driver chip 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the driver chip 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.
[0103] A number of components in the driver chip 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the driver chip 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0104] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a device control method.
[0105] In some embodiments, the device control method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on a heterogeneous hardware accelerator via a ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the device control method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the device control method in any other appropriate manner (e.g., by means of firmware).
[0106] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable device control device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0108] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0109] To provide interaction with a user, the systems and techniques described herein may be implemented on a heterogeneous hardware accelerator having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) through which a user can provide input to the heterogeneous hardware accelerator. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0110] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0111] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0112] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0113] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A device control method, characterized in that: Applied to driver chips, including: Detect the voltage direction of the power supply in real time, and obtain a first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle; Determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship; Determine a matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and operate the corresponding target device according to the target lighting mode; The step of obtaining a first proportional relationship between a positive voltage duration and a negative voltage duration in a current detection cycle specifically includes: Acquire a first proportional relationship between a duration of a forward voltage and a duration of a negative voltage in the current detection cycle, and a first numerical relationship between the forward voltage and the negative voltage; The step of determining the matching target lighting mode according to the instruction value of the first preset number of instruction data bits specifically includes: The matched target lighting mode is determined according to the instruction value of the first preset number of instruction data bits, and the matched target device is determined according to the first numerical relationship.
2. The method according to claim 1, characterized in that The step of determining a matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and operating a corresponding target device according to the target lighting mode, includes: According to the instruction values of the first preset number of instruction data bits, a matching target lighting mode and target device are determined, and the target device is controlled according to the target lighting mode.
3. The method according to claim 1, characterized in that Before determining the matching target lighting mode according to the instruction values of the first preset number of instruction data bits, the method further includes: Constructing a target chip identifier according to the instruction value of the second preset number of instruction data bits, and determining whether the target chip identifier is the same as the current driver chip identifier; The step of determining a matching target lighting mode according to the instruction value of the first preset number of instruction data bits includes: If it is determined that the target chip identifier is the same as the current driver chip identifier, a matching target lighting mode is determined according to the instruction values of the first preset number of instruction data bits.
4. The method according to claim 1, characterized in that The step of determining a matching target lighting mode according to the instruction value of the first preset number of instruction data bits further includes: Determine a matching target data type according to the first numerical relationship; A matching target lighting mode is determined according to the target data type and instruction values of a first preset number of instruction data bits.
5. The method according to claim 1, characterized in that After obtaining the voltage direction of the power supply in real time, it also includes: A voltage waveform diagram of the current detection cycle is obtained, and a matching target lighting mode is determined according to the voltage waveform diagram.
6. The method according to claim 1, characterized in that After obtaining the voltage direction of the power supply in real time, it also includes: The voltage direction switching frequency in the current detection cycle is obtained, and the instruction value of the instruction data bit corresponding to the current detection cycle is determined according to the voltage direction switching frequency.
7. A device control device, characterized in that: Applied to driver chips, including: A voltage direction acquisition module is used to detect the voltage direction of the power supply in real time and obtain a first proportional relationship between the duration of the positive voltage and the duration of the negative voltage in the current detection cycle; An instruction value acquisition module, used to determine the instruction value of the instruction data bit corresponding to the current detection cycle according to the first proportional relationship; A lighting mode acquisition module, used to determine a matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and operate the corresponding target device according to the target lighting mode; The voltage direction acquisition module is specifically used to acquire a first proportional relationship between a positive voltage duration and a negative voltage duration in the current detection cycle, and a first numerical relationship between the positive voltage and the negative voltage; The lighting mode acquisition module is specifically used to determine the matching target lighting mode according to the instruction value of the first preset number of instruction data bits, and to determine the matching target device according to the first numerical relationship.
8. A driver chip, characterized in that: The driver chip comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the device control method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device control method according to any one of claims 1 to 6 when executed.
Citation Information
Patent Citations
Control method of power supply carrier communication LED
CN106132013A