Linkage alarm method and system for environmental safety monitoring
By linking the portable detection terminal with the noise-canceling earbuds, the system monitors and transmits wireless alarm commands in real time, forcibly interrupts audio processing, and plays a special alarm sound. This solves the problem that users cannot perceive environmental dangers in time and enables safety alarms while wearing noise-canceling earbuds.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN INKBIRD TECH CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-04-24
AI Technical Summary
When users wear noise-canceling earplugs, the traditional sound and light alarm signals of existing environmental safety monitoring equipment are easily blocked, making it impossible to detect environmental dangers in a timely manner and posing safety hazards.
The portable detection terminal monitors environmental parameters in real time and generates wireless alarm commands, which are directly transmitted to the noise-canceling earbuds to forcibly interrupt audio processing and switch to alarm audio output mode, playing a pre-stored special alarm sound.
This ensures that users can promptly perceive environmental hazards while wearing noise-canceling earplugs, improving the reliability and practicality of environmental safety monitoring and solving the problem of traditional alarm methods failing.
Smart Images

Figure CN121921904A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of alarm device technology, specifically to a linkage alarm method and system for environmental safety monitoring. Background Technology
[0002] With the increasing popularity of outdoor camping and fieldwork, and the frequent use of enclosed spaces (such as tents and temporary rest pods), environmental safety monitoring has gradually become a crucial aspect of ensuring human safety. In these scenarios, environmental risks such as carbon monoxide leaks, abnormal temperature increases or decreases, and excessive humidity can all pose serious threats to human health and even life. Noise-canceling earplugs, which effectively isolate environmental noise and improve sleep quality, are also widely used in these situations.
[0003] Currently, existing environmental safety monitoring technologies mainly rely on portable or fixed detectors, with alarms primarily consisting of local audible and visual alarms. Noise-canceling earplugs, on the other hand, focus on providing noise cancellation or audio playback. These are independent devices lacking collaborative capabilities, leading to significant safety blind spots in practical use. Firstly, the core function of noise-canceling earplugs or headphones is to isolate ambient sound, effectively blocking the audible alarm signals from environmental monitoring devices, preventing users from perceiving danger through hearing. Secondly, the visual alarm signals from environmental monitoring devices are easily affected by the environment; for example, users often close their eyes while sleeping or may even wear eye masks, making it difficult to detect visual alarms in a timely manner. Especially in outdoor camping scenarios, the confined space and complex ambient noise within tents further reduce the reliability of traditional audible and visual alarms. Even if the environmental monitoring device detects excessive hazardous parameters, it may be difficult to effectively transmit warning information to the user wearing noise-canceling equipment, potentially leading to safety accidents due to alarm failure. Therefore, existing technologies suffer from the problem that users wearing noise-canceling earplugs cannot promptly perceive safety alarms issued by environmental monitoring devices, posing a serious safety hazard.
[0004] The preceding description is intended to provide general background information and does not necessarily constitute prior art. Summary of the Invention
[0005] This application provides a linkage alarm method and system for environmental safety monitoring, which can ensure that users wearing noise-canceling earplugs can perceive environmental safety hazards in a timely manner, effectively solving the problem of traditional environmental alarm methods failing when wearing noise-canceling earplugs.
[0006] In a first aspect, embodiments of this application provide a linkage alarm method for environmental safety monitoring, applied to a linkage alarm system, the linkage alarm system including a portable detection terminal and a noise-canceling earpiece terminal, the method comprising: The portable detection terminal monitors the safety parameters of the target environment in real time, and generates a wireless alarm command when the safety parameters reach a preset dangerous condition. The wireless alarm command is sent to the noise-canceling earbud via the portable detection terminal; After receiving the wireless alarm command, the noise-canceling earbuds forcibly interrupt the current audio processing function and switch to alarm audio output state based on the wireless alarm command. The noise-canceling earbuds play a pre-stored special alarm tone to trigger an alarm while the alarm audio output is active.
[0007] Secondly, this application provides a linkage alarm system for environmental safety monitoring, used to implement the linkage alarm method for environmental safety monitoring as described in the first aspect, including a portable detection terminal and a noise-canceling earplug terminal; The portable detection terminal is used to monitor the safety parameters of the target environment in real time, and when it is determined that the safety parameters have reached the preset dangerous conditions, it generates a wireless alarm command and sends it to the noise-canceling earplug terminal. The noise-canceling earbud is used to receive the wireless alarm command, and based on the wireless alarm command, forcibly interrupt the current audio processing function and switch to the alarm audio output state; in the alarm audio output state, a pre-stored special alarm sound is played to trigger the alarm.
[0008] This application provides a linkage alarm method and system for environmental safety monitoring. First, a portable detection terminal monitors the target environmental safety parameters in real time and generates a wireless alarm command when preset dangerous conditions are met, ensuring that environmental hazards can be captured in a timely manner. The alarm signal is directly and directionally transmitted wirelessly to the noise-canceling earbud, avoiding the drawbacks of traditional sound and light alarm signals being easily blocked by environmental noise or noise reduction functions. Second, after receiving the command, the noise-canceling earbud forcibly interrupts the current audio processing function, breaking through the limitations of conventional noise-canceling earbuds that only focus on audio functions and cannot respond to external safety alarms, ensuring the absolute priority of alarm response. Finally, by switching to the alarm audio output state and playing a pre-stored special alarm sound, the alarm signal directly acts on the user's hearing, regardless of scenarios such as sleeping with eyes closed or wearing an eye mask. This effectively solves the problem that users have difficulty perceiving environmental hazards when wearing noise-canceling earbuds, achieving a balance between noise reduction needs and safety warning needs. It ensures that users can receive danger alarms in a timely manner while enjoying a quiet environment, thereby improving the reliability and practicality of environmental safety monitoring. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic flowchart of the linkage alarm method for environmental safety monitoring provided in the embodiments of this application; Figure 2 This is a schematic diagram of the linkage alarm system for environmental safety monitoring provided in the embodiments of this application; Figure 3 This is another structural schematic diagram of the linkage alarm system for environmental safety monitoring provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the audio processing and playback module provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0011] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of systems and methods consistent with those detailed in the appended claims or with some aspects of this application.
[0012] Please see Figure 1 , Figure 1 This is a flowchart illustrating a linkage alarm method for environmental safety monitoring according to an embodiment of this application. This embodiment primarily uses the application of this linkage alarm method for environmental safety monitoring in a linkage alarm system as an example. The linkage alarm system includes a portable detection terminal and a noise-canceling earpiece terminal. Specifically, the linkage alarm method for environmental safety monitoring provided in this embodiment may include the following steps: S1. Real-time monitoring of safety parameters of the target environment via a portable detection terminal, and generation of wireless alarm command when the safety parameters are determined to reach preset dangerous conditions; Specifically, for step S1, after the portable detection terminal is activated, it enters continuous monitoring mode and continuously collects safety parameters in the target environment according to a preset collection frequency (e.g., once per second, once every 2 seconds, etc.) to ensure timely capture of dynamic changes in the parameters. The portable detection terminal has pre-stored preset hazard conditions for various safety parameters. These conditions are set based on scenario safety requirements or general safety standards, clearly defining the critical values of the parameters, such as the dangerous concentration value of a certain type of harmful gas, the critical value of extreme temperature, etc. After collecting each set of safety parameters, the portable detection terminal immediately compares and analyzes the real-time parameter with the pre-stored preset hazard conditions to determine whether the current parameter has reached the critical hazard threshold. When the real-time collected safety parameters meet or exceed the preset hazard conditions, the portable detection terminal quickly starts the instruction generation program to create a wireless alarm instruction containing an alarm identifier (used to distinguish it from other instructions), preparing for subsequent transmission. For example, in an outdoor camping scenario, the portable detection terminal is placed inside a tent to continuously collect the concentration parameters of a certain type of toxic gas inside the tent, with the preset hazard condition being "the gas concentration ≥ 60 ppm". When the detected gas concentration reaches 65 ppm, the portable detection device determines that the dangerous condition is met and then generates a corresponding wireless alarm command.
[0013] S2. Send wireless alarm commands to the noise-canceling earbuds via a portable detection terminal; Specifically, in step S2, the portable detection terminal and the noise-canceling earbuds have already completed wireless pairing before use, establishing a stable wireless communication link to ensure directional data transmission between them. After the wireless alarm command is generated, the portable detection terminal does not require additional triggering and immediately sends the command to the paired noise-canceling earbuds through the established wireless communication link. A basic signal verification mechanism is used during transmission to ensure the integrity of the wireless alarm command, preventing command loss or damage due to environmental interference, and ensuring accurate reception by the noise-canceling earbuds. In a specific embodiment, before using the system, Bluetooth pairing between the portable detection terminal and the noise-canceling earbuds must be completed. The pairing process follows the general Bluetooth device pairing logic to ensure that both can recognize each other and establish a dedicated communication association. During pairing, both the portable detection terminal and the noise-canceling earbuds enter Bluetooth discoverable mode. The user searches for and selects the other device by operating one device, completes authentication, and establishes a binding relationship. This pairing relationship is stored by both devices, and subsequent use does not require repeated pairing (unless actively unbinded). After successful pairing, both devices will maintain Bluetooth communication standby mode, ready to transmit data at any time, ensuring a rapid connection establishment without additional delay when alarm commands are sent. When the portable detection unit generates a wireless alarm command, it immediately triggers the internal Bluetooth communication module's workflow. The Bluetooth module switches from standby mode to data transmission mode, ready to send the command. The portable detection unit performs a simple format encapsulation of the wireless alarm command to conform to Bluetooth communication data transmission specifications, ensuring the noise-canceling earbuds can correctly parse it. The encapsulation process does not change the core information of the command (such as alarm identifier, priority, etc.). Based on the established pairing relationship, the Bluetooth module will directionally identify the Bluetooth address of the target noise-canceling earbuds, preventing the command from being mistakenly sent to other Bluetooth devices and ensuring targeted communication. The portable detection unit's Bluetooth module transmits the encapsulated wireless alarm command as a wireless signal through the Bluetooth communication link. During transmission, the basic anti-interference mechanism of Bluetooth communication is used to reduce interference from other wireless signals in the environment, ensuring the integrity of the command data. Bluetooth communication links are characterized by low latency and stable short-range transmission, making them suitable for outdoor camping and enclosed spaces, avoiding signal attenuation or distortion due to short transmission distances (such as inside a tent). The Bluetooth module in the noise-canceling earbuds continuously monitors surrounding Bluetooth signals. When it detects a transmission signal from a paired portable detector, it immediately receives and stores the signal, preparing for subsequent command parsing. For example, if a user has wirelessly paired the portable detector with their noise-canceling earbuds before camping, and the portable detector generates a wireless alarm command indicating excessive toxic gas, it instantly transmits the command to the user's earbuds via the wireless link, with the entire transmission process taking extremely short time.
[0014] S3. After receiving the wireless alarm command at the noise-canceling earbud, the noise-canceling earbud forcibly interrupts the current audio processing function based on the wireless alarm command and switches to the alarm audio output state. Specifically, in step S3, the noise-canceling earbud, under normal operating conditions, synchronously monitors the wireless signal sent by the paired portable detection unit. Once it detects a wireless alarm command conforming to the communication protocol, it immediately completes command reception and preliminary verification. After verifying that the alarm command is valid, the noise-canceling earbud performs a forced interruption operation. Regardless of whether it is currently in active noise cancellation, music playback, or other audio processing states, it unconditionally terminates all current audio processing flows and clears the audio output buffer. After the interruption, the noise-canceling earbud quickly adjusts its internal operating mode, switching from the normal audio processing mode to a dedicated alarm audio output state, closing the normal audio path, and activating the hardware working channels related to the alarm audio. For example, if a user is wearing the noise-canceling earbud and enjoying music playback to aid sleep, when the noise-canceling earbud receives a wireless alarm command from the portable detection unit, it immediately stops music playback, interrupts the audio decoding and output process, and quickly switches to the alarm audio output state, preparing to play the alarm sound.
[0015] S4. Play a pre-stored special alarm tone to trigger an alarm when the alarm audio output state is enabled via the noise-canceling earbuds; Specifically, in step S4, the noise-canceling earbud has a specially designed alarm tone pre-stored internally. This alarm tone is highly recognizable and easy to wake up (e.g., specific frequency combinations, regular pulse rhythms, etc.). After switching to the alarm audio output state, the noise-canceling earbud directly retrieves the pre-stored alarm tone data without additional decoding or loading processes, ensuring rapid playback. The alarm tone is played at an appropriate volume through the earbud's sound-emitting component (e.g., a built-in speaker), effectively waking the user without damaging their hearing, and directly transmitting the alarm to the user's ear canal. For example, if the noise-canceling earbud has a pre-stored alarm tone with a rapid rhythm and frequency concentrated within the sensitive range of the human ear, it will be played immediately through the sound-emitting unit after switching to the alarm audio output state. Even if the user is in a deep sleep, they can be quickly awakened and perceive the danger warning.
[0016] This embodiment achieves real-time monitoring and accurate alarm of environmental safety hazards through the collaborative work of a portable detection terminal and a noise-canceling earbud. It effectively solves the problem that users cannot perceive traditional environmental alarms when wearing noise-canceling devices, allowing users to receive timely environmental hazard alarms while enjoying noise cancellation or audio playback functions, thus improving the safety of use in scenarios such as outdoor camping and resting in enclosed spaces.
[0017] Furthermore, in some embodiments, step S1, "monitoring the safety parameters of the target environment in real time through a portable detection terminal, and generating a wireless alarm command when it is determined that the safety parameters have reached a preset dangerous condition," may specifically include: S11. Collect simulated signals of carbon monoxide concentration in the target environment using a carbon monoxide sensor; Specifically, in step S11, the carbon monoxide sensor, as a component specifically designed to detect carbon monoxide gas, continuously senses the presence and concentration of carbon monoxide in the target environment. Its sensing range covers key areas of the target environment, ensuring comprehensive capture of changes in carbon monoxide concentration. After detecting carbon monoxide, the sensor converts the concentration information into a continuously changing analog electrical signal. The strength of this analog signal corresponds to the carbon monoxide concentration; the higher the concentration, the larger the amplitude of the analog signal. The target environment can include outdoor camping tents, enclosed rest cabins, small indoor spaces, and other places where there is a risk of carbon monoxide accumulation. For example, in an outdoor camping scenario, the device equipped with a carbon monoxide sensor is placed in the center of the tent. The sensor continuously senses the carbon monoxide concentration inside the tent. When incomplete combustion of charcoal inside the tent produces carbon monoxide, the sensor immediately converts this concentration information into a corresponding analog electrical signal.
[0018] S12. Convert the carbon monoxide concentration analog signal into the raw concentration value, and perform anti-pulse interference filtering on multiple continuously acquired raw concentration values to obtain the effective concentration value; Specifically, in step S12, the continuous analog electrical signal output by the sensor is converted into a digital raw concentration value through the signal conversion module. This raw concentration value can be directly used for subsequent numerical comparison and analysis. The conversion process ensures the accuracy of the data and does not produce significant distortion. Due to environmental interference, instantaneous fluctuations in the sensor, and other factors, there may be abnormally fluctuating noise data among the multiple raw concentration values collected continuously. These data do not represent the actual changes in carbon monoxide concentration and need to be removed through anti-pulse interference filtering. During the filtering process, jump data that differs too much from adjacent raw concentration values will be identified, and such data will be replaced or ignored in a reasonable manner, retaining the effective data that conforms to the concentration change pattern. Finally, the effective concentration value that truly reflects the carbon monoxide concentration in the target environment is obtained by integrating the data. For example, if the raw concentration values continuously collected by the sensor are 10ppm, 12ppm, 80ppm, 13ppm, and 11ppm, and the 80ppm value differs significantly from the other adjacent values, it is determined to be pulse interference data. After filtering, this abnormal value is removed, and the remaining values are integrated to obtain an effective concentration value of approximately 11.5ppm.
[0019] S13. Compare the effective concentration value with the preset independent alarm threshold in real time; Specifically, for step S13, the system has a pre-set independent alarm threshold. This threshold is determined based on the core requirement of ensuring human life safety and directly corresponds to the critical value at which carbon monoxide concentration reaches the level that poses an immediate danger to the human body. It is the key standard for determining whether an emergency alarm is needed. After the effective concentration value is generated, it will be continuously compared with this independent alarm threshold in real time. The comparison process is without delay, ensuring that the concentration exceeding the standard can be detected as soon as possible, without missing any danger signals. For example, if the preset independent alarm threshold is 150 ppm, and the effective concentration value after filtering is 160 ppm, the system will immediately compare 160 ppm with 150 ppm and identify that the concentration has exceeded the standard; if the effective concentration value is 120 ppm, it is determined that it has not exceeded the standard, and real-time monitoring and comparison continue.
[0020] S14. When the effective concentration value reaches or exceeds the independent alarm threshold, a wireless alarm command is generated, wherein the wireless alarm command includes an identification field for indicating the highest priority alarm type; Specifically, for step S14, once the effective concentration value reaches or exceeds the preset independent alarm threshold, it is determined that there is an immediate life-threatening danger in the target environment. The system will immediately initiate the alarm command generation process to ensure that the alarm action is not delayed. The generated wireless alarm command is a digital command containing specific information. Its core feature is an identifier field indicating the highest priority alarm type. This identifier field clearly informs the receiver that this alarm is a danger alarm with the highest urgency level and requires priority response. This identifier field is unique and easily identifiable, and will not be confused with other types of command identifiers, ensuring that the receiver can quickly and accurately identify the alarm priority. For example, when the effective concentration value reaches the independent alarm threshold of 150 ppm, the system immediately generates a wireless alarm command. This command contains the identifier field "0x03" (for example only, representing the highest priority), clearly indicating that this alarm is a carbon monoxide concentration exceeding the limit alarm that requires urgent handling.
[0021] This embodiment achieves accurate acquisition, reliable processing, and timely determination of carbon monoxide concentration. Targeted filtering ensures the authenticity of the concentration data. Combined with real-time comparison of independent alarm thresholds, it can quickly identify the danger of carbon monoxide concentration exceeding the standard and generate a wireless alarm command with the highest priority identifier, providing an accurate and reliable triggering basis for subsequent emergency alarm responses.
[0022] Furthermore, in some embodiments, step S3, "after receiving the wireless alarm command at the noise-canceling earbud, the noise-canceling earbud forcibly interrupts the current audio processing function based on the wireless alarm command and switches to the alarm audio output state," may specifically include: S31. Identify the priority identifier in the wireless alarm command; Specifically, in step S31, the wireless alarm command contains a specific priority identifier field. This field is the core information distinguishing the urgency of the alarm. Its format and encoding rules are predefined in the system to ensure accurate parsing by the noise-canceling earbuds. After receiving the wireless alarm command, the noise-canceling earbuds initiate a dedicated command parsing process to accurately extract the priority identifier field from the command data, eliminating interference from other irrelevant data and ensuring the integrity and accuracy of the identifier information. The priority identifier can be a specific numeric code, character combination, or binary sequence. Different identifiers correspond to different alarm urgency levels, providing a clear basis for subsequent judgment. For example, if the wireless alarm command contains a priority identifier field "0x03", after receiving the command, the noise-canceling earbuds extract this identifier from the command data packet through an internal parsing program, confirming it as the priority information to be judged.
[0023] S32. Check if the priority indicator is the highest priority mandatory alarm command; Specifically, in step S32, the noise-canceling earbud pre-stores the identifier standard corresponding to the highest priority mandatory alarm command. This standard is consistent with the command generation rules of the portable detection terminal, ensuring consistency in judgment. The extracted priority identifier is compared one by one with the pre-stored highest priority identifier standard. The comparison process strictly follows preset matching rules to avoid misjudgment due to identifier similarity or interference. If the comparison results match, it is determined that the currently received command is the highest priority mandatory alarm command, triggering the subsequent emergency response process; if they do not match, it is processed as a regular command or the mandatory response is not initiated, ensuring reasonable resource allocation. For example, if the pre-stored highest priority identifier standard in the noise-canceling earbud is "0x03", comparing the extracted command identifier "0x03" with it confirms a perfect match, and the command is determined to be the highest priority mandatory alarm command.
[0024] S33. If so, send an interrupt signal to the audio processing unit at the noise-canceling earbud end to stop all current audio signal processing and output; Specifically, in step S33, the audio processing unit is the core component responsible for audio processing in the noise-canceling earbud. Its routine work includes various audio-related operations such as noise reduction signal processing, music decoding and playback, and audio amplification output. After confirming that the instruction is the highest priority forced alarm instruction, the control module of the noise-canceling earbud immediately generates and sends an interrupt signal. This signal has the highest execution authority and is not constrained by the regular audio processing flow. Upon receiving the interrupt signal, the audio processing unit will unconditionally terminate all currently ongoing audio signal processing tasks and clear the audio output buffer to prevent residual audio signals from affecting the output of subsequent alarm audio, ensuring that the audio channel is completely released. For example, if the user is wearing the noise-canceling earbud and performing deep noise reduction while playing soothing sleep-aiding music, the audio processing unit is continuously decoding the music signal and outputting a noise-canceling waveform; upon receiving the interrupt signal, it immediately stops music decoding, terminates noise reduction signal generation, clears the unoutput music data in the buffer, and stops all audio output.
[0025] S34. Control the audio path switch at the noise-canceling earbud end, switching the audio output path from being connected to a regular audio source to being connected to an internal alarm sound source; Specifically, in step S34, the audio path switch is a key component controlling the audio signal transmission path. Its state is precisely controlled by the control module at the noise-canceling earbud end, supporting rapid switching between the regular audio source and the internal alarm sound source. The regular audio source refers to the signal source providing regular services such as noise reduction and music playback, such as an audio player or a noise reduction signal generation module. The internal alarm sound source is a dedicated signal source storing pre-stored special alarm sounds, such as an internal storage unit or an alarm sound generation module. The control module sends a switching command to the audio path switch, driving the switch to perform a mechanical or electronic switching action, disconnecting the regular audio source from the audio output channel, and simultaneously establishing a stable connection between the internal alarm sound source and the audio output channel. The switching process is a hard switch, ensuring no signal superposition or interruption delay. For example, in the normal state, the audio path switch is connected to the audio signal source of the music player, and the audio is transmitted to the speaker through this path; after switching, the switch disconnects from the music player and connects instead to the internal read-only memory storing the special alarm sound, allowing the alarm sound signal to be transmitted through the audio output path.
[0026] This embodiment achieves accurate identification and forced response to the highest priority alarm command. Priority judgment ensures that emergency alarms are not interfered with by conventional audio functions. By forcibly interrupting audio processing and switching audio paths, it lays the foundation for rapid and interference-free output of subsequent alarm audio, ensuring the timeliness and reliability of environmental hazard alarms.
[0027] Furthermore, in some embodiments, step S4, "playing a pre-stored special alarm tone to trigger an alarm via the noise-canceling earbud in alarm audio output mode," may specifically include: S41. Read the pre-stored pulse code modulation format special alarm tone digital data directly from the read-only memory of the noise-canceling earbud; Specifically, in step S41, the read-only memory (ROM) is a component in the noise-canceling earbud specifically designed for long-term storage of fixed data. Its stored content cannot be arbitrarily modified or lost during device use, ensuring the stability and security of the specially designed alarm tone data. The digital data of the specially designed alarm tone is pre-stored in this ROM in pulse code modulation (PCM) format. This format is an uncompressed digital audio format with a simple data structure, requiring no complex decoding process and can be directly accessed by subsequent hardware modules, effectively shortening the latency between data reading and playback. The reading process is initiated by the control module of the noise-canceling earbud, directly accessing the storage address of the corresponding specially designed alarm tone data in the ROM, skipping redundant file retrieval or format conversion steps, achieving rapid data retrieval, and ensuring timely alarm response. For example, the ROM of the noise-canceling earbud may pre-store a segment of specially designed alarm tone data in PCM format, with a fixed storage address range of 0x1000-0x2000. When the alarm tone needs to be played, the control module directly locates this address range and quickly reads the digital audio data without requiring other data processing steps.
[0028] S42. A digital audio interface controller that transmits digital data of a special alarm tone to the noise-canceling earpiece via direct memory access; Specifically, for step S42, Direct Memory Access (DMI) is a technology that can complete data transmission without relying on a Central Processing Unit (CPU). It establishes a direct data transmission channel between the Read-Only Memory (ROM) and the Digital Audio Interface (DAI) controller, reducing CPU resource consumption and significantly increasing data transmission rate. The DAI controller is the core component in the noise-canceling earphone, responsible for receiving audio digital data and converting it into a format suitable for subsequent processing. The data it receives must meet specific timing and format requirements. After initiating DMI transmission, data is continuously and rapidly transmitted from the ROM to the DAI controller's receive buffer. During transmission, the CPU does not need to intervene in data handling; the CPU only needs to issue start and stop commands before and after transmission to ensure efficient and continuous data transmission. For example, after the control module of the noise-canceling earphone initiates a DMI request, the DMI controller takes over the data transmission task, directly sending the specially designed alarm tone digital data read from the ROM to the DAI controller's buffer at a transmission rate of 1MB per second. The entire transmission process takes less than 10 milliseconds, during which the CPU can simultaneously process other necessary control logic.
[0029] S43. Configure the gain of the audio power amplifier at the noise-canceling earbud end to the maximum value, and drive the digital audio interface controller to output digital data at a preset sampling rate. After digital-to-analog conversion and amplification, the speaker at the noise-canceling earbud end plays a special alarm sound at a preset volume. Specifically, in step S43, the audio power amplifier, responsible for amplifying the audio signal power, has its gain configured to the maximum value to ensure that the processed alarm tone signal has sufficient power to drive the speaker to emit a sufficiently loud sound to penetrate the sleep state and effectively wake the user. The preset sampling rate is a pre-set audio data output rate that matches the storage format of the special alarm tone, ensuring that the output audio signal can reproduce the original characteristics of the alarm tone (such as rhythm and frequency), avoiding sound distortion or stuttering. Common preset sampling rates are 44.1kHz or 16kHz. Under the drive, the digital audio interface controller continuously outputs the special alarm tone digital data from the buffer at the preset sampling rate. This digital data then enters the digital-to-analog converter module and is converted into an analog audio signal, which is a continuous voltage change waveform consistent with the sound wave characteristics of the original alarm tone. The converted analog audio signal is relatively weak and needs to be amplified by an audio power amplifier configured at maximum gain. This amplifies the signal power to a level sufficient to drive the speaker. Finally, the speaker converts the amplified analog audio signal into a sound perceptible to the human ear—a specially designed alarm tone at a preset volume. For example, the noise-canceling earbuds set the audio power amplifier to its maximum gain, driving the digital audio interface controller to output specially designed alarm tone digital data at a preset sampling rate of 44.1kHz. This digital data is then converted into a weak analog audio signal by a digital-to-analog converter and sent to the audio power amplifier, where the signal power is amplified 100 times. Finally, the speaker plays a rapid, highly recognizable specially designed alarm tone at a preset volume of 85 decibels, successfully waking the user from sleep.
[0030] This embodiment achieves low-latency, high-volume playback of specially designed alarm tones by rapidly reading pre-stored pulse code modulation format alarm tone data, high-speed transmission via direct memory access, and maximum gain amplification processing. This ensures that the alarm tone can be delivered to the user in a timely and effective manner, guaranteeing the reliability of environmental hazard alarms.
[0031] Furthermore, in some embodiments, the safety parameters also include temperature and / or humidity values; then step S1, "monitoring the safety parameters of the target environment in real time via a portable detection terminal, and generating a wireless alarm command when the safety parameters are determined to reach a preset dangerous condition," may specifically include: S101. Simultaneously collect simulated signals of carbon monoxide concentration, temperature, and humidity in the target environment using a portable detection terminal's carbon monoxide sensor, temperature sensor, and humidity sensor; Specifically, in step S101, the portable detection terminal has three built-in dedicated sensors, corresponding to the detection of carbon monoxide concentration, temperature, and humidity, respectively. The detection ranges of the three sensors are all adapted to the common parameter ranges of the target environment (such as outdoor tents, enclosed rest cabins, etc.), ensuring the validity of the collected data. Synchronous acquisition means that the three sensors start data acquisition at the same time node, and the acquisition frequency is consistent (e.g., once per second), avoiding parameter matching deviations caused by acquisition time differences, and ensuring that the environmental state at the same moment can be reflected in subsequent analysis. Each sensor converts the corresponding environmental parameter into a continuously changing analog electrical signal. The amplitude, frequency, and other characteristics of the signal correspond to the actual value of the parameter. For example, the higher the temperature, the greater the amplitude of the analog signal output by the temperature sensor. For example, in an outdoor camping scenario, the portable detection terminal is placed inside the tent, and its internal carbon monoxide sensor, temperature sensor, and humidity sensor start acquisition simultaneously, capturing the real-time situation of carbon monoxide concentration, air temperature, and air humidity inside the tent, and synchronously outputting the corresponding three sets of analog electrical signals.
[0032] S102. Convert the temperature analog signal and humidity analog signal into digital temperature value and digital humidity value respectively, and compare the digital temperature value and digital humidity value with the pre-stored temperature warning threshold and humidity warning threshold respectively; Specifically, in step S102, the analog electrical signals corresponding to temperature and humidity are converted into digital temperature and humidity values by the signal conversion module inside the portable detection terminal, respectively. Digital values offer advantages such as high accuracy, ease of storage, and convenient numerical comparison, avoiding the distortion effects of analog signal transmission. Temperature and humidity warning thresholds are pre-set critical values based on environmental safety and comfort standards or scenario usage requirements. For example, a temperature warning threshold can be set based on the comfortable temperature range for outdoor rest, and a humidity warning threshold can be set based on moisture-proof and mildew-proof requirements. These threshold values can be pre-stored in the detection terminal's storage unit. The converted digital temperature and humidity values are transmitted to the detection terminal's control module in real time. The control module compares these values with the corresponding warning thresholds one by one according to preset logic to determine whether the critical values have been reached or exceeded. For example, the pre-stored temperature warning threshold is 35℃ and the humidity warning threshold is 85%RH. After the temperature sensor of the portable detection terminal collects the analog signal, it converts it into a digital temperature value of 36.2℃. The analog signal collected by the humidity sensor is converted into a digital humidity value of 82%RH. The control module then compares 36.2℃ with 35℃ and 82%RH with 85%RH respectively.
[0033] S103. If the digital temperature value reaches or exceeds the temperature warning threshold, a first wireless warning command is generated; Specifically, in step S103, when the digital temperature value meets the condition of reaching or exceeding the temperature warning threshold, the control module at the detection end immediately starts the instruction generation program to create a first wireless warning instruction. The first wireless warning instruction is a warning signal specifically for temperature anomalies, containing identification information about the temperature anomaly. Its core feature is that the instruction type field differs from the wireless alarm instruction for excessive carbon monoxide concentration, ensuring that the receiving end can accurately distinguish the alarm type. The instruction generation process requires no additional manual triggering; it is automatically completed by the control module, and the generation speed is fast, avoiding the risk of temperature anomalies escalating due to delays. For example, when the digital temperature value of 36.2℃ exceeds the temperature warning threshold of 35℃, the control module at the detection end automatically generates a first wireless warning instruction. The type field of this instruction is marked as "temperature anomaly," clearly distinguishing it from the instruction type field corresponding to excessive carbon monoxide.
[0034] S104. If the digital humidity value reaches or exceeds the humidity warning threshold, a second wireless warning instruction is generated; wherein the instruction type field of the first wireless warning instruction and the second wireless warning instruction are different from the instruction type field of the wireless alarm instruction. Specifically, in step S104, when the digital humidity value reaches or exceeds the humidity warning threshold, the control module initiates an independent instruction generation process to generate a second wireless warning instruction. This instruction is specifically used to identify humidity anomalies. The instruction type field of the second wireless warning instruction is unique, differing from both the type field of the first wireless warning instruction (which can be distinguished by different codes or identifiers) and the type field of the wireless alarm instruction corresponding to excessive carbon monoxide concentration, thus achieving accurate identification of three different risk types. The instruction contains core information about the humidity anomaly, ensuring that the receiving end clearly understands the reason for the warning after receiving it, providing a basis for subsequent targeted responses. For example, if the digital humidity value is 86%RH, exceeding the humidity warning threshold of 85%RH, the control module generates a second wireless warning instruction, whose type field is marked as "abnormal humidity," which is different from the first instruction ("abnormal temperature") and the alarm instruction for excessive carbon monoxide. S105. The generated first or second wireless warning command is sent to the noise-canceling earbud via a portable detection terminal; Specifically, in step S105, after the first or second wireless warning command is generated, the portable detection terminal sends the command through its internal wireless communication module. The communication module and the noise-canceling earbuds have a pre-established stable pairing relationship to ensure directional transmission of the command and avoid accidental transmission to other devices. The transmission process uses a communication method adapted for short-range transmission to ensure the stability of command transmission in the target scenario (such as inside a tent) and reduce command loss due to environmental interference. Command transmission requires no manual intervention; the control module triggers the transmission process immediately after generating the command, ensuring that the warning information can be quickly transmitted to the user's noise-canceling earbuds. For example, after the detection terminal generates a first wireless warning command for "abnormal temperature," it quickly sends the command to the paired user's noise-canceling earbuds through its internal wireless communication module. The entire transmission process is extremely short, ensuring that the user receives the abnormal temperature alert promptly.
[0035] This embodiment enables simultaneous monitoring of three environmental parameters: carbon monoxide concentration, temperature, and humidity. It generates dedicated wireless warning commands for abnormal temperature or humidity and sends them to the noise-canceling earbuds, expanding the coverage of environmental safety monitoring and allowing users to promptly perceive environmental risks related to temperature and humidity, thus improving the practicality and comprehensiveness of the monitoring system.
[0036] Furthermore, in some embodiments, the method further includes: S111. Under the condition that the carbon monoxide concentration does not reach the independent alarm threshold, simultaneously acquire the current status of at least two of the following parameters of the target environment: effective concentration value, digital temperature value, and digital humidity value; Specifically, for step S111, if the carbon monoxide concentration does not reach the preset independent alarm threshold after detection, there is no need to trigger the highest priority emergency alarm. However, it is necessary to pay attention to the potential risks that may be brought about by the combination of multiple environmental parameters. The effective concentration value refers to the value that truly reflects the environmental carbon monoxide concentration obtained after the carbon monoxide concentration analog signal is converted and filtered. The digital temperature value and digital humidity value are the digital results after the temperature and humidity analog signals are converted. Simultaneous acquisition requires the collection of real-time values of at least two parameters at the same time point to ensure that the acquired parameter status can reflect the comprehensive environmental situation at the same moment and avoid the risk judgment deviation caused by the time difference of acquisition. The selectable parameter combinations include "effective concentration value + digital temperature value", "effective concentration value + digital humidity value", "digital temperature value + digital humidity value", or the simultaneous acquisition of three parameters. For example, in an outdoor camping scenario, the effective carbon monoxide concentration value is 80 ppm (not reaching the independent alarm threshold of 150 ppm). At this time, the effective concentration value, the digital temperature value of 32℃, and the digital humidity value of 80%RH are acquired simultaneously, and the current status of the three parameters "effective concentration value + digital temperature value + digital humidity value" is selected for subsequent analysis.
[0037] S112. Input the current status of at least two acquired safety parameters into a preset comprehensive risk assessment model for analysis; Specifically, for step S112, the comprehensive risk assessment model is an analysis model pre-embedded in the system. It is built based on risk assessment logic, historical data, and safety standards in the field of environmental safety, and has the ability to simultaneously process multiple parameters and uncover the risks associated with these parameters. The current state of the safety parameters input into the model is the real-time parameter value obtained. The model receives these values and performs multi-dimensional analysis according to a preset algorithm, not limited to threshold judgments for single parameters, but focusing on the cumulative risks generated by parameter combinations. The model's analysis process requires no manual intervention, automatically completing the correlation calculation of parameters and risk trend judgment, ensuring assessment efficiency and objectivity. For example, inputting an effective carbon monoxide concentration of 80 ppm, a digital temperature value of 32°C, and a digital humidity value of 80% RH into the comprehensive risk assessment model will trigger a correlation analysis of the three parameters to determine whether this parameter combination poses a potential safety risk.
[0038] S113. The current state of at least two safety parameters is mapped to a predefined parameter risk level by a comprehensive risk assessment model; wherein the parameter risk level is set according to the different threshold ranges to which the values of each parameter belong. Specifically, for step S113, the system pre-defines multiple threshold ranges for each safety parameter. Different threshold ranges correspond to different parameter risk levels, and the level classification is determined based on the parameter's impact on environmental safety, such as low risk, medium risk, and high risk. The comprehensive risk assessment model will individually judge the current state of each input parameter, mapping it to the corresponding parameter risk level based on which threshold range its value falls into, ensuring that the risk level of each parameter can be accurately identified. The threshold ranges and risk level mapping rules for different parameters are independent of each other. For example, the threshold ranges for effective carbon monoxide concentration and temperature need to be set separately to adapt to their respective safety standards. For example, the predefined rules are: effective carbon monoxide concentration of 60-100ppm corresponds to medium risk, and above 100ppm corresponds to high risk; temperature of 30-35℃ corresponds to medium risk, and above 35℃ corresponds to high risk; humidity of 75%-85% corresponds to medium risk, and above 85% corresponds to high risk. The model determines that an effective carbon monoxide concentration of 80 ppm, a temperature of 32°C, and a humidity of 80% RH are all considered medium-risk, thus mapping the risk levels of these three parameters.
[0039] S114. Based on the preset combined risk rules, comprehensively calculate the parameter risk levels corresponding to at least two safety parameters to generate a combined risk quantification value; Specifically, for step S114, the pre-set combined risk rule is a pre-defined risk calculation logic that clarifies the weight allocation and calculation method (such as weighted summation, product operation, matrix calculation, etc.) for different parameter risk levels. The weight allocation is determined based on the priority of each parameter's impact on environmental safety. During the comprehensive calculation process, the model will convert the risk level corresponding to each parameter into a calculable value according to the combined risk rule, and then perform calculations in combination with the weights, finally outputting a specific combined risk quantification value. This value intuitively reflects the overall risk level after the combination of multiple parameters. The combined risk rule ensures the scientific nature of the comprehensive calculation, avoids the one-sided influence of the risk level of a single parameter, and can comprehensively reflect the risk effect of multiple parameters superimposed. For example, the pre-set combined risk rule is "Combined risk quantification value = carbon monoxide risk level score × 0.5 + temperature risk level score × 0.3 + humidity risk level score × 0.2", where low risk corresponds to 1 point, medium risk corresponds to 2 points, and high risk corresponds to 3 points. The calculation process is (2×0.5)+(2×0.3)+(2×0.2)=1+0.6+0.4=2.0, generating a portfolio risk quantification value of 2.0.
[0040] S115. Compare the combined risk quantification value with the preset comprehensive risk level threshold to determine the final risk assessment level; wherein the risk assessment level includes at least a low-risk alert level, a medium-risk warning level, and a high-risk warning level; Specifically, for step S115, the system pre-sets comprehensive risk level thresholds. These thresholds are the critical values for dividing different final risk assessment levels. For example, the comprehensive risk level thresholds are set to 1.0 and 2.5, corresponding to three levels: low-risk alert, medium-risk warning, and high-risk warning. The combined risk quantification value is compared with these thresholds one by one. Based on the threshold range in which the quantification value falls, the final risk assessment level is determined, ensuring that the final risk level division is accurate and meets actual safety requirements. The final risk assessment level is a direct definition of the comprehensive environmental risk, providing a clear basis for generating corresponding warning instructions. For example, if the pre-set comprehensive risk level thresholds are 1.0 (the upper limit of the low-risk alert level) and 2.5 (the upper limit of the medium-risk warning level), and the combined risk quantification value of 2.0 falls between 1.0 and 2.5, then the final risk assessment level is determined to be the medium-risk warning level.
[0041] S116. Generate and send corresponding wireless early warning instructions based on the risk assessment level; wherein, the instruction type field of the generated wireless early warning instructions is different for different risk assessment levels; Specifically, in step S116, different risk assessment levels correspond to different wireless warning commands. Each command contains a unique command type field, which distinguishes the urgency of the warning, ensuring the receiver can accurately identify and execute the corresponding response. The generation of wireless warning commands is automatic. In addition to the command type field, the command content may also include key information such as the risk level identifier, facilitating the receiver's understanding of the warning reason. After generation, the command is sent to the noise-canceling earbuds via the portable detection terminal's wireless communication module. The transmission process ensures the integrity and timeliness of the command, avoiding warning delays due to transmission problems. For example, for a medium-level warning, a wireless warning command with a command type field of "0x02" is generated. This command is clearly distinguished from the "0x01" command type field for low-risk alerts and the "0x03" command type field for high-risk alerts. After generation, it is quickly sent to the paired noise-canceling earbuds via the wireless communication module.
[0042] This embodiment realizes a comprehensive risk assessment of multiple environmental parameters. Even if a single parameter does not reach the emergency alarm threshold, it can accurately identify the potential risks caused by the superposition of multiple parameters. By generating and sending graded early warning instructions, users can perceive different levels of environmental risks in a timely manner, thereby improving the comprehensiveness and accuracy of environmental safety monitoring.
[0043] To facilitate understanding of the linkage alarm method for environmental safety monitoring provided in this embodiment, this embodiment will be described in detail with specific examples, taking an application to a linkage alarm system as an example, such as... Figure 2 As shown, this linkage alarm system consists of a portable multi-functional detector (main unit) and smart noise-canceling earbuds, which are connected via Bluetooth. The portable detector uses its internal sensors to monitor the carbon monoxide concentration, temperature, and humidity in the tent or enclosed space in real time. The main controller compares the detected data with preset safety thresholds. When any parameter exceeds the limit, the main controller immediately generates an alarm command containing a specific identifier and sends the command to the paired noise-canceling earbuds via the Bluetooth module. After receiving the command, the Bluetooth module of the noise-canceling earbuds transmits it to the earbud's main control chip. The earbud's main control chip then performs a key action: forcibly interrupting the current noise cancellation or music playback function and calling a specially designed alarm audio file stored in memory. This audio is then used by an audio decoder and amplifier to drive the speaker (loudspeaker) to emit a high-volume, specific-frequency alarm sound, which is directly delivered to the user's ear canal.
[0044] In a specific embodiment, the portable multi-functional detector (main unit) includes: Environmental sensor array: includes carbon monoxide sensor, temperature sensor and humidity sensor, used to collect environmental data.
[0045] Main controller: Connects to and reads data from all sensors, and uses an internal program to determine whether the data exceeds a safety threshold.
[0046] Bluetooth transmitter module: When the main controller determines that the alarm state is reached, it is responsible for wirelessly sending the alarm command to the paired earbuds.
[0047] Local sound and light alarm: As a backup alarm method, it activates its own sound and light reminders simultaneously when an alarm is triggered.
[0048] Power module: Typically a high-capacity rechargeable battery that provides power for outdoor use and supplies power to all internal components.
[0049] The intelligent noise-canceling earbuds (with identical structures for both earbuds, working together) contain: Bluetooth receiver module: Responsible for receiving alarm commands from the detector.
[0050] The earbud's main control chip receives Bluetooth commands and controls the switching of audio channels accordingly. Under normal circumstances, it controls the noise cancellation function; upon receiving an alarm command, it forcibly executes an interrupt procedure.
[0051] Audio processing circuitry: integrates active noise cancellation to filter ambient noise during normal use.
[0052] Audio decoder and amplifier: used to decode and amplify a special alarm sound stored in the chip when an alarm is triggered.
[0053] Speaker: Ultimately converts electrical signals into sound, playing noise-reduced background music or alarm sounds.
[0054] Earbud battery: Powers a single earbud.
[0055] Charging case: Used for storing, charging, and carrying the earbuds.
[0056] The detailed process for determining carbon monoxide based on a carbon monoxide sensor includes: 1. Data Acquisition and Preprocessing High-speed sampling: The carbon monoxide sensor acquires data at a high frequency (e.g., once per second) to ensure rapid capture of sharp increases in concentration.
[0057] Simple filtering: Apply anti-pulse interference filtering to the acquired raw data, such as using anti-pulse interference averaging filtering. This filtering method can quickly remove obvious jump noise points, ensuring data reliability while introducing minimal delay to meet rapid response requirements.
[0058] 2. Independent threshold comparison Threshold setting: An independent alarm threshold is preset in the system firmware. This threshold directly adopts the concentration value representing immediate life-threatening danger as specified in national mandatory safety standards, for example: 150 ppm.
[0059] Real-time comparison: The main control chip compares the filtered instantaneous concentration value with the independent alarm threshold in real time and continuously. This comparison process is independent of any other sensor data logic.
[0060] 3. Triggering and Response Unconditional trigger: Once the instantaneous concentration value is greater than or equal to the independent alarm threshold, the main control chip will immediately set an independent alarm flag and interrupt the comprehensive risk assessment algorithm that may be in progress.
[0061] Command Generation: Subsequently, the main control chip generates a preset, fixed "Level 3 Alarm" digital command. The "Alarm Type" field of this command is directly assigned the code for a Level 3 alarm (e.g., 0x03).
[0062] This implementation also employs a dedicated channel response strategy. To ensure alarm effectiveness, this dedicated channel response strategy has the highest priority and is mandatory: Highest priority audio interruption: Regardless of the earphone's state (deep noise cancellation, music playback, low-level warning tone playback), once a Level 3 alarm command is received from the independent judgment channel, the audio system must unconditionally and immediately interrupt all current audio streams.
[0063] Play a special alarm tone: Play a pre-stored, non-ignorable special alarm tone. This alarm tone has the following characteristics: High volume: Outputs at maximum volume within the safe limits allowed by the hardware.
[0064] Specific frequency: Contains frequency components around 3000Hz, which is the most sensitive frequency for the human ear and is easy to wake up a sleeping person.
[0065] Rapid rhythm: Use fast, repetitive pulsed sounds, such as a "beep" sound 3-4 times per second, to create a sense of urgency.
[0066] The alarm will continue to play until any of the following conditions occur: Users can manually confirm the alarm using physical buttons; Alternatively, the carbon monoxide concentration drops to a safe range (e.g., below 30 ppm) and remains there for more than 1 minute.
[0067] The independent channel's ultra-fast response avoids time-consuming steps such as delayed confirmation and weighted calculations that may exist in integrated algorithms, reducing response time to the second or even sub-second level. As long as the carbon monoxide sensor and the main control chip's core functions are normal, this safety channel can operate without relying on data from other sensors or complex software algorithms, achieving a fail-safe design. Faced with a clear, catastrophic danger, the system does not make "intelligent" trade-offs but executes only the single, correct action, warning the user in the strongest possible way to ensure protection even in the worst-case scenario.
[0068] The algorithm for instruction recognition and channel switching is as follows: I. Command Recognition Process Data packet reception and parsing: After receiving data, the Bluetooth communication module sends an interrupt request to the main control chip via an interface such as a serial port. The main control chip responds to the interrupt and reads the original data packet, which has already been decoded at the lower level by the Bluetooth module. The chip parses the data packet according to a predefined communication protocol that is completely consistent with the transmitter, extracting key fields: Message Header: Used to verify the start of the data packet. Command Type: A core field used to distinguish between a regular audio control command and a forced alarm command. Command Parameters: For example, alarm level, volume, etc.
[0069] Instruction Classification and Priority Determination After parsing, the chip immediately categorizes the instructions. Common instructions: such as play / pause, volume adjustment, switching noise reduction modes, etc. These instructions have lower priority. Forced alarm instructions: These instructions are assigned the highest system priority. They are predefined in the protocol with a specific, unique value (e.g., the instruction type field is 0xA0), allowing the chip to instantly distinguish them from other instructions.
[0070] The audio channel switching algorithm and process are as follows: Step 1: Emergency stop of the current audio stream The main control chip sends a hardware-level interrupt signal or a highest-priority software command to the audio codec or audio DSP. This command instructs the audio processing unit to immediately cease any current signal processing (whether it's active noise cancellation or music decoding) and clear its audio output buffer. The purpose of this is to eliminate existing sound as quickly as possible, making way for alarm tones.
[0071] Step 2: Reconstruct the audio path Under normal circumstances, the audio path is: audio source - audio DSP - amplifier - speaker.
[0072] In alarm mode, the main control chip performs a hard switch of the audio path. By configuring the internal audio switch matrix, the path is reconstructed as: main control chip (built-in alarm tone) - amplifier - speaker. This action bypasses the audio DSP responsible for noise reduction and music processing, ensuring the independence and highest priority of the alarm path.
[0073] Step 3: Call up and play the alarm sound The main control chip directly reads pre-stored, uncompressed, specially designed alarm tone digital audio data from its internal read-only memory. The chip then transmits this raw data to the audio amplifier at a fixed, maximum sampling rate via digital audio interfaces such as I2S. Simultaneously, the chip sets the amplifier's gain to maximum via control interfaces such as I2C to ensure the alarm tone reaches the highest hardware-permitted loudness.
[0074] Step 4: Maintenance and Recovery The alarm tone will play in a loop until the main control chip receives a specific "alarm clear" Bluetooth command. Upon receiving the clear command, the chip will reverse the above process: stop playing the alarm tone, switch the audio path back to normal mode, and restore the normal working state of the audio DSP and codec.
[0075] The decoding and amplification process is as follows: I. Attributes and Storage of Special Alarm Tones Audio attributes: Format: The pre-stored special alarm sound is not in compressed format such as MP3, but in uncompressed PCM format.
[0076] Sampling rate / bit depth: For example, a sampling rate of 16kHz or 44.1kHz, and a bit depth of 16 bits. This ensures basic clarity and intelligibility of the sound while controlling the amount of data.
[0077] Content: A carefully designed digital audio clip containing key frequencies of 300-3000Hz (the most sensitive frequencies for the human ear), and employing rapid pulse or frequency sweep patterns to maximize the wake-up effect.
[0078] Storage method: This PCM data is pre-compiled into an array and directly stored in the read-only memory or Flash memory of the earphone's main control chip. This means that it can be directly read by the CPU without the need for a complex file system and decoding.
[0079] The "decoding" here differs from the "software decoding" in traditional music playback; it's a more fundamental and direct "data transmission" process. Its complete signal chain is as follows: 1. Digital audio data delivery (“hardware decoding”) When an alarm is triggered, the earphone's main control chip no longer activates a complex audio decoding library. Instead, it directly reads a pre-stored array of PCM digital audio data from its internal ROM via its memory controller. Subsequently, the main control chip uses a DMA controller to directly and continuously transfer this PCM data to the I2S controller's transmit data register. DMA transfer does not consume CPU resources; the CPU only needs to initiate the transfer and can then handle other tasks, resulting in high efficiency. This avoids file system addressing and decompression steps, achieving the shortest path from command to sound.
[0080] 2. Digital-to-analog conversion process: The I2S controller converts digital PCM data (a series of 16-bit samples) into a corresponding bitstream according to the set sampling rate (e.g., 44.1kHz), and outputs it serially to the audio decoder via the I2S bus. The core of the audio decoder is a DAC. The DAC receives these digital samples and generates an analog voltage that precisely corresponds to the digital value in each clock cycle. In this way, the digital bitstream is reconstructed into a continuous analog voltage waveform. This analog waveform typically passes through a low-pass filter to remove high-frequency noise generated by the digital sampling, resulting in a smoother and purer sound.
[0081] 3. Signal Amplification Process: The analog audio signal after DAC conversion and filtering has very weak voltage and current, which cannot directly drive the speaker. This weak signal is sent to the audio power amplifier.
[0082] Key Action: In alarm mode, the main control chip configures the power amplifier's gain to its maximum value via control buses such as I2C. This means the amplifier amplifies the input analog signal by its maximum gain, outputting a high-voltage, high-current drive signal. This powerful electrical signal is sent to the speaker's voice coil, causing the diaphragm to vibrate violently, thus producing a loud alarm sound.
[0083] This embodiment allows users to sleep peacefully while wearing noise-canceling earplugs, while ensuring that danger alarms penetrate the noise cancellation and directly wake the user. It transforms earplugs, which might otherwise block alarms, into the most reliable alarm tool. Traditional tent-based sound and light alarms are easily masked by wind and rain or blocked by goggles. This system's alarm sound enters the ear canal directly, is strong and cannot be ignored, and has a very high wake-up success rate. The detector and earplugs are designed specifically for outdoor scenarios, are portable and rechargeable, forming a complete sleep safety solution with a superior user experience.
[0084] In addition, users can pair the detector by touching the earplugs or their phone with the device before falling asleep. When an alarm is triggered, the detector initiates a connection via NFC and activates the earplugs. The alarm can also be delivered via a smart sleep mask, integrating a vibration motor or a miniature LED display. When an alarm is triggered, the mask vibrates or displays warning text on the LEDs. Alternatively, a portable mattress vibrator can be placed as a standalone device under a sleeping bag or mattress, generating a strong vibration when an alarm is triggered. Both the portable detector and the noise-canceling earplugs connect to the user's smartphone. The detector sends an alarm signal to a mobile app, which then forwards the command to the earplugs. The earplugs can also integrate detection functionality directly, with a miniature gas sensor integrated into the charging case. The charging case is placed inside a tent to monitor the environment, and when danger is detected, it directly commands the earplugs to sound an alarm via wired or wireless means.
[0085] In summary, the linkage alarm method for environmental safety monitoring provided in this embodiment, through the linkage between the portable detection terminal and the noise-canceling earbud, triggers the noise-canceling earbud to forcibly interrupt the current audio processing function and play a pre-stored special alarm sound when the target environmental safety parameters are detected to reach the preset dangerous conditions. This effectively solves the problem of the failure of traditional environmental alarm methods when wearing noise-canceling earbuds, ensuring that users can perceive environmental safety hazards in a timely manner.
[0086] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but may be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0087] To facilitate better implementation of the linkage alarm method for environmental safety monitoring according to the embodiments of this application, this application also provides a linkage alarm system for environmental safety monitoring based on the above-described linkage alarm method. The meanings of the terms used are the same as in the linkage alarm method for environmental safety monitoring described above, and specific implementation details can be found in the description of the method embodiments.
[0088] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of the linkage alarm system for environmental safety monitoring provided in the embodiments of this application. The linkage alarm system for environmental safety monitoring may specifically include a portable detection terminal 10 and a noise-canceling earplug terminal 20. The portable detection terminal 10 is used to monitor the safety parameters of the target environment in real time, and when it is determined that the safety parameters have reached the preset dangerous conditions, it generates a wireless alarm command and sends it to the noise-canceling earpiece terminal. Specifically, the portable detection terminal 10, as the core of the system's environmental monitoring and command generation, undertakes the key functions of real-time perception of environmental safety status, judgment of danger, and initiation of alarm commands, serving as the trigger source for linked alarms. The portable detection terminal 10 has built-in monitoring components adapted to the target environment (such as outdoor tents, enclosed rest cabins, and confined indoor spaces), continuously and uninterruptedly collecting safety parameters from the target environment to ensure that no emerging or developing danger signals are missed. The portable detection terminal 10 internally stores "preset danger conditions" (such as critical values of specific parameters, abnormal change trends, etc.) for various safety parameters. The collected real-time parameters are compared and analyzed against these conditions in real time to accurately determine whether the current environment is in a dangerous state. Once the safety parameters are determined to meet the preset danger conditions, a wireless alarm command containing a danger indicator is immediately generated, clearly indicating the need to initiate an alarm response. Subsequently, through its own wireless communication components, the command is directionally sent to the noise-canceling earpiece via an established dedicated link, completing the closed loop of "monitoring-judgment-command initiation." For example, a portable detection device can be placed inside a tent during outdoor camping to continuously collect safety parameters (such as carbon monoxide concentration) inside the tent. When the carbon monoxide concentration rises due to incomplete combustion of charcoal in the tent and reaches a preset danger threshold, the portable detection device quickly determines that it is in a dangerous state, generates a wireless alarm command, and sends the command to the noise-canceling earbuds worn by the user via a wireless link.
[0089] The noise-canceling earbud end 20 is used to receive wireless alarm commands, and based on the wireless alarm commands, forcibly interrupt the current audio processing function and switch to the alarm audio output state; in the alarm audio output state, it plays a pre-stored special alarm sound to perform the alarm sound. Specifically, the noise-canceling earbud 20, as the system's alarm execution terminal, is responsible for receiving alarm commands, switching working states, and outputting alarm signals. It is a key carrier for directly conveying danger warnings to users. The noise-canceling earbud 20 has a corresponding wireless communication receiving component, which can continuously monitor the signals sent by the paired portable detection terminal. When it receives a wireless alarm command, it can quickly complete command verification and parsing to confirm that it is a valid command that requires an alarm response. Regardless of the current conventional audio processing state (such as active noise cancellation, music playback, white noise output, etc.), once a valid wireless alarm command is confirmed, the highest priority interrupt mechanism will be activated, unconditionally terminating all current audio processing flows, clearing the audio output channel, making room for alarm audio playback, and ensuring that the alarm response is not interfered with by conventional functions. After interrupting the conventional audio function, it immediately switches to a dedicated alarm audio output state. In this state, the conventional audio path is closed, and the hardware working mode related to the alarm is activated to prepare for playing the alarm sound. When the alarm audio output is active, a specially pre-stored alarm tone is invoked and played through its own sound-generating components (such as a built-in speaker), directly transmitting the alarm tone to the user's ear canal to ensure that the user can perceive the danger in a timely manner.
[0090] For example, when a user is sleeping inside a tent wearing noise-canceling earplugs, the earplugs are in a deep noise-canceling state to block out the sounds of wind and rain. When the noise-canceling earplugs receive a wireless alarm command from a portable detection device, they immediately interrupt the noise-canceling function, switch to alarm audio output mode, and quickly play a pre-stored special alarm sound, successfully waking up the sleeping user and reminding them that there is danger inside the tent.
[0091] This embodiment establishes a complete alarm chain of "environmental monitoring - command transmission - alarm execution" through the linkage between the portable detection terminal and the noise-canceling earbud. This effectively solves the problem that users cannot perceive traditional environmental alarms when wearing noise-canceling devices, allowing users to receive timely environmental hazard alarms while enjoying the comfort of noise-canceling functions, thus improving the safety and reliability of use in relevant scenarios.
[0092] Furthermore, in some embodiments, the portable detection terminal 10 includes: Sensor module 11 is used to collect safety parameters of the target environment; the sensor module includes at least one of a carbon monoxide sensor, a temperature sensor, and a humidity sensor; Specifically, sensor module 11 is directly electrically connected to the main controller at the detection end (e.g., through pin soldering or ribbon cable connection) to ensure that the collected signals are transmitted to the main controller in real time without significant delay. It is specifically designed to collect safety parameters of the target environment and serves as the "input terminal" for the system to perceive the environmental state. Its collection range covers key areas of the target environment, and its collection frequency is adapted to real-time monitoring requirements. It can continuously capture dynamic changes in environmental parameters, and different types of sensors can be selected according to scenario needs (e.g., for toxic gases, temperature, and humidity). In outdoor camping scenarios, the sensor module is installed on the front detection surface of the portable detection end, continuously collecting safety parameters inside the tent (e.g., carbon monoxide concentration) and transmitting the collected signals to the main controller at the detection end in real time.
[0093] The main controller 12 at the detection end is connected to the sensor module and is used to process safety parameters and determine dangerous conditions in order to generate wireless alarm commands. Specifically, the main controller 12 at the detection end is electrically connected to the sensor module on one end to receive the raw parameter signals transmitted by it; the other end is electrically connected to the first wireless communication module, which can output the generated command signals to the module. It is the core processing unit of the portable detection end. The main controller 12 at the detection end undertakes three major functions: parameter processing, hazard judgment, and command generation. First, it converts and organizes the raw parameter signals transmitted by the sensor module to make them valid data that can be used for judgment; then, it compares the valid data with the pre-stored preset hazard conditions (such as parameter thresholds) in real time to accurately determine whether the environment is in a dangerous state; finally, if it is determined to be dangerous, it immediately generates a wireless alarm command containing a hazard indicator to prepare for subsequent transmission. The main controller at the detection end receives the raw carbon monoxide concentration signal transmitted by the sensor module, converts it into a digital concentration value, and compares it with the pre-stored hazard threshold (such as 150 ppm). When the concentration value reaches 160 ppm, it is determined to be a dangerous state and quickly generates a wireless alarm command.
[0094] The first wireless communication module 13 is connected to the main controller of the detection end and is used to send wireless alarm commands to the noise-canceling earplug end; Specifically, the first wireless communication module 13 is electrically connected to the main controller of the detection terminal and receives the wireless alarm command signal output by the main controller. It is the command sending unit of the portable detection terminal. Based on the established wireless communication link, it sends the wireless alarm command generated by the main controller of the detection terminal to the paired noise-canceling earbud. A basic signal verification mechanism is included during transmission to prevent command loss or distortion due to environmental interference, ensuring complete and timely delivery of the command. After receiving the carbon monoxide exceeding the standard alarm command generated by the main controller of the detection terminal, the first wireless communication module quickly sends the command to the noise-canceling earbud worn by the user via the wireless link. The entire transmission process is extremely short and does not affect the timeliness of the alarm.
[0095] Furthermore, in some embodiments, the noise-canceling earplug end 20 includes: The second wireless communication module 21 is used to receive wireless alarm commands sent by the portable detection terminal; Specifically, the second wireless communication module 21, electrically connected to the earbud main controller, transmits received wireless alarm command signals to the earbud main controller and serves as the command receiving unit for the noise-canceling earbud. It continuously monitors the wireless signals sent by the paired portable detection unit. Upon detecting a wireless alarm command conforming to the communication protocol, it quickly completes command reception and preliminary verification to ensure the received command is valid. The command is then transmitted to the earbud main controller for further processing. When the user wears the noise-canceling earbud, the second wireless communication module remains in a monitoring state. Upon receiving a carbon monoxide exceeding the standard wireless alarm command from the portable detection unit, it immediately verifies the command's validity and transmits the valid command to the earbud main controller.
[0096] The earbud main controller 22 is connected to the second wireless communication module and is used to parse wireless alarm commands and control audio path switching; Specifically, the earbud main controller 22 is electrically connected to the second wireless communication module on one end to receive command signals; the other end is electrically connected to the audio processing and playback module to output control signals, making it the core control unit of the noise-canceling earbud. The earbud main controller 22 is responsible for parsing the received wireless alarm command and clarifying the corresponding operational requirements; it then generates a control signal to forcibly control the audio processing and playback module to interrupt its current regular audio processing function and switch to alarm audio output mode, ensuring the priority execution of the alarm action. After the earbud main controller parses the received command as a "highest priority alarm command," it immediately generates a control signal and sends it to the audio processing and playback module, instructing it to stop the current music playback function and switch to alarm mode.
[0097] The audio processing and playback module 23 is connected to the earphone main controller and is used to provide noise reduction or music playback functions in normal mode and play a special alarm sound in alarm mode. Specifically, the audio processing and playback module 23 is electrically connected to the earbud main controller on one end to receive control signals, and electrically connected to the speaker on the other end to output audio signals. It is the core of audio processing in the noise-canceling earbud. The audio processing and playback module 23 has two working modes. In normal mode, it provides noise cancellation or music playback functions to meet the user's daily needs. In alarm mode, it responds to the control signals of the earbud main controller, calls up the pre-stored special alarm tone, and performs audio signal processing (such as signal amplification and adaptation) to provide a qualified audio signal for the speaker to play the alarm tone. In normal state, the audio processing and playback module is running the noise cancellation function to isolate the user from outdoor wind and rain noise. After receiving the alarm control signal from the earbud main controller, it immediately stops the noise cancellation processing, calls up the internally pre-stored special alarm tone data, performs signal processing, and outputs it to the speaker.
[0098] Speaker 24, connected to the audio processing and playback module; Specifically, speaker 24, electrically connected to the audio processing and playback module, receives the processed audio signal and serves as the sound output unit for the noise-canceling earbuds. It converts the audio signal (regular audio or alarm audio) transmitted by the audio processing and playback module into sound perceptible to the human ear. In alarm mode, it accurately plays a specially designed alarm tone, directly transmitted to the user's ear canal, ensuring the user can promptly perceive the danger warning. After receiving the specially designed alarm tone signal from the audio processing and playback module, the speaker immediately plays a highly recognizable and loud alarm sound, quickly waking the user even if they are asleep.
[0099] This embodiment establishes a complete link from environmental monitoring to alarm execution through the collaboration and wireless linkage of components between the portable detection end and the noise-canceling earbud. This effectively solves the problem that users cannot perceive traditional environmental alarms when wearing noise-canceling devices, allowing users to receive timely environmental hazard alarms while enjoying noise cancellation or audio playback functions, thus improving the safety and reliability of use in relevant scenarios.
[0100] Furthermore, such as Figure 4 As shown, in some embodiments, the audio processing and playback module 23 includes: The audio processing unit 231 is used to provide noise reduction or music playback functions in normal mode; Specifically, the audio processing unit 231 is electrically connected to the earbud main controller via a control signal line, receiving normal mode control commands from the main controller; simultaneously, it is connected to the audio path switch via an audio signal line, transmitting the processed normal audio signal to the path switch, making it the core processing component for normal audio functions. It focuses on audio services in normal mode, possessing noise reduction algorithm processing and audio decoding playback capabilities. In noise reduction mode, it filters ambient noise through a built-in algorithm to create a quiet environment for the user; in music playback mode, it decodes various normal audio files (such as music, white noise, etc.) and outputs an audio signal adapted for playback, meeting the user's daily needs. When the user wears the noise-canceling earbuds while camping outdoors, the audio processing unit receives noise reduction commands from the main controller, activates the active noise reduction algorithm, and filters out wind, rain, and external interference sounds outside the tent; when the user switches to music playback mode, the unit immediately decodes the music file transmitted from the mobile phone, generates a clear audio signal, and sends it to the audio path switch.
[0101] The audio path switch 232, controlled by the earphone main controller, is used to switch the audio signal source between normal mode and alarm mode; Specifically, the audio path switch 232 is controlled by the earbud main controller (connected via a control signal line) and receives path switching commands from the main controller. It is also connected to the audio processing unit and the internal alarm sound source via audio signal lines, acting as a control valve for switching audio signal sources. Based on the instructions from the earbud main controller, it achieves precise switching of the audio output path. In normal mode, it connects the audio processing unit to the speaker, allowing normal audio signals to be output. In alarm mode, it immediately disconnects the normal audio path and connects the internal alarm sound source to the speaker, ensuring interference-free transmission of the alarm audio signal and guaranteeing timely and reliable switching. In normal operation, the audio path switch remains connected to the audio processing unit, allowing noise-canceling or music signals to be transmitted to the speaker. When the earbud main controller issues an alarm switching command, the switch instantly disconnects from the audio processing unit and connects the internal alarm sound source, clearing obstacles for alarm sound playback.
[0102] The alarm sound storage and playback unit 233 is used to play a special alarm sound in alarm mode. It includes a read-only memory, a digital audio interface controller, and an audio power amplifier. The read-only memory is used to store the digital audio data of the special alarm sound. The digital audio interface controller is connected to the earphone main controller and the read-only memory and is used to read and output the digital audio data. The audio power amplifier is connected to the digital audio interface controller and the speaker, and the gain of the audio power amplifier is configured by the earphone main controller. Specifically, the alarm sound storage and playback unit 233, as the core execution component of the alarm mode, consists of a read-only memory, a digital audio interface controller, and an audio power amplifier. The three are electrically connected in sequence through audio signal lines and control signal lines to form an alarm audio processing link of "storage-reading-amplification".
[0103] The read-only memory (ROM) is directly connected to the digital audio interface controller via a data signal line, ensuring fast audio data retrieval without redundant transmission links. It is specifically designed to store specially crafted alarm tones; the stored content will not be modified or lost during device use, guaranteeing the stability of the alarm tones. The stored digital audio data format is compatible with subsequent processing components, allowing direct reading without additional conversion and shortening response time. The ROM pre-stores a segment of specially crafted alarm tones in pulse-code modulation format, containing frequencies sensitive to human hearing, specifically designed to wake sleeping users. Its fixed storage address facilitates rapid location and retrieval by the digital audio interface controller.
[0104] The digital audio interface controller has two terminals: one connected to a read-only memory (ROM) via a data signal line to read the alarm tone digital data; the other connected to the earphone's main controller via a control signal line to receive read and output commands; and simultaneously connected to an audio power amplifier via an audio signal line to transmit the digital audio data to the amplifier, serving as the transmission hub for the alarm audio data. Responding to commands from the earphone's main controller, it quickly reads the digital audio data of the specially designed alarm tone from the ROM, organizes it according to a preset format, and outputs it to the audio power amplifier with a stable timing sequence, ensuring the integrity and synchronization of data transmission and avoiding audio distortion. Upon receiving an alarm command from the earphone's main controller, the digital audio interface controller immediately locates the storage address of the specially designed alarm tone in the ROM, quickly reads the complete digital audio data, organizes it according to a preset sampling rate, and continuously transmits it to the audio power amplifier.
[0105] The audio power amplifier connects to the earbud's main controller via a control signal line, receiving gain configuration commands from the main controller. It also connects to the digital audio interface controller and the speaker via audio signal lines, receiving the original alarm audio signal from the digital audio interface controller, amplifying it, and outputting it to the speaker. Its core function is to amplify the alarm audio signal power. Its gain is precisely controlled by the earbud's main controller and is configured to its maximum value in alarm mode, amplifying the weak original alarm audio signal to sufficient power to drive the speaker to emit a loud alarm sound, effectively penetrating sleep mode and waking the user. In alarm mode, the earbud's main controller sends a "maximum gain" command to the audio power amplifier, which immediately adjusts its operating state, amplifying the power of the specially designed alarm sound original signal transmitted by the digital audio interface controller by 100 times, outputting a high-voltage, high-current drive signal to ensure the speaker can emit a sufficiently loud alarm sound.
[0106] The audio processing and playback module provided in this embodiment, through the coordinated work of its components, not only realizes noise reduction and audio playback functions in the normal mode, but also can quickly switch channels, amplify and output a special alarm sound when an alarm is triggered, ensuring that the alarm sound is clear, loud and interference-free. This effectively solves the problem that traditional alarm methods cannot penetrate the noise reduction function, providing users with hardware support that balances comfort and safety, and improving the reliability and effectiveness of alarm response.
[0107] Specific limitations regarding the linkage alarm system used for environmental safety monitoring can be found in the limitations on linkage alarm methods used for environmental safety monitoring described above, and will not be repeated here. Each module in the aforementioned linkage alarm system for environmental safety monitoring can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0108] The linkage alarm system for environmental safety monitoring provided in this embodiment, through the linkage between the portable detection terminal and the noise-canceling earbud, when the target environmental safety parameters are detected to reach the preset dangerous conditions, triggers the noise-canceling earbud to forcibly interrupt the current audio processing function and play a pre-stored special alarm sound via a wireless alarm command. This effectively solves the problem of the failure of traditional environmental alarm methods when wearing noise-canceling earbuds, ensuring that users can perceive environmental safety hazards in a timely manner.
[0109] Furthermore, embodiments of this application also provide an electronic device, such as... Figure 5 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically: The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.
[0110] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and linkage alarm methods for environmental safety monitoring by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0111] The electronic device also includes a power supply 303 that supplies power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0112] The electronic device may also include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0113] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302 to realize various functions, as follows: The portable detection terminal monitors the safety parameters of the target environment in real time and generates a wireless alarm command when the safety parameters reach the preset dangerous conditions. The portable detection terminal sends the wireless alarm command to the noise-canceling earpiece. After receiving the wireless alarm command, the noise-canceling earpiece forcibly interrupts the current audio processing function and switches to the alarm audio output state. In the alarm audio output state, the noise-canceling earpiece plays a pre-stored special alarm sound to trigger an alarm.
[0114] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0115] This application embodiment, through the linkage between the portable detection terminal and the noise-canceling earbud, when the target environmental safety parameters are detected to reach the preset dangerous conditions, triggers the noise-canceling earbud to forcibly interrupt the current audio processing function and play a pre-stored special alarm sound via a wireless alarm command. This effectively solves the problem of the failure of traditional environmental alarm methods when wearing noise-canceling earbuds, ensuring that users can perceive environmental safety hazards in a timely manner.
[0116] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0117] Therefore, embodiments of this application provide a storage medium storing multiple instructions that can be loaded by a processor to execute steps in any of the linkage alarm methods for environmental safety monitoring provided in embodiments of this application. For example, the instructions can execute the following steps: The portable detection terminal monitors the safety parameters of the target environment in real time and generates a wireless alarm command when the safety parameters reach the preset dangerous conditions. The portable detection terminal sends the wireless alarm command to the noise-canceling earpiece. After receiving the wireless alarm command, the noise-canceling earpiece forcibly interrupts the current audio processing function and switches to the alarm audio output state. In the alarm audio output state, the noise-canceling earpiece plays a pre-stored special alarm sound to trigger an alarm.
[0118] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0119] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0120] Since the instructions stored in the storage medium can execute the steps in any of the linkage alarm methods for environmental safety monitoring provided in the embodiments of this application, the beneficial effects that any of the linkage alarm methods for environmental safety monitoring provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0121] The above provides a detailed description of a linkage alarm method and system for environmental safety monitoring provided by the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A linkage alarm method for environmental safety monitoring, applied to a linkage alarm system, the linkage alarm system comprising a portable detection terminal and a noise-canceling earpiece terminal, characterized in that, The method includes: The portable detection terminal monitors the safety parameters of the target environment in real time, and generates a wireless alarm command when the safety parameters reach a preset dangerous condition. The portable detection terminal sends the wireless alarm command to the noise-canceling earbud. After receiving the wireless alarm command, the noise-canceling earbuds forcibly interrupt the current audio processing function and switch to alarm audio output state based on the wireless alarm command. The noise-canceling earplugs play a pre-stored special alarm tone to trigger an alarm while the alarm audio output is active.
2. The linkage alarm method for environmental safety monitoring according to claim 1, characterized in that, The method of monitoring safety parameters of the target environment in real time through the portable detection terminal, and generating a wireless alarm command when the safety parameters are determined to reach a preset dangerous condition, includes: The carbon monoxide concentration simulation signal of the target environment is collected using a carbon monoxide sensor; The simulated carbon monoxide concentration signal is converted into a raw concentration value, and multiple continuously acquired raw concentration values are subjected to anti-pulse interference filtering to obtain an effective concentration value. The effective concentration value is compared with a preset independent alarm threshold in real time; When the effective concentration value reaches or exceeds the independent alarm threshold, the wireless alarm command is generated, wherein the wireless alarm command includes an identification field for indicating the highest priority alarm type.
3. The linkage alarm method for environmental safety monitoring according to claim 1, characterized in that, After receiving the wireless alarm command at the noise-canceling earbud, the noise-canceling earbud, based on the wireless alarm command, forcibly interrupts the current audio processing function and switches to the alarm audio output state, including: Identify the priority identifier in the wireless alarm command; Detect whether the priority identifier is a mandatory alarm command with the highest priority; If so, an interrupt signal is sent to the audio processing unit at the noise-canceling earbud end to stop all current audio signal processing and output; Control the audio path switch at the noise-canceling earbud end to switch the audio output path from being connected to a regular audio source to being connected to an internal alarm sound source.
4. The linkage alarm method for environmental safety monitoring according to claim 1, characterized in that, The step of playing a pre-stored special alarm tone to trigger an alarm through the noise-canceling earplug in the alarm audio output state includes: Read the pre-stored pulse code modulation format special alarm tone digital data directly from the read-only memory of the noise-canceling earplug; The specially designed alarm tone digital data is transmitted to the digital audio interface controller at the noise-canceling earpiece via direct memory access. The gain of the audio power amplifier at the noise-canceling earbud end is configured to the maximum value, and the digital audio interface controller is driven to output the digital data at a preset sampling rate. After digital-to-analog conversion and amplification, the specially designed alarm sound at a preset volume is played by the speaker at the noise-canceling earbud end.
5. The linkage alarm method for environmental safety monitoring according to claim 1, characterized in that, The safety parameters also include temperature and / or humidity values; therefore, the real-time monitoring of the safety parameters of the target environment via the portable detection terminal, and the generation of a wireless alarm command when the safety parameters reach a preset dangerous condition, includes: Simultaneously, the carbon monoxide concentration simulation signal, temperature simulation signal, and humidity simulation signal of the target environment are collected using the carbon monoxide sensor, temperature sensor, and humidity sensor of the portable detection terminal. The temperature analog signal and the humidity analog signal are converted into digital temperature values and digital humidity values, respectively, and the digital temperature values and the digital humidity values are compared with pre-stored temperature warning thresholds and humidity warning thresholds, respectively. If the digital temperature value reaches or exceeds the temperature warning threshold, a first wireless warning command is generated. If the digital humidity value reaches or exceeds the humidity warning threshold, a second wireless warning command is generated; wherein the command type field of the first wireless warning command and the second wireless warning command are different from the command type field of the wireless alarm command. The generated first or second wireless warning command is sent to the noise-canceling earbud via the portable detection terminal.
6. The linkage alarm method for environmental safety monitoring according to claim 5, characterized in that, The method further includes: Under the condition that the carbon monoxide concentration does not reach the independent alarm threshold, the current status of at least two parameters among the effective concentration value of the target environment, the digital temperature value, and the digital humidity value is simultaneously acquired. The current status of at least two acquired safety parameters is input into a pre-set comprehensive risk assessment model for analysis. The comprehensive risk assessment model maps the current state of at least two safety parameters to predefined parameter risk levels; wherein the parameter risk levels are set according to the different threshold ranges to which the values of each parameter belong. Based on the preset combined risk rules, the parameter risk levels corresponding to the at least two safety parameters are comprehensively calculated to generate a combined risk quantification value. The combined risk quantification value is compared with a preset comprehensive risk level threshold to determine the final risk assessment level; wherein the risk assessment level includes at least a low-risk alert level, a medium-risk warning level, and a high-risk warning level; Based on the risk assessment level, a corresponding wireless early warning command is generated and sent; wherein, the command type field of the generated wireless early warning command is different for different risk assessment levels.
7. A linkage alarm system for environmental safety monitoring, used to implement the linkage alarm method for environmental safety monitoring as described in any one of claims 1-6, characterized in that, Includes portable detection terminals and noise-canceling earbud terminals; The portable detection terminal is used to monitor the safety parameters of the target environment in real time, and when it is determined that the safety parameters have reached the preset dangerous conditions, it generates a wireless alarm command and sends it to the noise-canceling earplug terminal. The noise-canceling earbud is used to receive the wireless alarm command, and based on the wireless alarm command, forcibly interrupt the current audio processing function and switch to the alarm audio output state; in the alarm audio output state, a pre-stored special alarm sound is played to trigger the alarm.
8. The linkage alarm system for environmental safety monitoring according to claim 7, characterized in that, The portable detection terminal includes: A sensor module is used to collect safety parameters of the target environment; the sensor module includes at least one of a carbon monoxide sensor, a temperature sensor, and a humidity sensor. The main controller at the detection end is connected to the sensor module and is used to process the safety parameters and determine dangerous conditions in order to generate the wireless alarm command; The first wireless communication module is connected to the main controller of the detection end and is used to send the wireless alarm command to the noise-canceling earplug.
9. The linkage alarm system for environmental safety monitoring according to claim 7, characterized in that, The noise-canceling earplug includes: The second wireless communication module is used to receive wireless alarm commands sent by the portable detection terminal; The earbud main controller is connected to the second wireless communication module and is used to parse the wireless alarm command and control the audio path switching; An audio processing and playback module is connected to the earbud main controller and is used to provide noise reduction or music playback functions in normal mode and to play the special alarm sound in alarm mode. A speaker is connected to the audio processing and playback module.
10. The linkage alarm system for environmental safety monitoring according to claim 9, characterized in that, The audio processing and playback module includes: An audio processing unit is used to provide noise reduction or music playback functions in normal mode; An audio path switch, controlled by the earbud main controller, is used to switch the audio signal source between normal mode and alarm mode; An alarm sound storage and playback unit, used to play the special alarm sound in alarm mode, includes a read-only memory, a digital audio interface controller, and an audio power amplifier. The read-only memory is used to store the digital audio data of the special alarm sound. The digital audio interface controller is connected to the earphone main controller and the read-only memory, and is used to read and output the digital audio data. The audio power amplifier is connected to the digital audio interface controller and the speaker, and the gain of the audio power amplifier is configured by the earphone main controller.