A method, device and medium for detecting safety of a laser mounted on a drone for performance

CN122881635APending Publication Date: 2026-10-09SHENZHEN DAMO DAZHI CONTROL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611374497.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

由于表演涉及大量无人机、长时间轴和多个激光通道,人工观察难以覆盖所有时刻和所有无人机,容易遗漏风险

Benefits of technology

[0015]本发明提供了一种无人机表演激光挂载安全检测方法、设备及介质,通过将位置关键帧、激光关键帧、云台关键帧的帧号与检测起始帧号、检测结束帧号合并去重并按帧号顺序构建检测采样帧集合,使检测采样帧覆盖所有位置变化时刻、激光开关变化时刻、云台姿态变化时刻以及检测区间边界,从而避免遗漏任一状态变化时刻。进一步地,针对每架无人机在各检测采样帧根据位置关键帧进行插值,得到该无人机的空间坐标;同时根据激光关键帧和云台关键帧进行阶梯查找,得到该无人机的激光通道开关状态和云台姿态,使每个检测采样帧均具备对应的位置信息和状态信息,为检测提供完整输入。进一步地,基于该空间坐标、激光通道开关状态、云台姿态、安全检测参数和待检测物体数据,在各检测采样帧执行低空开启激光检测、激光扫射范围检测和激光与物体相交检测,分别发现低空开启激光风险、地面或天面越界风险和激光与物体相交风险,得到异常帧。进一步地,将连续异常帧合并为异常帧段,输出异常无人机编号和异常帧段,使风险可定位到具体无人机和具体帧区间。由此,该方法通过构建覆盖全时间轴的检测采样帧集合、为各检测采样帧提供完整位置与状态输入、执行三类安全检测并输出可定位的异常结果,实现了对无人机激光表演设计阶段安全风险的全面检测。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122881635A_ABST
    Figure CN122881635A_ABST
Patent Text Reader

Abstract

The application discloses a kind of unmanned plane performance laser mounting safety detection method, equipment and medium, it is related to unmanned plane technical field.The method comprises: obtaining unmanned plane performance engineering data, object data to be detected and safety detection parameter;Frame number of position key frame, laser key frame, gimbals key frame is merged with detection start frame number, detection end frame number, and duplicate is removed, and detection sampling frame set is constructed according to frame number order;To each detection sampling frame, space coordinates are obtained according to position key frame interpolation, and laser channel switch state and gimbals posture are obtained according to laser key frame and gimbals key frame ladder search;According to space coordinates, laser channel switch state, gimbals posture, safety detection parameter and object data to be detected, low-altitude opening laser detection, laser scanning range detection and laser and object intersection detection are executed, and abnormal frame is obtained;Continuous abnormal frame is merged into abnormal frame section, and detection result is output.The application can improve the comprehensiveness and accuracy of unmanned plane performance detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicle (UAV) technology, and in particular to a method, equipment, and medium for safety detection of laser-mounted drone displays. Background Technology

[0002] In drone performances, projecting patterns with laser equipment can enhance visual appeal. However, lasers are highly directional and have concentrated energy. If they are activated at low altitudes, the scanning range exceeds the preset area, or they intersect with other objects, it may cause equipment damage, personal injury, or flight accidents.

[0003] Currently, in existing technologies, the commonly used design process mainly relies on designers manually observing the drone's position, laser direction, and performance effects in 3D software to determine safety. Since performances involve a large number of drones, long time axes, and multiple laser channels, manual observation cannot cover all moments and all drones, easily overlooking risks. Furthermore, the laser direction changes with gimbal attitude and keyframes, making it difficult for humans to accurately calculate the intersection points of the laser beam with the ground, roof, or other objects. Position keyframes, laser keyframes, and gimbal keyframes are interleaved in time, requiring designers to review different keyframe sequences separately, making it difficult to efficiently determine the actual safety status of each drone at a given moment. Furthermore, the detection results lack unified recording and output, making it difficult to quickly locate specific drones and frame intervals after a problem is discovered. These problems lead to safety detection being highly dependent on human experience, inefficient, and inaccurate, requiring repeated rework when problems are discovered later. Summary of the Invention

[0004] This invention provides a method, equipment, and medium for safety testing of laser mounts in drone performances. The technical problem it aims to solve is: how to provide an effective solution that can comprehensively detect safety risks during the design phase of drone laser performances.

[0005] In a first aspect, the present invention provides a method for safety detection of laser payloads used in drone performances, comprising: Acquire drone performance engineering data, object data to be detected, and safety detection parameters. The drone performance engineering data includes position keyframes, laser keyframes, gimbal keyframes, detection start frame number, and detection end frame number for each drone. The frame numbers of the location keyframe, the laser keyframe, the gimbal keyframe, the detection start frame number, and the detection end frame number are merged and deduplicated, and a set of detection sampling frames is constructed in order of frame number. For each UAV, interpolation is performed on each detection sampling frame in the set of detection sampling frames based on the location keyframes to obtain the spatial coordinates of the UAV; For each UAV, in each detection sampling frame in the detection sampling frame set, a step search is performed based on the laser key frame and the gimbal key frame to obtain the laser channel switch state and gimbal attitude of the UAV. For each UAV, in each detection sampling frame in the detection sampling frame set, based on the spatial coordinates, the laser channel switch status, the gimbal attitude, the safety detection parameters, and the data of the object to be detected, low-altitude laser activation detection, laser sweep range detection, and laser-object intersection detection are performed to obtain abnormal frames; The consecutive abnormal frames are merged into an abnormal frame segment, and the detection result is output. The detection result includes the abnormal drone number and the abnormal frame segment.

[0006] Optionally, for each UAV, interpolating the spatial coordinates of the UAV based on the location keyframes in each detection sampling frame of the detection sampling frame set includes: For each detection sampling frame in the set of detection sampling frames, obtain the frame number and coordinates of the previous and next position keyframes adjacent to the current detection sampling frame; The interpolation ratio is calculated based on the frame number of the current detection sampling frame, the frame number of the previous key frame, and the frame number of the next key frame. Based on the interpolation ratio, the coordinates of the previous keyframe, and the coordinates of the next keyframe, calculate the coordinate components of the spatial coordinates corresponding to the current detection sampling frame.

[0007] Optionally, for each UAV, the step of performing a stepwise search based on the laser keyframe and the gimbal keyframe in each detection sampling frame of the detection sampling frame set to obtain the laser channel switching state and gimbal attitude of the UAV includes: Acquire the initial state of the laser and the initial state of the gimbal; For each detection sampling frame in the set of detection sampling frames, find the nearest laser keyframe whose frame number is less than or equal to that detection sampling frame; If there is a laser keyframe with a frame number less than or equal to the detected sampling frame, then the laser state of the found laser keyframe is taken as the current laser channel switch state. If there is no laser keyframe with a frame number less than or equal to the detected sampling frame, then the initial laser state is used as the current laser channel switching state. Find the nearest gimbal keyframe whose frame number is less than or equal to the detected sampling frame; If there is a gimbal keyframe with a frame number less than or equal to the detected sampling frame, then the attitude of the found gimbal keyframe is taken as the current gimbal attitude. If there is no gimbal keyframe with a frame number less than or equal to the detected sampling frame, then the gimbal initial state is used as the current gimbal attitude.

[0008] Optionally, the low-altitude laser detection includes: Obtain the safety height threshold from the safety detection parameters; For each drone, in each detection sampling frame in the set of detection sampling frames, it is determined whether the height component of the spatial coordinates is less than the safe height threshold and whether any laser channel is in the open state. If the height component of the spatial coordinates is less than the safe height threshold, and any laser channel is in the open state, then the detection sampling frame is marked as a low-altitude open abnormal frame. If the height component of the spatial coordinates is not less than the safe height threshold, or if all laser channels are in the off state, then the detection sampling frame is not marked.

[0009] Optionally, both the laser scanning range detection and the laser-object intersection detection include: Based on the pitch angle, roll angle, and yaw angle in the gimbal attitude, determine the first rotation matrix for rotating the roll angle around the x-axis of the device body coordinate system, the second rotation matrix for rotating the pitch angle around the y-axis of the device body coordinate system, and the third rotation matrix for rotating the yaw angle around the z-axis of the device body coordinate system. Multiply the third rotation matrix, the second rotation matrix, and the first rotation matrix sequentially to obtain a combined rotation matrix; Obtain the initial direction vector of the laser in the device body coordinate system, multiply the combined rotation matrix with the initial direction vector of the laser in the device body coordinate system, and normalize the multiplication result to obtain the laser direction vector in the world coordinate system. Based on the spatial coordinates and the laser direction vector, a laser ray is constructed that starts from the spatial coordinates and extends along the laser direction vector.

[0010] Optionally, the laser scanning range detection further includes: Ground safety zone parameters and roof safety zone parameters are obtained from the safety detection parameters. The ground safety zone parameters include ground plane height and ground circular safety zone parameters, and the ground circular safety zone parameters include the center coordinates and radius. The roof safety zone parameters include roof plane height and roof circular safety zone parameters, and the roof circular safety zone parameters include the center coordinates and radius. For the ground plane, determine whether the z-component of the laser direction vector is zero; If the z-component of the laser direction vector is zero, then ground intersections are not calculated and ground boundary crossing anomaly frames are not recorded. If the z-component of the laser direction vector is not zero, then determine whether the z-component of the laser direction vector is less than zero and whether the z-component of the spatial coordinate is greater than the ground plane height. If the z-component of the laser direction vector is less than zero and the z-component of the spatial coordinate is greater than the height of the ground plane, then calculate the intersection point of the laser ray and the ground plane to obtain the ground intersection point; obtain the center coordinates and radius of the circular safety zone parameters on the ground; obtain the horizontal coordinates of the ground intersection point; and determine whether the horizontal distance from the ground intersection point to the center coordinates is greater than the radius. If the horizontal distance from the ground intersection point to the center coordinates of the circle is greater than the radius, then record a ground boundary crossing anomaly frame; If the horizontal distance from the ground intersection point to the center coordinates of the circle is not greater than the radius, then no ground boundary crossing anomaly frame is recorded; If the z-component of the laser direction vector is not less than zero or the z-component of the spatial coordinate is not greater than the ground plane height, then the ground intersection point is not calculated and the ground boundary crossing anomaly frame is not recorded. For the sky plane, determine whether the z-component of the laser direction vector is zero; If the z-component of the laser direction vector is zero, then the intersection point of the sky surface is not calculated and the abnormal frame of the sky surface crossing the boundary is not recorded. If the z-component of the laser direction vector is not zero, then determine whether the z-component of the laser direction vector is greater than zero and whether the z-component of the spatial coordinate is less than the height of the sky plane. If the z-component of the laser direction vector is greater than zero and the z-component of the spatial coordinate is less than the height of the sky plane, then calculate the intersection point of the laser ray and the sky plane to obtain the sky intersection point; obtain the center coordinates and radius of the circular safety area parameters of the sky; obtain the horizontal coordinates of the sky intersection point; and determine whether the horizontal distance from the sky intersection point to the center coordinates is greater than the radius. If the horizontal distance from the intersection point of the sky to the center coordinates of the circle is greater than the radius, then record the sky boundary crossing anomaly frame; If the horizontal distance from the intersection point of the sky to the center coordinates of the circle is not greater than the radius, then no sky boundary crossing abnormal frame is recorded; If the z-component of the laser direction vector is not greater than zero or the z-component of the spatial coordinate is not less than the height of the sky plane, then the sky intersection point is not calculated and the sky boundary crossing abnormal frame is not recorded.

