Vehicle light control method and device, controller and readable storage medium
By acquiring the centroid position and target position through the central controller, calculating the light sequence index and special effects granularity, and constructing control commands, the problem of intelligent control of vehicle formation light shows has been solved, realizing a more intelligent and precise light show.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
- Filing Date
- 2026-03-16
- Publication Date
- 2026-05-05
AI Technical Summary
The existing vehicle convoy light show methods cannot achieve intelligent control, resulting in the light show patterns not being intelligent enough.
The central controller obtains the centroid position of the vehicle performance area and the target position of the performing vehicles, calculates the light sequence index and special effects granularity, constructs light control information, and sends control commands to enable the vehicles to perform light shows according to the special effects granularity and light sequence index.
It enhances the intelligence of vehicle platoon light shows, ensuring the precision and coordination of the light performances.
Smart Images

Figure CN121985451A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and in particular to a vehicle lighting control method, device, controller, computer-readable storage medium, and computer program product. Background Technology
[0002] With the development of vehicle technology, a technology has emerged that uses vehicle platoons to complete light shows. This technology allows the vehicles in the platoon to reach a specific location, and then each vehicle is controlled to perform lighting control at that specific location, thus completing the light show through vehicle platooning.
[0003] However, this method cannot effectively present light show patterns, so the current method of completing light shows through vehicle formations is not intelligent enough. Summary of the Invention
[0004] Therefore, it is necessary to provide a vehicle lighting control method, device, controller, computer-readable storage medium, and computer program product that can improve the intelligence of vehicle formations in completing light shows, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a vehicle lighting control method applied to a central controller, comprising:
[0006] Obtain the centroid of the vehicle performance area and the target performance position of any vehicle.
[0007] Based on the target performance position and the centroid position, obtain the light sequence index of each performance vehicle and the special effects granularity of each performance vehicle;
[0008] Based on the light sequence index and the special effects granularity, construct the light control information of each performance vehicle, and construct the control commands of each performance vehicle based on the light control information and the target performance position.
[0009] Each of the control commands is sent to each of the performance vehicles to instruct each performance vehicle to perform a light show according to the special effects granularity and the light sequence index after arriving at each target performance position.
[0010] In one embodiment, obtaining the centroid position of the vehicle performance venue includes: obtaining the venue shape type of the vehicle performance venue; if the venue shape type indicates that the vehicle performance venue is a convex polygon venue, obtaining multiple venue boundary coordinates of the vehicle performance venue; obtaining the venue area of the vehicle performance venue based on each of the venue boundary coordinates; and obtaining the centroid position of the vehicle performance venue based on each of the venue boundary coordinates and the venue area.
[0011] In one embodiment, after obtaining the shape type of the vehicle performance venue, the method further includes: if the shape type indicates that the vehicle performance venue is a concave polygonal venue, performing triangulation on the vehicle performance venue to obtain multiple performance venue sub-regions; obtaining the area of each performance venue sub-region and the sub-centroid position of each performance venue sub-region; and using the area of each region to perform weighted processing on the sub-centroid positions to obtain the centroid position of the vehicle performance venue.
[0012] In one embodiment, the light sequence index is obtained through the following steps: obtaining the relative direction between each performance vehicle and the centroid position based on each target performance position and the centroid position; obtaining the venue partition information where each performance vehicle is located based on the relative direction; and obtaining the light index sequence corresponding to each venue partition information from a pre-stored mapping relationship as the light sequence index of each performance vehicle.
[0013] In one embodiment, the special effects granularity is obtained through the following steps: obtaining the distance between each performance vehicle and the centroid position based on each target performance position and the centroid position; if the distance is less than a preset distance threshold, determining the special effects granularity of the performance vehicle as a first special effects granularity; if the distance is greater than or equal to the preset distance threshold, determining the special effects granularity of the performance vehicle as a second special effects granularity; wherein the level of detail of the special effects pattern represented by the first special effects granularity is greater than the level of detail of the special effects pattern represented by the second special effects granularity.
[0014] In one embodiment, sending the control commands to each of the performance vehicles to instruct each performance vehicle to perform a light show according to the special effects granularity and light sequence index after arriving at each target performance position includes: sending the control commands to each of the performance vehicles; the performance vehicles are controlled by an autonomous driving system to reach the target performance position, and after the performance vehicles reach the target performance position, they send a position arrival signal to the central controller; upon detecting the return position arrival signal of each of the performance vehicles, a light show signal is sent to each performance vehicle; the light show signal is used to instruct each performance vehicle to perform a light show according to the special effects granularity and light sequence index.
[0015] In one embodiment, each location arrival signal carries the vehicle location of each performance vehicle; the step of sending a light show signal to each performance vehicle upon detecting a returned location arrival signal includes: upon detecting a returned location arrival signal from each performance vehicle, performing location verification based on the vehicle location carried in each location arrival signal, and performing signal integrity verification on each performance vehicle; if the location verification and signal integrity verification of any performance vehicle pass, obtaining a PTP timestamp and obtaining the light show execution time based on the PTP timestamp, constructing a light show signal based on the light show execution time, and sending it; if the location verification or signal integrity verification of any performance vehicle fails, sending a signal retransmission command to that performance vehicle to instruct it to re-upload the location arrival signal.
[0016] Secondly, this application also provides a vehicle lighting control device, comprising:
[0017] The performance information acquisition module is used to acquire the centroid position of the vehicle performance venue and the target performance position of any performing vehicle.
[0018] The lighting control acquisition module is used to acquire the lighting sequence index of each performance vehicle and the special effects granularity of each performance vehicle based on each target performance position and the centroid position.
[0019] The control command construction module is used to construct the lighting control information of each performance vehicle according to each lighting sequence index and each special effect granularity, and to construct the control command of each performance vehicle according to each lighting control information and each target performance position.
[0020] The light show execution module is used to send the control commands to the performance vehicles to instruct the performance vehicles to perform the light show according to the special effects granularity and light sequence index after they arrive at the target performance positions.
[0021] Thirdly, this application also provides a controller, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any embodiment of the first aspect.
[0022] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any embodiment of the first aspect.
[0023] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in any embodiment of the first aspect.
[0024] The aforementioned vehicle lighting control method, device, controller, computer-readable storage medium, and computer program product obtain the centroid position of the vehicle performance venue and the target performance position of any performing vehicle through a central controller; obtain the lighting sequence index and special effects granularity of each performing vehicle based on each target performance position and centroid position; construct lighting control information for each performing vehicle based on each lighting sequence index and special effects granularity, and construct control commands for each performing vehicle based on each lighting control information and each target performance position; and send each control command to each performing vehicle to instruct each performing vehicle to perform a lighting performance according to the special effects granularity and lighting sequence index after arriving at each target performance position. This application can collect the centroid position of the vehicle performance venue and the performance position of each vehicle. Then, based on the centroid position and each performance position, the light sequence index and special effect granularity of each vehicle can be obtained. This allows for the construction of lighting control information, which in turn generates control commands for the performance vehicles. These commands instruct each vehicle to perform a lighting show after reaching its target performance position. This method allows for the determination of special effect granularity and light sequence index based on the vehicle's performance position, and the execution of the lighting show according to these parameters, thereby improving the intelligence of the lighting show. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is a diagram illustrating the application environment of a vehicle lighting control method in one embodiment.
[0027] Figure 2 This is a flowchart illustrating a vehicle lighting control method in one embodiment;
[0028] Figure 3 This is a flowchart illustrating the process of obtaining the centroid position of the vehicle performance area in one embodiment;
[0029] Figure 4 This is a flowchart illustrating the process of obtaining the centroid position of the vehicle performance area in another embodiment;
[0030] Figure 5This is a schematic diagram of the process for obtaining the light sequence index in one embodiment;
[0031] Figure 6 This is a schematic diagram of the process of sending light show signals to each performance vehicle in one embodiment;
[0032] Figure 7 This is a schematic diagram of 5G-V2X layered broadcasting in one embodiment;
[0033] Figure 8 This is a schematic diagram of the lighting execution timing in one embodiment;
[0034] Figure 9 This is a schematic diagram of the position ready signal transmission process in one embodiment;
[0035] Figure 10 This is a schematic diagram of the PTP clock synchronization system flow in one embodiment;
[0036] Figure 11 This is a schematic diagram of the light sequence triggering timing in one embodiment;
[0037] Figure 12 This is a structural block diagram of a vehicle lighting control device in one embodiment;
[0038] Figure 13 This is a diagram of the internal structure of the controller in one embodiment. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0040] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0041] The vehicle lighting control method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, the central controller can communicate with multiple performance vehicles. The central controller can obtain the centroid position of the performance area and the position of any single performance vehicle. Then, based on the performance position and centroid position, it can obtain the lighting sequence index and effect granularity of the performance vehicles to construct lighting control information. Based on the performance position and lighting control information, it can construct and send control commands to each performance vehicle. These control commands instruct the performance vehicles to execute the lighting performance according to the effect granularity and lighting sequence index after arriving at their respective performance positions.
[0042] In one embodiment, such as Figure 2 As shown, a vehicle lighting control method is provided, which is applied to... Figure 1 Taking the central controller in the example, the following steps are included:
[0043] Step S201: Obtain the centroid position of the vehicle performance area and the target performance position of any performing vehicle.
[0044] Among them, the vehicle performance venue refers to the place where vehicle formation light shows are held, the centroid position refers to the centroid coordinates of the vehicle performance venue, the performance vehicle refers to each vehicle performing in the formation, and the target performance position is the position of each performance vehicle in the vehicle performance venue, such as the performance coordinates of the performance vehicle. The performance position can be set according to the performance requirements.
[0045] Specifically, after determining the vehicle performance venue, the central controller can first calculate the centroid of the performance venue and, based on the performance requirements, obtain the target performance positions for each vehicle set by the user.
[0046] Step S202: Based on the target performance position and centroid position, obtain the light sequence index of each performance vehicle and the special effects granularity of each performance vehicle.
[0047] A light sequence index is a sequence of multiple light indices, each representing a different light on a performing vehicle. For example, index 1 represents the vehicle's headlights, index 2 represents the vehicle's taillights, and so on. Therefore, the light index sequence represents the switching order of the vehicle's lights. Effect granularity refers to the degree of special effects presentation of the vehicle's lights, such as the fineness of the light patterns. Specifically, after obtaining the target performance position of each performing vehicle and the centroid position of the performance area, the controller can determine the light sequence index and effect granularity of each performing vehicle based on these positions.
[0048] Step S203: Based on each light sequence index and each special effect granularity, construct the light control information for each performance vehicle, and construct the control commands for each performance vehicle based on each light control information and each target performance position.
[0049] Step S204: Send each control command to each performance vehicle to instruct each performance vehicle to perform a light show according to the special effects granularity and the light sequence index after arriving at each target performance position.
[0050] Lighting control information refers to the lighting control command information for the performance vehicles. This control information can include two parts: light sequence index and effect granularity, which are used to control the switching sequence of the lights and the fineness of the light effects, respectively. The control command is the control instruction sent by the central controller to each performance vehicle. This control instruction can be constructed based on the lighting control information and the target performance position. The target performance position is used to instruct the performance vehicle to go to a specific position, while the lighting control information is used to instruct the performance vehicle to perform the lighting show.
[0051] Specifically, the central controller can first construct lighting control information for each performance vehicle based on the lighting sequence index and effect granularity. Then, it can combine this information with the target performance position of each vehicle to construct and send control commands. Upon receiving the control commands, the performance vehicles can proceed to the corresponding target performance position according to the commands. Once at the target performance position, they can execute the lighting performance according to the lighting control information, that is, according to the effect granularity and lighting sequence index.
[0052] In the above vehicle lighting control method, the centroid position of the vehicle performance venue and the target performance position of any performing vehicle are obtained through the central controller; the lighting sequence index and special effect granularity of each performing vehicle are obtained based on each target performance position and centroid position; the lighting control information of each performing vehicle is constructed based on each lighting sequence index and each special effect granularity, and the control command of each performing vehicle is constructed based on each lighting control information and each target performance position; the control command is sent to each performing vehicle to instruct each performing vehicle to perform a lighting performance according to the special effect granularity and lighting sequence index after arriving at each target performance position. This application can collect the centroid position of the vehicle performance venue and the performance position of each vehicle. Then, based on the centroid position and each performance position, the light sequence index and special effect granularity of each vehicle can be obtained. This allows for the construction of lighting control information, which in turn generates control commands for the performance vehicles. These commands instruct each vehicle to perform a lighting show after reaching its target performance position. This method allows for the determination of special effect granularity and light sequence index based on the vehicle's performance position, and the execution of the lighting show according to these parameters, thereby improving the intelligence of the lighting show.
[0053] In one embodiment, such as Figure 3 As shown, step S201 may further include:
[0054] Step S301: Obtain the shape type of the vehicle performance venue;
[0055] Step S302: When the field shape type characterizes the vehicle performance field as a convex polygon field, obtain the coordinates of multiple field boundaries of the vehicle performance field, and obtain the field area of the vehicle performance field based on the coordinates of each field boundary.
[0056] The shape type of the venue can be used to characterize the shape classification of the vehicle performance venue. For example, the vehicle performance venue can be classified into convex polygons and concave polygons according to its shape. The shape classification of the vehicle performance venue will affect the way the centroid position of the vehicle performance venue is obtained. The venue boundary coordinates refer to the coordinates of multiple boundary positions of the vehicle performance venue, while the venue area refers to the size of the area of the vehicle performance venue.
[0057] Specifically, the central controller can first identify the shape type of the vehicle performance venue, that is, determine whether the vehicle performance venue is a convex polygon venue or a concave polygon venue. If it is identified as a convex polygon venue, it can receive multiple venue boundary coordinates input by the user and use multiple venue boundary coordinates to calculate the area of the vehicle performance venue.
[0058] For example, if the number of boundary coordinates of a vehicle performance venue is n, the resulting set of boundary coordinates is: If the vehicle performance area is a convex polygon, then the area of the vehicle performance area can be calculated using the following formula:
[0059]
[0060] in, , .
[0061] Step S303: Based on the boundary coordinates of each venue and the area of the venue, the centroid position of the vehicle performance venue is obtained.
[0062] After obtaining the boundary coordinates and area of each venue, the centroid coordinates of the vehicle performance area can be calculated using these coordinates. For example, the centroid coordinates can be expressed as... The centroid coordinates can then be calculated using the following formula:
[0063]
[0064]
[0065] In this embodiment, the shape type of the vehicle performance venue can also be identified. If it is a convex polygonal venue, multiple boundary coordinates of the vehicle performance venue can be collected. After obtaining the venue area, the centroid position can be calculated by combining the multiple boundary coordinates and the venue area. This method can improve the accuracy of obtaining the centroid position of the convex polygonal vehicle performance venue.
[0066] In addition, such as Figure 4 As shown, after step S301, the following may also be included:
[0067] Step S401: When the vehicle performance venue is characterized as a concave polygonal venue in terms of its shape type, the vehicle performance venue is triangulated to obtain multiple sub-regions of the performance venue.
[0068] If the vehicle performance area is identified as a concave polygon, then the concave polygon can be decomposed into a set of triangles, that is, the vehicle performance area can be triangularly decomposed to obtain multiple performance area sub-regions divided into triangles.
[0069] Step S402: Obtain the area of each sub-region of the performance venue and the position of the sub-centroid of each sub-region of the performance venue.
[0070] Step S403: Use the area of each region to weight the position of each sub-centroid to obtain the centroid position of the vehicle performance area.
[0071] The area of a region refers to the triangular area of each sub-region of the performance venue, while the sub-centroid position is the centroid position of each sub-region of the performance venue. After the sub-regions of the performance venue are divided, the area of each sub-region and the sub-centroid position of each sub-region can be calculated. The above data can be calculated based on the coordinates of the three vertices of the sub-region of the performance venue. For example, the sub-centroid position can be calculated based on the average of the coordinates of the three vertices, and so on.
[0072] After obtaining the area of each region and the location of each sub-centroid, the centroid location of the vehicle performance area can be obtained by weighting the sub-centroid locations using the area of each region. The weight value can be the ratio of the area of each region to the total area of the vehicle performance area, which is the sum of the areas of all regions. For example, the centroid location of a concave polygonal area... It can be obtained through the following formula:
[0073]
[0074]
[0075] in, This represents the area of the i-th sub-region of the performance venue. This indicates the total area of the vehicle performance area. , , The coordinates of the three vertices of the i-th performance venue sub-region are identified respectively.
[0076] In this embodiment, if the vehicle performance venue is a concave polygonal venue, the vehicle performance venue can be triangulated to obtain multiple performance venue sub-regions. Then, the centroid position of each sub-region is weighted according to the area of each sub-region. This method can improve the accuracy of the centroid position calculation of the vehicle performance venue.
[0077] In one embodiment, such as Figure 5 As shown, the light sequence index is obtained through the following steps:
[0078] Step S501: Based on the target performance position and the center of mass position, obtain the relative direction between each performance vehicle and the center of mass position.
[0079] The relative direction can characterize the relative orientation between the target performance position and the center of mass. This relative direction can be characterized by an angle. In this embodiment, the relative direction between the performance vehicle and the center of mass can also be calculated based on each target performance position and the center of mass position. For example, the center of mass position can be used as the origin of polar coordinates, and the angle mapping of each target performance position in polar coordinates can be calculated as the relative direction between each performance vehicle and the center of mass position. This angle mapping can be calculated using the following formula:
[0080]
[0081] in, Indicates the target performance location, while Indicates the location of the center of mass.
[0082] Step S502: Obtain the venue zone information of each performance vehicle based on the relative direction;
[0083] Step S503: Obtain the light index sequence corresponding to each venue partition information from the pre-stored mapping relationship, and use it as the light sequence index for each performance vehicle.
[0084] The venue zoning information represents the venue zoning area where each performance vehicle is located. This zoning can be divided according to angles, and the mapping relationship is a pre-constructed set of correspondences storing the relationships between venue zoning areas and lighting indices. Different venue zoning information has corresponding pre-constructed lighting index sequences. In this embodiment, after obtaining the performance position of the performance vehicle, the relative direction between the performance position and the centroid position can be determined first, thereby identifying the venue zoning area where the performance vehicle is located based on the relative direction. Then, the mapping relationship between venue zoning areas and lighting index sequences can be further combined to identify the lighting index sequence corresponding to the venue zoning area where the performance vehicle is located from multiple lighting index sequences, serving as the lighting sequence index for that performance vehicle.
[0085] In this embodiment, the relative direction between the performance vehicle and the centroid position can be used to determine the venue partition where the performance vehicle is located. Then, the mapping relationship can be combined to identify the light sequence index of each performance vehicle. This method can improve the accuracy of obtaining the light sequence index.
[0086] In one embodiment, the special effects granularity is obtained through the following steps: based on each target performance position and the centroid position, the distance between each performance vehicle and the centroid position is obtained; if the distance is less than a preset distance threshold, the special effects granularity of the performance vehicle is determined as the first special effects granularity; if the distance is greater than or equal to the preset distance threshold, the special effects granularity of the performance vehicle is determined as the second special effects granularity; wherein, the level of detail of the special effects pattern represented by the first special effects granularity is greater than the level of detail of the special effects pattern represented by the second special effects granularity.
[0087] The first and second special effects granularities can be two different levels of special effects granularity. The level of detail in the special effects pattern represented by the first granularity is greater than that represented by the second granularity. For example, the first granularity represents a fine pattern, while the second granularity represents a coarse pattern. In this embodiment, the special effects granularity can be identified based on the distance between the performing vehicle and the center of mass. If the performing vehicle is close to the center of mass, the presented image can be a fine pattern image; if the performing vehicle is far from the center of mass, the presented image can be a coarse-grained image.
[0088] Specifically, the central controller can calculate the distance between the performance vehicle and the center of gravity based on the target performance position and the center of gravity position of each performance vehicle. If the distance is close, that is, less than the preset distance threshold, the special effect granularity of the performance vehicle is set to a high-precision first special effect granularity. If the distance is far, that is, greater than or equal to the preset distance threshold, the special effect granularity of the performance vehicle is set to a coarse-grained second special effect granularity. This method can improve the presentation effect of the light show.
[0089] In this embodiment, the granularity of the special effects of the performance vehicle can be identified based on the distance between the performance vehicle and the centroid position, which can further improve the presentation effect of the light show.
[0090] In one embodiment, step S204 may further include: sending control commands to each performance vehicle; the performance vehicle is used to reach the target performance location via an autonomous driving system, and after the performance vehicle reaches the target performance location, it sends a location arrival signal to the central controller; if the location arrival signal of each performance vehicle is detected, a light show signal is sent to each performance vehicle; the light show signal is used to instruct each performance vehicle to perform a light show according to the special effects granularity and the light sequence index.
[0091] The location arrival signal is sent by the performance vehicle to notify the central controller that the performance vehicle has arrived at the target performance location, while the light show signal is sent by the central controller to instruct the performance vehicle to perform the light show.
[0092] In this embodiment, after the central controller sends each control command to the corresponding performance vehicle, the performance vehicle can obtain the corresponding target performance position and lighting control information from the control commands and save the lighting control information. Then, the performance vehicle can activate its autonomous driving system to reach the target performance position. When the difference between the current position of the performance vehicle and the target performance position is less than a preset error, such as less than 5cm, it can be determined that the performance vehicle has reached the target performance position and sends a position arrival signal indicating that it has reached the target performance position to the central controller.
[0093] Once the central controller receives the arrival signal from all the performance vehicles, that is, after all the performance vehicles have traveled to the corresponding target performance position, it can send a light show signal to each performance vehicle. At this time, after receiving the light show signal, the performance vehicle can obtain the special effects granularity and light sequence index from the pre-stored light control information, and then execute the light show according to the special effects granularity and light sequence index.
[0094] In this embodiment, after the performance vehicle arrives at the target performance position, it can send a position arrival signal to the central controller to notify the central controller that the performance vehicle has arrived at the target performance position. Furthermore, when the central controller detects the return position arrival signal of each performance vehicle, it can send a light show signal to each performance vehicle to notify it to execute the light show. This method can improve the timeliness of light show control.
[0095] In one embodiment, the arrival signals at each location carry the vehicle location of each performance vehicle; such as Figure 6 As shown, sending light show signals to each performance vehicle upon detecting the arrival signal of their return position can further include:
[0096] Step S601: Upon detecting the return location arrival signals of each performance vehicle, perform location verification based on the vehicle location carried in each location arrival signal, and perform signal integrity verification for each performance vehicle.
[0097] In this embodiment, the location arrival signal can carry the real-time vehicle location of each performance vehicle. Therefore, after the central controller receives the location arrival signal, it can first obtain the vehicle location carried by it to perform location verification, that is, verify whether the location is the target performance location, and can also perform signal integrity verification on the location arrival signal sent by each performance vehicle.
[0098] Step S602: If the position verification and signal integrity verification of any performance vehicle pass, obtain the PTP timestamp and obtain the light show execution time based on the PTP timestamp, construct the light show signal based on the light show execution time and send it.
[0099] Step S603: If the position verification or signal integrity verification of any performance vehicle fails, a signal retransmission command is sent to that performance vehicle to instruct it to re-upload the position arrival signal.
[0100] Afterwards, the central controller can determine whether the position verification and signal integrity verification of the performance vehicle have passed. If both the position verification and signal integrity verification have passed, the central controller can obtain the PTP timestamp and then obtain the light show execution time based on the PTP timestamp. For example, the PTP timestamp + 100ms can be used as the light show execution time. The light show signal is then constructed and sent based on the light show execution time.
[0101] If either the position verification or the signal integrity verification fails, a signal retransmission command can be sent to the performance vehicle, instructing the vehicle to re-upload the position arrival signal.
[0102] In this embodiment, the location arrival signal of the returning performance vehicle can also be verified for both location and signal integrity. The light show signal is only sent if the verification passes; otherwise, the location arrival signal is re-uploaded. This method can further ensure the accuracy of the light show signal transmission.
[0103] In one embodiment, a vehicle lighting control system based on autonomous driving is also provided, the working principle of which is as follows:
[0104] 1. Electronic fence pretreatment:
[0105] Input the coordinate set of the performance venue boundary The feasible region O is calculated as the formation reference point.
[0106] (1) Calculate the area A of the polygon. ,in , .
[0107] Centroid coordinate calculation :
[0108]
[0109]
[0110] (2) Convex hull processing (for concave polygons):
[0111] Define a function to process concave polygons and calculate their centroids:
[0112] def concave_centroid(P):
[0113] # Extracting convex hull vertices using the Sklansky algorithm
[0114] hull = convex_hull(P)
[0115] # Decompose a concave polygon into a set of triangles
[0116] triangles = ear_clipping(P)
[0117] Calculate the weighted centroid:
[0118] total_area = 0 # Initialize the total area to 0
[0119] weighted_x = 0 # Initialize the weighted x-coordinate to 0
[0120] weighted_y = 0 # Initialize the weighted y-coordinate to 0
[0121] Traverse each triangle:
[0122] for tri in triangles:
[0123] a = triangle_area(tri) # Calculate the area of the current triangle
[0124] total_area += a # Add the area of the current triangle to the total area
[0125] weighted_x += a * (tri[0][0] + tri[1][0] + tri[2][0]) / 3 # Calculate and sum the weighted x-coordinates of the current triangle.
[0126] weighted_y += a * (tri[0][1] + tri[1][1] + tri[2][1]) / 3 # Calculate and sum the weighted y-coordinates of the current triangle.
[0127] Return the calculated weighted centroid:
[0128] return (weighted_x / total_area, weighted_y / total_area)
[0129] (3) Optimization of project implementation:
[0130] Parallel computing framework
[0131] / / Define a CUDA kernel function for parallel computation of the centroid
[0132] global void centroid_kernel(float* x, float* y, float* result, int n){
[0133] / / Calculate the global index of the current thread
[0134] int i = blockIdx.x * blockDim.x + threadIdx.x;
[0135] / / Ensure indexes do not go out of bounds
[0136] if (i < n - 1) {
[0137] / / Calculate the determinant (used to calculate area)
[0138] float det = x[i] * y[i + 1] - x[i + 1] * y[i];
[0139] / / Accumulate the area term using atomic operations
[0140] atomicAdd(&result[0], det);
[0141] / / Accumulate the numerator of C_x using atomic operations
[0142] atomicAdd(&result[1], (x[i] + x[i + 1]) * det);
[0143] / / Accumulate the numerator of C_y using atomic operations
[0144] atomicAdd(&result[2], (y[i] + y[i + 1]) * det);
[0145] }
[0146] }
[0147] / / After calling:
[0148] / / A = 0.5 * result[0], C_x = result[1] / (6 * A), C_y = result[2] / (6 * A)
[0149] Real-time update algorithm (movable fence scenario)
[0150] ,in This represents the change in the centroid along the x-axis. This represents the increment or change in the x-coordinate of the i-th point. This represents the variance of the x-coordinate, i.e., the degree of dispersion of the x-coordinate, where n is the number of points. When boundary points move, a full calculation is not required.
[0151] (4) Lighting system linkage:
[0152] The calculation results directly affect lighting control:
[0153] Establishment of the reference coordinate system: with the centroid Establish a polar coordinate system with the origin, and map the vehicle position: .
[0154] Light index assignment:
[0155] / / Assign light sequence indexes based on angle
[0156] int assign_light_index(float theta) {
[0157] int sector = (int)(theta / (2*M_PI / SECTOR_NUM)); / / Divide the angle field equally
[0158] return sector * LIGHTS_PER_SECTOR; / / Assign a fixed light index to each sector
[0159] }
[0160] ISD Effects Alignment (Bit6 / Bit7 Control):
[0161] Distance from the vehicle to the center of gravity:
[0162] Dynamically adjust the granularity of ISD effects:
[0163] if r < R_inner:
[0164] ISD_granularity = HIGH / / Fine pattern (0x31-0x3F)
[0165] else:
[0166] ISD_granularity = LOW / / Coarse-grained pattern (0x40-0x4F)
[0167] 2. Integration of lighting control commands:
[0168] The central controller simultaneously issues two types of commands via 5G-V2X: navigation commands (including target coordinates (x, y, z) and arrival time tolerance Δt ≤ 100ms) and light show bitstream data; the vehicle parses the commands through the vehicle body cross-domain service (BCM_Light_CS) and stores them in the lightshowstream array, where the 5G-V2X signal propagation method can be as follows: Figure 7 As shown.
[0169] Based on the lighting control protocol, the central controller issues dual commands and the vehicle-side processing flow is as follows:
[0170] (1) Dual-instruction data structure design:
[0171] struct DualCommand { / / Structure for navigation command area and light show command area
[0172] / / Navigation command area (12 bytes)
[0173] float target_x; / / Target coordinates in meters (X)
[0174] float target_y; / / Target coordinates in meters (Y)
[0175] float target_z; / / Target coordinates Z (height, meters)
[0176] uint16_t delta_t; / / Arrival time tolerance ≤ 100ms
[0177] / / Light show command area (8+1 bytes)
[0178] uint8_t lightshow_index_h; / / High 8 bits of the index
[0179] uint8_t lightshow_index_l; / / Index of the lower eight bits
[0180] uint8_t lightshow_data[8]; / / Light bitstream data
[0181] uint8_t checksum; / / Checksum (including coordinate hash)
[0182] };
[0183] (2) Vehicle-side processing, BCM_Light_CS parsing engine:
[0184] void parseDualCommand(DualCommand cmd) {
[0185] / / Step 1: Store lighting data
[0186] lightshowstream = cmd.lightshow_index_h; / / Byte0
[0187] lightshowstream[1] = cmd.lightshow_index_l; / / Byte1
[0188] for (int i = 0; i < 8; i++) {
[0189] lightshowstream[i + 2] = cmd.lightshow_data[i]; / / Byte2-7
[0190] }
[0191] / / Step 2: Verify coordinate hash (Byte4 reuse)
[0192] if (cmd.checksum != calcPositionHash(cmd.target_x, cmd.target_y)) {
[0193] lightshowmemcontrolReturnCode = 1; / / Request retransmission
[0194] return;
[0195] }
[0196] / / Step 3: Trigger navigation control
[0197] autodrive_setTarget(cmd.target_x, cmd.target_y, cmd.delta_t);
[0198] }
[0199] (4) Time synchronization control
[0200] Arrival determination:
[0201] def check_arrival():
[0202] # Get current RTK location
[0203] current_pos = get_rtk_position()
[0204] # Check if the distance between the current position and the target position is less than the 5cm error tolerance.
[0205] if distance(current_pos, target) < 0.05: # 5cm error tolerance
[0206] return True # Reach the target location
[0207] return False # Target location not reached
[0208] When the light is triggered and the conditions are met, lightshowcontrol=2 is set to execute the timing sequence, which can be as follows: Figure 8 As shown.
[0209] Instruction exception handling:
[0210] 1. Data verification failed: Set lightshowmemcontrolReturnCode=1 to trigger retransmission.
[0211] 2. If the coordinates are not reached within the time limit: Send lightshowcontrol=3 to pause the lights and replan the path.
[0212] 3. Vehicles too close together: Force brake lights to turn on (Bit1=1) + all position lights to illuminate (Bit4-5=11).
[0213] ISD safety interlock
[0214] / / Pre-ISD activation condition check
[0215] if (lightshow_data[BIT6] == 1) {
[0216] if (!is_front_position_light_on()) { / / Front position light needs to be turned on
[0217] block_isd_activation(); / / Prevent ISD activation
[0218] } else {
[0219] activate_front_isd(0x31); / / Activate the front effect
[0220] }
[0221] }
[0222] 3. Synchronization triggering mechanism:
[0223] After the vehicle arrives at the target location: the autonomous driving system sends a Position_Ready status signal; the central controller responds to the lightshowcontrol=2 command and starts the preloaded light sequence; using PTP (Precision Time Protocol) to align the clocks of multiple vehicles, the position ready signal transmission process can be as follows: Figure 9 As shown.
[0224] Signal structure:
[0225] struct Position_Ready {
[0226] double position_x; / / WGS84 coordinate X
[0227] double position_y; / / WGS84 coordinate Y
[0228] float position_z; / / Elevation
[0229] uint64_t ptp_timestamp; / / PTP precise timestamp (nanosecond level)
[0230] uint8_t vehicle_id; / / Vehicle identifier
[0231] };
[0232] Central controller response logic:
[0233] def handle_position_ready(signal):
[0234] # Coordinate Validation
[0235] if validate_position(signal):
[0236] # Check data integrity
[0237] if lightshowmemcontrol == 3: # Data complete
[0238] # Send command
[0239] send_command(vehicle_id,
[0240] command=0x02, # lightshowcontrol=2
[0241] `exec_time=signal.ptp_timestamp + 100) # Execution time = PTP timestamp + 100ms`
[0242] else:
[0243] # Trigger retransmission
[0244] request_data_retransmit(vehicle_id)
[0245] PTP clock synchronization system can be like Figure 10 As shown, where,
[0246] Vehicle-side execution process:
[0247] Command reception and storage
[0248] void BCMLightCS_Handler(DualCommand cmd) {
[0249] / / Store to lightshowstream[8]
[0250] lightshowstream = cmd.lightshow_index_h; / / Byte0
[0251] lightshowstream[1] = cmd.lightshow_index_l; / / Byte1
[0252] memcpy(&lightshowstream[2], cmd.lightshow_data, 8); / / Byte2-7
[0253] / / Update state machine
[0254] lightshowmemcontrol = 3; / / Data integrity flag
[0255] }
[0256] The timing sequence of light triggers can be as follows Figure 11 As shown, the details are as follows:
[0257] 1. Byte2 Bit0=1: Turn on low beam headlights;
[0258] 2. Byte3 Bit6=1: Pre-boot ISD;
[0259] 3. Byte7 Bit4-5=11: All positions light up.
[0260] State machine fault tolerance
[0261] / / Exception handling logic
[0262] if (lightshowmemcontrol != 3 || ptp_offset > 200) { / / 200μs
[0263] lightshowcontrol = 3; / / Pause the lights
[0264] request_time_resync(); / / PTP resynchronization
[0265] }
[0266] This embodiment enables light shows to be completed through an autonomous driving system, thereby improving the intelligence of the light show.
[0267] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0268] Based on the same inventive concept, this application also provides a vehicle lighting control device for implementing the vehicle lighting control method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more vehicle lighting control device embodiments provided below can be found in the limitations of the vehicle lighting control method described above, and will not be repeated here.
[0269] In one embodiment, such as Figure 12 As shown, a vehicle lighting control device is provided, applied to a central controller, including: a performance information acquisition module 1201, a lighting control acquisition module 1202, a control command construction module 1203, and a lighting performance execution module 1204, wherein:
[0270] The performance information acquisition module 1201 is used to acquire the centroid position of the vehicle performance venue and the target performance position of any performing vehicle.
[0271] The lighting control acquisition module 1202 is used to acquire the lighting sequence index of each performance vehicle and the special effects granularity of each performance vehicle based on the target performance position and the centroid position.
[0272] The control command construction module 1203 is used to construct the lighting control information of each performance vehicle based on each lighting sequence index and each special effect granularity, and to construct the control commands of each performance vehicle based on each lighting control information and each target performance position.
[0273] The light show execution module 1204 is used to send control commands to each performance vehicle to instruct each performance vehicle to execute the light show according to the special effects granularity and the light sequence index after arriving at each target performance position.
[0274] In one embodiment, the performance information acquisition module 1201 is further used to acquire the shape type of the vehicle performance venue; when the shape type indicates that the vehicle performance venue is a convex polygonal venue, it acquires multiple venue boundary coordinates of the vehicle performance venue, acquires the venue area of the vehicle performance venue based on each venue boundary coordinate, and obtains the centroid position of the vehicle performance venue based on each venue boundary coordinate and the venue area.
[0275] In one embodiment, the performance information acquisition module 1201 is further configured to perform triangulation on the vehicle performance venue to obtain multiple performance venue sub-regions when the venue shape type characterizes the vehicle performance venue as a concave polygonal venue; obtain the area of each performance venue sub-region and the sub-centroid position of each performance venue sub-region; and use the area of each region to perform weighted processing on the sub-centroid position to obtain the centroid position of the vehicle performance venue.
[0276] In one embodiment, the lighting control acquisition module 1202 is further configured to acquire the relative direction between each performance vehicle and the centroid position based on each target performance position and the centroid position; acquire the venue partition information where each performance vehicle is located based on the relative direction; and acquire the lighting index sequence corresponding to each venue partition information from the pre-stored mapping relationship as the lighting sequence index of each performance vehicle.
[0277] In one embodiment, the lighting control acquisition module 1202 is further configured to acquire the distance between each performance vehicle and the centroid position based on each target performance position and the centroid position; if the distance is less than a preset distance threshold, determine the special effect granularity of the performance vehicle as a first special effect granularity; if the distance is greater than or equal to the preset distance threshold, determine the special effect granularity of the performance vehicle as a second special effect granularity; wherein, the fineness of the special effect pattern represented by the first special effect granularity is greater than the fineness of the special effect pattern represented by the second special effect granularity.
[0278] In one embodiment, the light show execution module 1204 is further configured to send control commands to each performance vehicle; the performance vehicle is configured to reach the target performance location via an autonomous driving system, and after the performance vehicle reaches the target performance location, it sends a location arrival signal to the central controller; upon detecting the return location arrival signal of each performance vehicle, it sends a light show signal to each performance vehicle; the light show signal is configured to instruct each performance vehicle to execute a light show according to the special effects granularity and the light sequence index.
[0279] In one embodiment, each location arrival signal carries the vehicle location of each performing vehicle; the light show execution module 1204 is further configured to, upon detecting the location arrival signals returned by each performing vehicle, perform location verification based on the vehicle location carried in each location arrival signal, and perform signal integrity verification on each performing vehicle; if the location verification and signal integrity verification of any performing vehicle pass, obtain the PTP timestamp and obtain the light show execution time based on the PTP timestamp, construct the light show signal based on the light show execution time, and send it; if the location verification or signal integrity verification of any performing vehicle fails, send a signal retransmission instruction to the performing vehicle to instruct the performing vehicle to re-upload the location arrival signal.
[0280] Each module in the aforementioned vehicle lighting control device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the controller in hardware form or independent of it, or stored in the memory of the controller in software form, so that the processor can call and execute the corresponding operations of each module.
[0281] In one embodiment, a central controller is provided, the internal structure of which can be shown in the following diagram: Figure 13As shown, the controller includes a processor, memory, input / output interfaces, and a communication interface. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a vehicle lighting control method.
[0282] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the controller to which the present application is applied. A specific controller may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0283] In one embodiment, a controller is also provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above method embodiments.
[0284] In one exemplary embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.
[0285] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0286] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0287] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0288] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0289] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A vehicle lighting control method, characterized in that, Applied to a central controller, the method includes: Obtain the centroid of the vehicle performance area and the target performance position of any vehicle. Based on the target performance position and the centroid position, obtain the light sequence index of each performance vehicle and the special effects granularity of each performance vehicle; Based on the light sequence index and the special effects granularity, construct the light control information of each performance vehicle, and construct the control commands of each performance vehicle based on the light control information and the target performance position. Each of the control commands is sent to each of the performance vehicles to instruct each performance vehicle to perform a light show according to the special effects granularity and the light sequence index after arriving at each target performance position.
2. The method according to claim 1, characterized in that, The process of obtaining the centroid position of the vehicle performance area includes: Obtain the shape type of the vehicle performance venue; When the field shape type indicates that the vehicle performance venue is a convex polygonal field, multiple field boundary coordinates of the vehicle performance venue are obtained, and the field area of the vehicle performance venue is obtained based on each of the field boundary coordinates. The centroid of the vehicle performance area is determined based on the coordinates of each of the site boundaries and the area of the site.
3. The method according to claim 2, characterized in that, After obtaining the shape type of the vehicle performance venue, the process further includes: When the field shape type indicates that the vehicle performance venue is a concave polygonal field, the vehicle performance venue is triangulated to obtain multiple performance venue sub-regions. Obtain the area of each performance venue sub-region and the position of the sub-centroid of each performance venue sub-region; The centroid positions of the sub-centroids are weighted using the area of each region to obtain the centroid position of the vehicle performance area.
4. The method according to claim 1, characterized in that, The light sequence index is obtained through the following steps: Based on each of the target performance positions and the centroid position, the relative direction between each performance vehicle and the centroid position is obtained; Based on the relative directions, obtain the venue zoning information where each of the performance vehicles is located; From the pre-stored mapping relationship, obtain the light index sequence corresponding to each of the venue partition information, and use it as the light sequence index of each of the performance vehicles.
5. The method according to claim 1, characterized in that, The granularity of the special effects is obtained through the following steps: Based on the target performance positions and the centroid positions, the distance between each performance vehicle and the centroid position is obtained; If the distance is less than a preset distance threshold, the special effects granularity of the performance vehicle is determined to be the first special effects granularity; When the distance is greater than or equal to the preset distance threshold, the special effect granularity of the performance vehicle is determined to be the second special effect granularity; wherein, the level of detail of the special effect pattern represented by the first special effect granularity is greater than the level of detail of the special effect pattern represented by the second special effect granularity.
6. The method according to any one of claims 1 to 5, characterized in that, Sending the control commands to each of the performance vehicles to instruct them to perform a light show according to the special effects granularity and light sequence index after arriving at the target performance position includes: Each of the aforementioned control commands is sent to each of the aforementioned performance vehicles; the performance vehicles are used to reach the target performance location via an autonomous driving system, and after the performance vehicles reach the target performance location, they send a location arrival signal to the central controller; Upon detecting the arrival signal of the return position of each of the performance vehicles, a light show signal is sent to each of the performance vehicles; the light show signal is used to instruct each of the performance vehicles to perform a light show according to the special effects granularity and the light sequence index.
7. The method according to claim 6, characterized in that, Each of the aforementioned location arrival signals carries the vehicle position of each of the aforementioned performance vehicles; the step of sending a light show signal to each of the aforementioned performance vehicles upon detecting the return location arrival signal of each of the aforementioned performance vehicles includes: Upon detecting the return location arrival signal of each of the performance vehicles, a location check is performed based on the vehicle location carried in each location arrival signal, and a signal integrity check is performed on each of the performance vehicles. If the position verification and signal integrity verification of any of the performance vehicles pass, obtain the PTP timestamp and get the light show execution time based on the PTP timestamp, construct the light show signal based on the light show execution time and send it. If the position verification or signal integrity verification of any of the performance vehicles fails, a signal retransmission command is sent to that performance vehicle to instruct it to re-upload the position arrival signal.
8. A vehicle lighting control device, characterized in that, The device, applied to a central controller, includes: The performance information acquisition module is used to acquire the centroid position of the vehicle performance venue and the target performance position of any performing vehicle. The lighting control acquisition module is used to acquire the lighting sequence index of each performance vehicle and the special effects granularity of each performance vehicle based on each target performance position and the centroid position. The control command construction module is used to construct the lighting control information of each performance vehicle according to each lighting sequence index and each special effect granularity, and to construct the control command of each performance vehicle according to each lighting control information and each target performance position. The light show execution module is used to send the control commands to the performance vehicles to instruct the performance vehicles to perform the light show according to the special effects granularity and light sequence index after they arrive at the target performance positions.
9. A controller comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.