A Near-Field Communication Optimization Method in the Highway Engineering Environment
By using speakers to process audio data in highway projects and combining time stamp synchronization mechanism and audio prediction algorithm, the problem of inefficient near-field communication in confidential spaces such as tunnels is solved, and the accurate transmission and complete transmission of data are achieved.
Patent Information
- Application Number
- CN202510518519.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-04-24
AI Technical Summary
In highway projects, especially in confidential spaces such as tunnels, data transmission efficiency of near-field communication is inefficient and easy to lose packets, which cannot meet the needs of networking.
The speaker is used to process the audio data and use the time stamp synchronization mechanism and audio prediction algorithm, combined with the prediction frame and delay information adjustment, to achieve the precise transmission of audio data, and use Bluetooth devices to form a communication optimization group for data transmission.
It realizes accurate and efficient data transmission in near-field communication, exceeds the effective transmission range of traditional near-field communication, and ensures complete and error-free data transmission.
Smart Images

Figure CN120034903B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of highway engineering communication, and particularly to a method for optimizing near-field communication in a highway engineering environment. Background Art
[0002] In highway engineering, for near-field communication in secret-related spaces such as tunnels and air-raid shelters, data transmission is restricted. The engineering location and engineering distance do not meet the networking requirements in terms of hardware conditions, and the near-field communication distance leads to low data transmission efficiency and easy packet loss, resulting in poor data consistency. Summary of the Invention
[0003] The present invention provides a method for optimizing near-field communication in a highway engineering environment to solve the problems of the prior art.
[0004] In a first aspect, the present invention provides a method for optimizing near-field communication in a highway engineering environment, including:
[0005] In a tunnel with limited networking in a highway engineering environment, it includes:
[0006] A speaker processes audio data to the sending end;
[0007] The sending end outputs the audio data to two adjacent receiving ends;
[0008] The receiving end processes the audio data and plays it on the speaker;
[0009] Among them, one receiving end exchanges delay information with the sending end through a timestamp synchronization mechanism, and the speaker of the same receiving end adjusts the delay information according to its own delay and then plays the audio;
[0010] Among them, the other receiving end obtains predicted audio frames through an audio prediction algorithm, and the speaker of the same receiving end adjusts the predicted audio frames according to its own delay and then plays the audio.
[0011] Furthermore, every three near-field communication devices form a group of communication optimization groups. Among them, one sending end corresponds to two adjacent receiving ends. After one receiving end receives the audio data, it is converted into a sending end through a switching switch and sends the audio data to two adjacent receiving ends, and one receiving end is the initial sending end.
[0012] Furthermore, the other receiving end obtains predicted audio frames through an audio prediction algorithm, and the speaker of the same receiving end adjusts the predicted audio frames according to its own delay and then plays the audio, including:
[0013] Performing weighted linear combination on the received audio data to obtain an approximation of the current value, and the formula is as follows:
[0014]
[0015] in, a k are the predictor coefficients, determined by minimizing the squared difference between the actual audio data and the predicted samples;
[0016] : Indicates the predicted value of the current sampling point;
[0017] x [ n ]: represents the true value of the current sampling point;
[0018] x[n−k] : represents the true value of the k-th historical sampling point;
[0019] : represents the kth LPC coefficient, which is used to weight the historical sampling points;
[0020] e [ n ]: represents the prediction error, that is, the difference between the true value and the predicted value;
[0021] P : Indicates the order of the predictor, that is, the number of historical sampling points used to predict the current value.
[0022] Furthermore, the receiving end exchanges delay information with the transmitting end through a timestamp synchronization mechanism, and the speaker of the same receiving end processes the delay information and plays the audio after adjusting its own delay, including:
[0023] The receiving end receives the timestamp of the audio data packet synchronization package, parses the timestamp of the audio data packet and compares it with the local time of the near-field communication device where the receiving end is located to calculate the transmission delay of the audio data;
[0024] Perform data correction.
[0025] Furthermore, the data correction includes:
[0026] Based on the calculated delay, the buffer size of the audio data is dynamically adjusted, and the audio alignment algorithm is connected to synchronize the audio data.
[0027] Furthermore, the receiver periodically exchanges delay information with the transmitter and synchronously performs a timestamp calibration step periodically to adapt to the device's drift.
[0028] Furthermore, when the audio data packet transmits the data text synchronously, the display screen corresponding to the speaker performs text transcription, and the receiving end receives the transcribed text and corrects the audio data based on the transcribed text, specifically including:
[0029] Acoustic feature extraction: Call the Wav2Vec2 model to extract the acoustic features of audio data;
[0030] Generate frame-level label probabilities: Calculate the label category probabilities for each audio frame;
[0031] Generate a grid matrix: Create a matrix representing the probabilities of labels aligned at time steps;
[0032] Find the most likely path: Use a dynamic programming algorithm to find the most likely alignment path;
[0033] Merge segments into words: Merge segments into words and calculate the alignment time for each word;
[0034] Adjust the playback delay of the audio data in the audio data packet according to the alignment path, so that the audio data obtained by the speaker is aligned with the text on the display screen in time.
[0035] Furthermore, among them, the LPC order P Is determined by the number of formants, and one formant corresponds to a pair of poles.
[0036] Furthermore, when the switching switch makes the current receiving end become the transmitting end to transmit audio data outward, the original initial transmitting end becomes the receiving end and synchronously receives delay information or predicted audio frames;
[0037] When transmitting delay information, the receiving end where the original initial transmitting end is located eliminates the delay of the near-field communication device in the delay information, and then plays the audio after adjusting according to its own delay;
[0038] When transmitting predicted audio frames, the receiving end where the original initial transmitting end is located directly loads the adjusted data of the predicted audio frames and then plays the audio.
[0039] Furthermore, when each receiving end switching switch sends out the received audio data, the received delay information or predicted audio frames sent by the original transmitting end are consistent. Each group of communication optimization groups includes three near-field communication devices, including two cycles of delay information correction and one cycle of audio frame correction, or including one cycle of delay information correction and two cycles of audio frame correction.
[0040] In a second aspect, the present invention provides a near-field communication optimization system in a highway engineering environment, including at least one group of communication optimization groups. Each communication optimization group includes three near-field communication devices, and each near-field communication device includes a switching switch, a transmitting end that is also a receiving end, a display screen, a speaker, and an audio collector; Cooperate to implement any method in the first aspect;
[0041] Among them, the switching switch switches the transmitting end to the receiving end and switches the receiving end to the transmitting end;
[0042] Multiple communication optimization groups overlap with each other between adjacent near - field communication devices, and each near - field communication device forwards the audio data to the original sender for audio data verification.
[0043] A near - field communication optimization method in the highway engineering environment provided by the present invention uses prediction frames and timestamp synchronization technology to achieve accurate and efficient transmission of near - field data, and can transmit data information completely and correctly beyond the effective transmission range of one - to - one near - field communication.
[0044] The communication optimization group developed by the present invention reduces communication costs and speeds up the efficiency of highway engineering operations. Brief Description of the Drawings
[0045] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, form a part of the present invention, and do not limit the embodiments of the present invention. In the drawings:
[0046] Figure 1 It is a flowchart of a near - field communication optimization method in the highway engineering environment provided by an exemplary embodiment of the present invention.
[0047] Figure 2 It is a framework diagram of a near - field communication optimization system in the highway engineering environment provided by an exemplary embodiment of the present invention. Detailed Embodiments
[0048] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0049] First, the nouns involved in the present invention are explained:
[0050] Bluetooth is a short - range wireless communication technology that operates in the 2.4GHz ISM band and uses frequency - hopping spread - spectrum technology to enable short - range communication between devices. Bluetooth devices establish a paired relationship to achieve connection between devices. The pairing process includes steps such as device discovery, connection establishment, authentication, and encryption to ensure the security and reliability of communication.
[0051] In a two - way Bluetooth connection, each device is equipped with a microphone and a speaker. When one party speaks, the microphone converts the sound signal into an electrical signal, and then through an analog - to - digital converter (ADC), it is converted into a digital signal.
[0052] The digital signal is preprocessed by a signal processing module, such as denoising, gain control, etc., to improve the voice quality. Then, the signal is encoded by an audio codec (such as SBC, AAC, etc.) in the Bluetooth protocol stack, and the digital signal is compressed into a format suitable for wireless transmission.
[0053] However, due to the Bluetooth connection efficiency and connection order problems in near-field communication, the transmitted data is inconsistent, and it is easy to lose packets and the Bluetooth connection is lost. This is because in the position environment with poor communication signals and without the basic equipment conditions for implementing the Internet. Therefore, it is considered to perform sorting on Bluetooth interconnection through near-field Bluetooth communication plus data processing, and then transmit the data signal, so that each Bluetooth sub-device is a near-field "gateway" and transmits data as a data hub.
[0054] An optimization method for near-field communication in a highway engineering environment provided by the present invention aims to solve the above technical problems in the prior art.
[0055] The technical solution of the present invention and how the technical solution of the present invention solves the above technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below with reference to the accompanying drawings.
[0056] Embodiment 1:
[0057] This embodiment provides an optimization method for near-field communication in a highway engineering environment. In a network-constrained tunnel in a highway engineering environment, it specifically includes the following steps, as Figure 1 shown:
[0058] Step a: The speaker processes the audio data to the sending end;
[0059] Step b: The sending end outputs the audio data to two adjacent receiving ends;
[0060] Step c1: One receiving end exchanges delay information with the sending end through a timestamp synchronization mechanism, and the speaker of the same receiving end adjusts and plays the audio according to its own delay after processing the delay information;
[0061] Step c2: The other receiving end obtains the predicted audio frame through an audio prediction algorithm, and the speaker of the same receiving end adjusts and plays the predicted audio frame according to its own delay after processing it;
[0062] Step d: After receiving the audio data, one receiving end is converted into a sending end through a switch and sends the audio data to two adjacent receiving ends, where one receiving end is the initial sending end;
[0063] Step e: Repeat steps c1, c2, and d until all receiving ends receive the audio data.
[0064] In step c2, LPC is used to determine the predictor coefficient by minimizing the prediction error, and the audio sample data is predicted. The predictor coefficient is solved by using the Yule-Walker equation based on the autocorrelation function of the audio signal. The Levinson-Durbin algorithm is used to solve the Yule-Walker equation. The specific example is as follows:
[0065] Read an audio file:
[0066] Use MATLAB's audioread function to read the audio file.
[0067] Converts audio signals to mono for processing
[0068] Windowing:
[0069] Perform windowing on the audio signal to reduce spectral leakage.
[0070] Window the audio frame using a Hamming window or other window function.
[0071] Calculate the LPC coefficients:
[0072] Use MATLAB's lpc function to calculate the LPC coefficients. The basic syntax of the lpc function is lpc(x, p), where x is the input signal, P is the order of the predictor.
[0073] The choice of predictor order has a significant impact on the prediction results and usually needs to be adjusted according to the specific application.
[0074] Generation of prediction signal:
[0075] The calculated LPC coefficients are used to generate a prediction signal through a filter.
[0076] Use the filter function to generate prediction signals.
[0077] Calculation of prediction error:
[0078] The difference between the original audio signal and the predicted signal is calculated to obtain the prediction error.
[0079] The prediction error can be used to evaluate the performance of the predictor.
[0080] The code example is as follows:
[0081] [x, fs] = audioread('1.wav'); % Read audio file
[0082] x1 = x(:,1); % Convert to mono
[0083] n = 200; % Frame length
[0084] p0 = 50; % Overlap length
[0085] xx = buffer(x1, n, p0); % Frame processing
[0086] m = 8; % Select the 8th frame
[0087] y = xx((m-1)*n+1:m*n); % Extract one frame of data
[0088] p = 12; % Predictor order
[0089] ar = lpc(y, p); % Calculate LPC coefficients
[0090] est_x = filter([0 -ar(2:end)],1, y); % Generate predicted signal
[0091] err = y - est_x; % Calculate prediction error
[0092] % Plot the results
[0093] figure;
[0094] plot(x1);
[0095] title('Original signal');
[0096] figure;
[0097] subplot(2,2,1);
[0098] plot(y, 'r');
[0099] title('Original one frame');
[0100] subplot(2,2,2);
[0101] plot(est_x);
[0102] title('One frame predicted by LPC');
[0103] subplot(2,2,3);
[0104] plot(err, 'r');
[0105] title('Residual Signal');
[0106] As Figure 2 shown, in the second embodiment, a system is provided to implement multiple method operations as in the first embodiment. Specifically, inside a section of mountain, five near-field communication devices with relatively large distances between them are provided. The five near-field communication devices are divided into three communication optimization groups, and each communication optimization group includes three adjacent near-field communication devices. Each near-field communication device includes a switch, a transmitting and receiving end, a display screen, a speaker, and an audio collector. Since network communication is poor in the mountain, near-field communication devices are used for data transmission. It can be seen that dotted-line exchange prediction audio frames are performed between every other near-field communication device, and exchange delay information is also performed between every other near-field communication device to achieve near-field low-latency communication. This latency is lower than human sensing, so it is equivalent to no latency. For the original near-field communication, between two non-adjacent near-field communication devices with a relatively large distance, due to factors such as latency, electromagnetic shielding, and interference, the effects of this invention cannot be achieved. Among them, the switch switches the transmitting end to the receiving end and the receiving end to the transmitting end.
[0107] In several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0108] The modules described as separate components may or may not be physically separated. The components shown as modules may or may not be physical modules, that is, they can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, in each embodiment of the present invention, the functional modules can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.
[0110] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method or a system. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects.
[0111] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising the element.
[0112] The above are only embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the scope of the claims of the present invention.
[0113] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include known common knowledge or conventional technical means in the technical field not disclosed by the present invention. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present invention are pointed out by the claims above.
[0114] It should be understood that the present invention is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present invention is only limited by the appended claims.
Claims
1. A near field communication optimization method in a highway engineering environment, characterized in that: In networked, constrained tunnels in highway engineering environments, including: The speaker processes the audio data and sends it to the transmitter; The sending end outputs audio data to two adjacent receiving ends; The receiving end processes the audio data and plays it on the speaker; Among them, a receiving end exchanges delay information with the sending end through a timestamp synchronization mechanism. The speaker at the same receiving end processes the delay information and plays the audio according to its own delay adjustment. The receiving end receives the timestamp of the audio data packet, parses the timestamp of the audio data packet and compares it with the local time of the near-field communication device where the receiving end is located to calculate the transmission delay of the audio data; and performs data correction; Among them, every three near-field communication devices form a communication optimization group, in which one transmitter corresponds to two adjacent receivers. After receiving the audio data, one of the receivers switches to become a transmitter and sends the audio data to the two adjacent receivers, one of which is the initial transmitter. The other receiving end obtains a predicted audio frame through an audio prediction algorithm. The speaker at the same receiving end processes the predicted audio frame and plays the audio after adjusting its own delay, including: Perform a weighted linear combination of the received audio data to obtain the approximate current value. The formula is as follows: in, a k are the predictor coefficients, determined by minimizing the squared difference between the actual audio data and the predicted samples; : Indicates the predicted value of the current sampling point; x [ n ]: represents the true value of the current sampling point; x[n−k] : represents the true value of the kth historical sampling point; : represents the kth LPC coefficient, which is used to weight the historical sampling points; e [ n ]: represents the prediction error, that is, the difference between the true value and the predicted value; P : Indicates the order of the predictor, that is, the number of historical sampling points used to predict the current value.
2. The near field communication optimization method in a highway engineering environment according to claim 1, characterized in that: The data correction comprises: Based on the calculated delay, the buffer size of the audio data is dynamically adjusted, and the audio alignment algorithm is connected to synchronize the audio data.
3. The near field communication optimization method in a highway engineering environment according to claim 1, characterized in that: The receiver periodically exchanges delay information with the sender and synchronously performs timestamp calibration steps periodically.
4. The near field communication optimization method in a highway engineering environment according to claim 2, characterized in that: When the audio data packet is synchronously transmitting the data text, the display screen corresponding to the speaker performs text transcription. The receiving end receives the transcribed text and corrects the audio data based on the transcribed text, specifically including: Acoustic feature extraction: Call the Wav2Vec2 model to extract the acoustic features of audio data; Generate frame-level label probabilities: Calculate the label category probability for each audio frame; Generate Grid Matrix: Create a matrix representing the probability of labels being aligned at time steps; Find the most likely path: Use a dynamic programming algorithm to find the most likely alignment path; Merge segments into words: Merge segments into words and calculate the alignment time for each word; The playback delay of the audio data in the audio data packet is adjusted according to the alignment path, so that the audio data acquired from the speaker is aligned in time with the text on the display screen.
5. The near field communication optimization method in a highway engineering environment according to claim 1, characterized in that: in, LPC order P It is determined by the number of resonance peaks, where one resonance peak corresponds to a pair of poles.
6. The near field communication optimization method in a highway engineering environment according to claim 1, characterized in that: When the switch is switched from the current receiving end to the sending end to transmit audio data outward, the original initial sending end becomes the receiving end and synchronously receives the delay information or the predicted audio frame; When the delay information is sent, the receiving end where the original sending end is located removes the delay of the near-field communication device from the delay information, and then plays the audio after adjusting it according to its own delay; When the audio frame is predicted, the receiving end where the original sending end is located directly loads the adjusted data of the predicted audio frame and then plays the audio.
7. The near field communication optimization method in a highway engineering environment according to claim 6, characterized in that: When each receiving end switches the switch to send out the received audio data, the received delay information or predicted audio frame is consistent with the original sending end. Each group of three near-field communication devices in the communication optimization group includes two cycles of delay information correction and one cycle of audio frame correction, or one cycle of delay information correction and two cycles of audio frame correction.
Citation Information
Patent Citations
Power distribution network area global time synchronization method based on power line converged communication technology
CN118611811A