[0011] Optionally, the laser scanning range detection further includes: Calculate the horizontal coordinates of all ground and roof intersections; Based on the horizontal coordinates, determine the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate; Construct the circumscribed rectangle based on the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate.

[0012] Optionally, the laser-object intersection detection further includes: Obtain collision detection parameters from the safety detection parameters; obtain a safety threshold from the collision detection parameters; Obtain the object to be detected and its spatial position from the object data; calculate the distance from the object to be detected to the laser beam; Determine whether the distance is less than the safety threshold, and whether the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is non-negative; If the distance is less than the safety threshold, and the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is non-negative, then it is determined that the object to be detected is at risk of being irradiated by the laser or colliding with it, and an intersection anomaly frame is recorded. If the distance is not less than the safety threshold, or the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is negative, then no intersection anomaly frame is recorded. The following are obtained from the object data to be detected: the planar object to be detected, a point on the planar object to be detected, the normal vector, and the boundary range of the planar object to be detected; Determine whether the dot product of the normal vector and the laser direction vector is zero; If the dot product of the normal vector and the laser direction vector is zero, then the ray parameters are not calculated and the intersection anomaly frames are not recorded. If the dot product of the normal vector and the laser direction vector is not zero, then the ray parameters are calculated based on the normal vector, a point on the plane object to be detected, the spatial coordinates, and the laser direction vector. If the ray parameter is greater than zero and the intersection point determined according to the ray parameter falls within the boundary range of the plane object to be detected, then an intersection risk is determined, and an intersection anomaly frame is recorded. If the ray parameter is not greater than zero or the intersection point determined by the ray parameter does not fall within the boundary range of the plane object to be detected, then no intersection anomaly frame is recorded.

[0013] Secondly, the present invention also provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0014] Thirdly, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the above-described method.

[0015] This invention provides a method, device, and medium for safety detection of laser payloads in unmanned aerial vehicle (UAV) performances. By merging and deduplicating the frame numbers of position keyframes, laser keyframes, and gimbal keyframes with the detection start and end frame numbers, and constructing a set of detection sampling frames in sequence, the detection sampling frames cover all moments of position change, laser on / off change, gimbal attitude change, and detection interval boundaries, thus avoiding the omission of any state change moment. Furthermore, for each UAV, interpolation is performed on the position keyframes in each detection sampling frame to obtain the UAV's spatial coordinates; simultaneously, a stepwise search is performed based on the laser keyframes and gimbal keyframes to obtain the UAV's laser channel on / off state and gimbal attitude, ensuring that each detection sampling frame has corresponding position and state information, providing complete input for detection. Further, based on the spatial coordinates, laser channel on / off state, gimbal attitude, safety detection parameters, and object data, low-altitude laser activation detection, laser sweep range detection, and laser-object intersection detection are performed in each detection sampling frame to identify risks of low-altitude laser activation, ground or rooftop boundary crossing, and laser-object intersection, respectively, resulting in abnormal frames. Furthermore, consecutive abnormal frames are merged into abnormal frame segments, and the abnormal drone number and abnormal frame segment are output, allowing the risk to be located to a specific drone and a specific frame interval. Thus, this method achieves comprehensive detection of safety risks in the design phase of drone laser performances by constructing a set of detection sampling frames covering the entire time axis, providing complete position and status inputs for each detection sampling frame, performing three types of safety detections, and outputting locatable abnormal results. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 A flowchart illustrating a method for safety detection of laser mounts in drone performances, provided by an embodiment of the present invention; Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0020] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0021] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0022] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."

[0023] Please see Figure 1This invention provides a method for safety detection of laser-mounted drone performances. In drone performances, drones equipped with laser devices can project patterns, lines, and dynamic effects onto the ground, sky backdrops, or designated spatial areas. However, lasers have physical characteristics such as strong directionality, concentrated energy, and long propagation distance. Furthermore, when a drone activates its laser at low altitude, the laser sweeping range exceeds a preset safety zone, or the laser beam intersects with other drones, buildings, audience areas, stage equipment, or other objects, it may cause equipment damage, personal injury, or flight accidents. Therefore, when designing performances using laser-mounted drones, it is not enough to only focus on the aesthetics of the patterns and the smoothness of the trajectory; the laser activation height, sweeping range, spatial intersection relationships, and collision risks must be pre-constrained during the design phase. To address this, this embodiment incorporates the drone's position, laser switch status, gimbal attitude, performance timeline, safety boundaries, and object intersection relationships into the calculation. It identifies risks before the pattern and actions are formally executed and outputs anomalies pinpointed to the drone's number and frame interval. This solves the problems of existing manual observation methods, which struggle to cover the entire timeline, all drones, and all laser channels, as well as the difficulty in accurately calculating the intersection points of the laser beam with the ground, the canopy, or other objects. Specifically, the method includes the following steps: S1, acquire drone performance engineering data, object data to be detected, and safety detection parameters. The drone performance engineering data includes the position keyframe, laser keyframe, gimbal keyframe, detection start frame number, and detection end frame number for each drone.

[0024] In practice, the system acquires drone performance engineering data, object data to be detected, and safety detection parameters. The drone performance engineering data is a set of data describing the state changes of the drones within the performance timeline, including position keyframes, laser keyframes, gimbal keyframes, detection start frame number, and detection end frame number for each drone. Position keyframes are data objects recording the spatial position of the drone at a specific frame number. Each position keyframe contains the drone's spatial coordinates corresponding to that frame number, including x, y, and z components, where the z component represents the drone's altitude. Furthermore, laser keyframes are data objects recording the on / off state of the laser channel mounted on the drone at a specific frame number. Each laser keyframe contains the laser channel's on / off state information corresponding to that frame number. Furthermore, gimbal keyframes are data objects recording the gimbal's attitude angles at a specific frame number. Each gimbal keyframe contains the gimbal's attitude information corresponding to that frame number, including pitch, roll, and yaw angles. Furthermore, the detection start frame number and detection end frame number specify the start and end points of the time interval for this safety detection, respectively. Furthermore, the data of the object to be detected includes the spatial location or geometric abstraction of other drones, stage equipment, buildings, and restricted areas, used for subsequent laser-object intersection detection. Furthermore, the safety detection parameters are a set of preset parameters required to perform various detections, including a safety height threshold, ground safety area parameters, roof safety area parameters, and collision detection parameters. The safety height threshold is the minimum permissible laser activation height; the ground safety area parameters describe the circular area on the ground plane that is allowed to be illuminated by the laser; the roof safety area parameters describe the circular area on the sky screen plane that is allowed to be illuminated by the laser; and the collision detection parameters control the sensitivity and accuracy of laser-object intersection judgment. Furthermore, the safety detection parameters and the data of the object to be detected can be obtained by reading a pre-configured project file or by receiving input from the designer through an interactive interface; this invention is not specifically limited in this regard. The project file can be stored in a structured data format, such as Extensible Markup Language (XML) or Data Exchange (DEX) format (e.g., JSON), to facilitate system parsing and loading; this invention is not specifically limited in this regard either.

[0025] S2, merge and deduplicate the frame numbers of the location key frame, the laser key frame, the gimbal key frame, the detection start frame number, and the detection end frame number, and construct a set of detection sampling frames in order of frame number.

[0026] In specific implementation, the system merges and deduplicates the frame numbers of the position keyframe, laser keyframe, gimbal keyframe, detection start frame number, and detection end frame number, and constructs a detection sampling frame set in order of frame number. Merging and deduplication involves aggregating all the aforementioned frame numbers, removing duplicates, and then arranging them in ascending order to form a set. Furthermore, each frame number in the detection sampling frame set is called a detection sampling frame. Since position changes, laser switch changes, and gimbal attitude changes all occur on their corresponding keyframes, including all frame numbers of these three types of keyframes in the detection sampling frame set ensures that every moment of position change, laser switch change, and gimbal attitude change is detected and covered, avoiding omissions. Furthermore, the detection start frame number and detection end frame number define the detection time range, and all detection sampling frames in the detection sampling frame set fall within this time range. Furthermore, the key to this construction method is unifying the state change moments and the detection interval boundaries into the same time sampling sequence, enabling subsequent position interpolation and state lookup to be performed on this sequence. Furthermore, in practical engineering, position keyframes, laser keyframes, and gimbal keyframes belong to three different editing tracks. Designers add keyframes to each track to control the UAV's trajectory, laser switching timing, and gimbal orientation changes. The frame number distribution of the three tracks is usually inconsistent; a certain track may have a state change at a certain frame number, while other tracks may not have a keyframe at that frame number. If all frames within the detection interval are used as detection sampling frames one by one, the sampling density will be too high, increasing the computational load. If only keyframes of a single track are used as sampling points, the state change moments of other tracks will be missed. Therefore, this embodiment merges the keyframe numbers of the three tracks and adds the detection interval boundary frame numbers, so that the set of detection sampling frames exactly covers all state change moments, avoiding both the excessive computation of frame-by-frame sampling and the risk of omissions from single-track sampling. The merged and deduplicated set of detection sampling frames is arranged in ascending order of frame number, providing a basis for subsequent sequential traversal and state ladder lookup.

[0027] S3. For each UAV, interpolate the spatial coordinates of the UAV based on the location keyframes in each detection sampling frame of the detection sampling frame set.

[0028] In practice, for each UAV, the system interpolates the spatial coordinates of each detection sampling frame in the detection sampling frame set based on the position keyframes. The interpolation operation is based on the two adjacent position keyframes before and after the current detection sampling frame, calculating the position of the current detection sampling frame according to the frame number ratio between the coordinates of the two position keyframes. Furthermore, for a detection sampling frame that exactly coincides with a certain position keyframe, the interpolation result is the coordinate of that position keyframe. The spatial coordinates obtained by interpolation are the three-dimensional position of the UAV in the world coordinate system, including x, y, and z components. These spatial coordinates will serve as the position input for subsequent low-altitude laser activation detection, laser scanning range detection, and laser-object intersection detection.

