Vehicle lamp control method, device and equipment and storage medium
By initializing processing and generating control instructions in cars, the inefficient instruction execution efficiency caused by the single traditional light control method is solved, and more efficient LED light control is achieved, meeting the intelligent needs of new energy vehicles.
Patent Information
- Application Number
- CN202411341003.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-06
AI Technical Summary
The traditional car headlight control method is single, resulting in low execution efficiency of LED light control instructions and cannot meet the intelligent needs of new energy vehicles.
When the vehicle is in the preset startup state, initialization processing is performed to obtain the instruction timer cycle, and when the vehicle light state transition command is received, control commands are generated based on the target and current state, and control commands are sent through the timer cycle to control the vehicle lights. Improve instruction execution efficiency.
It improves the execution efficiency of LED light instructions, reduces system costs, and meets the intelligent control needs of new energy vehicles.
Smart Images

Figure CN119095221A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle light control method, device, equipment and storage medium. Background Art
[0002] Nowadays, new energy vehicle technology is developing rapidly, and competition among major automobile manufacturers is becoming increasingly fierce. Therefore, reducing automobile production costs and improving the level of automobile intelligence have become common goals. For traditional cars, car light control usually adopts traditional electrical control. Car owners can only operate the lights on and off. The control method is single and the lighting effect is single, which is far from meeting the current requirements for the new generation of intelligent cars. In order to provide users with a better driving experience, automobile manufacturers are installing more and more electronic devices on cars, which has brought about higher and higher costs for automotive electronics and increased workload for developers. Therefore, how to solve the low efficiency of the execution of vehicle LED light control instructions has become an urgent problem to be solved. Summary of the invention
[0003] The main purpose of this application is to provide a vehicle light control method, device, equipment and storage medium, aiming to solve the technical problem of low efficiency in executing vehicle LED light control instructions.
[0004] To achieve the above objectives, the present application proposes a vehicle light control method, the vehicle light control method comprising: When the vehicle is in a preset start state, initializing the headlights of the vehicle to obtain an initialization state and an instruction timer period; When the initialization state is the initialization completion state, sending a preset control instruction and monitoring a vehicle light state conversion instruction; When receiving a headlight state conversion instruction, generating a corresponding headlight control instruction according to a target headlight state corresponding to the headlight state conversion instruction and a current headlight state; The headlight control instruction is sent according to the instruction timer period to control the headlight of the target vehicle.
[0005] In one embodiment, when the vehicle is in a preset start-up state, the step of initializing the vehicle lights to obtain the initialization state and the instruction timer period includes: When the vehicle is in a preset start-up state, initializing the headlights of the vehicle to obtain an initialization state, and obtaining a message baud rate and a command recognition duration; The instruction timer period is obtained according to the message baud rate and the instruction recognition duration.
[0006] In one embodiment, the step of obtaining the instruction timer period according to the message baud rate and the instruction recognition duration includes: Determine the command stop bit according to the message baud rate and the command recognition time; Determine the corresponding control instruction byte number according to the instruction stop bit and each vehicle light control instruction; The instruction timer period is obtained according to the number of control instruction bytes, the message baud rate and the instruction recognition time length.
[0007] In one embodiment, when receiving the vehicle light state conversion instruction, generating a corresponding vehicle light control instruction according to the target vehicle light state corresponding to the vehicle light state conversion instruction and the current vehicle light state includes: When receiving a headlight state conversion instruction, comparing a target headlight state corresponding to the headlight state conversion instruction with a current headlight state to obtain a headlight state comparison result; When the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, updating the current vehicle light control data according to the target vehicle light state and the current vehicle light state to obtain updated vehicle light control data; Generate corresponding vehicle light control instructions according to the updated vehicle light control data.
[0008] In one embodiment, when the comparison result of the headlight state is that the target headlight state is inconsistent with the current headlight state, the step of updating the current headlight control data according to the target headlight state and the current headlight state to obtain the updated headlight control data includes: When the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, analyzing the target vehicle light state and the current vehicle light state to obtain target vehicle light information; The current vehicle light control data is updated according to the target vehicle light information to obtain updated vehicle light control data.
[0009] In one embodiment, the step of analyzing the target vehicle light state and the current vehicle light state to obtain target vehicle light information includes: Analyze the target vehicle light state and the current vehicle light state to obtain the target controlled vehicle light and the vehicle light control state; Generate light change combination information according to the target controlled light and the light control state; The target vehicle light information is obtained according to the light change combination information.
[0010] In one embodiment, after the step of comparing the target headlight state corresponding to the headlight state conversion instruction with the current headlight state and obtaining the headlight state comparison result upon receiving the headlight state conversion instruction, the step further includes: When the headlight state comparison result is that the target headlight state is consistent with the current headlight state, a headlight control instruction corresponding to the target headlight state is sent to control the headlight of the target vehicle.
[0011] In addition, to achieve the above-mentioned purpose, the present application also proposes a vehicle light control device, the vehicle light control device comprising: A processing module, used for initializing the headlights of the vehicle when the vehicle is in a preset start state, and obtaining an initialization state and an instruction timer period; A monitoring module, used for sending a preset control instruction and monitoring a vehicle light state conversion instruction when the initialization state is an initialization completion state; A generating module, configured to generate a corresponding headlight control instruction according to a target headlight state corresponding to the headlight state conversion instruction and a current headlight state when a headlight state conversion instruction is received; The control module is used to send the headlight control instruction according to the instruction timer period to control the headlight of the target vehicle.
[0012] In addition, to achieve the above-mentioned purpose, the present application also proposes a vehicle light control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the vehicle light control method as described above.
[0013] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the vehicle light control method described above are implemented.
[0014] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the vehicle light control method described above are implemented.
[0015] The present application performs initialization processing on the vehicle's lights when the vehicle is in a preset startup state to obtain an initialization state and a command timer cycle; when the initialization state is the initialization completion state, sends a preset control command and monitors the light state conversion command; when receiving the light state conversion command, generates a corresponding light control command according to the target light state corresponding to the light state conversion command and the current light state; sends the light control command according to the command timer cycle to control the target vehicle's lights. By sending a light-off command when the vehicle is running, and when receiving a mode state conversion command, comparing the current state with the target state, generating a corresponding control command and sending it to complete the light control, the execution efficiency of the LED light command is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 A schematic diagram of a flow chart provided for the first embodiment of the vehicle light control method of the present application; Figure 2 A schematic diagram of the software architecture of an LED light control system provided in Embodiment 1 of the vehicle light control method of the present application; Figure 3 A schematic diagram of a flow chart provided for the second embodiment of the vehicle light control method of the present application; Figure 4 A schematic diagram of a simplified process of a vehicle light control method provided in Embodiment 1 of the present application; Figure 5 This is a schematic diagram of the module structure of the vehicle light control device according to an embodiment of the present application; Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the vehicle light control method in the embodiment of the present application.
[0019] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0021] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0022] The main solution of the embodiment of the present application is: when the vehicle is in a preset starting state, the headlights of the vehicle are initialized to obtain the initialization state and the instruction timer cycle; when the initialization state is the initialization completion state, a preset control instruction is sent and the headlight state conversion instruction is monitored; when the headlight state conversion instruction is received, a corresponding headlight control instruction is generated according to the target headlight state corresponding to the headlight state conversion instruction and the current headlight state; the headlight control instruction is sent according to the instruction timer cycle to control the headlights of the target vehicle.
[0023] Nowadays, new energy vehicle technology is developing rapidly, and competition among major automobile manufacturers is becoming increasingly fierce. Therefore, reducing automobile production costs and improving the level of automobile intelligence have become common goals. For traditional cars, car light control usually adopts traditional electrical control. Car owners can only operate the lights on and off. The control method is single and the lighting effect is single, which is far from meeting the current requirements for the new generation of intelligent cars. In order to provide users with a better driving experience, automobile manufacturers are installing more and more electronic devices on cars, which has brought about higher and higher costs for automotive electronics and increased workload for developers. Therefore, how to solve the low efficiency of the execution of vehicle LED light control instructions has become an urgent problem to be solved.
[0024] The present application performs initialization processing on the vehicle's lights when the vehicle is in a preset startup state to obtain an initialization state and a command timer cycle; when the initialization state is the initialization completion state, sends a preset control command and monitors the light state conversion command; when receiving the light state conversion command, generates a corresponding light control command according to the target light state corresponding to the light state conversion command and the current light state; sends the light control command according to the command timer cycle to control the target vehicle's lights. By sending a light-off command when the vehicle is running, and when receiving a mode state conversion command, comparing the current state with the target state, generating a corresponding control command and sending it to complete the light control, the execution efficiency of the LED light command is improved.
[0025] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a headlight control device capable of realizing the above functions, etc. The following takes the headlight control device as the execution subject as an example to illustrate this embodiment and the following embodiments.
[0026] Based on this, the embodiment of the present application provides a vehicle light control method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the vehicle light control method of the present application.
[0027] In this embodiment, the vehicle light control method includes steps S10 to S40: Step S10, when the vehicle is in a preset start state, initializing the headlights of the vehicle to obtain an initialization state and an instruction timer period; It should be noted that if Figure 2 As shown, this embodiment provides an LED light control system and its software architecture implementation for controlling the LED light control chip by sending UART instructions via CAN bus. Developers only need to reserve one CAN bus and UART transmission interface during the development process to realize the entire system. The system has low cost, high portability, and large operational space, which can meet the needs of cost reduction and efficiency improvement. The system adopts a control method in which the ECU is directly connected to the light board via the CAN bus, with high instruction execution efficiency and fast response. Due to the stability of the CAN bus and support for transmission over a long physical distance, the scalability of the system is greatly improved.
[0028] It can be understood that the preset start state refers to the initial start state of the vehicle, the initialization state includes the initialization completion state and the uncompleted state, and the instruction timer cycle refers to the cycle of the timer sending control instructions, that is, a cycle time of the timer used to control the data sending frequency in the system.
[0029] In the specific implementation, when the vehicle is in the initial startup state, the timer T1 and the UART communication interface are initialized, and then the period of the timer T1 is set to ensure that it can meet the requirements of the LED light control chip for the UART command recognition time interval T2, and the UART interface is initialized, the baud rate B and the stop bit A are set to ensure the stability and accuracy of data transmission. Finally, when the initialization state is the completion state, the period of the timer sending the control command is obtained.
[0030] In a feasible implementation, step S10 may include steps A11 to A13: Step A11, when the vehicle is in a preset start state, initializing the headlights of the vehicle to obtain an initialization state, and obtaining a message baud rate and a command recognition duration; It can be understood that the message baud rate is used to describe the transmission rate of digital signals. Common baud rates include 9600 baud, 19200 baud, 38400 baud, 57600 baud, 115200 baud, etc. The command recognition time refers to the time interval for the LED light control chip to recognize the UART command.
[0031] In a specific implementation, when the vehicle is in an initial startup state, the vehicle's lights are initialized to obtain an initialization completion state or an incomplete state, and a suitable baud rate is selected according to system requirements and communication distance to obtain a message baud rate. Finally, the LED light control chip calculates the UART command recognition time interval based on the message baud rate.
[0032] Step A12, obtaining the instruction timer period according to the message baud rate and the instruction recognition duration.
[0033] It can be understood that the corresponding STOPbit (instruction stop bit) is determined according to the time interval of the LED light control chip to recognize the UART command, and then the total number of bytes of all light control commands is determined, and then combined with the message baud rate to calculate and obtain the instruction timer period.
[0034] In a feasible implementation, step A12 may include steps B121 to B123: Step B121, determining the command stop bit according to the message baud rate and the command recognition time; It can be understood that the instruction stop bit (STOP bit) refers to the interval bit between two bytes of data.
[0035] In the specific implementation, in order to realize the control of LED lights, it is necessary to combine all the control instructions of LED lights into a frame message and send it as a UART instruction with a baud rate of B. At the same time, it is necessary to meet the requirements of the LED light control chip for the UART instruction recognition time interval T2, and it is necessary to reasonably configure the STOP bit (interval between two bytes of data) A in the UART protocol.
[0036] Step B122, determining the corresponding control instruction byte number according to the instruction stop bit and each vehicle light control instruction; It can be understood that the number of control instruction bytes refers to the total number of bytes corresponding to all control instructions.
[0037] In a specific implementation, the number of bytes of different vehicle light control instructions is calculated and summarized according to the calculated interval between two bytes of data to obtain the total number of bytes corresponding to all control instructions.
[0038] Step B123, obtaining the instruction timer period according to the number of control instruction bytes, the message baud rate and the instruction recognition time.
[0039] It can be understood that the cycle time of the timer used to control the data sending frequency in the system is calculated based on the total number of bytes corresponding to all control instructions, the message baud rate and the time interval for the LED light control chip to recognize the UART instructions, and then the instruction timer cycle is obtained based on the calculation result.
[0040] It should be noted that in order to control the LED lights, all the control instructions of the LED lights need to be combined into a frame message and sent as a UART instruction with a baud rate of B. At the same time, the LED light control chip needs to meet the requirements of the UART instruction recognition time interval T2, and the STOP bit (interval between two bytes of data) A in the UART protocol needs to be reasonably configured. Therefore, T2<A / B. Since all the control instructions of the light boards mounted on this CAN bus are sent at one time, it is necessary to evaluate that all the control instruction bytes C are sent within a timer cycle, and it is necessary to ensure that: T1>(8*C) / B.
[0041] Step S20, when the initialization state is the initialization completion state, sending a preset control instruction and monitoring a vehicle light state conversion instruction; It is understood that the preset control instruction refers to the pre-set instruction to control all lights to turn off, and the headlight state conversion instruction refers to the instruction sent by the control system (such as the vehicle's ECU or central control unit) to indicate that the state of the headlight needs to be converted from the current state to a new target state. This instruction usually contains information about the target state, such as which lights need to be turned on or off, brightness adjustment, color change, etc.
[0042] In a specific implementation, when the initialization state is the initialization completion state, a preset instruction to control all lights to be off is sent to control all LEDs to enter the off state, and then monitor whether an instruction to control the vehicle light mode state to be converted is received.
[0043] Step S30, when a vehicle light state conversion instruction is received, generating a corresponding vehicle light control instruction according to a target vehicle light state corresponding to the vehicle light state conversion instruction and a current vehicle light state; It can be understood that the target headlight state refers to the state of the LED lights that the system expects to achieve, and the headlight control instruction refers to the actual control signal generated by the control system, which is used to directly control the switching, brightness adjustment and other specific operations of the headlights. This instruction usually acts directly on the headlight controller or drive circuit to make the headlight perform actions according to the instruction.
[0044] In a specific implementation, when an instruction to control the conversion of the headlight mode state is received, it indicates that there is a need to convert the headlight state, and then the state of the LED light that the system expects to achieve corresponding to the instruction to control the conversion of the headlight mode state is compared with the current state of the headlight, and the corresponding actual control signal of the headlight is generated according to the comparison result.
[0045] Step S40: sending the headlight control instruction according to the instruction timer period to control the headlights of the target vehicle.
[0046] In a specific implementation, the actual control signal of the headlights is sent based on the cycle of the control instruction sent by the timer to control the headlights. That is, in order to achieve the convenience of code operation, a data packet for controlling the brightness of each LED lamp is sent in each instruction cycle, and the LED lamp control mode combination is parsed according to the received application layer control instruction, and the change mode of the LED lamp brightness is determined. The data packet content is updated in real time to achieve different lighting effects.
[0047] This embodiment initializes the lights of the vehicle when the vehicle is in a preset start-up state to obtain an initialization state and a command timer cycle; when the initialization state is the initialization completion state, a preset control command is sent and the light state conversion command is monitored; when the light state conversion command is received, a corresponding light control command is generated according to the target light state corresponding to the light state conversion command and the current light state; the light control command is sent according to the command timer cycle to control the lights of the target vehicle. When the vehicle is running, a light all-off command is sent, and when a mode state conversion command is received, the current state and the target state are compared, and a corresponding control command is generated and sent to complete the light control, thereby improving the execution efficiency of the LED light command.
[0048] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S30 in the vehicle light control method includes steps S31 to S33: Step S31, when a headlight state conversion instruction is received, comparing a target headlight state corresponding to the headlight state conversion instruction with a current headlight state to obtain a headlight state comparison result; It can be understood that the vehicle light state comparison result refers to a comparison result of whether the target vehicle light state is consistent with the current vehicle light state.
[0049] In a specific implementation, when an instruction to control the vehicle light mode state to switch is received, the state of the LED lights that the system expects to achieve is compared with the current state of the vehicle LED lights to determine whether the state of the LED lights that the system expects to achieve is consistent with the current state of the vehicle LED lights, and finally the vehicle light state comparison result is obtained.
[0050] In a feasible implementation manner, step S31 may include step A311: Step A311, when the headlight state comparison result is that the target headlight state is consistent with the current headlight state, a headlight control instruction corresponding to the target headlight state is sent to control the headlight of the target vehicle.
[0051] It can be understood that when the headlight status comparison result is that the target headlight status is consistent with the current headlight status, it indicates that there is no need to update the data packet operation, and the headlight control instruction corresponding to the target headlight status is directly sent. Since the target headlight status is consistent with the current headlight status, the status of the LED light does not change.
[0052] Step S32, when the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, updating the current vehicle light control data according to the target vehicle light state and the current vehicle light state to obtain updated vehicle light control data; It can be understood that the current headlight control data includes control data such as brightness value, color value, mode, flashing frequency, gradient speed, etc., and the updated headlight control data refers to the updated headlight control data.
[0053] In a specific implementation, when the result of the headlight status comparison is that the target headlight status is inconsistent with the current headlight status, it indicates that an update data packet operation is required, and then the headlights that need to be switched are determined based on the LED light status that the system expects to achieve and the current state of the headlights, and the current headlight control data is updated, and finally the updated headlight control data is obtained.
[0054] In a feasible implementation, step S32 may include steps A321-A322: Step A321, when the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, analyzing the target vehicle light state and the current vehicle light state to obtain target vehicle light information; It can be understood that the target vehicle light information refers to the control information of the vehicle light that needs state conversion.
[0055] In a specific implementation, when the comparison result of the headlight status is that the target headlight status is inconsistent with the current headlight status, the headlight that needs to be switched is determined by analyzing the state of the LED lights that the system expects to achieve and the current state of the headlights, and the control data information corresponding to the headlights that need to be switched is obtained based on the state of the LED lights that the system expects to achieve, thereby obtaining the target headlight information.
[0056] In a feasible implementation, step A321 may include steps B3211 to B3213: Step B3211, analyzing the target vehicle light state and the current vehicle light state to obtain the target controlled vehicle light and the vehicle light control state; It can be understood that the target controlled headlights refer to the headlights that need to be switched in state, and the headlight control state refers to the state that the target controlled headlights are expected to achieve.
[0057] In a specific implementation, the state of the LED lights that the system expects to achieve and the current state of the lights are analyzed to determine the lights that need to be switched, and then determine the state that the target controlled lights are expected to achieve.
[0058] Step B3212, generating light change combination information according to the target controlled light and the light control state; In a specific implementation, the lighting change combination information refers to a set of instructions or parameter sets for describing how to transition from a current state to a target state.
[0059] In the specific implementation, by analyzing the state of the LED lights that the system expects to achieve and the current state of the headlights, it is determined that in order to achieve the change from the current state to the target state, for each headlight that needs to be changed, corresponding control information is generated, including brightness, color, mode, etc., and finally the light change combination information is obtained.
[0060] Step B3213, obtaining target vehicle light information according to the light change combination information.
[0061] In a specific implementation, corresponding control information (brightness, color, mode, etc.) is generated according to each headlight that needs to be changed to obtain control information of the headlight that needs state conversion, so as to realize the change of the headlight from the current state to the target state.
[0062] Step A322, updating the current headlight control data according to the target headlight information to obtain updated headlight control data.
[0063] It can be understood that the current headlight control data is updated according to the control data information corresponding to the headlights that need to switch states, namely, the brightness value, color value, mode, flashing frequency, gradient speed and other control data, thereby obtaining the updated headlight control data.
[0064] Step S33: generating corresponding vehicle light control instructions according to the updated vehicle light control data.
[0065] In a specific implementation, a corresponding instruction for controlling the vehicle from a current state to a target state is generated according to the updated vehicle light control data, so as to improve the instruction execution efficiency and response speed.
[0066] It should be noted that the system in this embodiment has high portability. Developers only need to reserve one CAN and timer resources. Different controllers can be directly ported for different vehicle models. They only need to adapt the underlying UART transmission interface, which can reduce the difficulty of development and has high adaptability. Chip control instructions are distinguished by address. In theory, a chip with an 8-bit address can theoretically mount 28 CAN boards on one CAN bus. In fact, considering the bus load rate and data packet size, the number of light boards that can be mounted is far less than the theoretical value. However, even if it is as expected, it provides a lot of expansion space for the system. Developers only need to connect the light board to the bus, expand the data packet and add the new light board control instructions to complete the system expansion.
[0067] This embodiment compares the target light state corresponding to the light state conversion instruction with the current light state to obtain a light state comparison result when receiving a light state conversion instruction; updates the current light control data according to the target light state and the current light state to obtain updated light control data when the light state comparison result is that the target light state is inconsistent with the current light state; generates a corresponding light control instruction according to the updated light control data. When receiving a mode state conversion instruction, the current state and the target state are compared. When the states are inconsistent, the required light change combination is parsed according to the current state and the target state, the data packet is updated, and the control instruction is sent to complete the light control.
[0068] For example, to help understand the implementation process of the vehicle light control method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 4 , Figure 4 A brief flow chart of a vehicle light control method is provided. Specifically: when the system is running, a light off command is sent by default. When a mode state conversion command is received, the current state and the target state are compared. When the states are consistent, no data packet update operation is performed. When the states are inconsistent, the required light change combination is parsed according to the current state and the target state, the data packet is updated, and a control command is sent to complete the light control.
[0069] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the vehicle light control method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0070] This application also provides a vehicle light control device, please refer to Figure 5 , the vehicle light control device comprises: The processing module 10 is used to initialize the headlights of the vehicle when the vehicle is in a preset startup state, and obtain an initialization state and an instruction timer period; A monitoring module 20, configured to send a preset control instruction and monitor a vehicle light state conversion instruction when the initialization state is an initialization completion state; A generating module 30, configured to generate a corresponding headlight control instruction according to a target headlight state corresponding to the headlight state conversion instruction and a current headlight state when receiving the headlight state conversion instruction; The control module 40 is used to send the headlight control instruction according to the instruction timer period to control the headlight of the target vehicle.
[0071] In one embodiment, the processing module 10 is further used for: When the vehicle is in a preset start-up state, initializing the headlights of the vehicle to obtain an initialization state, and obtaining a message baud rate and a command recognition duration; The instruction timer period is obtained according to the message baud rate and the instruction recognition duration.
[0072] In one embodiment, the processing module 10 is further used for: Determine the command stop bit according to the message baud rate and the command recognition time; Determine the corresponding control instruction byte number according to the instruction stop bit and each vehicle light control instruction; The instruction timer period is obtained according to the number of control instruction bytes, the message baud rate and the instruction recognition time length.
[0073] In one embodiment, the generating module 30 is further used for: When receiving a headlight state conversion instruction, comparing a target headlight state corresponding to the headlight state conversion instruction with a current headlight state to obtain a headlight state comparison result; When the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, updating the current vehicle light control data according to the target vehicle light state and the current vehicle light state to obtain updated vehicle light control data; Generate corresponding vehicle light control instructions according to the updated vehicle light control data.
[0074] In one embodiment, the generating module 30 is further used for: When the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, analyzing the target vehicle light state and the current vehicle light state to obtain target vehicle light information; The current vehicle light control data is updated according to the target vehicle light information to obtain updated vehicle light control data.
[0075] In one embodiment, the generating module 30 is further used for: Analyze the target vehicle light state and the current vehicle light state to obtain the target controlled vehicle light and the vehicle light control state; Generate light change combination information according to the target controlled light and the light control state; The target vehicle light information is obtained according to the light change combination information.
[0076] In one embodiment, the generating module 30 is further used for: When the headlight state comparison result is that the target headlight state is consistent with the current headlight state, a headlight control instruction corresponding to the target headlight state is sent to control the headlight of the target vehicle.
[0077] The vehicle light control device provided by the present application adopts the vehicle light control method in the above embodiment, which can solve the technical problem of low efficiency in executing vehicle LED light control instructions. Compared with the prior art, the beneficial effects of the vehicle light control device provided by the present application are the same as the beneficial effects of the vehicle light control method provided by the above embodiment, and other technical features in the vehicle light control device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0078] The present application provides a vehicle light control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the vehicle light control method in the above-mentioned embodiment 1.
[0079] Reference below Figure 6 , which shows a schematic diagram of the structure of a vehicle light control device suitable for implementing the embodiment of the present application. The vehicle light control device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The vehicle light control device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0080] like Figure 6As shown, the vehicle light control device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the vehicle light control device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the vehicle light control device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a vehicle light control device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0081] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0082] The vehicle light control device provided by the present application adopts the vehicle light control method in the above embodiment, which can solve the technical problem of low efficiency in executing vehicle LED light control instructions. Compared with the prior art, the beneficial effects of the vehicle light control device provided by the present application are the same as the beneficial effects of the vehicle light control method provided by the above embodiment, and other technical features in the vehicle light control device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0083] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0084] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0085] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the vehicle light control method in the above-mentioned embodiment.
[0086] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0087] The computer-readable storage medium may be included in the vehicle light control device; or may exist independently without being assembled into the vehicle light control device.
[0088] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the headlight control device, the headlight control device: when the vehicle is in a preset startup state, initializes the headlights of the vehicle to obtain an initialization state and an instruction timer cycle; when the initialization state is an initialization completion state, sends a preset control instruction and monitors the headlight state conversion instruction; when receiving a headlight state conversion instruction, generates a corresponding headlight control instruction according to the target headlight state corresponding to the headlight state conversion instruction and the current headlight state; and sends the headlight control instruction according to the instruction timer cycle to control the headlights of the target vehicle.
[0089] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0090] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the 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 square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0091] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0092] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned vehicle light control method, and can solve the technical problem of low efficiency in executing vehicle LED light control instructions. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the vehicle light control method provided in the above-mentioned embodiment, and will not be described in detail here.
[0093] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned vehicle light control method when executed by a processor.
[0094] The computer program product provided by the present application can solve the technical problem of low efficiency in executing vehicle LED light control instructions. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the vehicle light control method provided by the above embodiment, which will not be described in detail here.
[0095] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A vehicle light control method, characterized in that: The vehicle light control method comprises: When the vehicle is in a preset start state, initializing the headlights of the vehicle to obtain an initialization state and an instruction timer period; When the initialization state is the initialization completion state, sending a preset control instruction and monitoring a vehicle light state conversion instruction; When receiving a headlight state conversion instruction, generating a corresponding headlight control instruction according to a target headlight state corresponding to the headlight state conversion instruction and a current headlight state; The headlight control instruction is sent according to the instruction timer period to control the headlight of the target vehicle.
2. The method according to claim 1, characterized in that The step of initializing the headlights of the vehicle to obtain an initialization state and an instruction timer period when the vehicle is in a preset startup state includes: When the vehicle is in a preset start-up state, initializing the headlights of the vehicle to obtain an initialization state, and obtaining a message baud rate and a command recognition duration; The instruction timer period is obtained according to the message baud rate and the instruction recognition duration.
3. The method according to claim 2, characterized in that The step of obtaining the instruction timer period according to the message baud rate and the instruction recognition duration includes: Determine the command stop bit according to the message baud rate and the command recognition time; Determine the corresponding control instruction byte number according to the instruction stop bit and each vehicle light control instruction; The instruction timer period is obtained according to the number of control instruction bytes, the message baud rate and the instruction recognition time length.
4. The method according to claim 1, characterized in that When receiving the vehicle light state conversion instruction, generating a corresponding vehicle light control instruction according to the target vehicle light state corresponding to the vehicle light state conversion instruction and the current vehicle light state, comprises: When receiving a headlight state conversion instruction, comparing a target headlight state corresponding to the headlight state conversion instruction with a current headlight state to obtain a headlight state comparison result; When the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, updating the current vehicle light control data according to the target vehicle light state and the current vehicle light state to obtain updated vehicle light control data; Generate corresponding vehicle light control instructions according to the updated vehicle light control data.
5. The method according to claim 4, characterized in that When the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, the step of updating the current vehicle light control data according to the target vehicle light state and the current vehicle light state to obtain the updated vehicle light control data comprises: When the comparison result of the vehicle light state is that the target vehicle light state is inconsistent with the current vehicle light state, analyzing the target vehicle light state and the current vehicle light state to obtain target vehicle light information; The current vehicle light control data is updated according to the target vehicle light information to obtain updated vehicle light control data.
6. The method according to claim 5, characterized in that The step of analyzing the target vehicle light state and the current vehicle light state to obtain target vehicle light information includes: Analyze the target vehicle light state and the current vehicle light state to obtain the target controlled vehicle light and the vehicle light control state; Generate light change combination information according to the target controlled light and the light control state; The target vehicle light information is obtained according to the light change combination information.
7. The method according to claim 4, characterized in that After the step of comparing the target headlight state corresponding to the headlight state conversion instruction with the current headlight state to obtain the headlight state comparison result upon receiving the headlight state conversion instruction, the method further includes: When the headlight state comparison result is that the target headlight state is consistent with the current headlight state, a headlight control instruction corresponding to the target headlight state is sent to control the headlight of the target vehicle.
8. A vehicle light control device, characterized in that: The device comprises: A processing module, used for initializing the headlights of the vehicle when the vehicle is in a preset start state, and obtaining an initialization state and an instruction timer period; A monitoring module, used for sending a preset control instruction and monitoring a vehicle light state conversion instruction when the initialization state is an initialization completion state; A generating module, configured to generate a corresponding headlight control instruction according to a target headlight state corresponding to the headlight state conversion instruction and a current headlight state when a headlight state conversion instruction is received; The control module is used to send the headlight control instruction according to the instruction timer period to control the headlight of the target vehicle.
9. A vehicle light control device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the vehicle light control method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the vehicle light control method according to any one of claims 1 to 7 are implemented.
