Drunk driving automatic detection method and system based on deep learning model and robot system

By constructing a dynamic interaction framework for detection scenarios using deep learning models and robotic systems, integrating multi-source information acquisition and environmental adaptive adjustment, the low efficiency and environmental interference problems of existing drunk driving detection methods are solved, achieving efficient and intelligent drunk driving detection.

CN120894671AActive Publication Date: 2025-11-04CHONGQING TIANWANG HI-TECH CO LTD

Patent Information

Application Number
CN202511433276.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2025-11-04
Estimated Expiration
2045-10-09

AI Technical Summary

Technical Problem

Existing methods for detecting drunk driving are inefficient, prone to missing detections, and the detection equipment has limited functionality, making it difficult to deal with disguises and environmental interference, and lacking intelligent interaction and closed-loop processing mechanisms.

Method used

By constructing a dynamic interaction framework for detection scenarios based on deep learning models and robot systems, integrating behavioral guidance logic, temporal collaborative rules for multi-source information acquisition, and adaptive adjustment mechanisms for environmental parameters, the framework collects respiratory gas data streams and facial dynamic feature streams, and generates fused detection feature vectors through deep learning models to achieve intelligent judgment and closed-loop processing.

Benefits of technology

It has improved the accuracy and efficiency of drunk driving detection, achieved effective compensation for environmental interference and intelligent management of test results, and formed a complete intelligent detection system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120894671A_ABST
    Figure CN120894671A_ABST
Patent Text Reader

Abstract

The invention provides a drunk driving automatic detection method and system based on a deep learning model and a robot system, and the method comprises the steps: constructing a detection scene dynamic interaction frame through a scene interaction module of the robot system, and enabling the detection scene dynamic interaction frame to comprise behavior guide logic, a time sequence cooperation rule and an environment parameter adaptive adjustment mechanism; starting a multi-modal acquisition unit to acquire a breathing gas data flow and a face dynamic feature flow, performing environment compensation to obtain a data set after synchronous association and interference correction, inputting the data set into a pre-trained drunk driving detection deep learning model, generating a fusion detection feature vector, and verifying validity; and carrying out drunk driving judgment processing to generate a comprehensive judgment result. And triggering a detection scene closed-loop processing flow according to a comprehensive judgment result to realize encrypted recording, multi-terminal synchronization and scene resetting, and driving robot components to cooperatively act to realize intelligent drunk driving automatic detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of deep learning technology, and more specifically, to an automatic drunk driving detection method and system based on a deep learning model and a robotic system. Background Technology

[0002] In the field of traffic safety, drunk driving detection is a crucial link in ensuring road safety and reducing traffic accidents. Traditional drunk driving detection methods mainly rely on manual interception and on-site testing, which has many limitations.

[0003] On the one hand, manual interception and detection is inefficient, especially during peak traffic hours and on busy roads, making it difficult to comprehensively inspect all passing vehicles and potentially leading to some drunk drivers being missed. Furthermore, manual detection requires a significant investment of police resources, increasing enforcement costs.

[0004] On the other hand, existing detection equipment has relatively limited functionality, typically only detecting alcohol content in breath. This makes it difficult to effectively counter attempts to evade detection through disguise or interference. For example, some individuals may use breath fresheners to mask the smell of alcohol after drinking, affecting the accuracy of the test results. Furthermore, existing equipment lacks adaptability to the testing environment; varying temperatures and humidity levels can interfere with the results, leading to false positives or false negatives. Additionally, the detection process lacks intelligent interactive and closed-loop processing mechanisms, hindering functions such as rapid recording, synchronization, and scene reset of test results, which impedes subsequent law enforcement and management. Summary of the Invention

[0005] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide an automatic drunk driving detection method based on a deep learning model and a robotic system, the method comprising: A dynamic interaction framework for the detection scene is constructed through the scene interaction module of the robot system. The dynamic interaction framework for the detection scene includes the behavior guidance logic of the object to be detected, the time-series coordination rules for multi-source information collection, and the adaptive adjustment mechanism of environmental parameters. Based on the dynamic interaction framework of the detection scenario, the multimodal acquisition unit of the robot system is activated to collect the respiratory gas data stream and facial dynamic feature stream of the object to be detected according to the time-series collaborative rules. The environmental parameter adaptive adjustment mechanism is used to compensate for the interference of the detection environment, and the synchronous and correlated respiratory gas data set and facial dynamic feature set after interference correction are obtained. The respiratory gas data set and the facial dynamic feature set are input into the pre-trained deep learning model for drunk driving detection. The spatiotemporal mapping relationship between the respiratory gas data set and the facial dynamic feature set is established. The feature interaction processing through bidirectional feature transmission generates a fused detection feature vector, and the effectiveness of the fused feature is verified at the same time. The fused detection feature vectors are processed for drunk driving determination to generate a comprehensive drunk driving determination result that includes detection confidence, feature correlation strength and determination criteria; Based on the comprehensive judgment result of drunk driving, a closed-loop processing flow for the detection scenario is triggered. The closed-loop processing flow includes encrypted result recording, multi-terminal information synchronization, and detection scenario reset. The closed-loop processing flow needs to drive the robot components to coordinate actions based on the output result of the drunk driving detection deep learning model.

[0006] Furthermore, embodiments of the present invention also provide an automatic drunk driving detection system based on a deep learning model and a robotic system, characterized in that it includes: A processor; a machine-readable storage medium for storing machine-executable instructions of the processor; wherein the processor is configured to execute the aforementioned automatic drunk driving detection method based on a deep learning model and a robotic system by executing the machine-executable instructions.

[0007] In another aspect, embodiments of the present invention also provide a computer program product, the computer program product including machine-executable instructions, the machine-executable instructions being stored in a computer-readable storage medium, a processor of a computer device reading the machine-executable instructions from the computer-readable storage medium, the processor executing the machine-executable instructions, causing the computer device to execute the above-described automatic drunk driving detection method based on a deep learning model and a robot system.

[0008] Based on the above, a dynamic interaction framework for the detection scenario is constructed through the scene interaction module of the robot system. This framework integrates the behavior guidance logic of the object to be detected, the temporal coordination rules for multi-source information acquisition, and the adaptive adjustment mechanism for environmental parameters. Based on this dynamic interaction framework, a multimodal acquisition unit is activated, which can accurately acquire the respiratory gas data stream and facial dynamic feature stream of the object to be detected according to the temporal coordination rules. The adaptive adjustment mechanism for environmental parameters effectively compensates for interference in the detection environment, resulting in a high-quality dataset that is synchronously correlated and corrected for interference. The respiratory gas data set and facial dynamic feature set are input into a pre-trained deep learning model for drunk driving detection, establishing a spatiotemporal mapping relationship and generating a fused detection feature vector. The effectiveness of the fused features is verified, improving the accuracy and reliability of the detection. The fused detection feature vector is processed for drunk driving judgment, generating a comprehensive judgment result including detection confidence, feature correlation strength, and judgment criteria. Based on the judgment result, a closed-loop processing flow for the detection scenario is triggered, realizing functions such as encrypted result recording, multi-terminal information synchronization, and detection scenario reset. Furthermore, the model output drives the collaborative actions of robot components, forming a complete and intelligent automatic drunk driving detection system, significantly improving the efficiency, accuracy, and intelligence level of drunk driving detection. Attached Figure Description

[0009] Figure 1 This is a schematic diagram of the execution flow of the automatic drunk driving detection method based on a deep learning model and a robot system provided in an embodiment of the present invention.

[0010] Figure 2 This is a schematic diagram of exemplary hardware and software components of an automatic drunk driving detection system based on a deep learning model and a robotic system provided in an embodiment of the present invention. Detailed Implementation

[0011] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 This is a flowchart illustrating an automatic drunk driving detection method based on a deep learning model and a robot system, provided in one embodiment of the present invention. The following is a detailed description of this automatic drunk driving detection method based on a deep learning model and a robot system.

[0012] Step S110: Construct a dynamic interaction framework for the detection scene through the scene interaction module of the robot system. The dynamic interaction framework for the detection scene includes the behavior guidance logic of the object to be detected, the temporal coordination rules for multi-source information acquisition, and the adaptive adjustment mechanism for environmental parameters.

[0013] This embodiment uses an urban road traffic safety checkpoint as an application scenario. This checkpoint is equipped with a robotic system integrating multimodal data acquisition capabilities for automated detection of suspected drunk drivers. The scene interaction module, as the core control unit of the robotic system, first needs to integrate spatial information, equipment characteristics, and environmental factors of the detection scene to construct an interactive framework that can dynamically adapt to the detection process. This interactive framework must simultaneously satisfy the behavioral guidance of the detected object, the collaborative work of multiple types of acquisition devices, and real-time compensation for complex environmental interference.

[0014] Step S111: Call the environment perception unit of the scene interaction module to collect spatial parameters and environmental interference parameters through a multi-type sensor array in the detection area. The spatial parameters include the three-dimensional boundary coordinates of the detection area, the device layout position and the spatial size of the detection point. The environmental interference parameters include the light intensity distribution, air flow rate, ambient temperature change and background noise intensity.

[0015] After the scene interaction module is activated, the environmental perception unit is activated first. The environmental perception unit communicates with a preset sensor array within the detection area via a wired connection. The sensor array includes a lidar, an infrared rangefinder, a light sensor, an anemometer, a temperature and humidity sensor, and a noise meter. These sensors are distributed at a preset density on the top, sides, and ground of the detection area. The lidar and infrared rangefinder are used to collect spatial parameters. The lidar performs a 3D scan of the detection area, outputs point cloud data, and obtains the 3D boundary coordinates of the detection area after coordinate transformation. The infrared rangefinder is installed on the fixed brackets of each component of the robot system and is used to measure the relative positions between components. Combined with the initial installation coordinates, the equipment layout position is calculated. The spatial dimensions of the detection points are collected by the infrared rangefinder group deployed around the core detection area. The length, width, and height parameters of the detection points are obtained by fitting multi-point ranging data.

[0016] Light sensors are evenly distributed at different heights within the detection area. Each sensor collects light intensity data at its location at fixed intervals, generating light intensity distribution data. Anemometers are installed above and to the sides of the core detection area to collect airflow rate and wind direction data. Temperature and humidity sensors are distributed at multiple points within the detection area to collect real-time ambient temperature change data. Noise meters are installed at the entrance and edge of the core detection area to collect background noise intensity. All data collected by the sensors is transmitted via a data bus to the buffer of the environmental sensing unit, where it is stored according to data type.

[0017] Step S112: Based on spatial parameters, construct a basic spatial model of the detection scene using a 3D modeling tool. The basic spatial model divides the activity prohibition area, the guidance path area, and the detection core area of ​​the object to be detected, and marks the effective working range boundaries of each component of the multimodal acquisition unit.

[0018] The environmental perception unit packages and sends the collected spatial parameters to the 3D modeling tool. The 3D modeling tool first verifies the spatial parameters, removes outliers, and then scales the overall scene outline proportionally based on the 3D boundary coordinates of the detection area. Within this outline, functional areas are further divided according to the equipment layout and the spatial dimensions of the detection points. Prohibited activity areas include equipment installation areas, cable routing areas, and sensor deployment areas, marked with red solid blocks in the model; the guide path area extends from the entrance of the detection area to the core detection area, with the path width set according to ergonomic parameters, marked with a yellow dashed line on the model's ground layer; the core detection area is where the respiratory gases and facial features of the object to be detected are collected, drawn according to the spatial dimensions of the detection points, and marked with a green solid border.

[0019] The effective working range boundary marking of the multimodal acquisition unit needs to be combined with the technical parameters of each component. The effective working range boundary of the gas acquisition component is calculated based on the intake radius of its sampling port and the gas diffusion model, and a semi-transparent sphere is drawn in the model with the sampling port as the center. The effective working range boundary of the image acquisition component is calculated based on the camera's field of view, focal length, and resolution, and a quadrangular pyramid region is drawn in the model with the camera's optical center as the vertex. All functional areas and effective working range boundaries are displayed in layers in the basic spatial model and can be switched and viewed through the interactive interface.

[0020] Step S113: Combining the basic spatial model with the behavioral habit template of the object to be detected, construct behavioral guidance logic that includes phased path planning from the entrance of the detection area to the core detection area, posture maintenance norms in the core detection area, interaction timing requirements with the acquisition device, and guidance and correction rules for abnormal behavior.

[0021] The behavioral habit templates are stored in the database of the scene interaction module, containing typical behavioral characteristics data of people of different genders and ages in similar detection scenarios. The basic spatial model and the behavioral habit templates are fused together through a data interface. Phased path planning is generated based on the guidance path area in the basic spatial model and the walking speed distribution data in the behavioral habit templates. The guidance path is divided into an entrance guidance section, a transition section, and a core preparation section. The entrance guidance section has prominent ground markings to guide the subject into the detection area; the transition section guides the subject to adjust their walking direction through ground arrows and voice prompts; the length of the core preparation section is set according to the deceleration distance parameter in the behavioral habit template, guiding the subject to gradually reduce their walking speed and smoothly enter the core detection area.

[0022] The posture maintenance guidelines are based on the spatial dimensions of the detection core area and the effective working range boundaries of the multimodal acquisition unit. The subject must stand at the center marker of the detection core area, with feet shoulder-width apart, torso upright, face towards the image acquisition component, head in a natural position, and eyes looking straight ahead at the camera. The interaction sequence requirements stipulate that after entering the detection core area, the subject must wait for a voice prompt. Upon hearing the "Please blow air" command, the subject must blow air into the sampling port of the gas acquisition component, continuing until the "Blowing stopped" command is heard. Facial feature acquisition is performed simultaneously during the blowing process; the subject must maintain a natural facial expression and avoid large movements.