[0029] In some preferred embodiments, the step of interpolating the spatial coordinates of the UAV based on the location keyframes in each detection sampling frame of the detection sampling frame set for each UAV includes: for each detection sampling frame in the detection sampling frame set, obtaining the frame number and coordinates of the previous and next location keyframes adjacent to the current detection sampling frame; calculating the interpolation ratio based on the frame number of the current detection sampling frame, the frame number of the previous location keyframe, and the frame number of the next location keyframe; and calculating the coordinate components of the spatial coordinates corresponding to the current detection sampling frame based on the interpolation ratio, the coordinates of the previous location keyframe, and the coordinates of the next location keyframe.

[0030] In practical implementation, in drone performance engineering data, designers typically edit drone flight trajectories using discrete keyframes. The drone position between adjacent keyframes needs to be determined through interpolation. This embodiment addresses the problem in existing methods where the drone position cannot be continuously determined between position keyframes, leading to potential missing position data in detection sampling frames. The specific implementation method is as follows: For each detection sampling frame in the detection sampling frame set, the system obtains the frame number and coordinates of the preceding and following position keyframes adjacent to the current detection sampling frame. The preceding position keyframe refers to the position keyframe with a frame number less than the current detection sampling frame and closest to it, and the following position keyframe refers to the position keyframe with a frame number greater than the current detection sampling frame and closest to it. Furthermore, the coordinates of each position keyframe include x, y, and z components. In actual engineering data, the position keyframes of each UAV may have different frame number distributions. The system performs interpolation processing separately for each UAV according to the same detection sampling frame set. Further, for the case where a detection sampling frame coincides with a certain position keyframe, the interpolation processing can be simplified to directly using the coordinates of that position keyframe. For the special case where there are fewer than two position keyframes within the detection interval, the coordinates of that position keyframe can be used as the spatial coordinates of all detection sampling frames. That is, when there is only one position keyframe within the detection interval, the UAV is considered to be stationary within the detection interval.

[0031] Furthermore, the system calculates the interpolation ratio based on the frame number of the current detection sampling frame, the frame number of the previous keyframe, and the frame number of the next keyframe. The interpolation ratio reflects the relative position of the current detection sampling frame between the previous and next keyframes. Further, let the frame number of the current detection sampling frame be f, the frame number of the previous keyframe be f0, and the frame number of the next keyframe be f1. The interpolation ratio t is calculated according to the following mathematical formula: t=(f-f0) / (f1-f0).

[0032] In this formula, f is the frame number of the current detection sampling frame, f0 is the frame number of the previous keyframe, and f1 is the frame number of the next keyframe. The numerator f-f0 represents the frame interval between the current detection sampling frame and the previous keyframe, and the denominator f1-f0 represents the total frame interval between the two keyframes. The interpolation ratio t typically ranges from 0 to 1, where 0 indicates that the current detection sampling frame coincides with the previous keyframe, 1 indicates that the current detection sampling frame coincides with the next keyframe, and 0.5 indicates that the current detection sampling frame is located at the midpoint between the two keyframes. The physical meaning of this formula is: the ratio of the relative distance of the current detection sampling frame to the previous keyframe on the time axis to the total distance between the two keyframes.

[0033] Furthermore, the system calculates the coordinate components of the spatial coordinates corresponding to the current detection sampling frame based on the interpolation ratio, the coordinates of the previous keyframe, and the coordinates of the next keyframe. Let the coordinates of the previous keyframe be P0 = (x0, y0, z0), the coordinates of the next keyframe be P1 = (x1, y1, z1), and the spatial coordinates corresponding to the current detection sampling frame be P = (x, y, z). Each coordinate component is calculated using the following mathematical formula: x = x0 + t × (x1 - x0); y = y0 + t × (y1 - y0); z = z0 + t × (z1 - z0).

[0034] Further, in the above formula, x0, y0, and z0 are the coordinate components of the previous keyframe on the x, y, and z axes, respectively; x1, y1, and z1 are the coordinate components of the next keyframe on the x, y, and z axes, respectively; x, y, and z are the coordinate components of the current detection sampling frame on the x, y, and z axes, respectively; and t is the interpolation ratio. Further, for each coordinate component, the calculation method is to add the component from the previous keyframe to the product of the interpolation ratio and the difference between the components from the previous and next keyframes. This calculation process is linear interpolation, and its physical meaning is that it assumes the UAV moves at a constant speed along a straight line between two adjacent keyframes, and the position of the current detection sampling frame is uniformly distributed along this straight line according to the time ratio. Further, taking the x-component as an example, x1 - x0 represents the total displacement of the two previous keyframes in the x-axis direction, t × (x1 - x0) represents the displacement of the current detection sampling frame relative to the previous keyframe in the x-axis direction, and x0 plus this displacement gives the x-coordinate of the current detection sampling frame. The same applies to the y-component and z-component.

[0035] Furthermore, linear interpolation can provide positional data for any detection sampling frame with low computational overhead, and when the spacing between adjacent keyframes is small, the linear motion assumption can approximate the actual trajectory of the UAV well. When a detection sampling frame coincides with a keyframe at a certain location, the interpolation ratio t is either 0 or 1, and the interpolation result is the coordinate of that keyframe, ensuring that the positional data of the detection sampling frame at the keyframe is completely consistent with the original edited data. Furthermore, the spatial coordinates obtained from the interpolation are used as positional inputs for subsequent low-altitude laser activation detection, laser scanning range detection, and laser-object intersection detection, ensuring that all detection sampling frames have corresponding spatial positional information, and the data stream is complete and uninterrupted.

[0036] This embodiment expands discrete position keyframes into spatial coordinates corresponding to each detection sampling frame in the detection sampling frame set through linear interpolation, achieving continuous reconstruction of the UAV's position on the time axis. Compared to detection methods that only use position keyframes, this embodiment ensures accurate position data at all state change moments, avoiding detection omissions caused by the lack of position data at state change moments. Furthermore, linear interpolation is simple to calculate and can be directly applied to the discrete keyframe editing methods commonly used in performance design without significantly increasing computational overhead. The calculation of the interpolation ratio explicitly depends on the frame numbers of the preceding and following position keyframes and the frame number of the current detection sampling frame. The interpolation result can provide accurate UAV position input for subsequent detection, ensuring the executability of the detection method on actual engineering data.

[0037] S4. For each UAV, in each detection sampling frame in the detection sampling frame set, perform a stepwise search based on the laser key frame and the gimbal key frame to obtain the laser channel switch state and gimbal attitude of the UAV.

[0038] In practical implementation, for each UAV, the system performs a stepwise search based on laser keyframes and gimbal keyframes within the detection sampling frame set to obtain the UAV's laser channel on / off state and gimbal attitude. Further, the stepwise search refers to taking the laser state of the nearest laser keyframe with a frame number less than or equal to that detection sampling frame as the current laser channel on / off state, and taking the attitude of the nearest gimbal keyframe with a frame number less than or equal to that detection sampling frame as the current gimbal attitude. Further, when no corresponding keyframe exists before the detection sampling frame, the initial laser state and initial gimbal state are used as the current state. Further, the laser channel on / off state records the on / off status of each laser channel, and the gimbal attitude records the gimbal's pitch, roll, and yaw angles. The laser channel on / off state and gimbal attitude obtained through the stepwise search correspond to the same detection sampling frame as the spatial coordinates, constituting the complete detection input for that detection sampling frame.

[0039] In some preferred embodiments, the step of performing a stepwise search for each UAV in each detection sampling frame of the detection sampling frame set, based on the laser keyframe and the gimbal keyframe, to obtain the laser channel switching state and gimbal attitude of the UAV, includes: obtaining the initial laser state and the initial gimbal state; for each detection sampling frame in the detection sampling frame set, searching for the nearest laser keyframe with a frame number less than or equal to the detection sampling frame; if a laser keyframe with a frame number less than or equal to the detection sampling frame exists, then the laser state of the found laser keyframe is used as the current laser channel switching state; if no laser keyframe with a frame number less than or equal to the detection sampling frame exists, then the initial laser state is used as the current laser channel switching state; searching for the nearest gimbal keyframe with a frame number less than or equal to the detection sampling frame; if a gimbal keyframe with a frame number less than or equal to the detection sampling frame exists, then the attitude of the found gimbal keyframe is used as the current gimbal attitude; if no gimbal keyframe with a frame number less than or equal to the detection sampling frame exists, then the initial gimbal state is used as the current gimbal attitude.

[0040] In practical implementation, in the drone performance engineering data, both laser keyframes and gimbal keyframes record state changes discretely, and the state between adjacent keyframes usually maintains the value of the previous keyframe. This embodiment addresses the problem that the state of historical keyframes from before the detection interval may be incorrectly used at the beginning of the detection interval, leading to an incorrect state of the current detection sampling frame. The specific implementation method is as follows: The system acquires the initial laser state and the initial gimbal state. The initial laser state indicates the color or on / off state of each laser channel at the start of the detection frame, while the initial gimbal state indicates the direction vector or attitude of each laser channel at the start of the detection frame. The initial laser and gimbal states can be specified by the designer in the engineering data or inherited from the last state before the detection interval. When there is no corresponding keyframe within the detection interval, using the initial state ensures that the state of the current detection sampling frame has a definite source. The initial state can be acquired by reading preset initial values ​​from the engineering file or by reading the state value of the last keyframe before the detection interval.

[0041] Furthermore, for each detection sampling frame in the detection sampling frame set, the system searches for the nearest laser keyframe with a frame number less than or equal to that detection sampling frame. A laser keyframe records the laser channel on / off state at a specific frame number. If a laser keyframe with a frame number less than or equal to the detection sampling frame exists, the laser state of the found laser keyframe is used as the current laser channel on / off state. This laser state represents the laser channel on / off information recorded in that laser keyframe. Further, if no laser keyframe with a frame number less than or equal to the detection sampling frame exists, the initial laser state is used as the current laser channel on / off state. This usually occurs when the detection sampling frame is located before the first laser keyframe within the detection interval. This search method ensures that historical keyframes from before the detection interval are not used to overwrite the initial state of the current detection interval, avoiding the problem of incorrect state crossing the detection boundary.

[0042] Furthermore, the system searches for the nearest gimbal keyframe with a frame number less than or equal to the detected sampling frame. A gimbal keyframe records the gimbal attitude angle values ​​at a specific frame number. If a gimbal keyframe with a frame number less than or equal to the detected sampling frame exists, the attitude of that keyframe is used as the current gimbal attitude. This gimbal attitude includes pitch, roll, and yaw angles. If no gimbal keyframe with a frame number less than or equal to the detected sampling frame exists, the initial gimbal state is used as the current gimbal attitude. In this way, regardless of the location of the detected sampling frame within the detection interval, its laser channel switching state and gimbal attitude can be determined, ensuring a clear data source.

