Music melody generation method and system based on pavement groove setting

By laying a series of grooves on the road surface and combining them with an onboard sensor system to generate music, the controllability of the relationship between the grooves and the encoding of musical elements is solved, achieving stable beats and clear timbre output at dynamic vehicle speeds, thus enhancing the artistic value of road music generation and the driving experience.

CN121768337AInactive Publication Date: 2026-03-31JIANGSU WEIXIN ENG CONSULTING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-31
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies have failed to establish a controllable, designable, and predictable coding relationship between groove geometry parameters and basic musical elements, making roads unusable as an active medium for music composition. Vehicle speed affects the groove excitation frequency and duration, and traditional methods cannot maintain a stable beat structure under dynamic vehicle speeds, resulting in auditory confusion.

Method used

A sequence of grooves is laid out on the road surface according to a preset road music score coding rule. The spacing, depth and width of the grooves correspond to the note value, pitch and dynamics, respectively. The vehicle-mounted sensing system obtains real-time information of the vehicle passing through the grooves, calculates the tire excitation frequency, and generates a synthesized audio signal based on the target pitch and vibration signal. The synthesized audio signal is then integrated into a structured music event stream to output audible music.

Benefits of technology

It enables the output of audible music with unified tone, stable rhythm, and clear timbre under different vehicle speeds and construction error conditions, supports artists to participate in road music composition, and enhances the immersiveness and enjoyment of the driving experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121768337A_ABST
    Figure CN121768337A_ABST
Patent Text Reader

Abstract

The invention discloses a music melody generation method and system based on pavement groove setting, and relates to the technical field of music melody generation, and the method comprises the steps: laying a groove sequence on the surface of a road according to a preset road music score coding rule, according to the road music score coding rule, the spacing, depth and width of the groove are respectively corresponding to the time value, pitch and strength of a note; the real-time vehicle speed when the vehicle passes through the groove sequence and the passing time between the adjacent grooves are obtained through a vehicle-mounted sensing system, and the actual distance between the adjacent grooves is calculated according to the passing time and the real-time vehicle speed; the original frequency generated by tire excitation is determined according to the actual distance and the real-time vehicle speed; mapping the original frequency to an adaptive discrete standard musical scale according to the statistical distribution characteristics of the groove spacing of the current road section, and generating a target pitch; and collecting a vibration signal generated in the contact process of the tire and the groove, and carrying out fundamental frequency extraction, overtone reconstruction and phase alignment on the vibration signal based on the target pitch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of music melody generation technology, and in particular to a method and system for generating music melody based on road surface trenches. Background Technology

[0002] Music melody generation technology refers to a technical system that automatically transforms non-audio input signals (in this case, the physical structure of road trenches and vehicle dynamics response) into audible melodies with clear pitch sequences, rhythmic structures, dynamic variations, and tonality characteristics through steps such as perception, modeling, mapping, and synthesis.

[0003] Existing technologies have not established a controllable, designable, and predictable coding relationship between groove geometry parameters and basic musical elements, making it impossible to use the road as the active medium for music composition. Furthermore, vehicle speed directly affects the groove excitation frequency and duration. Traditional methods cannot maintain a stable beat structure under dynamic vehicle speeds, resulting in auditory confusion that is either too fast or too slow, thus losing the ability to express music. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a method for generating musical melodies based on road surface groove settings. This solves the problem that existing technologies have not established a controllable, designable, and predictable coding relationship between groove geometric parameters and basic musical elements, making it impossible to use the road as the active medium for music composition. Furthermore, vehicle speed directly affects the groove excitation frequency and duration, and traditional methods cannot maintain a stable beat structure under dynamic vehicle speeds, resulting in auditory confusion that is either too fast or too slow, thus losing the ability to express music.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0007] In a first aspect, the present invention provides a method for generating musical melodies based on road surface trenches, comprising:

[0008] A sequence of grooves is laid out on the road surface according to a preset road musical score coding rule, wherein the spacing, depth and width of the grooves correspond to the duration, pitch and dynamics of a musical note, respectively.