[0023] The rules for guiding and correcting abnormal behavior include behavior recognition conditions and corrective measures. Behavior recognition conditions are determined by comparing the real-time position and posture data of the object to be detected with preset thresholds. For example, if the object enters a prohibited activity area, deviates from the guidance path by more than a preset distance, or maintains a posture that does not conform to specifications for more than a preset time, it is considered abnormal behavior. Corrective measures include voice prompts, light guidance, and robotic arm assistance. The voice prompt module plays preset guidance statements, such as "Please return to the guidance path" or "Please face the camera." Ground guidance lights illuminate corresponding areas based on the real-time position of the object to be detected, forming a visual guidance path. When voice and light guidance are ineffective, robotic arm assistance is activated. A flexible guidance device installed at the end of the robotic arm gently touches the arm of the object to be detected, guiding it to adjust its position and posture.

[0024] Step S114: Record the start-up delay parameters, data acquisition cycle parameters, data transmission delay parameters, and acquisition accuracy fluctuation range of the gas acquisition component and image acquisition component in the multimodal acquisition unit through multiple pre-acquisition experiments, establish a component working characteristic database, and generate a timing coordination rule that includes the start-up trigger time difference setting of the gas acquisition component and image acquisition component, the acquisition cycle synchronization calibration mechanism, and the data transmission timing alignment requirements, so as to control the acquisition synchronization error of the respiratory gas data stream and facial dynamic feature stream in the time dimension within the preset synchronization error range.

[0025] The pre-acquisition experiment was conducted in an interference-free environment, using simulated dummies of different body types as experimental samples, with each body type undergoing multiple repeated experiments. The multimodal acquisition unit's gas acquisition component included a gas sensor array and a sampling pump, while the image acquisition component included a high-definition camera and a supplementary light. During the experiment, a start command was sent to both the gas and image acquisition components via the control module, and the timestamps of the command transmission and actual data acquisition commencement were recorded; the difference between these timestamps was the start-up delay parameter. The data acquisition period parameter was calculated using the timestamp sequence of continuously acquired data; the difference between the timestamps of two adjacent data frames was the acquisition period. The data transmission delay parameter was determined by recording the time difference between the data's output port and the system's receive buffer. The acquisition accuracy fluctuation range was obtained by statistically analyzing multiple acquisitions of the same standard sample, calculating the standard deviation and range.

[0026] All experimental data are categorized and stored according to component type and number of experiments, forming a component operating characteristic database. Based on this database, the start-up trigger time difference is calculated based on the difference in average start-up delay parameters between the gas acquisition component and the image acquisition component. If the gas acquisition component has a longer start-up delay, it is triggered to start earlier, with the advance time equal to the difference in their average start-up delay parameters. The acquisition cycle synchronization calibration mechanism adopts a master-slave synchronization method. Using the acquisition cycle of the image acquisition component as a benchmark, the sampling pump control signal frequency of the gas acquisition component is adjusted to keep the acquisition cycle deviation between the two within a preset range. Data transmission timing alignment is achieved by adding a timestamp to each data frame. The system receiver interpolates or resamples the respiratory gas data stream and facial dynamic feature stream based on the timestamps, ensuring a one-to-one correspondence between their sampling points on the time axis. Synchronization error is statistically analyzed using the absolute value of the timestamp difference, ensuring that this absolute value does not exceed a preset synchronization error threshold.

[0027] Step S115: Based on the environmental interference parameters collected by the environmental sensing unit, construct an adaptive adjustment mechanism for environmental parameters that includes light intensity compensation rules, airflow interference suppression rules, temperature influence correction rules, and background noise filtering rules.

[0028] The construction of an adaptive adjustment mechanism for environmental parameters requires analyzing the correlation between environmental interference parameters and the acquisition accuracy of the multimodal acquisition unit. The illumination intensity compensation rule is formulated based on the illumination intensity distribution data acquired by the illumination sensor and the exposure characteristic curve of the image acquisition component. When the illumination intensity is below a preset lower threshold, a supplementary light is activated, and the brightness level of the supplementary light is determined based on the difference between the illumination intensity and the lower threshold. When the illumination intensity is above a preset upper threshold, the aperture and shutter speed of the camera are adjusted to reduce the exposure. The airflow interference suppression rule is formulated based on the airflow rate data acquired by the anemometer and the gas diffusion model. When the airflow rate exceeds a preset threshold, the windproof cover of the gas acquisition component is activated, and the opening angle of the windproof cover is adjusted according to the wind direction data. Simultaneously, the sampling time is extended, with the extension ratio proportional to the multiple by which the airflow rate exceeds the threshold.

[0029] The temperature effect correction rule is formulated based on the ambient temperature change data collected by the temperature and humidity sensor and the temperature characteristic model of the gas sensor. A temperature compensation coefficient table is established, with different compensation coefficients corresponding to different temperature ranges. The output value of the gas sensor is multiplied by the compensation coefficient to obtain the corrected gas concentration data. The background noise filtering rule is based on the background noise intensity data collected by the noise meter. When the noise intensity exceeds a preset threshold, the noise reduction algorithm of the voice prompt module is activated. The noise frequency band is identified through spectrum analysis, and the corresponding frequency band of the voice signal is attenuated. At the same time, the volume of the voice prompt is adjusted, and the volume adjustment is proportional to the number of decibels the noise intensity exceeds the threshold.

[0030] Step S116: Establish the mutual influence relationship between behavior guidance logic, temporal coordination rules and environmental parameter adaptive adjustment mechanism, and integrate them to generate a dynamic interaction framework for the detection scenario that includes spatial constraints, temporal constraints and environmental constraints.

[0031] The behavior guidance logic, timing coordination rules, and environmental parameter adaptive adjustment mechanism each output control commands to different execution units, and these three elements influence each other. The posture maintenance specification in the behavior guidance logic affects the acquisition cycle setting of the timing coordination rules. When the posture change frequency of the object being detected is high, the timing coordination rules need to increase the acquisition cycle to capture more details. The start-up trigger time difference setting of the timing coordination rules affects the warm-up time of the environmental parameter adaptive adjustment mechanism; components that trigger early need to monitor environmental parameters in advance. The illumination intensity compensation rule of the environmental parameter adaptive adjustment mechanism affects the visual guidance effect of the behavior guidance logic. Turning on the supplementary lighting may change the visibility of ground markings, requiring synchronous adjustment of the marking brightness in the guidance path area.

[0032] By constructing an influence relationship matrix, the interaction weights among the three elements are quantified, and the weight values ​​are obtained through training with historical data. Functional region division in spatial parameters is used as a spatial constraint, synchronization error requirements in temporal coordination rules are used as temporal constraints, and thresholds in the adaptive adjustment mechanism of environmental parameters are used as environmental constraints. These are fused to generate a dynamic interaction framework for the detection scenario. The framework is stored in the form of a data structure, containing specific parameters and execution priorities for behavior guidance logic, temporal coordination rules, and the adaptive adjustment mechanism of environmental parameters. The execution priority is dynamically adjusted according to the stage of the detection process.

[0033] Step S120: Based on the dynamic interaction framework of the detection scenario, start the multimodal acquisition unit of the robot system, acquire the respiratory gas data stream and facial dynamic feature stream of the object to be detected according to the temporal coordination rules, and compensate for the interference of the detection environment through the environmental parameter adaptive adjustment mechanism to obtain the synchronous and correlated respiratory gas data set and facial dynamic feature set after interference correction.

[0034] After the dynamic interaction framework for the detection scenario is constructed, the robot system enters the detection state. When the object to be detected enters the entrance of the detection area, the infrared sensing device is triggered, and the system starts the multimodal acquisition unit. The multimodal acquisition unit includes a gas acquisition component and an image acquisition component. The gas acquisition component includes a gas sensor array, a sampling pump, and a windproof cover; the image acquisition component includes a high-definition camera, a supplementary light, and an image processor. The system controls the start-up timing and acquisition parameters of the multimodal acquisition unit according to the temporal coordination rules in the dynamic interaction framework for the detection scenario. At the same time, it adjusts the acquisition strategy in real time according to the environmental parameter adaptive adjustment mechanism to eliminate environmental interference. During the acquisition process, the respiratory gas data stream and the facial dynamic feature stream are correlated through timestamps and form a structured data set after interference correction.

[0035] Step S121: Based on the behavior guidance logic in the dynamic interaction framework of the detection scene, the robot system’s guidance execution component sends an initial path guidance signal at the entrance of the detection area. The initial path guidance signal includes the lighting sequence of the ground-embedded visual guidance light strip and the phased prompting instructions of the voice broadcast module, which are used to guide the object to be detected to move to the preset detection point in the core detection area.

[0036] The guidance execution component includes a ground-embedded visual guidance light strip, a voice broadcast module, and a mechanical guide arm. The ground-embedded visual guidance light strip is laid along the guidance path area and consists of color-changing LED beads arranged at preset intervals. The initial path guidance signal is generated based on phased path planning in the behavioral guidance logic. When the object to be detected enters the detection area entrance, the infrared sensor outputs a trigger signal. Upon receiving the trigger signal, the guidance execution component controls the visual guidance light strip to light up according to a preset lighting sequence, which illuminates sequentially from the entrance towards the core detection area, creating a flowing light effect. Simultaneously, the voice broadcast module is activated, playing the first phase of the phased prompts, instructing the object to be detected to follow the light strip.

[0037] The color and flashing frequency of the visual guidance light strip can be adjusted according to the moving speed of the object being detected. When the object moves too slowly, the flashing frequency increases; when the object deviates from the guidance path, the light strip at the deviated position flashes red. The voice broadcast module uses a high-fidelity speaker, and the playback volume is automatically adjusted according to the background noise intensity to ensure the clarity of the prompts. Preset detection points are clearly marked on the ground in the core detection area, and the endpoint of the visual guidance light strip coincides with the marked pattern.

[0038] Step S122: During the movement of the object to be detected, the infrared sensors deployed along the path by the guidance execution component acquire the position information of the object to be detected in real time. Combined with the path planning in the basic spatial model, the lighting area of ​​the visual guidance light strip and the content of the voice prompts are dynamically adjusted so that the object to be detected moves along the preset path.

[0039] The infrared sensors along the path are arranged in an array, with each sensor responsible for monitoring a specific area. When an object to be detected enters the monitoring area of ​​a sensor, the sensor outputs a high-level signal. The system calculates the real-time position information of the object based on the triggered sensor number. This position information is compared with the guide path area in the basic spatial model to determine whether the object is on the preset path and its deviation from the path centerline.

[0040] When the object to be detected is on the preset path, the illuminated area of ​​the visual guidance light strip is a preset length range in front of the current position, and the light color is green. The voice prompt switch to the second stage, prompting the object to maintain its current orientation. When the object deviates from the preset path, the system calculates the direction and distance of deviation, controls the light strip on the side of the deviation to light up red, and simultaneously plays a direction correction instruction, which includes the deviation direction and correction suggestions. The dynamic adjustment cycle is consistent with the infrared sensor's acquisition cycle to ensure real-time guidance.

[0041] Step S123: When the object to be detected reaches the preset detection point, the guided execution component sends a posture adjustment signal according to the posture maintenance specification in the behavior guidance logic. At the same time, the vision acquisition unit of the robot system is activated to capture the current posture image of the object to be detected. The current posture image is compared with the preset standard posture template at the pixel level. The head angle deviation, body posture deviation and distance deviation from the acquisition device are calculated respectively. After being standardized and mapped to the same scale range, the posture deviation parameters are obtained by weighted summation. The fineness of the voice prompt command is adjusted according to the posture deviation parameters. The current posture image is continuously captured and compared until the posture deviation parameters of the object to be detected are within the preset deviation threshold range, and the posture adjustment is completed.

[0042] The ground markings at the preset detection points have built-in pressure sensors. When the object to be detected stands on the markings, the pressure sensors output a trigger signal. Upon receiving the trigger signal, the guiding execution component issues a posture adjustment signal according to the posture maintenance specifications. The posture adjustment signal includes a color change of the visual guidance light strip and a switch of voice prompts. The visual guidance light strip changes from a flowing light effect to a stable, solid green light, and the voice prompts switch to posture adjustment prompts.

[0043] The visual acquisition unit includes high-definition cameras deployed around the core detection area. The cameras are installed at preset angles to ensure they can capture images of the front, side, and top of the object being inspected. The current posture image is acquired synchronously by the cameras, pre-processed, and then compared with a standard posture template. The standard posture template consists of frontal and side images of standard human postures stored in the system. Head angle deviation is calculated by extracting the coordinate differences of head feature points in the current posture image and the standard posture template. These feature points include the corners of the eyes, the tip of the nose, and the tip of the chin. Body posture deviation is calculated by extracting the coordinate differences of torso feature points, including the acromion, the anterior superior iliac spine, and the ankle joint. Distance deviation from the acquisition device is calculated using the camera's focal length and imaging ratio.