[0043] Furthermore, the name "ladder lookup" derives from the characteristic that the state value remains unchanged in a stepped manner as the frame number changes. Between two adjacent laser keyframes, the laser channel switch state retains the value of the previous laser keyframe until the next laser keyframe is encountered, at which point a jump occurs. This method aligns with the typical semantics of keyframe animation editing, where the state maintains the value of the previous keyframe between keyframes. Similarly, the gimbal attitude remains unchanged between two adjacent gimbal keyframes. It should be noted that the frame number distributions of laser keyframes and gimbal keyframes can differ. Ladder lookup is performed independently for laser keyframes and gimbal keyframes, determining the corresponding current state for each. Therefore, on the same detection sampling frame, the laser channel switch state may originate from a single laser keyframe, while the gimbal attitude may originate from a gimbal keyframe with a different frame number.

[0044] Furthermore, at the beginning of the detection interval, an initial laser state and a gimbal initial state are introduced, effectively avoiding the problem of historical keyframes from previous detection intervals incorrectly overwriting the initial state of the current segment. For example, if the detection interval starts from frame 100, and a certain laser keyframe is located at frame 50, and there are no laser keyframes before frame 100 within the detection interval, then the laser keyframe at frame 50 should not be used as the state source for the current detection sampling frame; otherwise, the historical state will be incorrectly carried over to the current detection interval. Furthermore, by using the initial laser state to replace historical keyframes, the independence and correctness of the state within the detection interval are ensured. The laser channel switch state and gimbal attitude obtained through the ladder lookup correspond to the frame number of the current detection sampling frame, serving as the state input for subsequent detections of that sampling frame.

[0045] This embodiment achieves correct assignment of laser channel switch status and gimbal attitude to the detection sampling frame set by finding the nearest keyframe with a frame number less than or equal to the current detection sampling frame and introducing an initial state as the default source in the absence of a keyframe. Furthermore, this step-wise search method ensures that the state information of each detection sampling frame has a clear and reasonable source, avoiding state data gaps and cross-interval erroneous inheritance. Furthermore, state assignment and position interpolation are independent, processing position and state data separately, together forming the data foundation for the detection input. This implementation is simple and reliable, and can adapt to the discrete keyframe editing mode commonly used in UAV performance engineering.

[0046] S5. For each UAV, in each detection sampling frame in the detection sampling frame set, based on the spatial coordinates, the laser channel switch status, the gimbal attitude, the safety detection parameters, and the data of the object to be detected, perform low-altitude laser activation detection, laser scanning range detection, and laser-object intersection detection to obtain abnormal frames.

[0047] In specific implementation, for each UAV, within the set of detection sampling frames, the system performs low-altitude laser activation detection, laser sweep range detection, and laser-object intersection detection based on spatial coordinates, laser channel on / off status, gimbal attitude, safety detection parameters, and object data, resulting in abnormal frames. Further, the low-altitude laser activation detection determines whether any laser channel is activated when the UAV is below a safe altitude threshold; if so, the detection sampling frame is marked as a low-altitude activation abnormal frame. Further, the laser sweep range detection determines whether the intersection of the laser beam with the ground plane or the sky plane exceeds a preset circular safety area; if so, the corresponding detection sampling frame is marked as a ground boundary violation abnormal frame or a sky boundary violation abnormal frame. Further, the laser-object intersection detection determines whether there is a risk of laser irradiation or collision between the laser beam and the object being detected; if so, the detection sampling frame is marked as an intersection abnormal frame. Furthermore, the results of the above three types of detections are all abnormal frames, which are identifiers recording detection sampling frames with potential safety hazards and their abnormality types. The three types of detections can be performed sequentially or in parallel; the specific order does not affect the completeness of the detection results.

[0048] In some preferred embodiments, the low-altitude laser detection includes: obtaining a safe altitude threshold from the safety detection parameters; for each UAV, determining in each detection sampling frame in the detection sampling frame set whether the altitude component of the spatial coordinates is less than the safe altitude threshold and whether any laser channel is in an on state; if the altitude component of the spatial coordinates is less than the safe altitude threshold and any laser channel is in an on state, then marking the detection sampling frame as a low-altitude activation abnormal frame; if the altitude component of the spatial coordinates is not less than the safe altitude threshold, or all laser channels are in a closed state, then not marking the detection sampling frame.

[0049] In practice, drones activating lasers at low altitudes may cause the laser to illuminate personnel, equipment, or sensitive ground areas at close range, posing a safety risk. This embodiment addresses the lack of automatic judgment regarding the risk of accidental laser activation by drones at insufficient altitude, as found in existing methods. The specific implementation method is as follows: The system obtains the safety height threshold from safety detection parameters. The safety height threshold is a pre-set minimum permissible altitude for laser activation. Below this altitude, drones activating the laser may expose personnel, equipment, or sensitive ground areas at close range, posing a safety risk. Furthermore, the safety height threshold can be determined based on the performance environment, personnel positions, and equipment layout. For example, in performances near the audience area, the safety height threshold can be set to 10 meters or higher; in uninhabited open areas, the safety height threshold can be appropriately lowered. The specific value of the safety height threshold is not a necessary limitation of this method and can be adjusted according to the actual application scenario.

[0050] Furthermore, for each drone, in each detection sampling frame in the detection sampling frame set, the system determines whether the altitude component of the spatial coordinates is less than the safe altitude threshold and whether any laser channel is in the on state. The altitude component of the spatial coordinates, i.e., the z-component, represents the drone's altitude in the world coordinate system. Furthermore, any laser channel being in the on state means that at least one of the multiple laser channels mounted on the drone is in the on state. A drone may carry multiple laser channels, each of which can be turned on or off independently. When the drone is at a low altitude and the laser is on, the laser emission point is closer to the ground or personnel, significantly increasing the risk. The altitude determination and the laser channel on / off state determination use a logical "AND" relationship, meaning that both conditions must be met simultaneously for an anomaly to be considered.

[0051] Furthermore, if the altitude component of the spatial coordinates is less than the safe altitude threshold, and any laser channel is in the active state, the detection sampling frame is marked as a low-altitude active laser anomalous frame. A low-altitude active laser anomalous frame refers to a frame where a low-altitude active laser safety hazard exists. The anomalous type associated with this frame is low-altitude active laser. Further, if the altitude component of the spatial coordinates is not less than the safe altitude threshold, or all laser channels are in the closed state, the detection sampling frame is not marked. This condition fully covers all possible situations: sufficient altitude or all lasers being off does not constitute a low-altitude active laser anomalous frame. Specifically, when the altitude component of the spatial coordinates is not less than the safe altitude threshold, regardless of whether the laser channels are active, the UAV's altitude is within the safe range and does not constitute a low-altitude active laser anomalous frame; when all laser channels are in the closed state, even if the UAV's altitude is low and no laser is emitted, it also does not constitute a low-altitude active laser anomalous frame.

[0052] Furthermore, the low-altitude laser activation anomaly frames will be merged with other detected anomaly frames in subsequent steps, and the merged frames will be included in the final detection results. Based on the detection results, designers can determine which frame segments the specific UAV is experiencing low-altitude laser activation and adjust the UAV's flight altitude or laser activation timing accordingly. The merging principle for consecutive anomaly frames is to merge multiple anomaly frames with adjacent frame numbers or intervals less than a preset merging threshold into the same anomaly frame segment, outputting the start and end frame numbers. Furthermore, the minimum altitude value of the anomaly frame segment can be output as an anomaly value, indicating the UAV's minimum flight altitude within that segment and providing designers with a risk level reference. The lower the minimum altitude value, the closer the UAV is to the ground when activating the laser at low altitude, and the greater the safety risk. Designers can prioritize processing anomaly frame segments with the smallest minimum altitude values.

[0053] This embodiment automatically identifies dangerous situations where drones activate their lasers at insufficient altitude by jointly determining a safe altitude threshold and the laser channel's on / off status. This detection process does not rely on manual observation, covers all drones and all sampled frames, eliminating the limitations of manual judgment. Furthermore, the detection conditions are clearly defined, the two branches are mutually exclusive and fully covered, with no omissions. The marking of abnormal frames provides direct input for subsequent merging and output, enabling designers to quickly locate the risky locations of low-altitude laser activation. This detection method can identify potential hazards during the design phase, preventing safety accidents caused by close-range laser irradiation during actual performances.

[0054] In some preferred embodiments, the laser scanning range detection and the laser-object intersection detection both include: determining a first rotation matrix for rotating the roll angle around the x-axis of the device body coordinate system, a second rotation matrix for rotating the pitch angle around the y-axis of the device body coordinate system, and a third rotation matrix for rotating the yaw angle around the z-axis of the device body coordinate system, based on the pitch angle, roll angle, and yaw angle in the gimbal attitude; multiplying the third rotation matrix, the second rotation matrix, and the first rotation matrix sequentially to obtain a combined rotation matrix; obtaining the initial direction vector of the laser in the device body coordinate system, multiplying the combined rotation matrix with the initial direction vector of the laser in the device body coordinate system, and normalizing the multiplication result to obtain the laser direction vector in the world coordinate system; and constructing a laser ray starting from the spatial coordinates and extending along the laser direction vector based on the spatial coordinates and the laser direction vector.

[0055] In practice, both laser scanning range detection and laser-object intersection detection require calculations based on the laser ray as a geometric model. The laser ray is determined by its emission point and direction vector, while the gimbal attitude is typically recorded in angles. Therefore, it is necessary to convert the gimbal attitude angles into laser direction vectors in the world coordinate system. The specific implementation method is as follows: The system determines a first rotation matrix for rotating the gimbal around the x-axis (tilt), a second rotation matrix for rotating the gimbal around the y-axis (pitch), and a third rotation matrix for rotating the gimbal around the z-axis (yaw) of its coordinate system, based on the pitch, roll, and yaw angles in the gimbal's attitude. The pitch angle is the angle of rotation of the gimbal around the y-axis, the roll angle is the angle of rotation around the x-axis, and the yaw angle is the angle of rotation around the z-axis. Each rotation matrix is ​​a 3x3 matrix, used to describe the coordinate transformation relationship of a spatial vector after rotating it around the corresponding coordinate axis by a specified angle. Each element of the rotation matrix consists of the cosine and sine values ​​of the corresponding angle.

[0056] Furthermore, the rotation matrix R of rotating about the x-axis by an angle φ x (φ) is expressed by the following mathematical formula: .

[0057] In this formula, φ is the angle of rotation about the x-axis, and cosφ and sinφ are the cosine and sine values ​​of this angle, respectively. When this matrix is ​​applied to column vectors, it keeps the x-component unchanged and mixes the y-component and z-component by the rotation angle φ.

