Ultrasonic signal transmission method and device, and computer readable storage medium
By creating a model of monitoring service functions and virtual microphones, the problem of ultrasonic signal transmission in the prior art requires special hardware and drivers, and the low-cost and highly compatible ultrasonic signal transmission is achieved.
Patent Information
- Application Number
- CN202510012529.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-11
AI Technical Summary
The prior art requires the installation of special hardware equipment and driving equipment in ultrasonic signal transmission, resulting in high cost and incompatible audio signal transmission.
By creating a model of monitoring service functions and virtual microphones, the transmission of ultrasonic signals is realized, without setting up a hardware device for ultrasonic transmission, or setting up a driving device for driving the hardware device.
The cost burden of ultrasonic transmission is reduced, and based on the current audio signal transmission configuration, the compatible transmission capability of ultrasonic signals and audio signals is realized.
Smart Images

Figure CN119814175A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of ultrasonic transmission, and in particular relates to a method and device for transmitting ultrasonic signals, and a computer-readable storage medium. Background Art
[0002] Ultrasonic transmission refers to a technology that uses sound waves with frequencies above the human hearing range (usually defined as above 20 kHz) to transmit information or energy.
[0003] This technology has a wide range of applications in many fields, including but not limited to:
[0004] Medical imaging: Ultrasound is used in medical ultrasound imaging, such as B-ultrasound, to examine internal organs and fetal development because it can safely penetrate human tissue without causing radiation damage.
[0005] Non-destructive testing: In industry, ultrasound is used to detect defects within materials, such as cracks in metal welds.
[0006] Communications: Used for short-range wireless data transmission, such as in water or certain specific indoor environments, because electromagnetic waves are not efficient in these environments.
[0007] Cleaning and treatment: Ultrasonic cleaning machines use the cavitation effect produced by ultrasound in liquids to remove dirt from the surface of objects.
[0008] Biomedical Engineering: In therapeutic applications, high-intensity focused ultrasound (HIFU) can be used to target heating and destruction of tumor cells.
[0009] Navigation and ranging: Ultrasonic sensors are often used in robots, self-driving cars, and drones to measure distances and avoid obstacles.
[0010] Ultrasonic Positioning System: Using ultrasound to determine the position of an object in space is particularly useful in virtual reality and augmented reality.
[0011] The key to ultrasonic transmission lies in its sending and receiving technology, which usually requires specially designed transducers to convert electrical signals into sound wave signals. Ultrasonic waves have a shorter wavelength, so under certain conditions, they can achieve more precise positioning and higher resolution than low-frequency sound waves. Summary of the invention
[0012] The embodiments of the present disclosure provide a method and device for transmitting an ultrasonic signal, and a computer-readable storage medium.
[0013] The present disclosure provides a method for transmitting an ultrasonic signal, comprising:
[0014] Create a monitoring service function;
[0015] The monitoring service function is configured to monitor the audio signal collected by the audio device;
[0016] Create a model of a virtual microphone;
[0017] The virtual microphone is configured to collect the ultrasonic signal of the predetermined frequency from the audio signal, process the ultrasonic signal of the predetermined frequency, and convert it into a local downloadable address;
[0018] The model of the virtual microphone and the monitoring service function are packaged in the form of an executable file and implanted into a local server.
[0019] In some embodiments, creating a model of a virtual microphone includes:
[0020] Determining a device type of the virtual microphone so that the virtual bus can identify the virtual microphone;
[0021] Create virtual plug-and-play functionality;
[0022] The virtual microphone supports the plug-and-play function; the plug-and-play function is configured to handle insertion and removal events of the virtual microphone;
[0023] A power management function is created; the power management function is configured to handle the behavior of the virtual microphone under different power states.
[0024] In some embodiments, the data formats of the audio signals in the virtual microphone and the audio device are the same.
[0025] The disclosed embodiment also provides a method for transmitting an ultrasonic signal, comprising: monitoring an audio signal collected by an audio device;
[0026] The ultrasonic signal of the predetermined frequency is collected from the audio signal, the ultrasonic signal of the predetermined frequency is processed, and the ultrasonic signal is converted into a local downloadable address.
[0027] In some embodiments, collecting the ultrasonic signal of the predetermined frequency from the audio signal, processing the ultrasonic signal of the predetermined frequency, and converting it into a local downloadable address includes:
[0028] Creating a management instance of the audio signal and initializing the audio device to a sharing mode;
[0029] The sharing mode is that other applications can use the audio device while monitoring the audio signal collected by the audio device;
[0030] Configuring a data format of the audio signal;
[0031] Acquire the buffer of the audio device by a buffer acquisition method to write the audio signal into the buffer of the audio device, and then release the buffer of the audio device by a buffer release method to acquire the audio signal;
[0032] Converting the audio signal from a byte stream to a sample array;
[0033] Performing spectrum analysis on the audio signal of the sample array to determine whether the ultrasonic signal of the predetermined frequency exists;
[0034] When it is determined that the ultrasonic signal of the agreed frequency exists, accessing the audio device, filtering the ultrasonic signal of the agreed frequency, retaining the agreed frequency portion of the ultrasonic signal, and ignoring the non-agreed frequency portion of the ultrasonic signal;
[0035] The agreed frequency portion of the ultrasonic signal is converted into a local downloadable address.
[0036] In some embodiments, the ultrasonic signal of the predetermined frequency is a continuous sinusoidal wave signal with a frequency range of 40 to 48 kHz.
[0037] In some embodiments, the data format of the audio signal includes: the sampling rate of the audio device for collecting the audio signal is at least 48 kHz, and the bit depth is at least 16 bits.
[0038] In some embodiments, the type of the sample array is short type or float type.
[0039] In some embodiments, the spectral analysis comprises a Fast Fourier Transform.
[0040] In some embodiments, before monitoring the audio signal collected by the audio device, the method further includes:
[0041] Enable virtual plug-and-play function;
[0042] The agreed frequency of the ultrasonic signal is obtained from the business service end.
[0043] In some embodiments, the method further includes: determining whether the virtual plug-and-play function receives an enable command;
[0044] If yes, performing spectrum analysis on the audio signal of the sample array to determine whether the ultrasonic signal of the predetermined frequency exists;
[0045] If no, then end.
[0046] The embodiment of the present disclosure also provides an ultrasonic signal transmission device, comprising: a creation module, configured to create a model of a monitoring service function and a virtual microphone;
[0047] The monitoring service function is configured to monitor the audio signal collected by the audio device;
[0048] The virtual microphone is configured to collect the ultrasonic signal of the predetermined frequency from the audio signal, process the ultrasonic signal of the predetermined frequency, and convert it into a local downloadable address;
[0049] The implantation module is configured to package the model of the virtual microphone and the monitoring service function in the form of an executable file, and implant it into the local server.
[0050] In some embodiments, the invention further includes: a monitoring module configured to monitor the audio signal collected by the audio device;
[0051] The virtual microphone is configured to collect the ultrasonic signal of the agreed frequency from the audio signal, process the ultrasonic signal of the agreed frequency, and convert it into a local downloadable address.
[0052] The embodiment of the present disclosure also provides a computer-readable storage medium having a program stored thereon, wherein when the program is executed, the steps in the above-mentioned method for transmitting ultrasonic signals are implemented.
[0053] Beneficial effects of the present disclosure: The ultrasonic signal transmission method provided by the present disclosure, by creating a model of a monitoring service function and a virtual microphone, can realize the transmission of ultrasonic signals through a virtual driving device and a virtual ultrasonic transmission device, so that the transmission of ultrasonic signals does not require the setting of ultrasonic transmission hardware devices, nor does it require the setting of driving devices for driving the hardware devices, thereby not only reducing the cost burden of ultrasonic transmission, but also being compatible with the ability to transmit ultrasonic signals and audio signals based on the current configuration of audio signal transmission. By packaging the model of the virtual microphone and the monitoring service function in the form of an executable file and implanting it into the local server, when ultrasonic signal transmission is required, the local server can directly call the executable file, thereby realizing the above-mentioned method of transmitting ultrasonic signals through the monitoring service function and the virtual microphone.
[0054] The ultrasonic signal transmission device provided by the present disclosure can realize the transmission of ultrasonic signals through a virtual driving device and a virtual ultrasonic transmission device by setting a creation module, so that the transmission of ultrasonic signals does not need to set up a hardware device for ultrasonic transmission, nor does it need to set up a driving device for driving the hardware device, thereby not only reducing the cost burden of ultrasonic transmission, but also being compatible with the ability to transmit ultrasonic signals and audio signals based on the current configuration of audio signal transmission. By setting an implantation module, when ultrasonic signal transmission is required, the local server can directly call the packaged executable file, thereby realizing the transmission of ultrasonic signals through the monitoring service function and the virtual microphone. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a preliminary processing flow chart of a method for transmitting an ultrasonic signal in an embodiment of the present disclosure;
[0056] Figure 2a is a practical transmission flow chart of a method for transmitting an ultrasonic signal in an embodiment of the present disclosure;
[0057] Figure 2b for Figure 2a Specific flow chart of step S21;
[0058] Figure 3 A start-up flow chart of a method for transmitting an ultrasonic signal in an embodiment of the present disclosure;
[0059] Figure 4 It is a principle block diagram of an ultrasonic signal transmission device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0060] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention discloses an ultrasonic signal transmission method and device, and a computer-readable storage medium, which are further described in detail below in conjunction with the accompanying drawings and specific implementations.
[0061] The embodiments of the present disclosure will be described more fully below with reference to the accompanying drawings, but the embodiments shown may be embodied in different forms and should not be construed as being limited to the embodiments set forth in the present disclosure. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0062] The embodiments of the present disclosure are not limited to the embodiments shown in the drawings, but include modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the drawings have schematic properties, and the shapes of the regions shown in the drawings illustrate the specific shapes of the regions, but are not intended to be limiting.
[0063] Microphone noise reduction technology: This is the noise reduction function in the microphone driver, which is designed to reduce or eliminate background noise to improve voice clarity and call quality. Noise reduction functions are generally divided into two main types: hardware noise reduction and software noise reduction.
[0064] Hardware noise reduction: This involves the design and construction of the microphone device itself. This includes: Dual microphone or array microphone: Using two or more microphones to capture sound, the target voice and background noise can be distinguished by comparing and analyzing the difference in the signals received by each microphone. Beamforming technology: The microphone array uses an algorithm to focus on the direction of the sound source, enhancing the target voice while suppressing noise from other directions. Noise suppression circuit: Some high-end microphones have built-in dedicated circuits that can analyze and reduce noise levels in real time.
[0065] Software noise reduction: This is implemented in the microphone driver or related audio processing software. This includes: Digital signal processing (DSP) algorithms: Use complex mathematical models to analyze audio signals, identify and separate noise components, and thus reduce or eliminate them. Machine learning and artificial intelligence (AI): In recent years, AI technology has been applied to noise reduction by training models to identify and filter out background noise while trying to preserve the natural texture of speech. Echo cancellation: In teleconferencing or VoIP applications, software can identify and eliminate echoes caused by speaker feedback.
[0066] Since the frequency of ultrasonic transmission is beyond the human senses, it is a data source that can be defined as noise for ordinary drivers. Therefore, there is a logical contradiction in the transmission of ultrasonic waves in audio signals. If noise reduction is not used, the use of the microphone and user experience will not meet the corresponding basic functions of the microphone; if the noise reduction mode is used, it will shield the corresponding ultrasonic wave band for ultrasonic transmission, which cannot meet the requirements of ultrasonic short-distance transmission.
[0067] Therefore, there is a need for an ultrasonic transmission method that is compatible with the transmission capabilities of ultrasonic and audio signals and does not require the use of additional ultrasonic transmission hardware, so as to reduce the cost burden of ultrasonic transmission.
[0068] In order to solve the above problems, the present disclosure provides a method for transmitting an ultrasonic signal. Figure 1 As shown, it includes: step S10: creating a monitoring service function; the monitoring service function is configured to monitor the audio signal collected by the audio device.
[0069] Step S11: creating a model of a virtual microphone; the virtual microphone is configured to collect an ultrasonic signal of a predetermined frequency from an audio signal, process the ultrasonic signal of the predetermined frequency, and convert it into a local downloadable address.
[0070] Step S12: Package the model of the virtual microphone and the monitoring service function in the form of an executable file, and implant it into the local server.
[0071] The audio device refers to a hardware device that transmits audio signals, such as a microphone. The audio signal can be the file address of a file containing any content sent by the sender in the all-in-one machine. Through the local downloadable address, the client can download and view the file containing any content. Creating a model for a virtual microphone includes designing the functions and characteristics of the virtual microphone and how it interacts with other components in the system.
[0072] In this embodiment, the model of the virtual microphone and the monitoring service function are packaged in the form of an executable file (exe), which becomes an executable program that can be run by double-clicking. The advantage of this is that there is no need to deploy the driver permanently. When it is needed, the program is started by external call, and soft start replaces manual plug-in and unplug. In addition, a LocalService (a local server running in the Windows system) is required for monitoring and running the virtual microphone.
[0073] The service capabilities of the above executable program when called mainly include collecting and processing ultrasonic signals of agreed frequencies in the audio signals collected by the hardware audio device; the goal is to use the sharing mode to analyze the collected content to correspond to the set whitelist area (non-noise reduction frequency area) and other areas (noise reduction frequency area). If the monitoring service function is not used, the ultrasonic content cannot be captured by the corresponding service, and the driving content of the virtual microphone cannot be turned on.
[0074] In this embodiment, by creating a model of a monitoring service function and a virtual microphone, it is possible to transmit ultrasonic signals through a virtual driving device and a virtual ultrasonic transmission device, so that the transmission of ultrasonic signals does not require the setting of ultrasonic transmission hardware devices, nor does it require the setting of driving devices for driving the hardware devices, thereby not only reducing the cost burden of ultrasonic transmission, but also being compatible with the ability to transmit ultrasonic signals and audio signals based on the current configuration of audio signal transmission. By packaging the model of the virtual microphone and the monitoring service function in the form of an executable file and implanting it into the local server, when ultrasonic signal transmission is required, the local server can directly call the executable file, thereby realizing the above-mentioned method of transmitting ultrasonic signals through the monitoring service function and the virtual microphone.
[0075] In some embodiments, step S11: creating a model of a virtual microphone includes: step S111: determining a device type of the virtual microphone so that the virtual bus can identify the virtual microphone.
[0076] In this step, for example, the device class code of the virtual microphone uses KSDATAFORMAT_SUBTYPE_PCM or KSDATAFORMAT_SUBTYPE_IEEE_FLOAT.
[0077] Step S112: Create a virtual plug-and-play function. The virtual microphone supports the plug-and-play function; the plug-and-play function is configured to process the insertion and removal events of the virtual microphone.
[0078] In this step, on the Windows platform of the local server, Microsoft's unified extensible driver framework (UMDF) can be used to create a virtual microphone device and support plug-and-play (PnP) functions. UMDF is a framework for developing user-mode drivers, which simplifies the development process of the driver and provides better stability, reliability and resource management. In this embodiment, a traceless driver for plug-and-play (PnP) device plug-in and unplugging of a virtual bus (PCI Express, PCIe) is used, i.e., a virtual plug-and-play device, which can be automatically identified and configured after the device is inserted into the computer without manual intervention. UMDF provides plug-and-play (PnP) functions to implement necessary callback functions to handle the insertion and removal events of the virtual microphone. The identification codes for the virtual bus to identify the insertion and removal events of the virtual microphone include: EvtDeviceAdd (addition of virtual microphone), EvtDevicePrepareHardware (preparation of virtual microphone), EvtDeviceReleaseHardware (removal of virtual microphone) and EvtDeviceD0Entry (opening of virtual microphone). The local server can turn on and off the virtual plug-and-play function.
[0079] Among them, the virtual bus (PCI Express, PCIe), also known as virtual PCIe or vPCIe, is a technology that simulates the physical PCI Express bus in a virtualized environment. In traditional computing architectures, the PCI Express bus is used to connect the CPU (central processing unit) and various expansion cards, such as graphics cards, network adapters, storage controllers, etc., to achieve high-speed data transmission. In a virtualized scenario, multiple virtual machines (VMs) share the resources of the same physical host, including CPU, memory, and I / O (input / output) devices. In order to improve the performance and efficiency of I / O devices, virtual bus technology was introduced to allow physical PCIe devices to be directly assigned to specific virtual machines. This process is usually called "passthrough" or "single root I / O virtualization" (SR-IOV). Passthrough: Passthrough technology allows a physical PCIe device to be directly connected to a virtual machine instead of going through the software I / O stack of the virtualization layer. The benefit of this is that it reduces virtualization overhead and improves device performance and responsiveness. However, this also means that the device will not be available to other virtual machines after passthrough. Single Root I / O Virtualization (SR-IOV): SR-IOV is a standard developed by PCI-SIG (PCI Special Interest Group) to allow physical PCIe devices to be shared between multiple virtual machines. By creating multiple virtual functions (VFs) on a physical device, each virtual function can be independently assigned to a different virtual machine, while retaining one physical function (PF) for management purposes. This provides better resource sharing and isolation while maintaining close to pass-through performance.
[0080] Virtual bus (PCIe) technology is particularly useful in data center and cloud computing environments because it can significantly improve the performance of I / O intensive applications such as database servers, high performance computing (HPC), and graphics processing unit (GPU) accelerated computing. However, the use of virtual bus (PCIe) also brings some challenges, such as device compatibility, virtual machine management complexity, and potential security risks. Therefore, careful planning and configuration are required during implementation to ensure the stability and security of the system. In this embodiment, the virtual bus is mainly used to bind the virtual hardware in the Windows system on the PC side to meet the ultrasonic signal transmission solution.
[0081] Step S113: Create a power management function; the power management function is configured to handle the behavior of the virtual microphone in different power states.
[0082] In this step, power management is implemented, that is, the EvtDeviceDx series of functions are implemented to handle whether the virtual microphone needs to continue to be driven when the power is dormant, locked, or sleeping; and the start, stop, and buffer filling of the audio data stream are implemented.
[0083] In some embodiments, the data format of the audio signal in the virtual microphone and the audio device is the same. In this way, when the virtual microphone collects the ultrasonic signal of the agreed frequency from the audio signal and processes it, it can avoid interference with other audio signal processing in the audio device.
[0084] The present disclosure also provides a method for transmitting an ultrasonic signal. Figure 2a As shown, it includes: Step S20: monitoring the audio signal collected by the audio device.
[0085] Step S21: collecting an ultrasonic signal of a predetermined frequency from an audio signal, processing the ultrasonic signal of the predetermined frequency, and converting it into a local downloadable address.
[0086] In this embodiment, step S20-step S21 is to start the packaged executable file after completing the processing and operation of step S10-step S12 to hijack the current sound card, and then use the virtual microphone to complete the collection of ultrasonic signals of the agreed frequency from the audio signal, process the ultrasonic signals of the agreed frequency, and convert them into a local downloadable address to complete the overall process of ultrasonic signal transmission.
[0087] In some embodiments, Figure 2b As shown, step S21 includes: step S211: creating a management instance of an audio signal and initializing the audio device to a sharing mode.
[0088] The sharing mode is that while the audio signal collected by the audio device is being monitored, other applications can use the audio device.
[0089] In this step, the non-exclusive mode of WASAPI (Windows Audio Session API, an audio processing framework developed by Microsoft) is used. In Windows system, WASAPI (Windows Audio Session API) provides two audio capture modes: shared mode and exclusive mode. Among them, shared mode allows other applications to use the audio device at the same time without being blocked or interrupted. Shared mode is very useful for monitoring audio device input without interfering with other running applications.
[0090] In this step, the WASAPI client is initialized: an IAudioClient (an object used to manage audio data streams) instance is created and set to shared mode using the initialization method. The shared mode allows other applications to use the audio device while monitoring the audio signals collected by the audio device.
[0091] Step S212: configuring the data format of the audio signal.
[0092] In this step, a suitable WAVEFORMATEX structure (a data structure used to describe the audio data format, which defines the basic parameters of the audio data) is set to ensure that the audio signal has a sufficient sampling rate and an appropriate bit depth when it is collected. In this embodiment, the data format of the audio signal includes: the sampling rate of the audio device collecting the audio signal is at least 48kHz, and the bit depth is at least 16 bits.
[0093] Step S213: obtaining the buffer of the audio device by a method for obtaining a buffer so as to write the audio signal into the buffer of the audio device, and then releasing the buffer of the audio device by a method for releasing a buffer so as to obtain the audio signal.
[0094] In this step, the GetBuffer method of the IAudioRenderClient interface (an important interface in the Windows Audio Session API, mainly used to control the rendering process of audio data) is used to obtain the data in the audio buffer, and then the ReleaseBuffer method is used to release the buffer.
[0095] Step S214: Convert the audio signal from a byte stream into a sample array.
[0096] In this step, the type of the sample array is short or float.
[0097] Step S215: Perform spectrum analysis on the audio signal of the sample array to determine whether there is an ultrasonic signal of a predetermined frequency.
[0098] In this step, a conventional spectrum analysis method is used, such as using FFT (Fast Fourier Transform) to perform spectrum analysis on the audio data to confirm whether an ultrasonic signal of a predetermined frequency exists. In this embodiment, the ultrasonic signal of a predetermined frequency is a continuous sine wave signal with a frequency range of 40 to 48 kHz.
[0099] Step S216: When it is determined that there is an ultrasonic signal of the agreed frequency, access the audio device, filter the ultrasonic signal of the agreed frequency, retain the agreed frequency portion of the ultrasonic signal, and ignore the non-agreed frequency portion of the ultrasonic signal.
[0100] In this step, digital signal processing (DSP) technology, such as a bandpass filter, is applied to retain only the frequency components of 40 to 48 kHz while ignoring other frequency components to avoid the side effects of the noise reduction process.
[0101] In this embodiment, in the process of monitoring the audio signal collected by the audio device, the frequency agreement can be completed through protocol agreement or other business forms. Here, there is no need to perform corresponding frequency screening, but directly process the ultrasonic signal of the agreed frequency in a non-exclusive mode, retaining the driving function of the original audio device, that is, retaining the driving function of the original sound card. On the basis of creating WASAPI, on the one hand, it is only necessary to access the driver of the original audio device, keep the bit depth and number of channels the same as the default settings of the original sound card driver, so as to avoid interfering with the driving function of the original audio device; on the other hand, convert the audio data from a byte stream into a sample array (such as a short or float type); then, apply digital signal processing (DSP) technology, such as a bandpass filter, to retain only the frequency components of 40 to 48 kHz, while ignoring other frequency components to avoid the side effects of noise reduction processing.
[0102] Step S217: Convert the agreed frequency portion of the ultrasonic signal into a local downloadable address.
[0103] In some embodiments, Figure 2a As shown, before step S20: monitoring the audio signal collected by the audio device, the method further includes: step S18: enabling a virtual plug-and-play function;
[0104] Step S19: Obtain the agreed frequency of the ultrasonic signal from the service server.
[0105] In some embodiments, the ultrasonic signal transmission method, such as Figure 3 As shown, it also includes: step S30: determining whether the virtual plug-and-play function receives an enable command;
[0106] If yes, then execute step S31: perform spectrum analysis on the audio signal of the sample array to determine whether there is an ultrasonic wave signal of the agreed frequency; if no, then end.
[0107] In this embodiment, the spectrum analysis of the audio signal can be completed by the SDK of other solutions. SDK is the process of integrating the software development kit into the project, which is designed to help developers quickly and conveniently create, test and deploy software applications; the steps of integrating SDK include: 1. Download and import SDK; 2. Configure project settings; 3. Call SDK interface; 4. Test and debug. SDK is a relatively mature technology, so I will not go into details here.
[0108] The ultrasonic signal transmission method provided by the embodiment of the present disclosure can realize the transmission of ultrasonic signals through virtual driving devices and virtual ultrasonic transmission devices by creating a model of a monitoring service function and a virtual microphone, so that the transmission of ultrasonic signals does not require the setting of ultrasonic transmission hardware devices, nor does it require the setting of driving devices for driving the hardware devices, thereby not only reducing the cost burden of ultrasonic transmission, but also being compatible with the ability to transmit ultrasonic signals and audio signals based on the current configuration of audio signal transmission. By packaging the model of the virtual microphone and the monitoring service function in the form of an executable file and implanting it into the local server, when ultrasonic signal transmission is required, the local server can directly call the executable file, thereby realizing the above-mentioned method of transmitting ultrasonic signals through the monitoring service function and the virtual microphone.
[0109] The present disclosure also provides an ultrasonic signal transmission device, such as Figure 4 As shown, it includes: a creation module 1, which is configured to create a model of a monitoring service function and a virtual microphone; the monitoring service function is configured to monitor the audio signal collected by the audio device; the virtual microphone is configured to collect an ultrasonic signal of a specified frequency from the audio signal, process the ultrasonic signal of the specified frequency, and convert it into a local downloadable address; an implantation module 2, which is configured to package the model of the virtual microphone and the monitoring service function in the form of an executable file, and implant it into the local server.
[0110] In some embodiments, the ultrasonic signal transmission device also includes: a monitoring module 3, configured to monitor the audio signal collected by the audio device; a virtual microphone 4, configured to collect the ultrasonic signal of the agreed frequency from the audio signal, process the ultrasonic signal of the agreed frequency, and convert it into a local downloadable address.
[0111] The ultrasonic signal transmission device provided in the embodiment of the present disclosure can realize the transmission of ultrasonic signals through a virtual driving device and a virtual ultrasonic transmission device by setting a creation module, so that the transmission of ultrasonic signals does not need to set up a hardware device for ultrasonic transmission, nor does it need to set up a driving device for driving the hardware device, thereby not only reducing the cost burden of ultrasonic transmission, but also being compatible with the ability to transmit ultrasonic signals and audio signals based on the current configuration of audio signal transmission. By setting an implantation module, when ultrasonic signal transmission is required, the local server can directly call the packaged executable file, thereby realizing the transmission of ultrasonic signals through the monitoring service function and the virtual microphone.
[0112] The embodiment of the present disclosure further provides a computer-readable storage medium having a program stored thereon, wherein when the program is executed, the steps in the method for transmitting an ultrasonic signal in the above embodiment are implemented.
[0113] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A method for transmitting an ultrasonic signal, characterized in that: include: Create a monitoring service function; The monitoring service function is configured to monitor the audio signal collected by the audio device; Create a model of a virtual microphone; The virtual microphone is configured to collect the ultrasonic signal of the predetermined frequency from the audio signal, process the ultrasonic signal of the predetermined frequency, and convert it into a local downloadable address; The model of the virtual microphone and the monitoring service function are packaged in the form of an executable file and implanted into a local server.
2. The method for transmitting ultrasonic signals according to claim 1, characterized in that: The step of creating a virtual microphone model comprises: Determining a device type of the virtual microphone so that the virtual bus can identify the virtual microphone; Create virtual plug-and-play functionality; The virtual microphone supports the plug-and-play function; the plug-and-play function is configured to handle insertion and removal events of the virtual microphone; A power management function is created; the power management function is configured to handle the behavior of the virtual microphone under different power states.
3. The method for transmitting ultrasonic signals according to claim 1, characterized in that: The data formats of the audio signals in the virtual microphone and the audio device are the same.
4. A method for transmitting an ultrasonic signal, characterized in that: include: Monitor the audio signals collected by the audio equipment; The ultrasonic signal of the predetermined frequency is collected from the audio signal, the ultrasonic signal of the predetermined frequency is processed, and the ultrasonic signal is converted into a local downloadable address.
5. The method for transmitting ultrasonic signals according to claim 4, characterized in that: The step of collecting the ultrasonic signal of the predetermined frequency from the audio signal, processing the ultrasonic signal of the predetermined frequency, and converting the ultrasonic signal into a local downloadable address includes: Creating a management instance of the audio signal and initializing the audio device to a sharing mode; The sharing mode is that other applications can use the audio device while monitoring the audio signal collected by the audio device; Configuring a data format of the audio signal; Acquire the buffer of the audio device by a buffer acquisition method to write the audio signal into the buffer of the audio device, and then release the buffer of the audio device by a buffer release method to acquire the audio signal; Converting the audio signal from a byte stream to a sample array; Performing spectrum analysis on the audio signal of the sample array to determine whether the ultrasonic signal of the predetermined frequency exists; When it is determined that the ultrasonic signal of the agreed frequency exists, accessing the audio device, filtering the ultrasonic signal of the agreed frequency, retaining the agreed frequency portion of the ultrasonic signal, and ignoring the non-agreed frequency portion of the ultrasonic signal; The agreed frequency portion of the ultrasonic signal is converted into a local downloadable address.
6. The method for transmitting ultrasonic signals according to claim 4, characterized in that: The ultrasonic signal of the predetermined frequency is a continuous sinusoidal wave signal with a frequency range of 40 to 48 kHz.
7. The method for transmitting ultrasonic signals according to claim 5, characterized in that: The data format of the audio signal includes: the sampling rate of the audio device for collecting the audio signal is at least 48 kHz, and the bit depth is at least 16 bits.
8. The method for transmitting ultrasonic signals according to claim 5, characterized in that: The type of the sample array is short type or float type.
9. The method for transmitting ultrasonic signals according to claim 5, characterized in that: The spectrum analysis includes Fast Fourier Transform.
10. The method for transmitting ultrasonic signals according to claim 5, characterized in that: Before monitoring the audio signal collected by the audio device, it also includes: Enable virtual plug-and-play function; The agreed frequency of the ultrasonic signal is obtained from the business service end.
11. The method for transmitting ultrasonic signals according to claim 10, characterized in that: Also includes: Determining whether the virtual plug-and-play function receives an enable command; If yes, performing spectrum analysis on the audio signal of the sample array to determine whether the ultrasonic signal of the predetermined frequency exists; If no, then end.
12. An ultrasonic signal transmission device, characterized in that: include: A creation module configured to create a model of a monitoring service function and a virtual microphone; The monitoring service function is configured to monitor the audio signal collected by the audio device; The virtual microphone is configured to collect the ultrasonic signal of the predetermined frequency from the audio signal, process the ultrasonic signal of the predetermined frequency, and convert it into a local downloadable address; The implantation module is configured to package the model of the virtual microphone and the monitoring service function in the form of an executable file, and implant it into the local server.
13. The ultrasonic signal transmission device according to claim 12, characterized in that: Also includes: A monitoring module, configured to monitor the audio signal collected by the audio device; The virtual microphone is configured to collect the ultrasonic signal of the agreed frequency from the audio signal, process the ultrasonic signal of the agreed frequency, and convert it into a local downloadable address.
14. A computer-readable storage medium having a program stored thereon, wherein: When the program is executed, the steps of the ultrasonic signal transmission method according to any one of claims 4 to 11 are implemented.