[0044] The calculated head angle deviation, body posture deviation, and distance deviation are standardized, mapping the deviation values ​​to a range of zero to one. The standardized deviation values ​​are multiplied by preset weighting coefficients and then summed to obtain the posture deviation parameter. The weighting coefficients are set according to the degree of influence of each deviation on the acquisition accuracy, with the head angle deviation having the highest weighting coefficient. When the posture deviation parameter is greater than the upper limit of the preset deviation threshold, the voice broadcast module plays detailed posture adjustment instructions, such as "Please turn your head to the left" or "Please separate your feet shoulder-width apart." When the posture deviation parameter is between the upper and lower limits of the preset deviation threshold, simplified adjustment instructions are played. When the posture deviation parameter is less than the lower limit of the preset deviation threshold, the posture adjustment is considered complete, and a voice prompt "Posture correct, please prepare for acquisition" is given. During the posture adjustment process, the camera acquires images and calculates the posture deviation parameter at fixed intervals until the parameter falls within the preset deviation threshold range.

[0045] Step S124: Start the synchronization trigger module of the multimodal acquisition unit, call the timing coordination rules in the dynamic interaction framework of the detection scene, obtain the start-up trigger time difference and acquisition cycle parameters of the gas acquisition component and the image acquisition component, synchronously trigger the start of the gas acquisition component and the image acquisition component, monitor the working status of the gas acquisition component and the image acquisition component in real time during the acquisition process, and calibrate the timestamp of the acquired data through the data transmission timing alignment requirements so that the respiratory gas data and facial dynamic feature data at the same acquisition time have the same time identifier.

[0046] The synchronous trigger module is the control core of the multimodal acquisition unit, integrating a high-precision clock chip and a trigger signal generator. Upon startup, the synchronous trigger module reads the timing coordination rules from the dynamic interaction framework of the detection scene via a data interface, parsing the startup trigger time difference and acquisition cycle parameters of the gas acquisition component and the image acquisition component. The trigger signal generator generates two trigger signals based on the startup trigger time difference, sending them respectively to the startup control terminals of the gas acquisition component and the image acquisition component to ensure that both start according to the preset timing sequence.

[0047] During data acquisition, the synchronization trigger module reads the operating status words of the gas acquisition component and image acquisition component in real time through the status monitoring interface. These status words include power status, sensor status, and data transmission status. When an abnormal state is detected, the synchronization trigger module sends a reset signal to restart the components. Data transmission timing alignment is achieved by embedding a timestamp in the trigger signal. Each time acquisition is triggered, the clock chip outputs the current timestamp, which is transmitted to the system receiver along with the acquired data. The system receiver compares the timestamps of the respiratory gas data and facial dynamic feature data. If a discrepancy exists, interpolation is performed according to the data transmission timing alignment requirements to ensure that data acquired at the same time have the same time identifier. The time identifier uses the system's unified UTC time format, accurate to the millisecond level.

[0048] Step S125: Invoke the environmental parameter adaptive adjustment mechanism in the dynamic interaction framework of the detection scene, and dynamically adjust the sampling flow rate of the gas acquisition component and the exposure parameters of the image acquisition component according to the environmental interference parameters collected in real time: when the light intensity is outside the preset light threshold range, adjust the supplementary light intensity of the image acquisition component; when the air flow rate is outside the preset flow velocity threshold range, adjust the sampling port orientation of the gas acquisition component and adjust the sampling duration.

[0049] The adaptive adjustment mechanism for environmental parameters is invoked through real-time data interaction between the environmental sensing unit and the multimodal acquisition unit. The environmental sensing unit sends environmental interference parameters to the control module of the multimodal acquisition unit at fixed intervals. The control module calculates the adjustment parameters according to the rules in the adaptive adjustment mechanism. The sampling flow rate of the gas acquisition component is controlled by adjusting the speed of the sampling pump. The pump speed is proportional to the sampling flow rate, and the control module adjusts the pump speed command according to the temperature compensation coefficient in the temperature influence correction rules.

[0050] The exposure parameters of the image acquisition component include aperture size, shutter speed, and ISO sensitivity. The control module calculates the optimal combination of exposure parameters corresponding to the current light intensity based on the light intensity compensation rule. When the light intensity is lower than the lower limit of the preset light threshold range, the control module calculates the required supplementary lighting intensity. The supplementary lighting intensity is proportional to the difference between the light intensity and the lower threshold, and the drive current of the supplementary light is adjusted according to the supplementary lighting intensity. When the light intensity is higher than the upper limit of the preset light threshold range, the control module first reduces the aperture. If the aperture is adjusted to its smallest size and still cannot meet the requirements, the shutter speed is shortened.

[0051] Airflow rate is monitored in real time by an anemometer. When the airflow rate exceeds the upper limit of the preset flow rate threshold range, the control module drives the steering motor of the gas sampling component to adjust the orientation of the sampling port so that it faces away from the wind direction. Simultaneously, an adjustment value for the sampling duration is calculated based on airflow interference suppression rules. The original sampling duration is added to the adjustment value to obtain the new sampling duration. The adjustment value is calculated based on the proportion of the airflow rate exceeding the threshold; the larger the proportion, the larger the adjustment value. The adjusted sampling flow rate and exposure parameters are sent to the execution unit of the corresponding component via the control bus, and the execution unit configures the hardware circuitry according to the new parameters.

[0052] Step S126: The gas acquisition component continuously acquires respiratory gas samples of the subject under test through the gas sensor array according to the adjusted sampling parameters. The gas composition response value, sampling flow rate parameter and ambient temperature parameter at each acquisition time are arranged in chronological order to form an initial respiratory gas data stream.

[0053] The gas sampling assembly includes a sampling port, a sampling pump, a gas sensor array, and a data preprocessing circuit. The sampling port is detachable and has a built-in dust filter; the sampling pump is a miniature diaphragm pump with adjustable speed; the gas sensor array includes an alcohol sensor, a carbon dioxide sensor, and a humidity sensor, which output analog signals; the data preprocessing circuit includes signal amplification, filtering, and A / D conversion modules. According to the adjusted sampling parameters, the sampling pump operates at the set speed, drawing in the breath gas from the subject through the sampling port, which is then detected by the gas sensor array.

[0054] Each sensor in the gas sensor array responds to different gas components, outputting an analog signal proportional to the gas concentration. This analog signal is converted into a digital signal by a data preprocessing circuit, which is the gas component response value. At each acquisition moment, the system simultaneously records the gas component response value, the current rotation speed of the sampling pump (corresponding to the sampling flow rate parameter), and the current ambient temperature parameter sent by the environmental sensing unit. The above data is packaged in chronological order of acquisition time. Each data packet contains a timestamp, an array of gas component response values, sampling flow rate parameters, and ambient temperature parameters. Multiple data packets are arranged in chronological order to form an initial respiratory gas data stream. The data stream is stored in a circular buffer, the size of which is set according to the preset acquisition duration.

[0055] Step S127: Using the image acquisition component, the face images of the subject to be detected are continuously captured by a multi-angle camera according to the adjusted exposure parameters. The dynamic features of the eyes, facial muscle movement features, and skin color change features in each face image are extracted. At the same time, the light intensity parameters at the time of shooting are recorded and combined in chronological order to form an initial facial dynamic feature stream.

[0056] The image acquisition component includes a multi-angle camera array, supplementary lighting, and an image processor. The multi-angle camera array consists of high-definition cameras deployed on the front, left, and right sides of the object to be inspected, each equipped with an adjustable-focus lens. The supplementary lighting consists of ring-shaped LEDs installed around the front cameras. The image processor includes an FPGA and a GPU for image acquisition and feature extraction. Following adjusted exposure parameters, the camera array synchronously starts capturing images. The image sensor outputs raw image data at a set frame rate. The raw image data undergoes preprocessing by the FPGA module of the image processor, including noise reduction, contrast enhancement, and distortion correction.

[0057] The preprocessed facial image is input into the GPU module for feature extraction. Dynamic eye features are extracted by locating the contours of the pupil and eyelids. An edge detection algorithm is used to extract the circumscribed ellipse of the pupil, and the changes in the center coordinates and major axis of the ellipse over time are calculated. Simultaneously, the contour curves of the upper and lower eyelids are extracted, and the eyelid opening and closing degree is calculated. Facial muscle movement features are extracted by tracking facial feature points, selecting key feature points such as the corners of the mouth, the alar of the nose, and the brow bone, and calculating the displacement and movement velocity of these feature points. Skin color variation features are extracted by analyzing the color space component changes in the facial region. The RGB image is converted to the HSV color space, and the mean and variance of the H and S components are extracted over time.

[0058] At each acquisition moment, dynamic eye features, facial muscle movement features, and skin color change features are extracted to form a feature vector. Simultaneously, the illumination intensity parameters at the time of capture are recorded; these parameters are provided in real-time by the environmental perception unit. The feature vectors and illumination intensity parameters are combined chronologically, with each time point corresponding to a feature data block. Multiple feature data blocks are arranged chronologically to form an initial facial dynamic feature stream. This initial facial dynamic feature stream is stored in a video stream encapsulation format, with each keyframe containing complete feature vector data.

[0059] Step S128: Based on the timestamp information of the acquisition time, associate and mark the data at the same time node in the initial respiratory gas data stream and the initial facial dynamic feature stream to generate associated data pairs. Remove temperature change interference from the initial respiratory gas data in the associated data pairs according to the temperature influence correction rule in the environmental parameter adaptive adjustment mechanism to obtain corrected respiratory gas data. Remove light change interference from the initial facial dynamic feature data in the associated data pairs according to the light intensity compensation rule to obtain corrected facial dynamic feature data. Integrate all corrected respiratory gas data in chronological order to form a synchronously associated and interference-corrected respiratory gas data set. Integrate all corrected facial dynamic feature data in chronological order to form a synchronously associated and interference-corrected facial dynamic feature set.

[0060] The timestamp information is the UTC time generated by the synchronization trigger module, accurate to the millisecond level. Each data unit in the initial respiratory gas data stream and the initial facial dynamic feature stream contains a timestamp field. The association marking process is implemented by traversing the timestamp fields of the two data streams, using a difference matching method. When the timestamp difference between two data units is less than a preset matching threshold (the preset matching threshold is set to 50ms, which has been verified through multiple acquisition experiments to ensure the accuracy of data at the same time point), they are determined to be data at the same time point, and an associated data pair is generated. The associated data pair contains the initial respiratory gas data and the initial facial dynamic feature data.

[0061] Temperature variation interference removal is based on temperature influence correction rules. The compensation coefficient corresponding to the current ambient temperature is read from the environmental parameter adaptive adjustment mechanism. The gas component response value in the initial respiratory gas data is multiplied by the compensation coefficient to obtain the corrected gas component response value. The sampling flow rate parameter and ambient temperature parameter remain unchanged, forming the corrected respiratory gas data. Illumination variation interference removal is based on illumination intensity compensation rules. The illumination intensity parameter I is extracted from the initial facial dynamic feature data, and the illumination compensation factor K is calculated. The specific calculation method is as follows: First, a standard illumination intensity I0 is set (valued at 500 lux, meeting the standard detection illumination environment requirements of the indoor-outdoor transition area of ​​urban road traffic safety inspection stations). When I≠0, K=I0 / I; when I=0 (extreme low light environment), K=10 (through experimental calibration, this value can avoid excessive feature correction under low light conditions). Simultaneously, an illumination response correction coefficient α (valued at 0.95, obtained through fitting experiments of facial feature acquisition under 1000 sets of different illumination conditions, used to compensate for the nonlinear response of the image sensor) is introduced. Finally, the illumination compensation factor K_final=K×α. The H and S components of skin color change features are corrected using the following formulas: corrected H component = original H component × K_final, corrected S component = original S component × K_final. Eye dynamic features and facial muscle movement features remain unchanged as they are unaffected by illumination, thus forming corrected facial dynamic feature data.

[0062] The corrected respiratory gas data are arranged in ascending order by timestamp. Each data unit contains the corrected gas component response value, sampling flow rate parameter, ambient temperature parameter, and timestamp. All data units are combined to form a respiratory gas dataset, which is stored in JSON format and includes metadata and a data list. The metadata records the collection start time, collection duration, and number of data units. The corrected facial dynamic feature data are also arranged in ascending order by timestamp, forming a facial dynamic feature dataset, which is stored in the same JSON format as the respiratory gas dataset to ensure data structure consistency.

[0063] Step S130: Input the respiratory gas data set and the facial dynamic feature set into the pre-trained deep learning model for drunk driving detection, establish the spatiotemporal mapping relationship between the respiratory gas data set and the facial dynamic feature set, generate the fused detection feature vector through feature interaction processing via bidirectional feature transmission, and verify the effectiveness of the fused features.