[0058] Furthermore, the rotation matrix R of rotating about the y-axis by an angle θ y (θ) is expressed by the following mathematical formula: .

[0059] In this formula, θ is the angle of rotation about the y-axis, and cosθ and sinθ are the cosine and sine values ​​of this angle, respectively. When this matrix is ​​applied to column vectors, it keeps the y-component unchanged and mixes the x and z components by the rotation angle θ.

[0060] Furthermore, the rotation matrix R of the rotation angle ψ around the z-axis z (ψ) can be expressed by the following mathematical formula: .

[0061] In this formula, ψ is the angle of rotation about the z-axis, and cosψ and sinψ are the cosine and sine values ​​of this angle, respectively. When this matrix is ​​applied to column vectors, it keeps the z-component unchanged and mixes the x and y components by the rotation angle ψ.

[0062] The system multiplies the third, second, and first rotation matrices sequentially to obtain the combined rotation matrix. Let the pitch angle be θ, the roll angle be φ, and the yaw angle be ψ. The combined rotation matrix R is calculated using the following mathematical formula: R=R z (ψ)·R y (θ)·R x (φ).

[0063] In this formula, R z (ψ) represents the third rotation matrix that rotates by an angle ψ around the z-axis of the device's body coordinate system. R y (θ) represents the second rotation matrix that rotates by an angle θ around the y-axis of the device's body coordinate system. R x (φ) represents the first rotation matrix that rotates by an angle φ around the x-axis of the equipment's coordinate system. The symbol · indicates matrix multiplication. The multiplication order is R. z (ψ) multiplied by R on the left y (θ), the result is then multiplied on the left by R x(φ) represents the rotation angle around the z-axis (yaw), pitch around the y-axis (pitch), and roll around the x-axis (roll) in sequence. Matrix multiplication is not commutative, so the order of multiplication cannot be changed. The rotation semantics corresponding to this order are: first rotate the roll around the x-axis, then the pitch around the y-axis, and finally the yaw around the z-axis, consistent with the conventional Euler angle rotation order. Furthermore, the combined rotation matrix R is a 3x3 orthogonal matrix that integrates angular information from the three directions, enabling the transformation of vectors in the device body coordinate system to the world coordinate system. The characteristic of an orthogonal matrix is ​​that its inverse is equal to its transpose, and its determinant is 1; therefore, the length of the vector transformed by the combined rotation matrix remains unchanged.

[0064] Further, the system obtains the initial direction vector of the laser in the device's body coordinate system. The initial direction vector represents the fixed illumination direction of the laser emitter in the device's body coordinate system, typically along the front of the device or a specific installation direction. Let the initial direction vector be d0. Multiply the combined rotation matrix R by the initial direction vector d0, and normalize the result to obtain the laser direction vector d in the world coordinate system. The laser direction vector d is calculated according to the following mathematical formula: d=(R·d0 ) / |R·d0|.

[0065] Further, in this formula, d0 is the initial direction vector of the laser in the device's body coordinate system, R is the combined rotation matrix, R·d0 represents the vector after transforming the initial direction vector from the device's body coordinate system to the world coordinate system, |R·d0| represents the magnitude of the transformed vector, and d is the normalized unit direction vector. The normalization operation scales the magnitude of this vector to 1. Since the combined rotation matrix R is an orthogonal matrix, it maintains the vector length unchanged when applied to any vector. Therefore, if d0 itself is a unit vector, then |R·d0| equals 1, d equals R·d0, and the normalization operation can be omitted. However, for generality, normalization is still required when d0 is not a unit vector. The magnitude of the unit direction vector is 1, which facilitates subsequent ray parameter calculation and distance calculation. The laser direction vector contains x, y, and z components, and its z component is used to determine whether the laser is pointing upwards or downwards.

[0066] The system constructs a laser ray originating from the spatial coordinates and extending along the laser direction vector. Let the spatial coordinates be P, the laser direction vector be d, and the point L(t) on the laser ray be represented by the following mathematical formula: L(t) = P + t·d, t > 0.

[0067] Furthermore, in this formula, P is the laser emission point, i.e., the spatial coordinates of the UAV in the current detection sampling frame, d is the laser direction vector, and t is the ray parameter, representing the distance propagated from the emission point along the direction vector d. t>0 indicates that only points in the forward propagation direction of the laser are considered. A laser ray is a mathematical model used to describe the propagation path of a laser in space, mathematically expressed as a semi-straight line extending along the direction vector from the starting point. The semi-straight line extends only in the laser emission direction, not in the opposite direction, consistent with the physical characteristic of unidirectional laser propagation. This laser ray is used for calculating the intersection points with the ground and the sky in subsequent laser scanning range detection, and for determining the intersection with the object surface in laser-object intersection detection. When the laser direction vector d is a unit vector, the value of the ray parameter t is equal to the actual distance from the spatial point to the emission point, facilitating subsequent calculation of the physical distance. If d is not a unit vector, it needs to be divided by the magnitude of d when calculating the distance; this factor has been considered in subsequent related detection steps.

[0068] This embodiment achieves a unified transformation from angular attitude to spatial direction vectors by converting the gimbal attitude angle into a rotation matrix and then transforming the initial direction vector in the device's coordinate system to the world coordinate system. This transformation enables laser scanning range detection and laser-object intersection detection to be numerically calculated based on a unified laser ray model, avoiding the difficulty of manually calculating the intersection relationship between the laser direction and the safety boundary. Furthermore, the multiplication order of the combined rotation matrix is ​​consistent with the definition of the gimbal attitude angle, ensuring the correctness of the direction transformation. The use of a unit direction vector simplifies the subsequent calculation of intersection parameters and distances, improving computational efficiency. This laser ray construction process constitutes the basic input for laser-related detection, providing a unified spatial geometric model for both types of detection.

[0069] In some preferred embodiments, the laser scanning range detection further includes: obtaining ground safety area parameters and roof safety area parameters from the safety detection parameters, wherein the ground safety area parameters include ground plane height and ground circular safety area parameters, the ground circular safety area parameters including center coordinates and radius; the roof safety area parameters include roof plane height and roof circular safety area parameters, the roof circular safety area parameters including center coordinates and radius; for the ground plane, determining whether the z-component of the laser direction vector is zero; if the z-component of the laser direction vector is zero, then ground intersection points are not calculated, and ground boundary crossing anomaly frames are not recorded; if the z-component of the laser direction vector is zero, then... If the z-component of the laser direction vector is less than zero, then determine whether the z-component of the spatial coordinate is greater than the ground plane height. If the z-component of the laser direction vector is less than zero and the z-component of the spatial coordinate is greater than the ground plane height, then calculate the intersection point of the laser ray and the ground plane to obtain the ground intersection point. Obtain the center coordinates and radius of the ground circular safety zone parameters. Obtain the horizontal coordinates of the ground intersection point. Determine whether the horizontal distance from the ground intersection point to the center coordinate is greater than the radius. If the horizontal distance from the ground intersection point to the center coordinate is greater than the radius, then record a ground boundary violation anomaly frame. If the radius is not greater than the stated radius, then no ground boundary crossing anomaly frame is recorded; if the z-component of the laser direction vector is not less than zero or the z-component of the spatial coordinate is not greater than the ground plane height, then no ground intersection point is calculated, and no ground boundary crossing anomaly frame is recorded; for the sky plane, determine whether the z-component of the laser direction vector is zero; if the z-component of the laser direction vector is zero, then no sky intersection point is calculated, and no sky boundary crossing anomaly frame is recorded; if the z-component of the laser direction vector is not zero, determine whether the z-component of the laser direction vector is greater than zero and whether the z-component of the spatial coordinate is less than the sky plane height; if the z-component of the laser direction vector is greater than zero and the z-component of the spatial coordinate is less than the sky plane height; if the z-component of the laser direction vector is greater than zero and the z-component of the spatial coordinate is less than the sky plane height... If the plane height is given, the intersection point of the laser ray and the sky plane is calculated to obtain the sky plane intersection point; the center coordinates and radius of the circular safety area parameters of the sky are obtained; the horizontal coordinates of the sky plane intersection point are obtained; it is determined whether the horizontal distance from the sky plane intersection point to the center coordinates is greater than the radius; if the horizontal distance from the sky plane intersection point to the center coordinates is greater than the radius, a sky boundary crossing anomaly frame is recorded; if the horizontal distance from the sky plane intersection point to the center coordinates is not greater than the radius, a sky boundary crossing anomaly frame is not recorded; if the z-component of the laser direction vector is not greater than zero or the z-component of the spatial coordinates is not less than the sky plane height, the sky plane intersection point is not calculated and no sky boundary crossing anomaly frame is recorded.

[0070] In specific implementation, laser scanning range detection is used to determine whether the intersection of the laser beam and the ground or roof plane exceeds a preset circular safety zone. This embodiment solves the problem in existing methods where the laser scanning range cannot be accurately calculated to determine whether it exceeds the ground or roof safety zone. The specific implementation method is as follows: The system obtains ground safety zone parameters and roof safety zone parameters from safety detection parameters. Ground safety zone parameters include ground plane height and ground circular safety zone parameters, with the circular safety zone parameters including the center coordinates and radius. Roof safety zone parameters include roof plane height and roof circular safety zone parameters, with the roof circular safety zone parameters including the center coordinates and radius. Ground plane height is the z-coordinate value of the horizontal plane containing the ground, and the ground circular safety zone is a circular area on the ground designated for laser illumination. Roof plane height is the z-coordinate value of the horizontal plane containing the sky curtain, and the roof circular safety zone is a circular area on the roof designated for laser illumination. The safety zone parameters can be set based on the actual dimensions of the performance venue and safety requirements.

[0071] Furthermore, for the ground plane, the system determines whether the z-component of the laser direction vector is zero. The z-component of the laser direction vector represents the vertical component of the laser direction. If the z-component of the laser direction vector is zero, it means the laser direction is completely horizontal and will not intersect with the horizontal ground plane; therefore, no ground intersection point is calculated, and no ground boundary violation anomaly frame is recorded. If the z-component of the laser direction vector is not zero, it further determines whether the z-component of the laser direction vector is less than zero and whether the z-component of the spatial coordinates is greater than the ground plane height. This condition indicates that the laser is pointing downwards and the emission point is above the ground; only when this condition is met can the laser possibly illuminate the ground.

[0072] Furthermore, if the z-component of the laser direction vector is less than zero and the z-component of the spatial coordinates is greater than the height of the ground plane, then the intersection point of the laser ray and the ground plane is calculated to obtain the ground intersection point. Let the height of the ground plane be h, the z-component of the spatial coordinates be z, and the z-component of the laser direction vector be d. z The x-component of the laser direction vector is d. x The y-component of the laser direction vector is d. y The x-component of the spatial coordinates is x, the y-component of the spatial coordinates is y, and the ray parameter t is calculated according to the following mathematical formula: t=(hz) / d z .