[0009] The vehicle's real-time speed and the time taken to pass between adjacent ditches are obtained by the vehicle-mounted sensing system as the vehicle passes through the ditches. The actual distance between adjacent ditches is calculated based on the time taken to pass and the real-time speed.

[0010] The original frequency generated by tire excitation is determined based on the actual distance and real-time vehicle speed.

[0011] The original frequency is mapped to a suitable discrete standard pitch based on the statistical distribution characteristics of the current road section trench spacing to generate the target pitch.

[0012] Vibration signals generated during the contact between the tire and the groove are collected, and the fundamental frequency is extracted, overtones are reconstructed and phase is aligned based on the target pitch to generate a synthesized audio signal with a clear pitch.

[0013] The target pitch, rhythmic values ​​derived from the actual pitch, and processed amplitude information are integrated into a structured music event stream, and then audible music is output through the in-vehicle audio rendering unit.

[0014] As a preferred embodiment of the music melody generation method based on road surface grooves described in this invention, the specific steps of arranging a groove sequence on the road surface according to a preset road music score encoding rule are as follows:

[0015] Obtain the note sequence of the target melody, where each note contains pitch, duration, and dynamics information;

[0016] Set reference speed Used to standardize trench design dimensions;

[0017] The first The duration of each note is converted into groove spacing. Satisfying the relation:

[0018] ;

[0019] in, Indicates the first The duration of each note;

[0020] Establish a monotonic mapping function from pitch to groove depth, and assign the first... The pitch number of each note Convert to trench depth ;

[0021] Establish a positive correlation mapping function from force to groove width, and then... The dynamic level of each note Convert to trench width ;

[0022] Based on the calculation , , Physical trenches are laid out sequentially along the vehicle's direction of travel to form a trench sequence that corresponds one-to-one with the target melody.

[0023] Among them, the reference vehicle speed The preset benchmark driving speed during the design phase is used to ensure that the rhythm and timing of groove excitation are consistent at standard vehicle speeds.

[0024] As a preferred embodiment of the music melody generation method based on road surface ditch settings described in this invention, the steps of acquiring the real-time vehicle speed and the passage time between adjacent ditches through an onboard sensing system, and calculating the actual distance between adjacent ditches based on the passage time and real-time vehicle speed, are as follows:

[0025] The vehicle's current speed is output in real time using wheel speed sensors. ;

[0026] The vibration detection unit installed on the vehicle chassis records the tire's passage through the [missing information - likely a number of steps]. The moment of the groove and after the first The moment of the groove ;

[0027] Calculate the transit time of adjacent trenches ;

[0028] Based on real-time vehicle speed With time Calculate the actual trench spacing

[0029] ;

[0030] in, Indicates the first The first groove and the first The measured physical distance between the grooves;

[0031] The real-time vehicle speed The transit time is provided by the vehicle dynamics system. The time measurement accuracy is ensured by triggering the zero-crossing point or peak value of the vibration signal.

[0032] As a preferred embodiment of the music melody generation method based on road surface ditch settings described in this invention, the specific steps for mapping the original frequency to a suitable discrete standard scale based on the statistical distribution characteristics of the current road segment ditch spacing to generate the target pitch are as follows:

[0033] Select a sliding window centered on the current trench, including continuous Actual trench spacing ;

[0034] Calculate the arithmetic mean of the groove spacing within the window. with standard deviation ;

[0035] Calculate the coefficient of variation It is used to characterize the regularity of the trench arrangement;

[0036] according to and Search the preset key template library to find the closest musical key. The mode template library includes three basic modes: pentatonic scale, natural major, and natural minor, and their corresponding interval structures.

[0037] The original excitation frequency is calculated using the following expression:

[0038] ;

[0039] in, This represents the unprocessed fundamental frequency excited by the physical trench;

[0040] Will Map to the selected key The most recent standard pitch frequency ,satisfy:

[0041] ;

[0042] in, Indicates mode The corresponding set of standard pitches.

[0043] As a preferred embodiment of the music melody generation method based on road surface grooves described in this invention, the steps of collecting vibration signals generated during the contact between the tire and the groove, and extracting the fundamental frequency, reconstructing overtones, and aligning the phase of the vibration signals based on the target pitch to generate a synthesized audio signal with a clear pitch are as follows:

[0044] Time-domain vibration signals generated by tire-groove impact are collected using an onboard accelerometer. ;

[0045] right Perform a short-time Fourier transform to obtain the time spectrum. ;

[0046] With target pitch frequency Centered on, in the frequency domain range The maximum peak value of the internal search energy is used to determine the actual fundamental frequency estimate. ;

[0047] The synthetic harmonic signal is constructed as follows:

[0048] ;

[0049] in The overtone number, with values ​​ranging from 3 to 6. For the first The amplitude of the overtone is determined by the time spectrum. The energy at the corresponding frequency is determined after normalization. For the first The phase of the first-order overtones is corrected by linearly fitting the instantaneous phase of each component within a short time window to ensure phase consistency of the harmonic structure.

[0050] Output As an enhanced synthesized audio signal, it is used to improve the purity and recognizability of the timbre.

[0051] As a preferred embodiment of the music melody generation method based on road surface grooves described in this invention, the steps of integrating the target pitch, the rhythmic duration derived from the actual spacing, and the processed amplitude information into a structured music event stream, and outputting audible music through an in-vehicle audio rendering unit, are as follows:

[0052] target pitch Convert to MIDI note number ,satisfy:

[0053] ;

[0054] in, The MIDI number corresponding to standard pitch A4 (440 Hz);

[0055] Actual trench spacing With real-time vehicle speed Combine and calculate the duration of the note. ;

[0056] trench depth With trench width Integrate into a comprehensive strength parameter , expressed as

[0057] ;

[0058] in, and These are preset weighting coefficients used to balance the contributions of depth and width to sound intensity;

[0059] Organize triplets in chronological order This forms a structured data stream that conforms to a common music event format;

[0060] The structured data stream is input into the in-vehicle digital audio synthesizer, which drives the generation of waveforms corresponding to the instrument timbre, and plays listenable music in real time through the in-vehicle audio system.

[0061] The in-vehicle digital audio synthesizer supports multiple timbre switching, allowing users to select different timbres such as piano, strings, or percussion to match the style of the road music.

[0062] As a preferred embodiment of the music melody generation method based on road surface grooves described in this invention, the structured music event stream incorporates a rhythm quantization mechanism during generation to maintain overall beat stability. The specific steps are as follows:

[0063] Set the baseline cycle time for the current road segment;

[0064] The calculated note duration Perform a beat grid alignment operation, mapping it to the nearest beat score multiple. ,Right now

[0065] ;

[0066] in, The granularity of the beat is set to 4, 8, or 16, which correspond to the quantization precision of a quarter note, an eighth note, or a sixteenth note, respectively.

[0067] Use quantified Replace the original Participate in the construction of structured music event streams.

[0068] Secondly, the present invention provides a music melody generation system based on road surface trenches, comprising:

[0069] The system includes a road music encoding module, a trench spacing sensing module, a raw frequency calculation module, a pitch adaptive mapping module, a harmonic enhancement synthesis module, and a structured audio output module.

[0070] The road music encoding module is used to lay out a groove sequence on the road surface according to preset rules, and to map the note value, pitch and dynamics of the target melody to the spacing, depth and width of the grooves, respectively, to form a physically triggerable music carrier.

[0071] The trench spacing sensing module is used to obtain the real-time vehicle speed and the passage time between adjacent trenches when the vehicle passes through the trench sequence through the vehicle-mounted sensing system, and to calculate the actual physical distance between adjacent trenches based on the passage time and the real-time vehicle speed.

[0072] The original frequency calculation module is used to determine the original excitation frequency generated by the interaction between the tire and the groove based on the actual distance and the real-time vehicle speed.

[0073] The adaptive pitch mapping module is used to identify the appropriate music mode based on the statistical distribution characteristics of the current road section trench spacing, and map the original frequency to the discrete standard pitch corresponding to the mode to generate a target pitch that meets the aesthetic requirements of hearing.

[0074] The harmonic enhancement synthesis module is used to collect the vibration signal generated by the tire-groove contact, and, guided by the target pitch, perform fundamental frequency extraction, multi-order overtone reconstruction and phase alignment processing to generate a synthesized audio signal with clear pitch and stable timbre.