[0064] The deep learning model for drunk driving detection is deployed in the edge computing unit of the robot system. This deep learning model for drunk driving detection is a multimodal fusion model based on the Transformer architecture, which includes a gas feature extraction layer, a facial feature extraction layer, a feature association layer, and a feature fusion layer. The model construction and training process is as follows: 1. Model structure design: The gas feature extraction layer adopts a 3-layer 1D convolutional network with convolutional kernel sizes of 3, 5, and 7 (to capture gas concentration change features at different time scales). Each convolutional layer is followed by batch normalization and ReLU activation function, and finally outputs a gas feature vector with a dimension of 256 through global average pooling; The facial feature extraction layer adopts a 2-layer 2D convolutional network (capturing spatial features) + a 2-layer temporal convolutional network (TCN, capturing temporal features). The 2D convolutional kernel size is 3×3, the TCN convolutional kernel size is 3, and the output facial feature vector has a dimension of 256; The feature association layer adopts an 8-head self-attention mechanism (Multi-HeadSelf-Attention), and the attention weights are calculated through the covariance matrix of gas and facial features; The feature fusion layer adopts a fully connected network, which concatenates the associated features into a 512-dimensional vector, and outputs a fused detection feature vector through a 2-layer fully connected network (hidden layer dimension of 1024) and a Sigmoid activation function. 2. Training data preparation: Collect 100,000+ sets of labeled data. Each set of labeled data includes breath gas data with known alcohol concentration (0-200mg / 100ml, covering scenarios of not driving under the influence, driving under the influence, and drunk driving), corresponding facial dynamic feature data, and manually labeled drunk driving status labels (not driving under the influence / driving under the influence / drunk driving). Data augmentation processing is performed: ±5% Gaussian noise is added to the breath data (simulating sensor error), and the facial data is rotated by ±10° and scaled by 0.8-1.2 times (simulating posture changes). 3. Training Process: An end-to-end training method was adopted, with the loss function consisting of cross-entropy loss (weight 0.7) and contrastive loss (weight 0.3, used to enhance the consistency of multimodal features). The optimizer used was Adam, with an initial learning rate of 1e-4, which decayed to 0.1 times the original learning rate every 10 epochs using a cosine annealing strategy. The training consisted of 100 epochs, employing 5-fold cross-validation. Training stopped when the validation set accuracy reached 98.2%. After training, the model was evaluated using 30,000 test sets (not used in training) to ensure its generalization ability, with a test set accuracy of no less than 97.5%. The respiratory gas dataset and facial dynamic feature dataset served as inputs to the model. These were first processed by gas feature extraction layers and facial feature extraction layers, respectively, to obtain gas feature vector sequences and facial feature vector sequences. The feature association layer established a spatiotemporal mapping relationship between the two through an attention mechanism, achieving bidirectional feature transmission. The feature fusion layer concatenated and nonlinearly transformed the transmitted features to generate a fused detection feature vector.The effectiveness of fused features is verified by calculating the information entropy and dispersion of the features to ensure that the features contain sufficient discriminative information.

[0065] Step S131: Input the breath gas data set into the gas feature extraction layer of the drunk driving detection deep learning model to obtain the gas feature vector sequence.

[0066] Step S1311: Receive the respiratory gas data set through the preprocessing sublayer of the gas feature extraction layer, and extract the gas component response value, sampling flow rate parameter and ambient temperature parameter from each respiratory gas data set.

[0067] The preprocessing sublayer parses the input respiratory gas dataset, extracting key parameters from each data unit. The gas composition response value reflects the detection results of various components in the respiratory gas by the gas sensor array; the sampling flow rate parameter characterizes the inhalation rate during gas collection; and the ambient temperature parameter is used for subsequent temperature compensation calculations. These parameters are extracted and organized into a structured data list in the order of data units.

[0068] Step S1312: Remove abnormal response values ​​from the gas component response values ​​that are outside the range of the gas sensor. Fill in the missing data points of the remaining response values ​​using the mean filling method to obtain the preliminary processed gas component response values. Based on the sampling flow rate parameter, convert the response values ​​under different sampling flow rates to the response values ​​under the standard sampling flow rate according to the flow rate-response characteristic curve of the gas sensor. Combine the ambient temperature parameter and correct the response value offset caused by temperature change according to the temperature-response characteristic model of the gas sensor to obtain the temperature-compensated gas component response values.

[0069] Abnormal response value removal is achieved by comparing the gas component response value with the sensor's measurement range threshold; values ​​exceeding the range are marked as abnormal and discarded. For missing points in the data sequence, mean imputation is used, calculating the arithmetic mean of a preset number of valid data points before and after the missing point to ensure data sequence continuity. During flow conversion, based on the flow-response characteristic curve calibrated at the gas sensor's factory, the response value at the actual sampling flow rate is mapped to the theoretical response value corresponding to the standard sampling flow rate. Temperature compensation utilizes a pre-established gas sensor temperature-response characteristic model, substituting ambient temperature parameters into the model to calculate compensation coefficients, correcting the response value after flow conversion to eliminate the impact of temperature changes on sensor detection accuracy.

[0070] Step S1313: Standardize the temperature-compensated gas component response value to obtain a standardized gas component response value. Combine the standardized gas component response value, the corrected sampling flow rate parameter, and the compensated ambient temperature parameter to form standardized respiratory gas data.

[0071] The standardized mapping employs a min-max normalization method to compress the temperature-compensated gas component response values ​​into a specific numerical range. The relative magnitude within this range characterizes the strength of the gas component response. The corrected sampling flow rate parameter is compared with the standard sampling flow rate to obtain a relative flow coefficient, which reflects the deviation of the actual sampling flow rate from the standard flow rate. The compensated ambient temperature parameter is converted into a deviation value from the standard temperature to reflect the influence of ambient temperature on the detection process. The standardized gas component response values, relative flow coefficients, and temperature deviation values ​​are combined in a preset order to construct standardized respiratory gas data containing multi-dimensional information.

[0072] Step S1314: Call the convolutional filtering unit of the gas feature extraction layer, load the pre-trained multi-scale convolutional kernel parameters containing convolutional windows of different sizes, each convolutional window corresponds to a different convolutional kernel weight, arrange the standardized gas component response values ​​in the standardized respiratory gas data into a one-dimensional data sequence in chronological order, and input them into convolutional windows of different sizes for convolutional operation.

[0073] The convolutional filtering unit loads pre-trained multi-scale convolutional kernel parameters. These kernels have convolutional windows of different sizes to capture features across different time ranges. The standardized gas component response values ​​from the standardized respiratory gas data are arranged chronologically to form a one-dimensional data sequence. This one-dimensional data sequence is then input into convolutional windows of different sizes, and the data sequence is filtered through convolution operations. Each convolutional window extracts specific feature patterns from the data based on its corresponding kernel weights.

[0074] Step S1315: Perform convolution on the one-dimensional data sequence with different ranges through convolution windows of different sizes to capture local peak features, slope change features between local peaks and overall concentration distribution trend features, and output corresponding feature maps. Then, stitch the feature maps together by channel dimension to obtain the original gas features.

[0075] Convolutional windows of different sizes perform sliding convolution operations on a one-dimensional data sequence. Smaller windows perform local convolution on the data sequence, capturing local peak features over a short period, which may correspond to abrupt changes in gas composition. Medium-sized windows perform mid-range convolution, capturing the slope variation between local peaks, reflecting the rate of change in gas concentration. Larger windows perform larger-scale convolution, capturing the overall concentration distribution trend, reflecting the overall change pattern of gas composition over time. Each convolutional window outputs a corresponding feature map, which is then stitched together along the channel dimension to integrate different types of features, forming the original gas features containing multifaceted information.

[0076] Step S1316: Input the original gas features into the nonlinear transformation sublayer of the gas feature extraction layer, call the pre-trained activation function to perform nonlinear transformation on each feature value in the original gas features, strengthen the response signal related to alcohol molecule features and suppress the response signal related to interfering gas components, and obtain enhanced gas features.

[0077] After receiving the original gas features, the nonlinear transformation sublayer calls a pre-trained activation function to perform nonlinear processing on each feature value. The activation function nonlinearly maps the input feature values, making the differences between them more apparent. This nonlinear transformation enhances the response signal related to alcohol molecule features, highlighting key features for alcohol detection, while suppressing response signals related to interfering gas components, reducing the influence of irrelevant factors on subsequent feature extraction, thus resulting in enhanced gas features.

[0078] Step S1317: The enhanced gas features are analyzed by the feature integration sublayer of the gas feature extraction layer. Feature dimensions related to molecular structure and feature dimensions related to concentration distribution are identified. Feature peak position, feature peak width and feature peak intensity are extracted from the feature dimensions related to molecular structure to form molecular structure response features. Concentration uniformity parameters and concentration gradient parameters are calculated from the feature dimensions related to concentration distribution to form concentration distribution features.

[0079] The feature integration sublayer first performs feature dimension analysis on the enhanced gas features. Based on the physical meaning of the features and predefined rules, it identifies feature dimensions related to gas molecule structure and feature dimensions related to gas concentration distribution. For feature dimensions related to molecule structure, by analyzing the morphological parameters of characteristic peaks, information such as peak position, peak width, and peak intensity are extracted. This information reflects the structural characteristics of gas molecules and is combined to form molecular structure response features. For feature dimensions related to concentration distribution, a concentration uniformity parameter is calculated to describe the uniformity of gas concentration distribution in space or time, and a concentration gradient parameter is calculated to reflect the rate of concentration change. These two parameters are combined to form concentration distribution features.

[0080] Step S1318: Arrange the molecular structure response features and concentration distribution features in a preset dimension order to form a gas feature vector for a single respiratory gas data. Arrange the gas feature vectors of all single respiratory gas data in the order of their acquisition time in the respiratory gas data set to generate a gas feature vector sequence.

[0081] Molecular structure response features and concentration distribution features are arranged in a predetermined dimensional order to form a gas feature vector that can comprehensively characterize the features of a single respiratory gas data point. Then, according to the acquisition time sequence of the respiratory gas data in the respiratory gas dataset, the gas feature vectors corresponding to all individual respiratory gas data points are arranged sequentially to form a gas feature vector sequence.

[0082] Step S132: Input the set of dynamic facial features into the facial feature extraction layer of the drunk driving detection deep learning model to obtain a sequence of facial feature vectors.

[0083] Step S1321: Extract the facial feature frames and shooting timestamps corresponding to each facial dynamic feature in the facial dynamic feature set by dividing the feature fragments of the facial feature extraction layer into sub-layers, and calculate the feature difference degree between two adjacent facial feature frames by the sum of squares of the normalized inter-frame pixel differences.

[0084] The feature segmentation sublayer first extracts the facial feature frame corresponding to each facial dynamic feature from the facial dynamic feature set, along with the corresponding capture timestamp, establishing a correspondence between facial feature frames and time. Then, for two adjacent facial feature frames, the feature difference between them is calculated. During the calculation, the two frames are first normalized to eliminate the influence of differences in image size or brightness. Then, the sum of squares of the corresponding pixel differences between the normalized frames is calculated, and this sum of squares is used as the feature difference measure to assess the degree of difference between adjacent facial feature frames.

[0085] Step S1322: Determine the feature change frequency based on the magnitude of the feature difference. When multiple consecutive feature differences are within a preset difference threshold range, the facial feature frames in the corresponding time period are divided into feature segments of a first preset time length range. When multiple consecutive feature differences are outside the preset difference threshold range, the facial feature frames in the time period are divided into feature segments of a second preset time length range. This ensures that the number of facial feature frames contained in each feature segment remains within a preset frame number range. If the number is less than the lower limit of the preset frame number range, it is merged with the feature frames of adjacent time periods. If the number exceeds the upper limit of the preset frame number range, it is split into multiple feature segments.

[0086] The frequency of facial feature changes is determined based on the calculated feature difference magnitude. A preset difference threshold range is established. When multiple consecutive feature difference values ​​fall within this range, it indicates that facial feature changes are relatively gradual during this period, and the facial feature frames within that time period are divided into feature segments with a longer first preset time length range. When multiple consecutive feature difference values ​​fall outside the preset difference threshold range, it indicates that facial feature changes are more drastic, and the facial feature frames within that time period are divided into feature segments with a shorter second preset time length range. During the segmentation process, it is necessary to ensure that the number of facial feature frames contained in each feature segment is within a preset frame count range. If the number of frames in a segment after segmentation is less than a preset lower limit, it is merged with feature frames from adjacent time periods; if it exceeds a preset upper limit, it is split into multiple feature segments to ensure the effectiveness of subsequent feature processing.

[0087] Step S1323: The feature point matching sub-layer of the facial feature extraction layer is used to locate the feature points of the first facial feature frame in each feature segment using a pre-trained facial feature point detection model, and the coordinate positions of the eye feature points, facial muscle feature points and skin color feature points are marked in the frame image.

[0088] The feature point matching sublayer processes the first facial feature frame in each feature segment. A pre-trained facial feature point detection model is used, which can automatically identify and locate key feature points in facial images. In the frame image, eye feature points, such as pupil edges and eyelid contours, are marked; facial muscle feature points, such as mouth corner contours and cheek contours, are marked; and skin color feature points, such as forehead and cheek area points, are marked. The coordinates of these feature points in the image coordinate system are recorded.

[0089] Step S1324: For subsequent facial feature frames in the feature segment, use the optical flow tracing algorithm to track the located feature points and determine the coordinate position of each feature point in the subsequent frame. If feature points are lost during the tracking process, use a template matching-based method to relocate them and establish a feature point coordinate mapping table for all facial feature frames in each feature segment.

[0090] For subsequent facial feature frames after the first frame in a feature segment, an optical flow tracing algorithm is used to track the feature points already located in the first frame. The optical flow tracing algorithm determines the new coordinate positions of the feature points in subsequent frames by calculating the motion vectors of pixels between adjacent frames. When feature points are lost during tracking due to occlusion, blurring, or other reasons, a template matching-based method is used for re-localization. Using the neighborhood image of the feature point before loss as a template, template matching is performed within the corresponding search area of ​​the current frame to find the most similar region as the new position of the feature point. The coordinates of all facial feature frames within each feature segment are organized in frame order to establish a feature point coordinate mapping table, recording the dynamic changes of feature points in different frames.

[0091] Step S1325: Call the temporal convolutional network of the facial feature extraction layer to convert the feature point coordinate mapping table of the feature segment into feature point motion trajectory data containing the sequence of coordinates changing over time. Input the motion trajectory data into each convolutional layer of the temporal convolutional network to perform convolution operations to extract motion features at different time scales.