[0073] Furthermore, in this formula, h is the height of the ground plane, z is the z-component of the laser emission point's spatial coordinates, and d... z Let be the z-component of the laser direction vector. In this branch, since the laser is pointing downwards, d zSince z is less than zero and the emission point is above the ground, z is greater than h. Therefore, the numerator hz is negative, and the denominator d is negative. z The value is negative, and the ray parameter t is positive, indicating that the laser travels a distance t along the emission direction before reaching the ground. The derivation of this formula is as follows: The z-component equation in the laser ray equation L(t) = P + t·d is h = z + t·d. z Rearranging the terms and solving for t yields the above formula. If the laser direction vector is a unit vector, then the value of t is equal to the actual distance from the emission point to the intersection point on the ground. The coordinates of the intersection point I are calculated using the following mathematical formula: I=(x+t·d x y+t·d y ,z+t·d z ).

[0074] Furthermore, in this formula, x, y, and z are the spatial coordinate components of the laser emission point, and d x d y d z Let x, y, and z be the components of the laser direction vector, t be the ray parameter, and I be the coordinates of the intersection point between the laser ray and the horizontal plane. In the calculated intersection coordinates, the z-component is equal to the ground plane height h.

[0075] Furthermore, the system then obtains the center coordinates and radius of the circular safety zone parameters on the ground, obtains the horizontal coordinates of the ground intersection point, and determines whether the horizontal distance from the ground intersection point to the center coordinates is greater than the radius. Let the horizontal coordinates of the ground intersection point be (i... x i y ), the center coordinates are (c x ,c y Given a radius of r, determine the following mathematical formula: (i x -c x ) 2 +(i y -c y ) 2 >r 2 .

[0076] Furthermore, in this formula, i x i y Let c be the x and y coordinates of the intersection point on the ground in the horizontal plane. x c y Let x and y be the center of the circular safety zone on the ground, and r be the radius of the circular safety zone on the ground. 2 This represents the squaring operation. The left side (i) x -c x ) 2 +(i y -c y) 2 The right side r represents the square of the horizontal distance from the intersection point on the ground to the center of the circle. 2 This represents the square of the radius. If the left side is greater than the right side, it indicates that the ground intersection point falls outside the circular safety zone, constituting a ground boundary violation. Using a square comparison instead of a direct distance comparison avoids square root calculations and saves computational resources. If the horizontal distance from the ground intersection point to the center coordinates is greater than the radius, a ground boundary violation anomaly frame is recorded. If the horizontal distance from the ground intersection point to the center coordinates is not greater than the radius, no ground boundary violation anomaly frame is recorded. If the z-component of the laser direction vector is not less than zero or the z-component of the spatial coordinates is not greater than the ground plane height, the ground intersection point is not calculated, and no ground boundary violation anomaly frame is recorded. This negative branch covers the cases where the laser is pointing upwards, the laser is horizontal, or the emission point is below the ground. Specifically, when the laser is pointing upwards, d z If the value is greater than zero, the laser cannot illuminate the ground; when the laser is horizontal, d z If the value is zero, it has already been addressed in the previous section; when the emission point is below the ground, z is no greater than h, so even if the laser is pointing downwards, it is impossible for the laser to illuminate the safe area on the ground plane.

[0077] Furthermore, for the sky plane, the system determines whether the z-component of the laser direction vector is zero. If the z-component of the laser direction vector is zero, the sky plane intersection point is not calculated, and no sky plane boundary violation frame is recorded. If the z-component of the laser direction vector is not zero, the system determines whether the z-component of the laser direction vector is greater than zero and whether the z-component of the spatial coordinate is less than the sky plane height. This condition indicates that the laser is pointing upwards and the emission point is below the sky plane; only if this condition is met can the laser illuminate the sky plane. If the z-component of the laser direction vector is greater than zero and the z-component of the spatial coordinate is less than the sky plane height, the system calculates the intersection point of the laser ray and the sky plane, obtaining the sky plane intersection point. Let the sky plane height be H; the intersection point calculation formula is the same as the ground intersection point calculation method, and the ray parameter t is calculated according to the following mathematical formula: t=(Hz) / d z .

[0078] Furthermore, in this formula, H is the height of the sky plane, z is the z-component of the laser emission point, and d z Let be the z-component of the laser direction vector. In this branch, d z If the value is greater than zero and z is less than H, the numerator Hz is positive, and the denominator d zThe ray parameter t is positive. Then, the center coordinates and radius of the circular safety area on the roof are obtained, and the horizontal coordinates of the roof intersection point are obtained. It is then determined whether the horizontal distance from the roof intersection point to the center coordinates is greater than the radius. The determination formula is the same as the ground boundary violation determination formula, and will not be repeated here. If it is greater, a roof boundary violation anomaly frame is recorded; if it is not greater, no roof boundary violation anomaly frame is recorded. Furthermore, if the z-component of the laser direction vector is not greater than zero or the z-component of the spatial coordinate is not less than the roof plane height, the roof intersection point is not calculated, and no roof boundary violation anomaly frame is recorded.

[0079] This embodiment achieves accurate detection of the laser scanning range by calculating the intersection point and determining boundary violations for both the ground and roof planes. The judgment conditions comprehensively cover all possible relationships between the laser direction and the plane. Ground and roof boundary violation anomaly frames are included as anomaly frames in subsequent merging and output to the detection results. Furthermore, this detection method can automatically identify the risk of laser scanning exceeding a preset safety zone during the design phase, providing a basis for designers to adjust the gimbal angle and laser trajectory. All mathematical calculations are performed using analytical geometry, eliminating the need for iteration or numerical simulation, resulting in high computational efficiency. This makes it suitable for batch processing of a large number of drones and detection sampling frames during the performance design phase.

[0080] In some preferred embodiments, the laser scanning range detection further includes: calculating the horizontal coordinates of all ground intersections and roof intersections; determining the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate based on the horizontal coordinates; and constructing a bounding rectangle based on the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate.

[0081] In practical implementation, during laser scanning range detection, in addition to determining whether the intersection points exceed the circular safety area, it is also necessary to provide designers with an intuitive reference for the actual laser coverage area. The circumscribed rectangle is a compact description of the horizontal distribution range of all ground and rooftop intersection points, helping designers understand the maximum active area of ​​the laser on the horizontal plane. This embodiment addresses the problem of existing methods failing to intuitively obtain the actual laser coverage area, and the specific implementation is as follows: The system statistically analyzes the horizontal coordinates of all ground and rooftop intersections. These intersections are derived from those calculated during laser scanning range detection. The horizontal coordinates are the x and y coordinates of the intersection on the horizontal plane. The statistical process iterates through all intersections, collecting the x and y coordinates of each. If multiple intersections are calculated in a single detection sampling frame, each intersection is included in the statistical analysis. The statistical scope can cover all detection sampling frames within the entire detection range, or it can be targeted at a specific time period or a specific subset of drones to meet different viewing needs. For large-scale performance projects, the number of intersections may be large; in such cases, a linear traversal method is used to collect coordinates point by point, and the algorithm's time complexity is proportional to the number of intersections.

[0082] Furthermore, the system determines the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate based on the horizontal coordinates. The minimum x-coordinate is the minimum x-coordinate among all intersection points, the maximum x-coordinate is the maximum x-coordinate among all intersection points, the minimum y-coordinate is the minimum y-coordinate among all intersection points, and the maximum y-coordinate is the maximum y-coordinate among all intersection points. These four values ​​collectively define the coverage area of ​​all intersection points on the horizontal plane. Let the minimum x-coordinate be min_x, the maximum x-coordinate be max_x, the minimum y-coordinate be min_y, and the maximum y-coordinate be max_y. The process of determining the extreme values ​​is completed through point-by-point comparison. For each intersection point coordinate, its x-coordinate is compared and updated with the current minimum and maximum x-coordinates, and its y-coordinate is compared and updated with the current minimum and maximum y-coordinates. After traversing all points, the final extreme value is obtained.

[0083] Furthermore, the system constructs a bounding rectangle based on the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate. The bounding rectangle is a rectangular region with min_x and min_y as its lower left vertices and max_x and max_y as its upper right vertices, with its four sides parallel to the x-axis and y-axis, respectively. This rectangle completely encompasses all ground and roof intersections. Once constructed, the bounding rectangle can be output to the design interface or inspection report for designers to view the actual laser irradiation coverage. The bounding rectangle does not distinguish between ground and roof, considering all intersections uniformly to reflect the maximum horizontal range of laser activity. The bounding rectangle (bbox) is represented by the following mathematical formula: bbox=[min_x,min_y,max_x,max_y].

[0084] Furthermore, in this formula, min_x is the minimum x-coordinate of all intersection points, min_y is the minimum y-coordinate of all intersection points, max_x is the maximum x-coordinate of all intersection points, and max_y is the maximum y-coordinate of all intersection points. The width of the circumscribed rectangle is max_x - min_x, the height is max_y - min_y, and the area is the product of the width and height. The area of ​​the circumscribed rectangle can be used to quickly assess the overall size of the laser coverage area.

[0085] Furthermore, designers can visually determine whether the laser scanning range is too large and whether adjustments to the laser pattern or pan-tilt trajectory are needed based on the circumscribed rectangle. Comparing the circumscribed rectangle with the circular safety area allows for quick identification of deviations between the coverage area and the safety area. The circumscribed rectangle can also be used to assess the overall coverage area after different laser channels are superimposed, providing a global perspective for safety assessment. In the interactive interface, the circumscribed rectangle can be overlaid on the site plan, allowing designers to visually see the spatial relationship between the laser illumination range and the site boundaries, audience area, and stage area.

[0086] This embodiment constructs a minimum bounding rectangle encompassing all laser illumination points by statistically analyzing the coordinates of all intersection points and determining their extreme values. This bounding rectangle presents the overall laser coverage area on the horizontal plane in a compact manner, providing designers with an intuitive visual reference and avoiding the inefficient method of checking the coordinates of each intersection point individually. Furthermore, the construction process is computationally simple, requiring only statistical and comparison operations, without significantly increasing the computational burden. The bounding rectangle serves as an auxiliary output for laser scanning range detection, complementing the out-of-bounds anomaly detection results, jointly helping designers comprehensively understand the laser coverage situation and thus optimize the performance design.