[0075] The structured audio output module is used to integrate the target pitch, the rhythmic value derived from the actual spacing, and the processed amplitude information into a structured music event stream, and output audible music with melody and rhythm in real time through the vehicle-mounted audio rendering unit.

[0076] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the music melody generation method based on road surface trench settings as described in the first aspect of the present invention.

[0077] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the music melody generation method based on road surface trench settings as described in the first aspect of the present invention.

[0078] The beneficial effects of this invention are as follows: By systematically mapping the physical parameters of road trenches with musical semantic elements, the transformation from a passive road surface structure to an active music generation medium is realized. This not only solves the problems of chaotic and disordered sound production and lack of melody in traditional trenches, but also ensures that audible music with unified tonality, stable rhythm, and clear timbre can still be output under different vehicle speeds and construction error conditions through techniques such as scale adaptive mapping, harmonic enhancement synthesis, and rhythm quantization. At the same time, the method supports artists to participate in road music composition, endowing traffic infrastructure with cultural expression and artistic value, and effectively improving the immersiveness and enjoyment of the driving experience. Attached Figure Description

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

[0080] Figure 1 A flowchart of a method for generating music melodies based on road surface grooves. Detailed Implementation

[0081] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0082] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0083] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0084] Reference Figure 1 As one embodiment of the present invention, this embodiment provides a method for generating music melodies based on road surface trenches, including the following steps:

[0085] S1. A series of grooves are laid out on the road surface according to a preset road musical score coding rule. The road musical score coding rule corresponds the spacing, depth and width of the grooves to the note value, pitch and dynamics, respectively.

[0086] Furthermore, obtain the note sequence of the target melody, where each note contains pitch, duration, and dynamics information;

[0087] Set reference speed Used to standardize trench design dimensions;

[0088] The first The duration of each note is converted into groove spacing. Satisfying the relation:

[0089] ;

[0090] in, Indicates the first The duration of each note;

[0091] Establish a monotonic mapping function from pitch to groove depth, and assign the first... The pitch number of each note Convert to trench depth ;

[0092] Establish a positive correlation mapping function from force to groove width, and then... The dynamic level of each note Convert to trench width ;

[0093] Based on the calculation , , Physical trenches are laid out sequentially along the vehicle's direction of travel to form a trench sequence that corresponds one-to-one with the target melody.

[0094] Among them, reference speed The preset benchmark driving speed during the design phase is used to ensure that the rhythm and timing of groove excitation are consistent at standard vehicle speeds.

[0095] It should be noted that by mapping the note values, pitches, and dynamics of the target melody to the spacing, depth, and width of the grooves, and using a unified design scale based on reference vehicle speed, the road itself becomes a physical musical score that can be played by vehicles. This method achieves a precise transformation from abstract musical composition to physical road engineering, ensuring that the rhythms, pitches, and dynamics generated under standard driving conditions strictly correspond to the original melody, laying a structural foundation for subsequent high-quality music generation.

[0096] S2. Obtain the real-time vehicle speed and the passage time between adjacent ditches through the vehicle-mounted sensing system, and calculate the actual distance between adjacent ditches based on the passage time and real-time vehicle speed.

[0097] Furthermore, wheel speed sensors are used to output the vehicle's current speed in real time. ;

[0098] The vibration detection unit installed on the vehicle chassis records the tire's passage through the [missing information - likely a number of steps]. The moment of the groove and after the first The moment of the groove ;

[0099] Calculate the transit time of adjacent trenches ;

[0100] Based on real-time vehicle speed With time Calculate the actual trench spacing

[0101] ;

[0102] in, Indicates the first The first groove and the first The measured physical distance between the grooves;

[0103] Real-time vehicle speed Provided by the vehicle dynamics system, through time The time measurement accuracy is ensured by triggering the zero-crossing point or peak value of the vibration signal.

[0104] It should be noted that by using wheel speed sensors and vibration detection units to obtain real-time vehicle speed and trench passage time, the actual trench spacing can be accurately inverted, effectively overcoming perception deviations caused by construction errors, tire slippage, or positioning drift. This step provides reliable input for frequency calculation, ensuring the robustness and adaptability of the system in real road environments.