[0092] The temporal convolutional network receives a feature point coordinate mapping table of a feature segment and converts it into feature point motion trajectory data. This motion trajectory data records the sequence of coordinate changes of each feature point over time. The motion trajectory data is then input into the temporal convolutional network, which contains multiple convolutional layers, each using a different sized kernel. The first convolutional layer uses a smaller kernel to perform convolution operations on the motion trajectory data, extracting local fast motion features of the feature points; the middle convolutional layers use medium-sized kernels to extract medium-scale motion features of the feature points; and the last convolutional layer uses a larger kernel to extract the overall motion trend features of the feature points.

[0093] Step S1326: Max pooling is applied to the output of each convolutional layer of the temporal convolutional network to retain the key feature values ​​in each trajectory feature, resulting in a simplified trajectory feature. Based on the trajectory feature, the total position change of each feature point within the feature segment time length is calculated and divided by the time length to obtain the average change rate. The coordinate difference between the current frame and the previous frame at each time node is extracted as the instantaneous change rate and arranged in chronological order to form an instantaneous change rate sequence. The average change rate and the instantaneous change rate sequence are combined to form a dynamic change rate feature.

[0094] The feature maps output by each convolutional layer of the temporal convolutional network are pooled using max pooling. This involves selecting the maximum value from each pooling window of a preset size as the output of that window, preserving key feature values ​​in the trajectory features, achieving feature dimensionality reduction and data simplification, resulting in simplified trajectory features. Based on the simplified trajectory features, the total positional change of each feature point over the entire feature segment's time length is calculated, and this is divided by the time length to obtain the average rate of change for the feature point. Simultaneously, at each time node, the difference between the coordinates of the feature point in the current frame and the coordinates of the feature point in the previous frame is calculated as the instantaneous rate of change. The instantaneous rates of change at all time nodes are arranged chronologically to form an instantaneous rate of change sequence. Combining the average rate of change and the instantaneous rate of change sequence constitutes a dynamic rate of change feature that describes the speed and trend of feature point movement.

[0095] Step S1327: Analyze the correlation between changes in different types of feature points. Select the changes in the position of eye feature points and the changes in the position of facial muscle feature points within the same time interval and calculate their correlation coefficient as the change synchronization rate. Determine the time difference between the changes in facial muscle feature points and the changes in skin color feature points through cross-correlation analysis as the change lag time. Combine the change synchronization rate and the change lag time to form the feature correlation feature.

[0096] The correlation between changes in different types of feature points, such as eye feature points, facial muscle feature points, and skin color feature points, is analyzed. Within the same time interval, the changes in the positions of eye feature points and facial muscle feature points are calculated separately. The correlation coefficient between these two changes is used to measure their synchronicity; this correlation coefficient is the synchronization rate. Cross-correlation analysis is employed to analyze the time delay relationship between the change sequences of facial muscle feature points and skin color feature points, determining the time difference between changes in facial muscle feature points and changes in skin color feature points; this time difference is used as the lag time. Combining the synchronization rate and the lag time forms a feature correlation characteristic that reflects the dynamic correlation between different types of feature points.

[0097] Step S1328: The dynamic change rate feature and feature correlation feature are unified in dimension through the feature fusion sub-layer of the facial feature extraction layer. The weighted fusion algorithm is used to perform weighted fusion of the unified dynamic change rate feature and feature correlation feature according to the pre-trained feature weight parameters to obtain the fused feature vector of each feature segment. All fused feature vectors are arranged in order of time of feature segment in the facial dynamic feature set to generate a facial feature vector sequence.

[0098] The feature fusion sublayer first unifies the dimensions of the dynamic change rate features and feature correlation features, converting them into feature vectors of the same dimension. Then, a weighted fusion algorithm is used to sum the unified dynamic change rate features and feature correlation features based on the feature weight parameters learned during pre-training, resulting in a fused feature vector for each feature segment. This fused feature vector integrates the motion rate information of feature points and the correlation information between different feature points. Finally, according to the temporal order of the feature segments in the facial dynamic feature set, the fused feature vectors of all feature segments are arranged sequentially to form a facial feature vector sequence. This sequence reflects the overall dynamic changes of facial features over time.

[0099] Step S133: Calculate the normalized correlation coefficient of each feature dimension in the gas feature vector sequence and the facial feature vector sequence as the first type of correlation parameter, and calculate the matching degree of the feature dimension change rate as the second type of correlation parameter. After weighted fusion of the first type of correlation parameter and the second type of correlation parameter, generate a cross-correlation parameter. Based on the cross-correlation parameter, construct a spatiotemporal mapping matrix. Through an attention mechanism, assign dynamic weights to each element in the spatiotemporal mapping matrix according to the magnitude of the cross-correlation parameter, strengthen the feature weights of regions where the cross-correlation parameter is within a preset correlation threshold range, and weaken the feature weights of regions where the cross-correlation parameter is outside the preset correlation threshold range, thereby generating a weighted spatiotemporal mapping matrix.

[0100] The gas feature vector sequence and the facial feature vector sequence may have different lengths. First, they are adjusted to the same length using linear interpolation. Let the adjusted length be N, the dimension of the gas feature vector be Dg, and the dimension of the facial feature vector be Df. When calculating the first type of correlation parameters, the normalized correlation coefficient is calculated for each dimension of the gas feature vector sequence and each dimension of the facial feature vector sequence. The normalized correlation coefficient is obtained by calculating the Pearson correlation coefficient and taking its absolute value, forming a Dg×Df correlation coefficient matrix, which is the first type of correlation parameter matrix.

[0101] When calculating the second type of correlation parameters, firstly, the difference operation is performed on each dimension of the gas feature vector sequence and the facial feature vector sequence to obtain the rate of change sequence. Then, the matching degree of each dimension combination of the gas rate of change sequence and the facial rate of change sequence is calculated. The matching degree is obtained by calculating the mutual information of the rate of change sequences, forming a matching degree matrix of Dg×Df, which is the second type of correlation parameter matrix.

[0102] The first and second type association parameter matrices are summed element-wise with weights, and the weight coefficients are determined through cross-validation in the training data to obtain the cross-association parameter matrix. The spatiotemporal mapping matrix has an N×N dimension, and the matrix elements represent the association strength between the gas feature vector sequence at time t and the facial feature vector sequence at time t'. The association strength is initialized to the average value of the cross-association parameter matrix. The attention mechanism adjusts the weights of the spatiotemporal mapping matrix based on the element values ​​of the cross-association parameter matrix. For dimensional pairs with cross-association parameters greater than a preset association threshold, the weight of their corresponding spatiotemporal positions is increased; for dimensional pairs with cross-association parameters less than the preset association threshold, the weight of their corresponding spatiotemporal positions is decreased. The adjusted spatiotemporal mapping matrix is ​​the weighted spatiotemporal mapping matrix, with element values ​​between zero and one.

[0103] Step S134: Perform bidirectional feature transfer based on the weighted spatiotemporal mapping matrix to establish transfer paths from gas features to facial features and from facial features to gas features. In the first transfer path, the molecular structure response features in the gas feature vector are transferred to the facial feature vector to correct the dynamic change features in the facial features related to the influence of alcohol. In the second transfer path, the feature correlation features in the facial feature vector are transferred to the gas feature vector to correct the concentration distribution features in the gas features related to the respiratory state. Perform collaborative analysis on the dynamic change features and concentration distribution features after bidirectional transfer to extract collaborative features. Integrate the collaborative features with the key features in the original gas feature vector sequence and facial feature vector sequence to generate a fusion detection feature vector.

[0104] A weighted spatiotemporal mapping matrix guides bidirectional feature transfer, which is implemented in the feature association layer. The first transfer path is from gas features to facial features. First, molecular structure response features are extracted from the gas feature vector sequence. These molecular structure response features correspond to the response modes of the alcohol sensors in the gas sensor array, achieved by selecting feature dimensions related to the alcohol molecule structure within the gas feature vector. The molecular structure response features are then multiplied by the weighted spatiotemporal mapping matrix to obtain spatiotemporally weighted molecular structure response features. These features represent the intensity of the influence of the molecular structure response at different time points on each facial feature point. Finally, the spatiotemporally weighted molecular structure response features are element-wise added to the facial feature vector sequence to correct for dynamic changes related to alcohol effects, such as slowed eye movement and relaxed facial muscles.

[0105] The second transmission path is from facial features to gas features. Feature correlation features are extracted from the facial feature vector sequence. These features represent the collaborative changes between various dynamic facial features, obtained by calculating the covariance matrix of the facial feature vector sequence. The feature correlation features are then multiplied by the transpose of the weighted spatiotemporal mapping matrix to obtain spatiotemporally weighted feature correlation features. These features represent the influence of facial feature correlations at different time points on gas concentration distribution. The spatiotemporally weighted feature correlation features are then element-wise added to the gas feature vector sequence to correct for concentration distribution features related to respiratory states, such as concentration fluctuations caused by respiratory rhythm.

[0106] The facial feature vector sequence and gas feature vector sequence after bidirectional transmission are input into the co-analysis module. This module extracts co-features using the mutual information maximization criterion. Co-features represent the common variations in the two modal features. The dimension of the co-features is a preset fixed value, and dimensionality reduction is achieved through principal component analysis. The original gas feature vector sequence and facial feature vector sequence are processed by global average pooling to obtain key feature vectors. The key feature vectors are concatenated with the co-features along the feature dimension to form a fused detection feature vector, the dimension of which is the sum of the dimensions of the co-features and the key feature vectors.

[0107] Step S135: Calculate the information entropy value and feature dispersion of the fused detection feature vector. Compare the information entropy value with a preset information entropy threshold and the feature dispersion with a preset dispersion threshold. If the information entropy value is within the preset information entropy threshold range and the feature dispersion is within the preset dispersion threshold range, the fused detection feature vector is determined to be valid. If the information entropy value is outside the preset information entropy threshold range or the feature dispersion is outside the preset dispersion threshold range, the feature reconstruction mechanism is triggered, and the weight allocation of the spatiotemporal mapping matrix is ​​adjusted until a valid fused detection feature vector is generated.

[0108] The validity of the fused detection feature vectors is verified by calculating the information entropy and feature dispersion. The information entropy is calculated based on the probability distribution estimation of the fused detection feature vectors. The kernel density estimation method is used to estimate the probability density function of each dimension of the feature vector, and then the entropy value of each dimension is calculated and summed to obtain the total information entropy value. The information entropy reflects the uncertainty of the feature vectors; too high an information entropy indicates feature disorder, while too low an information entropy indicates feature homogeneity.

[0109] Feature dispersion is calculated by summing the standard deviations of each dimension of the feature vector. A larger standard deviation indicates a more dispersed feature distribution and richer information content; a smaller standard deviation indicates a more concentrated feature distribution and potential information redundancy. The preset information entropy threshold interval and preset dispersion threshold interval are obtained through statistical analysis of effective feature vectors in the training data. The 95% confidence interval of the information entropy value and feature dispersion in the training data is taken as the preset threshold interval.

[0110] If both the information entropy and feature dispersion of the fused detection feature vector are within a preset threshold range, it is deemed valid, and the fused detection feature vector is output; otherwise, a feature reconstruction mechanism is triggered. The feature reconstruction mechanism adjusts the weight distribution of the weighted spatiotemporal mapping matrix, increasing the weights for information entropy and feature dispersion deviating from the threshold direction. For example, if the information entropy is too low, the weight of weakly correlated regions is increased to introduce more variation; if the feature dispersion is too high, the weight of strongly correlated regions is increased to enhance feature consistency. The adjusted weighted spatiotemporal mapping matrix is ​​reused for bidirectional feature propagation, repeating steps S134 to S135 until a valid fused detection feature vector is generated. The maximum number of iterations is preset to ten. If it is still invalid after exceeding the number of iterations, a warning message is output, and the last generated fused detection feature vector is used.

[0111] Step S140: Perform drunk driving determination processing on the fused detection feature vector to generate a comprehensive drunk driving determination result that includes detection confidence, feature correlation strength and determination criteria.

[0112] The drunk driving detection process is implemented in the model's classification decision layer, which comprises a first-level decision module and a second-level decision module, employing a two-level cascaded structure. The first-level decision module performs preliminary classification, outputting the suspected state category and preliminary confidence level. The second-level decision module performs refined determination of the suspected drunk driving state, calculating the detection confidence level and feature association strength. The determination criteria include the state category, confidence level, feature association strength, and feature difference analysis results, output in structured data format.

[0113] Step S141: Input the fused detection feature vector into the first-level decision module. Load the pre-trained classification model parameters through the pre-trained binary classifier contained in the first-level decision module, and perform feature mapping on the fused detection feature vector to convert it into feature points in the classification space.

[0114] The first-level decision module uses a binary classifier based on a support vector machine (SVM). The model parameters include support vectors, classification hyperplane coefficients, and bias terms. These parameters are obtained through training on the training dataset and stored in a model parameter file. After the fused detection feature vectors are input into the binary classifier, they first undergo kernel function mapping to transform the original feature space into a high-dimensional classification space. The kernel function used is a radial basis function, and its parameters are optimized and determined during training. The mapped feature vectors are then multiplied by the support vectors to obtain the coordinates of the feature points in the classification space. The dimension of the feature points is equal to the number of support vectors.