[0087] In some preferred embodiments, the laser-object intersection detection further includes: obtaining collision detection parameters from the safety detection parameters; obtaining a safety threshold from the collision detection parameters; obtaining the object to be detected and its spatial position from the object data; calculating the distance from the object to be detected to the laser ray; determining whether the distance is less than the safety threshold and whether the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is non-negative; if the distance is less than the safety threshold and the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is non-negative, then it is determined that the object to be detected is at risk of being irradiated by the laser or colliding with it, and an intersection anomaly frame is recorded; if the distance is not less than the safety threshold, or the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is negative, then no intersection anomaly frame is recorded. A normal frame is obtained from the object data to be detected: the planar object to be detected, a point on the planar object to be detected, the normal vector, and the boundary range of the planar object to be detected; it is determined whether the dot product of the normal vector and the laser direction vector is zero; if the dot product of the normal vector and the laser direction vector is zero, the ray parameter is not calculated and no intersection anomaly frame is recorded; if the dot product of the normal vector and the laser direction vector is not zero, the ray parameter is calculated based on the normal vector, a point on the planar object to be detected, the spatial coordinates, and the laser direction vector; if the ray parameter is greater than zero and the intersection point determined based on the ray parameter falls within the boundary range of the planar object to be detected, an intersection risk is determined and an intersection anomaly frame is recorded; if the ray parameter is not greater than zero or the intersection point determined based on the ray parameter does not fall within the boundary range of the planar object to be detected, no intersection anomaly frame is recorded.

[0088] In practical implementation, laser-object intersection detection is used to determine whether there is a risk of laser irradiation or collision between the laser beam and other drones, stage equipment, buildings, or restricted areas. To address this, this embodiment solves the problem in existing methods where potential intersection risks between the laser beam and other objects cannot be detected in advance. The specific implementation method is as follows: The system obtains collision detection parameters from the safety detection parameters, and then obtains the safety threshold from the collision detection parameters. The collision detection parameters control the sensitivity and accuracy of laser-object intersection detection, while the safety threshold is the minimum permissible distance between the laser beam and the object. When the distance from the object to the laser beam is less than the safety threshold, it is considered that there is a risk of being irradiated or colliding with the laser. The safety threshold can be set based on the laser beam's divergence angle and safety margin. For example, for lasers with a small divergence angle, the safety threshold can be set to a smaller value; for higher-energy lasers, the safety threshold needs to be set larger to allow sufficient safety distance. Furthermore, the safety threshold can also be set according to the type of object to be detected, with a larger safety threshold set for areas with high human activity and a smaller safety threshold set for general equipment.

[0089] Furthermore, the system obtains the object to be detected and its spatial position from the object data, and calculates the distance from the object to the laser beam. The object to be detected can be a geometric abstraction such as a point, sphere, bounding box, or polyhedron. For a point object, its spatial position is the coordinates of that point. For a sphere, its spatial position is the coordinates of its center. For a bounding box, its spatial position is the coordinates of its center or vertex. Let the spatial position of the object to be detected be Q, the laser emission point be P, and the laser direction vector be d. The distance D from the object to the laser beam is calculated according to the following mathematical formula: D = |(QP)×d| / |d|.

[0090] Furthermore, in this formula, Q is the spatial position vector of the object to be detected, P is the spatial coordinates of the laser emission point (i.e., the current detection sampling frame), d is the laser direction vector, (QP) is the vector pointing from the laser emission point to the object to be detected, the symbol × represents the cross product operation, |(QP)×d| is the magnitude of the cross product vector, and |d| is the magnitude of the laser direction vector. The geometric meaning of this formula is: the magnitude of the cross product vector is equal to the area of ​​the parallelogram with vectors (QP) and d as adjacent sides. Dividing this area by the length of the base |d| gives the height on the base, i.e., the distance from the point to the line. When the laser direction vector d is a unit vector, |d| equals 1, and the distance D equals |(QP)×d|. This distance reflects the shortest spatial distance from the object to be detected to the laser beam.

[0091] Furthermore, the system determines whether the distance is less than a safety threshold and whether the projection of the vector pointing from the spatial coordinates to the object being detected onto the laser direction vector is non-negative. A non-negative projection indicates that the object being detected is located in front of the laser emission point, i.e., in the laser propagation direction. The projection is calculated according to the following mathematical formula: proj=(QP)·d.

[0092] Furthermore, in this formula, QP is the vector pointing from the laser emission point to the object to be detected, d is the laser direction vector, the symbol · represents the vector dot product operation, and proj is the projection value of this vector onto the laser direction vector. If proj is greater than or equal to zero, it means that the object to be detected is on one side of the laser emission direction; if proj is less than zero, it means that the object to be detected is behind the laser emission point, and the laser cannot illuminate the object. The joint judgment of the non-negativity condition of projection and the distance condition avoids misjudging objects behind the emission point as collision risks. If the distance is less than the safety threshold and the projection is non-negative, it is determined that the object to be detected has a risk of being illuminated by the laser or colliding, and an intersection anomaly frame is recorded. If the distance is not less than the safety threshold, or the projection is negative, no intersection anomaly frame is recorded.

[0093] Furthermore, the system obtains the planar object to be detected, a point on the planar object, the normal vector, and the boundary range of the planar object from the object data. The planar object to be detected can be a building wall, a stage equipment flat surface, or other planar obstacles. A point on the plane is used to determine the plane's position in space, the normal vector is used to determine the plane's orientation, and the boundary range is used to determine the finite size of the planar object. The normal vector can be a unit vector or a non-unit vector perpendicular to the plane, and its magnitude does not affect the intersection judgment result.

[0094] Furthermore, the system determines whether the dot product of the normal vector and the laser direction vector is zero. If the dot product is zero, it means the laser direction is parallel to the plane, and the laser ray will not intersect the plane; therefore, ray parameters are not calculated, and intersection anomaly frames are not recorded. If the dot product is not zero, the ray parameters are calculated based on the normal vector, a point on the plane object to be detected, its spatial coordinates, and the laser direction vector. Let A be a point on the plane object to be detected, n be the normal vector, P be the laser emission point, and d be the laser direction vector. The ray parameter t is calculated according to the following mathematical formula: t=[n·(AP)] / (n·d).

[0095] Furthermore, in this formula, n is the normal vector of the plane object to be detected, A is a point on the plane object to be detected, P is the laser emission point, d is the laser direction vector, and (AP) is the vector pointing from the laser emission point to a point on the plane. The symbol · represents the vector dot product operation. The numerator n·(AP) represents the projection of the vector formed by the point on the plane and the emission point onto the normal vector direction, and the denominator n·d represents the projection of the laser direction vector onto the normal vector direction. The ray parameter t represents the distance that the laser emission point needs to travel along the laser direction to reach the intersection point of the plane. Furthermore, the derivation process of this formula is as follows: any point X on the plane satisfies the plane equation n·(XA)=0. Substituting the laser ray equation X=P+t·d into the plane equation, we get n·(P+t·dA)=0. Simplifying, we get n·(AP)=t·(n·d), and then solving for t. If the dot product of the normal vector and the laser direction vector is not zero, the denominator is not zero, and the formula is valid.

[0096] Further, the system determines whether the ray parameter is greater than zero and whether the intersection point determined by the ray parameter falls within the boundary range of the planar object to be detected. If the ray parameter is greater than zero and the intersection point determined by the ray parameter falls within the boundary range of the planar object to be detected, then an intersection risk is identified, and an intersection anomaly frame is recorded. Further, if the ray parameter is not greater than zero or the intersection point determined by the ray parameter does not fall within the boundary range of the planar object to be detected, then no intersection anomaly frame is recorded. A ray parameter not greater than zero indicates that the intersection point is behind the laser emission point; an intersection point not falling within the boundary range indicates that although the ray intersects an infinitely extending plane, the intersection point is not on the actual planar object. Further, the intersection point coordinates can be obtained by substituting the ray parameter t into the laser ray equation. The methods for determining whether the intersection point falls within the boundary range include: for rectangular planar objects, determining whether the horizontal and vertical components of the intersection point in the local coordinate system of the planar object fall within the intervals corresponding to the rectangular boundary; for polygonal planar objects, using the standard determination method for points within polygons, this invention does not specifically limit this.

[0097] This embodiment achieves laser intersection risk detection for point-like and planar objects by determining the distance from the point to the ray, the forward projection, and the intersection of the ray with the plane. The detection logic for the two types of objects is processed separately, covering the geometric shapes of common objects to be detected. Furthermore, intersection anomaly frames are included in the merged output as anomaly frames, enabling designers to identify potential intersection risks between the laser beam and other objects in advance, reducing the probability of safety accidents during actual performances. Furthermore, this detection method eliminates the need for repeated manual observation, covers all detection sampling frames and all objects to be detected, significantly improving the comprehensiveness and efficiency of the detection.

[0098] S6, merge consecutive abnormal frames into an abnormal frame segment, and output the detection result, which includes the abnormal drone number and the abnormal frame segment.

[0099] In practice, the system merges consecutive abnormal frames into abnormal frame segments and outputs the detection results, which include the abnormal drone number and the abnormal frame segment. Consecutive abnormal frames refer to multiple abnormal frames with adjacent frame numbers or an interval less than a preset merging threshold. The merged abnormal frame segment includes the start frame number, end frame number, and abnormal type. Further, the abnormal drone number is used to locate drones with potential safety hazards, and the abnormal frame segment is used to locate the time interval within which the drone poses a safety hazard. Further, the method for merging consecutive abnormal frames is to traverse the abnormal frame list, grouping abnormal frames with adjacent frame numbers into the same abnormal frame segment. When a frame number jump occurs, if the jump interval is less than the preset merging threshold, both are still grouped into the same abnormal frame segment; otherwise, a new abnormal frame segment is started. Further, the preset merging threshold can be set according to actual detection needs, typically using a small value to merge briefly interrupted abnormal frames into the same abnormal frame segment. Further, the detection results can be output as a detection report file or presented as a list or timeline on the interactive interface. Designers can directly locate specific drones and specific frame segments based on the detection results and make targeted modifications.

[0100] This embodiment constructs a detection sampling frame set by merging the frame numbers of three types of keyframes, encompassing all changes in position, laser switching, and gimbal attitude, achieving complete coverage of the entire timeline. Position interpolation and step search ensure accurate alignment of spatial coordinates and state information with the detection sampling frames, avoiding the problem of manual observation failing to cover all drones and all time points. Furthermore, all three types of detection are uniformly executed based on the same batch of detection sampling frames and the same set of input data, with detection results merged into anomaly frame segments for output. This transforms safety detection from manual experience-based judgment into a calculable, reproducible, and traceable procedural process. Moreover, designers can identify risks such as low-altitude laser activation, cross-boundary sweeping, and laser collisions before the actual performance, quickly locating the drone number and frame interval, reducing rework costs, and improving design efficiency and performance safety.

[0101] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0102] Please see Figure 2 , Figure 2 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a terminal or a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.