[0105] S3. Determine the original frequency generated by tire excitation based on the actual distance and real-time vehicle speed.

[0106] Furthermore, a sliding window centered on the current trench is selected, including continuous... Actual trench spacing ;

[0107] Calculate the arithmetic mean of the groove spacing within the window. with standard deviation ;

[0108] Calculate the coefficient of variation It is used to characterize the regularity of the trench arrangement;

[0109] according to and Search the preset key template library to find the closest musical key. The mode template library includes three basic modes: pentatonic scale, natural major, and natural minor, along with their corresponding interval structures.

[0110] The original excitation frequency is calculated using the following expression:

[0111] ;

[0112] in, This represents the unprocessed fundamental frequency excited by the physical trench.

[0113] It should be noted that by introducing a sliding window to statistically analyze the distribution of trench spacing and calculate the coefficient of variation, the generation of the original frequency not only depends on single-point measurement, but also integrates the overall layout characteristics of local road sections. This mechanism avoids the interference of isolated trench anomalies on frequency judgment, provides a stable basis for subsequent mode identification, and effectively improves the coherence and structure of melody generation.

[0114] S4. Map the original frequency to the appropriate discrete standard pitch based on the statistical distribution characteristics of the current road section trench spacing to generate the target pitch.

[0115] Furthermore, Map to the selected key The most recent standard pitch frequency ,satisfy:

[0116] ;

[0117] in, Indicates mode The corresponding set of standard pitches.

[0118] It should be noted that the original frequency is automatically matched to a standard scale set such as the pentatonic scale, natural major, or natural minor based on statistical characteristics, and pitch quantization is performed using the principle of minimizing logarithmic distance. This effectively solves the problem of inconsistency between the physical excitation frequency and the musical pitch system. This mapping mechanism ensures that the output melody has a clear tonality and auditory harmony, fundamentally distinguishing it from disordered noise.

[0119] S5. Collect the vibration signal generated during the contact between the tire and the groove, and extract the fundamental frequency, reconstruct the overtones and align the phase of the vibration signal based on the target pitch to generate a synthesized audio signal with a clear pitch.

[0120] Furthermore, time-domain vibration signals generated by tire-groove impact are collected using an onboard accelerometer. ;

[0121] right Perform a short-time Fourier transform to obtain the time spectrum. ;

[0122] With target pitch frequency Centered on, in the frequency domain range The maximum peak value of the internal search energy is used to determine the actual fundamental frequency estimate. ;

[0123] The synthetic harmonic signal is constructed as follows:

[0124] ;

[0125] in The overtone number, with values ​​ranging from 3 to 6. For the first The amplitude of the overtone is determined by the time spectrum. The energy at the corresponding frequency is determined after normalization. For the first The phase of the first-order overtones is corrected by linearly fitting the instantaneous phase of each component within a short time window to ensure phase consistency of the harmonic structure.

[0126] Output As an enhanced synthesized audio signal, it is used to improve the purity and recognizability of the timbre.

[0127] It should be noted that the fundamental frequency of the original vibration signal is accurately located, multi-order overtones are reconstructed and phase consistency is corrected based on the target pitch guidance, which effectively improves the timbre purity and instrumental quality of the synthesized audio. Even when faced with ambiguous signals excited by non-uniform or rough grooves, it can still output clear and distinguishable musical tones, bridging the gap between physical roughness and auditory refinement.

[0128] S6 integrates the target pitch, rhythmic duration derived from the actual pitch, and processed amplitude information into a structured music event stream, and outputs audible music through the vehicle-mounted audio rendering unit.

[0129] Furthermore, the target pitch Convert to MIDI note number ,satisfy:

[0130] ;

[0131] in, The MIDI number corresponding to standard pitch A4 (440 Hz);

[0132] Actual trench spacing With real-time vehicle speed Combine and calculate the duration of the note. ;

[0133] trench depth With trench width Integrate into a comprehensive strength parameter , expressed as

[0134] ;