[0115] Step S142: Calculate the distance between the feature point and the center of the normal state category and the center of the suspected drunk driving category in the classification space. If the distance between the feature point and the center of the normal state category is less than the distance between the feature point and the center of the suspected drunk driving category, the suspected state category is determined to be normal. If the distance between the feature point and the center of the suspected drunk driving category is less than the center of the normal state category, the suspected state category is determined to be suspected drunk driving. At the same time, calculate the normalized distance ratio between the feature point and the corresponding category center as the confidence parameter for the first-level determination.

[0116] The class centers in the classification space are calculated using class samples from the training data. The class center for the normal state is the mean vector of feature points mapped from all normal samples, while the class center for the suspected drunk driving state is the mean vector of feature points mapped from all drunk driving samples. The distance between a feature point and its class center is calculated using Euclidean distance; a smaller distance value indicates that the feature point is closer to that class.

[0117] The determination of a suspected drunk driving status category is achieved by comparing two distance values. If the distance from the feature point to the center of the normal status category is less than the distance to the center of the suspected drunk driving status category, it is determined to be a normal status; otherwise, it is determined to be a suspected drunk driving status. The confidence parameter for the first-level determination is calculated as 1 minus the distance between the feature point and the corresponding category center divided by the distance between the two category centers. The closer this value is to 1, the more reliable the determination; the closer it is to 0, the more ambiguous the determination.

[0118] Step S143: When the suspected state category is normal, integrate the suspected state category and the confidence parameter of the first-level judgment to generate a preliminary drunk driving judgment result. If the confidence parameter of the first-level judgment is within the preset normal confidence threshold range, then directly integrate the suspected state category, the confidence parameter of the first-level judgment, and the basic correlation between the gas feature component and the facial feature component as the feature correlation strength to generate a comprehensive drunk driving judgment result. If the confidence parameter of the first-level judgment is outside the preset normal confidence threshold range, then trigger the re-judgment mechanism to return to the feature correlation layer to regenerate the fused detection feature vector, and perform two-level hierarchical judgment again until a judgment result is obtained where the confidence parameter is within the preset normal confidence threshold range.

[0119] The preliminary drunk driving determination result is a dictionary structure containing the suspected state category and confidence parameters. The preset normal confidence threshold range is set according to the confidence distribution of normal samples in the training data, typically between 0.7 and 1.0. The basic correlation between the gas feature components and the facial feature components is obtained by calculating the cosine similarity between the gas feature part and the facial feature part in the fused detection feature vector; this value reflects the consistency of the two modal features.

[0120] When the confidence parameter is within the preset normal confidence threshold range, the feature association strength is the basic association strength. The comprehensive drunk driving judgment result includes the suspected state category, confidence parameter, feature association strength, and judgment basis. The judgment basis explains the reason for judging it as a normal state, such as "the alcohol concentration in the gas feature is lower than the threshold, and there is no abnormal dynamic in the facial features". When the confidence parameter is lower than the lower limit of the preset normal confidence threshold range, a re-judgment mechanism is triggered. The re-judgment mechanism sends a signal to the feature association layer, adjusts the weight parameters of the attention mechanism, increases the weight of the gas feature component, and then regenerates the fused detection feature vector. Steps S133 to S143 are repeated, with a maximum of three re-judgments. If the confidence requirement is still not met, a low confidence warning is output, and the current judgment result is adopted.

[0121] Step S144: When the suspected status category is suspected drunk driving, the fused detection feature vector and the confidence parameter of the first-level judgment are input into the second-level judgment module to calculate the detection confidence.

[0122] Step S1441: Input the fused detection feature vector and the confidence parameter of the first-level judgment into the second-level judgment module. Load the preset drunk driving feature template library through the second-level judgment module. The drunk driving feature template library is generated by training multiple standard fused feature templates. Each standard fused feature template includes a template identifier, the drunk driving level category corresponding to the standard fused feature template, the template feature vector, and the feature dimension weight table.

[0123] After receiving the fused detection feature vector and the confidence parameters from the first-level judgment, the second-level judgment module first loads a pre-defined drunk driving feature template library. This drunk driving feature template library is generated by feature extraction and training on a large number of standard samples labeled with drunk driving severity categories, and contains multiple standard fused feature templates. Each standard fused feature template has a unique template identifier, corresponding to a specific drunk driving severity category, such as no drunk driving, slight drunk driving, moderate drunk driving, and severe drunk driving. Simultaneously, each template also includes a template feature vector, which is obtained by feature fusion of standard samples and can represent the typical features of that drunk driving severity category, as well as a feature dimension weight table, which records the importance weight of each feature dimension in the matching process of the standard fused feature template.

[0124] Step S1442: Compare the fused detection feature vector with each standard fused feature template in the drunk driving feature template library one by one, extract the template feature vector and feature dimension weight table of the standard fused feature template, calculate the normalized absolute difference value between the fused detection feature vector and the template feature vector in each feature dimension, perform weighted processing on the normalized absolute difference value of each feature dimension according to the weight value in the feature dimension weight table, count the weighted difference values ​​of all feature dimensions and calculate the sum to obtain the total weighted difference value, and convert the total weighted difference value into a matching degree parameter.

[0125] The second-level judgment module compares the input fused detection feature vector with each standard fused feature template in the drunk driving feature template library one by one. For each standard fused feature template, its template feature vector and feature dimension weight table are extracted. The absolute difference between the fused detection feature vector and the template feature vector in each feature dimension is calculated, and this absolute difference value is normalized to obtain a normalized absolute difference value to eliminate the influence of different feature dimension units. According to the weight value of each feature dimension in the feature dimension weight table, the corresponding normalized absolute difference value is weighted, that is, multiplied by its respective weight value. Then, the weighted difference values ​​of all feature dimensions are summed to obtain the total weighted difference value. The smaller the total weighted difference value, the more similar the fused detection feature vector is to the standard fused feature template. The total weighted difference value is converted into a matching degree parameter through a preset transformation function. The larger the matching degree parameter, the higher the matching degree.

[0126] Step S1443: Sort the matching degree parameters of all standard fusion feature templates, select the standard fusion feature template with the largest matching degree parameter as the optimal matching template, record the template identifier and corresponding drunk driving level category of the optimal matching template, extract the feature dimension weight table of the optimal matching template, count the number of feature dimensions within the preset difference threshold range in the feature dimension difference values ​​between the complete fusion detection feature vector and the optimal matching template, calculate the proportion of the number of feature dimensions to the total number of feature dimensions to obtain the auxiliary matching degree parameter. If the auxiliary matching degree parameter is outside the preset auxiliary threshold range, select the standard fusion feature template with the second largest matching degree parameter as the candidate optimal matching template and repeat the calculation of the auxiliary matching degree parameter until a standard fusion feature template with the auxiliary matching degree parameter within the preset auxiliary threshold range is found as the optimal matching template.

[0127] The matching degree parameters of all standard fusion feature templates are sorted in descending order. The standard fusion feature template with the largest matching degree parameter is initially determined as the optimal matching template, and its template identifier and corresponding drunk driving level category are recorded. Next, the feature dimension weight table of this optimal matching template is extracted, and the feature dimension difference between the fusion detection feature vector and the template feature vector of the optimal matching template on each feature dimension is calculated. It is then determined whether these difference values ​​are within a preset difference threshold range. The number of feature dimensions within this range is counted, and this number is divided by the total number of feature dimensions to obtain the auxiliary matching degree parameter. This auxiliary matching degree parameter is used to measure the overall matching situation between the fusion detection feature vector and the optimal matching template on the feature dimensions. If the auxiliary matching degree parameter is within a preset auxiliary threshold range, the template is confirmed as the optimal matching template; if it is outside the range, the standard fusion feature template with the second largest matching degree parameter is selected as a candidate optimal matching template, and the above process of calculating the auxiliary matching degree parameter is repeated until an optimal matching template with the required auxiliary matching degree parameter is found, thereby improving the reliability of the matching results.

[0128] Step S1444: Normalize the confidence parameters, core matching parameters, and auxiliary matching parameters of the first-level judgment, and calculate the final detection confidence using a product correction method. Simultaneously, calculate the variance of the confidence parameters, core matching parameters, and auxiliary matching parameters. If the variance is within a preset variance threshold range, directly use the initial product result as the detection confidence. If the variance is outside the preset variance threshold range, trigger the weight adjustment mechanism, assign different correction weights to the confidence parameters, core matching parameters, and auxiliary matching parameters according to the pre-trained parameter weight model, and recalculate the detection confidence.

[0129] First, the confidence parameters for the first-level judgment, the core matching parameters of the optimal matching template (i.e., the matching parameters obtained in step S1442), and the auxiliary matching parameters are normalized and compressed into the [0, 1] interval to ensure that all parameters are calculated under the same dimension. Then, a product correction method is used to multiply the three normalized parameters to obtain the initial detection confidence. At the same time, the variance of these three parameters is calculated, which is used to measure the dispersion of the values ​​of the three parameters. If the variance is within the preset variance threshold interval, it indicates that the values ​​of the three parameters are relatively consistent and have good mutual corroboration, and the initial product result is directly used as the final detection confidence. If the variance is outside the preset variance threshold interval, it indicates that the values ​​of the three parameters are highly dispersed, and some parameters may be unreliable. In this case, the weight adjustment mechanism is triggered. Based on the pre-trained parameter weight model, which learns the importance of each parameter under different conditions from historical data, different correction weights are assigned to the confidence parameter, core matching parameter and auxiliary matching parameter. Then, the normalized parameters are multiplied by the corresponding correction weights and then the product operation is performed to obtain the adjusted detection confidence.

[0130] Step S145: Extract the gas feature components of the key features corresponding to the original gas feature vector sequence and the facial feature components of the key features corresponding to the original facial feature vector sequence from the fused detection feature vector. Calculate the mutual influence coefficient of the gas feature components and facial feature components obtained by the trace value of the covariance matrix as the feature association strength.

[0131] The extraction of gas and facial feature components is achieved through feature segmentation. The first half of the fused detection feature vector represents the gas feature component, corresponding to the key features of the original gas feature vector sequence; the second half represents the facial feature component, corresponding to the key features of the original facial feature vector sequence. The length of each feature component is preset during model training.

[0132] The mutual influence coefficient is calculated by constructing the covariance matrix of the gas feature components and the facial feature components. The size of the covariance matrix is ​​(gas feature component dimension + facial feature component dimension) × (gas feature component dimension + facial feature component dimension). The trace of the matrix is ​​the sum of the diagonal elements, reflecting the overall correlation between the two feature components. Normalizing the trace of the covariance matrix to the range of zero to one yields the mutual influence coefficient, i.e., the feature correlation strength. A larger value indicates a stronger mutual influence between the two feature components, and a more reliable judgment result.

[0133] Step S146: Integrate the suspected state category, detection confidence, feature association strength, optimal matching template identifier, and feature dimension difference distribution to form the judgment basis. If the detection confidence is within the preset drunk driving confidence threshold range, then integrate the suspected state category, detection confidence, feature association strength, and judgment basis to generate a comprehensive drunk driving judgment result. If the detection confidence is outside the preset drunk driving confidence threshold range, then trigger the supplementary collection mechanism to supplement the respiratory gas data and facial dynamic feature data of the subject to be tested through the multimodal collection unit of the robot system. After regenerating the fused detection feature vector, perform two-level hierarchical judgment again until a judgment result is obtained where the detection confidence is within the preset drunk driving confidence threshold range.

[0134] The optimal matching template identifier is obtained by comparing the fused detection feature vector with a pre-defined drunk driving feature template library. This library contains standard feature vectors for different drunk driving severity categories. Euclidean distance is used for matching, and the template with the smallest distance is the optimal matching template, and its identifier is recorded. The feature dimension difference distribution is the difference between each feature dimension of the fused detection feature vector and the optimal matching template. These differences are arranged in dimensional order to form a difference vector, which reflects the deviation of the current feature from the standard template.

[0135] The judgment criteria are based on a JSON object containing the suspected state category, detection confidence, feature association strength, optimal matching template identifier, and feature dimension difference distribution. The preset drunk driving confidence threshold range is set according to the legally stipulated alcohol concentration threshold. The specific conversion method is as follows: 1. Establish the mapping relationship between alcohol concentration and model confidence: Using the 100,000+ sets of labeled data used in the model training process, extract the correspondence between the alcohol concentration value C (mg / 100ml) of each set of data and the detection confidence P output by the model. Use Platt scaling for probability calibration and fit the mapping function P=f(C), where f(C) is a sigmoid function: f(C)=1 / (1+e^(-aC+b)). Fit the parameters a=0.032, b=-0.64 using the least squares method (fitting error R0). 2 =0.96, to ensure mapping accuracy). 2. Determine the confidence threshold range: According to relevant regulations, alcohol concentration C < 20mg / 100ml is considered not driving under the influence, 20mg / 100ml ≤ C < 80mg / 100ml is considered driving under the influence, and C ≥ 80mg / 100ml is considered drunk driving; substitute the legal threshold into the mapping function to calculate the corresponding confidence level: when C = 20mg / 100ml, P = f(20) = 0.6; when C = 80mg / 100ml, P = f(80) = 0.8; therefore, set the preset confidence threshold range for driving under the influence: driving under the influence (20-80mg / 100ml) corresponds to 0.6-0.8, drunk driving (≥80mg / 100ml) corresponds to 0.8-1.0, and not driving under the influence (<20mg / 100ml) corresponds to <0.6.