[0103] The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.

[0104] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute a method for safety detection of laser-mounted drone displays.

[0105] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0106] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute a method for safe detection of laser mounts in UAV performances.

[0107] The network interface 505 is used for network communication with other devices. Those skilled in the art will understand that the above structure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. A specific computer device 500 may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements.

[0108] The processor 502 is used to run a computer program 5032 stored in a memory to implement the steps of a laser-mounted safety detection method for unmanned aerial vehicle (UAV) performances provided in any of the above method embodiments.

[0109] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0110] It will be understood by those skilled in the art 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 may be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.

[0111] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to perform the steps of the laser-mounted safety detection method for unmanned aerial vehicle (UAV) performances provided in any of the above-described method embodiments.

[0112] The storage medium is a physical, non-transient storage medium, such as a USB flash drive, external hard drive, read-only memory (ROM), magnetic disk, or optical disk, or any other physical storage medium capable of storing program code. The computer-readable storage medium can be non-volatile or volatile.

[0113] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0114] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.

[0115] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0116] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0117] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0118] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, this invention is also intended to include these modifications and variations as long as they fall within the scope of the claims of this invention and their equivalents.

[0119] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for safety detection of laser-mounted drones used in performances, characterized in that, include: Acquire drone performance engineering data, object data to be detected, and safety detection parameters. The drone performance engineering data includes position keyframes, laser keyframes, gimbal keyframes, detection start frame number, and detection end frame number for each drone. The frame numbers of the location keyframe, the laser keyframe, the gimbal keyframe, the detection start frame number, and the detection end frame number are merged and deduplicated, and a set of detection sampling frames is constructed in order of frame number. For each UAV, interpolation is performed on each detection sampling frame in the set of detection sampling frames based on the location keyframes to obtain the spatial coordinates of the UAV; For each UAV, in each detection sampling frame in the detection sampling frame set, a step search is performed based on the laser key frame and the gimbal key frame to obtain the laser channel switch state and gimbal attitude of the UAV. For each UAV, in each detection sampling frame in the detection sampling frame set, based on the spatial coordinates, the laser channel switch status, the gimbal attitude, the safety detection parameters, and the data of the object to be detected, low-altitude laser activation detection, laser sweep range detection, and laser-object intersection detection are performed to obtain abnormal frames; The consecutive abnormal frames are merged into an abnormal frame segment, and the detection result is output. The detection result includes the abnormal drone number and the abnormal frame segment.

2. The method for safety detection of laser-mounted drone performances according to claim 1, characterized in that, For each UAV, interpolation is performed on each detection sampling frame in the detection sampling frame set based on the position keyframes to obtain the spatial coordinates of the UAV, including: For each detection sampling frame in the set of detection sampling frames, obtain the frame number and coordinates of the previous and next position keyframes adjacent to the current detection sampling frame; The interpolation ratio is calculated based on the frame number of the current detection sampling frame, the frame number of the previous key frame, and the frame number of the next key frame. Based on the interpolation ratio, the coordinates of the previous keyframe, and the coordinates of the next keyframe, calculate the coordinate components of the spatial coordinates corresponding to the current detection sampling frame.

3. The method for safety detection of laser-mounted drone performances according to claim 1, characterized in that, For each UAV, a stepwise search is performed on each detection sampling frame in the detection sampling frame set based on the laser keyframe and the gimbal keyframe to obtain the UAV's laser channel switching state and gimbal attitude, including: Acquire the initial state of the laser and the initial state of the gimbal; For each detection sampling frame in the set of detection sampling frames, find the nearest laser keyframe whose frame number is less than or equal to that detection sampling frame; If there is a laser keyframe with a frame number less than or equal to the detected sampling frame, then the laser state of the found laser keyframe is taken as the current laser channel switch state. If there is no laser keyframe with a frame number less than or equal to the detected sampling frame, then the initial laser state is used as the current laser channel switching state. Find the nearest gimbal keyframe whose frame number is less than or equal to the detected sampling frame; If there is a gimbal keyframe with a frame number less than or equal to the detected sampling frame, then the attitude of the found gimbal keyframe is taken as the current gimbal attitude. If there is no gimbal keyframe with a frame number less than or equal to the detected sampling frame, then the gimbal initial state is used as the current gimbal attitude.

4. The method for safety detection of laser-mounted drone performances according to claim 1, characterized in that, The low-altitude laser detection includes: Obtain the safety height threshold from the safety detection parameters; For each drone, in each detection sampling frame in the set of detection sampling frames, it is determined whether the height component of the spatial coordinates is less than the safe height threshold and whether any laser channel is in the open state. If the height component of the spatial coordinates is less than the safe height threshold, and any laser channel is in the open state, then the detection sampling frame is marked as a low-altitude open abnormal frame. If the height component of the spatial coordinates is not less than the safe height threshold, or if all laser channels are in the off state, then the detection sampling frame is not marked.

5. The method for safety detection of laser-mounted drone performances according to claim 1, characterized in that, Both the laser scanning range detection and the laser-object intersection detection include: Based on the pitch angle, roll angle, and yaw angle in the gimbal attitude, determine the first rotation matrix for rotating the roll angle around the x-axis of the device body coordinate system, the second rotation matrix for rotating the pitch angle around the y-axis of the device body coordinate system, and the third rotation matrix for rotating the yaw angle around the z-axis of the device body coordinate system. Multiply the third rotation matrix, the second rotation matrix, and the first rotation matrix sequentially to obtain a combined rotation matrix; Obtain the initial direction vector of the laser in the device body coordinate system, multiply the combined rotation matrix with the initial direction vector of the laser in the device body coordinate system, and normalize the multiplication result to obtain the laser direction vector in the world coordinate system. Based on the spatial coordinates and the laser direction vector, a laser ray is constructed that starts from the spatial coordinates and extends along the laser direction vector.

6. The method for safety detection of laser-mounted drone performances according to claim 5, characterized in that, The laser scanning range detection also includes: Ground safety zone parameters and roof safety zone parameters are obtained from the safety detection parameters. The ground safety zone parameters include ground plane height and ground circular safety zone parameters, and the ground circular safety zone parameters include the center coordinates and radius. The roof safety zone parameters include roof plane height and roof circular safety zone parameters, and the roof circular safety zone parameters include the center coordinates and radius. For the ground plane, determine whether the z-component of the laser direction vector is zero; If the z-component of the laser direction vector is zero, then ground intersections are not calculated and ground boundary crossing anomaly frames are not recorded. If the z-component of the laser direction vector is not zero, then determine whether the z-component of the laser direction vector is less than zero and whether the z-component of the spatial coordinate is greater than the ground plane height. If the z-component of the laser direction vector is less than zero and the z-component of the spatial coordinate is greater than the height of the ground plane, then calculate the intersection point of the laser ray and the ground plane to obtain the ground intersection point; obtain the center coordinates and radius of the circular safety zone parameters on the ground; obtain the horizontal coordinates of the ground intersection point; and determine whether the horizontal distance from the ground intersection point to the center coordinates is greater than the radius. If the horizontal distance from the ground intersection point to the center coordinates of the circle is greater than the radius, then record a ground boundary crossing anomaly frame; If the horizontal distance from the ground intersection point to the center coordinates of the circle is not greater than the radius, then no ground boundary crossing anomaly frame is recorded; If the z-component of the laser direction vector is not less than zero or the z-component of the spatial coordinate is not greater than the ground plane height, then the ground intersection point is not calculated and the ground boundary crossing anomaly frame is not recorded. For the sky plane, determine whether the z-component of the laser direction vector is zero; If the z-component of the laser direction vector is zero, then the intersection point of the sky surface is not calculated and the abnormal frame of the sky surface crossing the boundary is not recorded. If the z-component of the laser direction vector is not zero, then determine whether the z-component of the laser direction vector is greater than zero and whether the z-component of the spatial coordinate is less than the height of the sky plane. If the z-component of the laser direction vector is greater than zero and the z-component of the spatial coordinate is less than the height of the sky plane, then calculate the intersection point of the laser ray and the sky plane to obtain the sky intersection point; obtain the center coordinates and radius of the circular safety area parameters of the sky; obtain the horizontal coordinates of the sky intersection point; and determine whether the horizontal distance from the sky intersection point to the center coordinates is greater than the radius. If the horizontal distance from the intersection point of the sky to the center coordinates of the circle is greater than the radius, then record the sky boundary crossing anomaly frame; If the horizontal distance from the intersection point of the sky to the center coordinates of the circle is not greater than the radius, then no sky boundary crossing abnormal frame is recorded; If the z-component of the laser direction vector is not greater than zero or the z-component of the spatial coordinate is not less than the height of the sky plane, then the sky intersection point is not calculated and the sky boundary crossing abnormal frame is not recorded.

7. The method for safety detection of laser-mounted drone performances according to claim 6, characterized in that, The laser scanning range detection also includes: Calculate the horizontal coordinates of all ground and roof intersections; Based on the horizontal coordinates, determine the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate; Construct the circumscribed rectangle based on the minimum x-coordinate, maximum x-coordinate, minimum y-coordinate, and maximum y-coordinate.

8. The method for safety detection of laser-mounted drone performances according to claim 5, characterized in that, The laser-object intersection detection also includes: Obtain collision detection parameters from the safety detection parameters; obtain a safety threshold from the collision detection parameters; Obtain the object to be detected and its spatial position from the object data; calculate the distance from the object to be detected to the laser beam; Determine whether the distance is less than the safety threshold, and whether the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is non-negative; If the distance is less than the safety threshold, and the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is non-negative, then it is determined that the object to be detected is at risk of being irradiated by the laser or colliding with it, and an intersection anomaly frame is recorded. If the distance is not less than the safety threshold, or the projection of the vector from the spatial coordinates to the object to be detected onto the laser direction vector is negative, then no intersection anomaly frame is recorded. The following are obtained from the object data to be detected: the planar object to be detected, a point on the planar object to be detected, the normal vector, and the boundary range of the planar object to be detected; Determine whether the dot product of the normal vector and the laser direction vector is zero; If the dot product of the normal vector and the laser direction vector is zero, then the ray parameters are not calculated and the intersection anomaly frames are not recorded. If the dot product of the normal vector and the laser direction vector is not zero, then the ray parameters are calculated based on the normal vector, a point on the plane object to be detected, the spatial coordinates, and the laser direction vector. If the ray parameter is greater than zero and the intersection point determined according to the ray parameter falls within the boundary range of the plane object to be detected, then an intersection risk is determined, and an intersection anomaly frame is recorded. If the ray parameter is not greater than zero or the intersection point determined by the ray parameter does not fall within the boundary range of the plane object to be detected, then no intersection anomaly frame is recorded.

9. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, can implement the method as described in any one of claims 1-8.