[0135] in, and These are preset weighting coefficients used to balance the contributions of depth and width to sound intensity;

[0136] Organize triplets in chronological order This forms a structured data stream that conforms to a common music event format;

[0137] The structured data stream is input into the in-vehicle digital audio synthesizer, which drives the generation of waveforms corresponding to the instrument timbre, and plays listenable music in real time through the in-vehicle audio system.

[0138] The in-vehicle digital audio synthesizer supports multi-timbre switching, allowing users to select different timbres such as piano, strings, or percussion to match the style of the road music.

[0139] The structured music event stream incorporates a rhythm quantization mechanism during its generation process to maintain overall beat stability. The specific steps are as follows:

[0140] Set the baseline cycle time for the current road segment;

[0141] The calculated note duration Perform a beat grid alignment operation, mapping it to the nearest beat score multiple. ,Right now

[0142] ;

[0143] in, The granularity of the beat is set to 4, 8, or 16, which correspond to the quantization precision of a quarter note, an eighth note, or a sixteenth note, respectively.

[0144] Use quantified Replace the original Participate in the construction of structured music event streams.

[0145] It should be noted that by organizing the target pitch, rhythmic duration, and comprehensive dynamic parameters into a structured music event stream and introducing a beat grid quantization mechanism, the rhythm instability caused by vehicle speed fluctuations is effectively suppressed. At the same time, it supports MIDI standard output and multi-tone rendering, so that the music played in the end has melody, rhythmic movement, and artistic expression, truly realizing an immersive experience where the road is an instrument and driving is playing.

[0146] This embodiment also provides a music melody generation system based on road surface trenches, including:

[0147] The system includes a road music encoding module, a trench spacing sensing module, a raw frequency calculation module, a pitch adaptive mapping module, a harmonic enhancement synthesis module, and a structured audio output module.

[0148] The road music encoding module is used to lay out a series of grooves on the road surface according to preset rules, and to map the note values, pitches and dynamics of the target melody to the spacing, depth and width of the grooves, respectively, forming a physically triggerable music carrier.

[0149] The trench spacing sensing module is used to obtain the real-time vehicle speed and the passage time between adjacent trenches when the vehicle passes through the trench sequence through the vehicle-mounted sensing system, and to calculate the actual physical distance between adjacent trenches based on the passage time and the real-time vehicle speed.

[0150] The original frequency calculation module is used to determine the original excitation frequency generated by the interaction between the tire and the groove based on the actual distance and real-time vehicle speed.

[0151] The scale adaptive mapping module is used to identify the appropriate music mode based on the statistical distribution characteristics of the current road section ditch spacing, and map the original frequency to the discrete standard scale corresponding to the mode to generate the target pitch that meets the auditory aesthetic.

[0152] The harmonic enhancement synthesis module is used to collect vibration signals generated by tire-groove contact, and guided by the target pitch, it performs fundamental frequency extraction, multi-order overtone reconstruction and phase alignment processing to generate a synthesized audio signal with clear pitch and stable timbre.

[0153] The structured audio output module is used to integrate the target pitch, the rhythmic value derived from the actual spacing, and the processed amplitude information into a structured music event stream, and output audible music with melody and rhythm in real time through the vehicle audio rendering unit.

[0154] This embodiment also provides a computer device applicable to the method of generating music melody based on road surface grooves, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method of generating music melody based on road surface grooves as proposed in the above embodiment.

[0155] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0156] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the method for generating music melodies based on road surface trench settings as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0157] In summary, this invention systematically maps the physical parameters of road trenches to musical semantic elements, transforming them from passive road surface structures into active music generation media. This not only solves the problems of chaotic and unmelodic sound generation from traditional trenches, but also ensures, through techniques such as adaptive scale mapping, harmonic enhancement synthesis, and rhythm quantization, that audible music with unified tonality, stable rhythm, and clear timbre can still be output under different vehicle speeds and construction error conditions. Furthermore, the method supports artists' participation in road music composition, endowing transportation infrastructure with cultural expression and artistic value, effectively enhancing the immersive and enjoyable driving experience.