[0136] When the detection confidence level is within the preset drunk driving confidence threshold range, the comprehensive drunk driving judgment result includes the suspected status category (refined into not driving under the influence / driving under the influence / driving while intoxicated), detection confidence level, feature correlation strength, and judgment basis. When the detection confidence level is lower than the lower limit of the preset drunk driving confidence threshold range (e.g., judged as drunk driving but with a confidence level <0.6), a supplementary data collection mechanism is triggered. The supplementary data acquisition mechanism issues supplementary acquisition commands through the robot system's guidance and execution component. The voice broadcast module prompts the subject to "blow again and look at the camera." At the same time, the multimodal acquisition unit starts a new round of acquisition, with the acquisition time being half of the initial acquisition time (the initial acquisition time is 10 seconds, and the supplementary acquisition time is 5 seconds, balancing efficiency and data volume). After the acquired data is processed by steps S125 to S128, it is merged with the original dataset (using data splicing to preserve timestamp continuity), and a new fusion detection feature vector is generated. Steps S133 to S146 are repeated, with a maximum of two supplementary acquisitions. If the confidence requirement is still not met, a high-risk warning is output, and manual review is recommended (the manual review process includes re-testing with a portable alcohol detector and reviewing the facial dynamic video recording).

[0137] Step S150: Based on the comprehensive judgment result of drunk driving, trigger the closed-loop processing flow of the detection scenario. The closed-loop processing flow includes encrypted result recording, multi-terminal information synchronization and detection scenario reset. The closed-loop processing flow needs to drive the robot components to coordinate actions based on the output result of the drunk driving detection deep learning model.

[0138] The closed-loop processing flow is coordinated and executed by the central control unit of the robot system. After receiving the comprehensive drunk driving assessment result, the central control unit triggers the corresponding processing flow based on the type of drunk driving assessment result. Encrypted result records ensure the security and immutability of the detection data; multi-terminal information synchronization enables real-time sharing of detection results; the detection scenario resets and restores the system to its initial state, preparing for the next detection. Each process is controlled by a state machine to ensure sequential execution.

[0139] Based on the same inventive concept, please refer to Figure 2 This document shows a schematic block diagram of an automatic drunk driving detection system 100 based on a deep learning model and a robot system, provided in an embodiment of this application, for executing the above-described automatic drunk driving detection method based on a deep learning model and a robot system. The automatic drunk driving detection system 100 based on a deep learning model and a robot system may include a communication unit 110, a machine-readable storage medium 120, and a processor 130.

[0140] The machine-readable storage medium 120 is used to store machine-executable instructions for executing the scheme of this application, and the processor 130 is used to execute the machine-executable instructions stored in the machine-readable storage medium 120 to implement the automatic drunk driving detection method based on deep learning model and robot system provided in the aforementioned method embodiment.

[0141] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.

Claims

1. An automatic drunk driving detection method based on a deep learning model and a robotic system, characterized in that, The method includes: A dynamic interaction framework for the detection scene is constructed through the scene interaction module of the robot system. The dynamic interaction framework for the detection scene includes the behavior guidance logic of the object to be detected, the time-series coordination rules for multi-source information collection, and the adaptive adjustment mechanism of environmental parameters. Based on the dynamic interaction framework of the detection scenario, the multimodal acquisition unit of the robot system is activated to collect the respiratory gas data stream and facial dynamic feature stream of the object to be detected according to the time-series collaborative rules. The environmental parameter adaptive adjustment mechanism is used to compensate for the interference of the detection environment, and the synchronous and correlated respiratory gas data set and facial dynamic feature set after interference correction are obtained. The respiratory gas data set and the facial dynamic feature set are input into the pre-trained deep learning model for drunk driving detection. The spatiotemporal mapping relationship between the respiratory gas data set and the facial dynamic feature set is established. The feature interaction processing through bidirectional feature transmission generates a fused detection feature vector, and the effectiveness of the fused feature is verified at the same time. The fused detection feature vectors are processed for drunk driving determination to generate a comprehensive drunk driving determination result that includes detection confidence, feature correlation strength and determination criteria; Based on the comprehensive judgment result of drunk driving, a closed-loop processing flow for the detection scenario is triggered. The closed-loop processing flow includes encrypted result recording, multi-terminal information synchronization, and detection scenario reset. The closed-loop processing flow needs to drive the robot components to coordinate actions based on the output result of the drunk driving detection deep learning model.

2. The automatic drunk driving detection method based on a deep learning model and robot system according to claim 1, characterized in that, The construction of a dynamic interaction framework for the detection scene through the scene interaction module of the robot system includes: The environmental perception unit of the scene interaction module is invoked to collect spatial parameters and environmental interference parameters through a multi-type sensor array within the detection area. The spatial parameters include the three-dimensional boundary coordinates of the detection area, the device layout position, and the spatial dimensions of the detection points. The environmental interference parameters include the light intensity distribution, air flow rate, ambient temperature change, and background noise intensity. Based on spatial parameters, a basic spatial model of the detection scene is constructed using 3D modeling tools. The basic spatial model divides the activity prohibition area, the guidance path area, and the detection core area of ​​the object to be detected, and marks the effective working range boundaries of each component of the multimodal acquisition unit. By combining the basic spatial model with the behavioral habit template of the object to be detected, a behavioral guidance logic is constructed, which includes phased path planning from the entrance of the detection area to the core detection area, posture maintenance norms in the core detection area, interaction timing requirements with the acquisition equipment, and guidance and correction rules for abnormal behavior. Through multiple pre-acquisition experiments, the start-up delay parameters, data acquisition cycle parameters, data transmission delay parameters, and acquisition accuracy fluctuation range of the gas acquisition component and image acquisition component in the multimodal acquisition unit were recorded. A component working characteristic database was established. Based on this component working characteristic database, a timing coordination rule was generated that includes the start-up trigger time difference setting of the gas acquisition component and image acquisition component, the acquisition cycle synchronization calibration mechanism, and the data transmission timing alignment requirements, so as to control the acquisition synchronization error of respiratory gas data stream and facial dynamic feature stream in the time dimension within the preset synchronization error range. Based on the environmental interference parameters collected by the environmental sensing unit, an adaptive adjustment mechanism for environmental parameters is constructed, which includes rules for light intensity compensation, airflow interference suppression, temperature influence correction, and background noise filtering. Establish the interrelationships between behavior guidance logic, temporal coordination rules, and environmental parameter adaptive adjustment mechanisms, and integrate them to generate a dynamic interaction framework for detection scenarios that includes spatial constraints, temporal constraints, and environmental constraints.

3. The automatic drunk driving detection method based on a deep learning model and robot system according to claim 1, characterized in that, The dynamic interaction framework based on the detection scenario activates the multimodal acquisition unit of the robot system, which acquires the respiratory gas data stream and facial dynamic feature stream of the object to be detected according to the temporal coordination rules. An adaptive adjustment mechanism for environmental parameters compensates for interference in the detection environment, resulting in a synchronously correlated and interference-corrected set of respiratory gas data and facial dynamic feature data, including: Based on the behavior guidance logic in the dynamic interaction framework of the detection scenario, the robot system’s guidance execution component sends an initial path guidance signal at the entrance of the detection area. The initial path guidance signal includes the lighting sequence of the ground-embedded visual guidance light strip and the phased prompting instructions of the voice broadcast module, which are used to guide the object to be detected to move to the preset detection point in the core detection area. During the movement of the object to be detected, the infrared sensors deployed along the path by the guidance execution component acquire the position information of the object to be detected in real time. Combined with the path planning in the basic spatial model, the lighting area of ​​the visual guidance light strip and the content of the voice prompts are dynamically adjusted so that the object to be detected moves along the preset path. When the object to be detected reaches the preset detection point, the guided execution component sends a posture adjustment signal according to the posture maintenance specification in the behavior guidance logic. At the same time, the vision acquisition unit of the robot system is activated to capture the current posture image of the object to be detected. The current posture image is compared with the preset standard posture template at the pixel level. The head angle deviation, body posture deviation and distance deviation from the acquisition device are calculated respectively. After being standardized and mapped to the same scale range, the posture deviation parameters are obtained by weighted summation. The fineness of the voice prompt command is adjusted according to the posture deviation parameters. The current posture image is continuously captured and compared until the posture deviation parameters of the object to be detected are within the preset deviation threshold range, and the posture adjustment is completed. The synchronous triggering module of the multimodal acquisition unit is started, and the timing coordination rules in the dynamic interaction framework of the detection scene are called to obtain the start-up trigger time difference and acquisition cycle parameters of the gas acquisition component and the image acquisition component. The gas acquisition component and the image acquisition component are started synchronously. The working status of the gas acquisition component and the image acquisition component is monitored in real time during the acquisition process. The timestamp of the acquired data is calibrated through the data transmission timing alignment requirements so that the respiratory gas data and facial dynamic feature data at the same acquisition time have the same time identifier. The environmental parameter adaptive adjustment mechanism in the dynamic interaction framework of the detection scene is invoked to dynamically adjust the sampling flow rate of the gas acquisition component and the exposure parameters of the image acquisition component based on the environmental interference parameters collected in real time: when the light intensity is outside the preset light threshold range, the supplementary light intensity of the image acquisition component is adjusted; when the air flow rate is outside the preset flow velocity threshold range, the sampling port orientation of the gas acquisition component is adjusted and the sampling duration is adjusted. The gas acquisition component continuously acquires respiratory gas samples from the subject under test through the gas sensor array according to the adjusted sampling parameters. The gas composition response value, sampling flow rate parameter and ambient temperature parameter at each acquisition moment are arranged in chronological order to form an initial respiratory gas data stream. The image acquisition component continuously captures facial images of the subject under test using a multi-angle camera according to the adjusted exposure parameters. It extracts the dynamic features of the eyes, facial muscle movement features, and skin color change features from each facial image. At the same time, it records the light intensity parameters at the time of shooting and combines them in chronological order to form an initial facial dynamic feature stream. Based on the timestamp information of the acquisition time, the data at the same time node in the initial respiratory gas data stream and the initial facial dynamic feature stream are associated and marked to generate associated data pairs. The initial respiratory gas data in the associated data pairs are removed from the temperature change interference according to the temperature influence correction rule in the environmental parameter adaptive adjustment mechanism to obtain the corrected respiratory gas data. The initial facial dynamic feature data in the associated data pairs are removed from the light change interference according to the light intensity compensation rule to obtain the corrected facial dynamic feature data. All the corrected respiratory gas data are integrated in chronological order to form a synchronous associated and interference-corrected respiratory gas data set. All the corrected facial dynamic feature data are integrated in chronological order to form a synchronous associated and interference-corrected facial dynamic feature set.

4. The automatic drunk driving detection method based on a deep learning model and robot system according to claim 1, characterized in that, The process involves inputting a set of respiratory gas data and a set of facial dynamic features into a pre-trained deep learning model for drunk driving detection, establishing a spatiotemporal mapping relationship between the two sets of data, generating a fused detection feature vector through bidirectional feature transmission and feature interaction processing, and simultaneously verifying the effectiveness of the fused features, including: The breath gas data set is input into the gas feature extraction layer of the deep learning model for drunk driving detection to obtain a sequence of gas feature vectors. The breath gas data set is input into the facial feature extraction layer of the deep learning model for drunk driving detection to obtain a sequence of facial feature vectors. The normalized correlation coefficient of each feature dimension in the gas feature vector sequence and the facial feature vector sequence is calculated as the first type of correlation parameter, and the matching degree of the feature dimension change rate is calculated as the second type of correlation parameter. The first type of correlation parameter and the second type of correlation parameter are weighted and fused to generate a cross-correlation parameter. A spatiotemporal mapping matrix is ​​constructed based on the cross-correlation parameter. An attention mechanism is used to assign dynamic weights to each element in the spatiotemporal mapping matrix according to the magnitude of the cross-correlation parameter. The feature weights of the regions where the cross-correlation parameter is within the preset correlation threshold range are strengthened, and the feature weights of the regions where the cross-correlation parameter is outside the preset correlation threshold range are weakened, thus generating a weighted spatiotemporal mapping matrix. Based on the weighted spatiotemporal mapping matrix, bidirectional feature transmission is performed to establish transmission paths from gas features to facial features and from facial features to gas features. In the first transmission path, the molecular structure response features in the gas feature vector are transmitted to the facial feature vector to correct the dynamic change features in the facial features related to the effects of alcohol. In the second transmission path, the feature correlation features in the facial feature vector are transmitted to the gas feature vector to correct the concentration distribution features in the gas features related to the respiratory state. The dynamic change features and concentration distribution features after bidirectional transmission are synergistically analyzed to extract synergistic features. The synergistic features are integrated with the key features in the original gas feature vector sequence and facial feature vector sequence to generate a fusion detection feature vector. The information entropy value and feature dispersion of the fused detection feature vector are calculated. The information entropy value is compared with a preset information entropy threshold, and the feature dispersion is compared with a preset dispersion threshold. If the information entropy value and the feature dispersion are both within the preset information entropy threshold range, the fused detection feature vector is determined to be valid. If the information entropy value or the feature dispersion is outside the preset information entropy threshold range, a feature reconstruction mechanism is triggered, and the weight allocation of the spatiotemporal mapping matrix is ​​adjusted until a valid fused detection feature vector is generated.