[0158] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for generating musical melodies based on road surface trenches, characterized in that: include: A sequence of grooves is laid out on the road surface according to a preset road musical score coding rule, wherein the spacing, depth and width of the grooves correspond to the duration, pitch and dynamics of a musical note, respectively. The vehicle's real-time speed and the time taken to pass between adjacent ditches are obtained by the vehicle-mounted sensing system when the vehicle passes through the ditches, and the actual distance between adjacent ditches is calculated based on the time taken to pass and the real-time speed. The original frequency generated by tire excitation is determined based on the actual distance and real-time vehicle speed. The original frequency is mapped to a suitable discrete standard pitch based on the statistical distribution characteristics of the current road section trench spacing to generate the target pitch. Vibration signals generated during the contact between the tire and the groove are collected, and the fundamental frequency is extracted, overtones are reconstructed and phase is aligned based on the target pitch to generate a synthesized audio signal with a clear pitch. The target pitch, rhythmic values ​​derived from the actual pitch, and processed amplitude information are integrated into a structured music event stream, and then audible music is output through the in-vehicle audio rendering unit.

2. The music melody generation method based on road surface trench settings as described in claim 1, characterized in that: The specific steps for laying a groove sequence on the road surface according to a preset road music score coding rule are as follows: Obtain the note sequence of the target melody, where each note contains pitch, duration, and dynamics information; Set reference speed Used to standardize trench design dimensions; The first The duration of each note is converted into groove spacing. Satisfying the relation: ; in, Indicates the first The duration of each note; Establish a monotonic mapping function from pitch to groove depth, and assign the first... The pitch number of each note Convert to trench depth ; Establish a positive correlation mapping function from force to groove width, and then... The dynamic level of each note Convert to trench width ; Based on the calculation , , Physical trenches are laid out sequentially along the vehicle's direction of travel to form a trench sequence that corresponds one-to-one with the target melody. Among them, the reference vehicle speed The preset benchmark driving speed during the design phase is used to ensure that the rhythm and timing of groove excitation are consistent at standard vehicle speeds.

3. The music melody generation method based on road surface trench settings as described in claim 2, characterized in that: The steps for obtaining the real-time vehicle speed and the transit time between adjacent ditches by the vehicle-mounted sensing system, and calculating the actual distance between adjacent ditches based on the transit time and real-time vehicle speed, are as follows: The vehicle's current speed is output in real time using wheel speed sensors. ; The vibration detection unit installed on the vehicle chassis records the tire's passage through the [missing information - likely a number of steps]. The moment of the groove and after the first The moment of the groove ; Calculate the transit time of adjacent trenches ; Based on real-time vehicle speed With time Calculate the actual trench spacing ; in, Indicates the first The first groove and the first The measured physical distance between the grooves; The real-time vehicle speed The transit time is provided by the vehicle dynamics system. The time measurement accuracy is ensured by triggering the zero-crossing or peak value of the vibration signal.

4. The method for generating music melodies based on road surface trenches as described in claim 3, characterized in that: The specific steps for mapping the original frequency to a suitable discrete standard pitch based on the statistical distribution characteristics of the current road segment's trench spacing to generate the target pitch are as follows: Select a sliding window centered on the current trench, including continuous Actual trench spacing ; Calculate the arithmetic mean of the groove spacing within the window. with standard deviation ; Calculate the coefficient of variation It is used to characterize the regularity of the trench arrangement; according to and Search the preset key template library to find the closest musical key. The mode template library includes three basic modes: pentatonic scale, natural major, and natural minor, and their corresponding interval structures. The original excitation frequency is calculated using the following expression: ; in, This represents the unprocessed fundamental frequency excited by the physical trench; Will Map to the selected key The most recent standard pitch frequency ,satisfy: ; in, Indicates mode The corresponding set of standard pitches.

5. The music melody generation method based on road surface trench settings as described in claim 4, characterized in that: The process involves collecting vibration signals generated during the contact between the tire and the groove, and then extracting the fundamental frequency, reconstructing overtones, and aligning the phase of the vibration signals based on the target pitch to generate a synthesized audio signal with a clear pitch. The specific steps are as follows: Time-domain vibration signals generated by tire-groove impact are collected using an onboard accelerometer. ; right Perform a short-time Fourier transform to obtain the time spectrum. ; With target pitch frequency Centered on, in the frequency domain range The maximum peak value of the internal search energy is used to determine the actual fundamental frequency estimate. ; The synthetic harmonic signal is constructed as follows: ; in The overtone number, with values ​​ranging from 3 to 6. For the first The amplitude of the overtone is determined by the time spectrum. The energy at the corresponding frequency is determined after normalization. For the first The phase of the first-order overtones is corrected by linearly fitting the instantaneous phase of each component within a short time window to ensure phase consistency of the harmonic structure. Output As an enhanced synthesized audio signal, it is used to improve the purity and recognizability of the timbre.

6. The method for generating music melodies based on road surface trenches as described in claim 5, characterized in that: The specific steps for integrating the target pitch, the rhythmic timing value derived from the actual spacing, and the processed amplitude information into a structured music event stream, and then outputting audible music through the in-vehicle audio rendering unit, are as follows: target pitch Convert to MIDI note number ,satisfy: ; in, The MIDI number corresponding to standard pitch A4 (440 Hz); Actual trench spacing With real-time vehicle speed Combine and calculate the duration of the note. ; trench depth With trench width Integrate into a comprehensive strength parameter , expressed as ; in, and These are preset weighting coefficients used to balance the contributions of depth and width to sound intensity; Organize triplets in chronological order This forms a structured data stream that conforms to a common music event format; The structured data stream is input into the in-vehicle digital audio synthesizer, which drives the generation of waveforms corresponding to the instrument timbre, and plays listenable music in real time through the in-vehicle audio system. The in-vehicle digital audio synthesizer supports multiple timbre switching, allowing users to select different timbres such as piano, strings, or percussion to match the style of the road music.

7. The method for generating music melodies based on road surface trenches as described in claim 6, characterized in that: The structured music event stream incorporates a rhythm quantization mechanism during its generation process to maintain overall beat stability. The specific steps are as follows: Set the baseline cycle time for the current road segment; The calculated note duration Perform a beat grid alignment operation, mapping it to the nearest beat score multiple. ,Right now ; in, The granularity of the beat is set to 4, 8, or 16, which correspond to the quantization precision of a quarter note, an eighth note, or a sixteenth note, respectively. Use quantified Replace the original Participate in the construction of structured music event streams.

8. A music melody generation system based on road surface trenches, based on the music melody generation method based on road surface trenches according to any one of claims 1 to 7, characterized in that: include: The system includes a road music encoding module, a trench spacing sensing module, a raw frequency calculation module, a pitch adaptive mapping module, a harmonic enhancement synthesis module, and a structured audio output module. The road music encoding module is used to lay out a groove sequence on the road surface according to preset rules, and to map the note value, pitch and dynamics of the target melody to the spacing, depth and width of the grooves, respectively, to form a physically triggerable music carrier. The trench spacing sensing module is used to obtain the real-time vehicle speed and the passage time between adjacent trenches when the vehicle passes through the trench sequence through the vehicle-mounted sensing system, and to calculate the actual physical distance between adjacent trenches based on the passage time and the real-time vehicle speed. The original frequency calculation module is used to determine the original excitation frequency generated by the interaction between the tire and the groove based on the actual distance and the real-time vehicle speed. The adaptive pitch mapping module is used to identify the appropriate music mode based on the statistical distribution characteristics of the current road section trench spacing, and map the original frequency to the discrete standard pitch corresponding to the mode to generate a target pitch that meets the aesthetic requirements of hearing. The harmonic enhancement synthesis module is used to collect the vibration signal generated by the tire-groove contact, and, guided by the target pitch, perform fundamental frequency extraction, multi-order overtone reconstruction and phase alignment processing to generate a synthesized audio signal with clear pitch and stable timbre. The structured audio output module is used to integrate the target pitch, the rhythmic value derived from the actual spacing, and the processed amplitude information into a structured music event stream, and output audible music with melody and rhythm in real time through the vehicle-mounted audio rendering unit.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the music melody generation method based on road surface trench settings as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the music melody generation method based on road surface groove settings as described in any one of claims 1 to 7.