5. The automatic drunk driving detection method based on a deep learning model and robot system according to claim 4, characterized in that, The process of inputting the breath gas data set into the gas feature extraction layer of the deep learning model for drunk driving detection to obtain a sequence of gas feature vectors includes: The preprocessing sublayer of the gas feature extraction layer receives the respiratory gas data set and extracts the gas component response value, sampling flow rate parameter and ambient temperature parameter from each respiratory gas data set. Abnormal response values ​​that are outside the range of the gas sensor are removed from the gas component response values. The remaining response values ​​are filled with the mean value method to fill in the missing data points to obtain the preliminary gas component response values. Based on the sampling flow rate parameter, the response values ​​under different sampling flow rates are converted to the response values ​​under the standard sampling flow rate according to the flow rate-response characteristic curve of the gas sensor. Combined with the ambient temperature parameter, the temperature-response characteristic model of the gas sensor is used to correct the response value deviation caused by temperature change to obtain the temperature-compensated gas component response values. The temperature-compensated gas component response values ​​are standardized and mapped to obtain standardized gas component response values. The standardized gas component response values, the corrected sampling flow rate parameters, and the compensated ambient temperature parameters are combined to form standardized respiratory gas data. The convolutional filtering unit of the gas feature extraction layer is invoked, and pre-trained multi-scale convolutional kernel parameters containing a first-size convolutional window, a second-size convolutional window, and a third-size convolutional window are loaded. Each convolutional window corresponds to a different convolutional kernel weight. The standardized gas component response values ​​in the standardized respiratory gas data are arranged in chronological order into a one-dimensional data sequence, and then input into the three convolutional windows of different sizes for convolutional operations. The local peak features are captured and a local peak feature map is output by performing local convolution on the one-dimensional data sequence through a first-size convolution window. The slope change features between local peaks are captured and a slope change feature map is output by performing medium-range convolution on the one-dimensional data sequence through a second-size convolution window. The overall concentration distribution trend features are captured and a trend feature map is output by performing larger-range convolution on the one-dimensional data sequence through a third-size convolution window. The original gas features are obtained by concatenating the local peak feature map, slope change feature map and trend feature map along the channel dimension. The original gas features are input into the nonlinear transformation sublayer of the gas feature extraction layer. The pre-trained activation function is called to perform a nonlinear transformation on each feature value in the original gas features, thereby strengthening the response signal related to alcohol molecule features and suppressing the response signal related to interfering gas components, thus obtaining enhanced gas features. The feature integration sublayer of the gas feature extraction layer performs feature dimension analysis on the enhanced gas features, identifies the feature dimensions related to molecular structure and the feature dimensions related to concentration distribution, extracts the feature peak position, feature peak width and feature peak intensity from the feature dimensions related to molecular structure to form the molecular structure response features, and calculates the concentration uniformity parameter and concentration gradient parameter from the feature dimensions related to concentration distribution to form the concentration distribution features. The molecular structure response features and concentration distribution features are arranged in a preset dimension order to form a gas feature vector for a single respiratory gas data. The gas feature vectors of all the single respiratory gas data are arranged in the order of the acquisition time of the respiratory gas data in the respiratory gas data set to generate a gas feature vector sequence.

6. The automatic drunk driving detection method based on a deep learning model and robot system according to claim 4, characterized in that, The process of inputting the breath gas data set into the facial feature extraction layer of the deep learning model for drunk driving detection to obtain a facial feature vector sequence includes: The facial feature extraction layer divides the feature fragments of the facial feature extraction layer into sub-layers to extract the facial feature frames and shooting timestamps corresponding to each facial dynamic feature in the facial dynamic feature set. The feature difference between two adjacent facial feature frames is calculated by the sum of squares of the normalized inter-frame pixel differences. The frequency of feature change is determined based on the magnitude of feature difference. When multiple consecutive feature differences are within a preset difference threshold range, the facial feature frames in the corresponding time period are divided into feature segments of the first preset time length range. When multiple consecutive feature differences are outside the preset difference threshold range, the facial feature frames in the time period are divided into feature segments of the second preset time length range. This ensures that the number of facial feature frames contained in each feature segment remains within a preset frame number range. If the number is less than the lower limit of the preset frame number range, it is merged with the feature frames of the adjacent time period. If the number exceeds the upper limit of the preset frame number range, it is split into multiple feature segments. The feature point matching sublayer of the facial feature extraction layer uses a pre-trained facial feature point detection model to locate feature points in the first frame of each feature segment. In the frame image, the eye feature points include eyelid contour points (including pupil edge points and upper and lower eyelid contour feature points evenly distributed around the pupil contour), facial muscle feature points (including corner of the mouth contour points and upper and lower lip edge points and cheek contour feature points), and skin color feature points (including forehead region points and cheek region points). For subsequent facial feature frames in a feature segment, an optical flow tracking algorithm is used to track the located feature points and determine the coordinate position of each feature point in the subsequent frame. For feature point loss during the tracking process, a feature point prediction algorithm based on the feature point motion trajectory of the previous N frames is used to supplement the predicted coordinates of the lost feature points. The deviation between the tracked feature point coordinates and the predicted feature point coordinates is calculated. If the deviation is within the preset tracking deviation threshold range, the tracked coordinates are used. If the deviation is outside the preset tracking deviation threshold range, the facial feature point detection model is called again to locate the feature points. A feature point coordinate mapping table for all facial feature frames in each feature segment is established. The temporal convolutional network of the facial feature extraction layer is invoked to convert the feature point coordinate mapping table of the feature segment into feature point motion trajectory data containing the sequence of coordinates changing over time. The motion trajectory data is input into the first convolutional layer of the temporal convolutional network and convolutional operation is performed with a convolutional kernel of the first size to extract the local curvature change features of the trajectory. The output of the first convolutional layer is input into the second convolutional layer and convolutional operation is performed with a convolutional kernel of the second size to extract the displacement distance features of the trajectory. The output of the second convolutional layer is input into the third convolutional layer and convolutional operation is performed with a convolutional kernel of the third size to extract the motion direction features of the trajectory. The output of the third convolutional layer is pooled using the max pooling method to retain the key feature values ​​in each trajectory feature, resulting in a simplified trajectory feature. Based on this trajectory feature, the total position change of each feature point within the feature segment time length is calculated and divided by the time length to obtain the average change rate. The coordinate difference between the current frame and the previous frame at each time node is extracted as the instantaneous change rate and arranged in chronological order to form an instantaneous change rate sequence. The average change rate and the instantaneous change rate sequence are combined to form a dynamic change rate feature. The correlation between changes in different types of feature points is analyzed. The correlation coefficient between the changes in the position of eye feature points and the changes in the position of facial muscle feature points within the same time interval is calculated as the change synchronization rate. The time difference between the changes in facial muscle feature points and the changes in skin color feature points is determined by cross-correlation analysis as the change lag time. The change synchronization rate and the change lag time are combined to form the feature correlation feature. The feature fusion sublayer of the facial feature extraction layer unifies the dimensions of dynamic change rate features and feature correlation features. A weighted fusion algorithm is used to weight and fuse the dynamic change rate features and feature correlation features after unification according to the pre-trained feature weight parameters to obtain the fused feature vector of each feature segment. All fused feature vectors are arranged in the order of time of the feature segments in the facial dynamic feature set to generate a facial feature vector sequence.

7. The automatic drunk driving detection method based on a deep learning model and robot system according to claim 1, characterized in that, The process of performing drunk driving determination on the fused detection feature vector generates a comprehensive drunk driving determination result that includes detection confidence, feature correlation strength, and determination criteria, including: The fused detection feature vector is input into the first-level decision module. The pre-trained classification model parameters are loaded through the pre-trained binary classifier contained in the first-level decision module, and the fused detection feature vector is converted into feature points in the classification space by feature mapping. Calculate the distance between the feature point and the center of the normal state category and the center of the suspected drunk driving category in the classification space. If the distance between the feature point and the center of the normal state category is less than the distance between the feature point and the center of the suspected drunk driving category, the suspected state category is determined to be normal. If the distance between the feature point and the center of the suspected drunk driving category is less than the center of the normal state category, the suspected state category is determined to be suspected drunk driving. At the same time, calculate the normalized distance ratio between the feature point and the corresponding category center as the confidence parameter of the first-level judgment. When the suspected status category is normal, the preliminary drunk driving judgment result is generated by integrating the suspected status category and the confidence parameter of the first-level judgment. If the confidence parameter of the first-level judgment is within the preset normal confidence threshold range, the suspected status category, the confidence parameter of the first-level judgment, and the basic correlation between the gas feature component and the facial feature component are directly integrated as the feature correlation strength to generate a comprehensive drunk driving judgment result. If the confidence parameter of the first-level judgment is outside the preset normal confidence threshold range, the re-judgment mechanism is triggered to return to the feature correlation layer to regenerate the fused detection feature vector, and the two-level judgment is performed again until a judgment result is obtained where the confidence parameter is within the preset normal confidence threshold range. When the suspected status category is suspected drunk driving, the fused detection feature vector and the confidence parameter of the first-level judgment are input into the second-level judgment module to calculate the detection confidence. Extract the gas feature components of the key features corresponding to the original gas feature vector sequence and the facial feature components of the key features corresponding to the original facial feature vector sequence from the fusion detection feature vector. Calculate the mutual influence coefficient between the gas feature components and the facial feature components obtained by the trace value of the covariance matrix as the feature association strength. The system integrates suspected status category, detection confidence level, feature association strength, optimal matching template identifier, and feature dimension difference distribution to form the judgment criteria. If the detection confidence level is within the preset drunk driving confidence threshold range, the system integrates the suspected status category, detection confidence level, feature association strength, and judgment criteria to generate a comprehensive drunk driving judgment result. If the detection confidence level is outside the preset drunk driving confidence threshold range, a supplementary collection mechanism is triggered to supplement the respiratory gas data and facial dynamic feature data of the subject to be tested through the multimodal acquisition unit of the robot system. After regenerating the fused detection feature vector, a two-level hierarchical judgment is performed again until a judgment result is obtained in which the detection confidence level is within the preset drunk driving confidence threshold range.

8. The automatic drunk driving detection method based on a deep learning model and robot system according to claim 7, characterized in that, When the suspected status category is suspected drunk driving, the fused detection feature vector and the confidence parameter of the first-level judgment are input into the second-level judgment module to calculate the detection confidence, including: The fused detection feature vector and the confidence parameter of the first-level judgment are input into the second-level judgment module. The second-level judgment module loads the preset drunk driving feature template library. The drunk driving feature template library is generated by training multiple standard fused feature templates. Each standard fused feature template includes a template identifier, the drunk driving level category corresponding to the standard fused feature template, the template feature vector, and a feature dimension weight table that records the importance weight of each feature dimension in the matching process of the standard fused feature template. The fused detection feature vector is compared one by one with each standard fused feature template in the drunk driving feature template library. The template feature vector and feature dimension weight table of the standard fused feature template are extracted. The normalized absolute difference value between the fused detection feature vector and the template feature vector in each feature dimension is calculated. The normalized absolute difference value of each feature dimension is weighted according to the weight value in the feature dimension weight table. The weighted difference values ​​of all feature dimensions are counted and the sum is calculated to obtain the total weighted difference value. The total weighted difference value is converted into a matching degree parameter. The matching degree parameters of all standard fusion feature templates are sorted, and the standard fusion feature template with the largest matching degree parameter is selected as the optimal matching template. The template identifier and corresponding drunk driving level category of the optimal matching template are recorded. The feature dimension weight table of the optimal matching template is extracted. The number of feature dimensions that are within the preset difference threshold range among the feature dimension differences between the complete fusion detection feature vector and the optimal matching template is counted. The proportion of the number of feature dimensions to the total number of feature dimensions is calculated to obtain the auxiliary matching degree parameter. If the auxiliary matching degree parameter is outside the preset auxiliary threshold range, the standard fusion feature template with the second largest matching degree parameter is selected as the candidate optimal matching template and the auxiliary matching degree parameter is calculated repeatedly until a standard fusion feature template with the auxiliary matching degree parameter within the preset auxiliary threshold range is found as the optimal matching template. The confidence parameters of the first-level judgment, the core matching parameters of the optimal matching template, and the auxiliary matching parameters are normalized, and the final detection confidence is calculated using a product correction method. At the same time, the variances of the confidence parameters, the core matching parameters of the optimal matching template, and the auxiliary matching parameters are calculated. If the variances are within the preset variance threshold range, the initial product result is directly used as the detection confidence. If the variances are outside the preset variance threshold range, a weight adjustment mechanism is triggered. Based on the pre-trained parameter weight model, different correction weights are assigned to the confidence parameters, the core matching parameters of the optimal matching template, and the auxiliary matching parameters, and the detection confidence is recalculated.

9. An automatic drunk driving detection system based on a deep learning model and a robotic system, characterized in that, include: processor; A machine-readable storage medium for storing machine-executable instructions of the processor; The processor is configured to execute the automatic drunk driving detection method based on a deep learning model and robotic system according to any one of claims 1 to 8 by executing the machine-executable instructions.

10. A computer program product, characterized in that, The computer program product includes machine-executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the machine-executable instructions from the computer-readable storage medium and executes the machine-executable instructions, causing the computer device to perform the automatic drunk driving detection method based on a deep learning model and robot system as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Alcohol concentration detection method and device, wearable equipment and storage medium

    CN115032250A

  • Detection unit position regulation and control method and track processing system

    CN119811102A

  • Abnormal behavior identification method based on hotel monitoring and dynamic inspection

    CN119992169A

  • Non-contact drunk driving detection method based on deep learning

    CN120296491A

  • System for risk object identification via causal inference and method thereof

    US20210264167A1

Cited By

  • Learning concentration degree monitoring method, system and device based on machine vision and medium

    CN121281122A

  • Peripheral base station on-site metering method and system based on channel measurement

    CN122120699A