Method, device and equipment for controlling map elements to move along with music rhythm
By collecting music spectrum data and controlling the rhythm of map elements, the problem of static display of map elements in the navigation interface is solved, dynamic changes are achieved, and the user experience and the value of navigation software are enhanced.
Patent Information
- Application Number
- CN202310744624.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2024-12-24
AI Technical Summary
The map elements in the existing navigation interface are presented in a static form, lacking dynamic changes, unable to attract users' attention, and lacking fun and interactiveness, affecting the user experience.
By collecting the spectrum data of music, extracting spectrum feature data, controlling the rhythm of map elements, achieving synchronous dynamic display of map elements and music, and enhancing the user's driving experience and artistic display effect.
The navigation interface presents users with a beautiful and dynamic display effect, increasing the fun and attention of map elements, improving users' driving experience and excitement, and enhancing the value of immersive navigation.
Smart Images

Figure CN119178448A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geographic information system and navigation technology, and in particular to a method, device and equipment for controlling map elements to follow the rhythm of music. Background Art
[0002] With the development of electronic technology, people have begun to live a faster and more convenient lifestyle, among which self-driving cars have become an increasingly indispensable part of people's lives. However, when we drive to a destination, due to the large and complex cities or regions, people cannot recognize the route, which brings inconvenience to life; and with the development of navigation technology, the use of navigation systems for navigation in order to query the route to the destination brings convenience to people's lives. In the prior art, 3D maps are increasingly widely used in the field of navigation, which makes navigation more intuitive, and the use of 3D navigation can help guide users to quickly reach their destinations.
[0003] 3D maps can display 3D images of various map elements such as buildings, trees, and signboards in the navigation map interface, so that drivers can get an immersive driving experience during navigation. At the same time, as users' pursuit of the deep beauty of immersive navigation continues to increase, the form or art form of map elements such as buildings in the navigation interface has been greatly developed. Therefore, using scientific and technological means to make map elements such as buildings more lively and vibrant has become a research hotspot in the navigation field. Summary of the invention
[0004] In order to increase the selection space, bring vitality to the 3D images in the immersive navigation interface, and thus enhance the user's driving experience, an embodiment of the present invention provides a method, device and equipment for controlling map elements to follow the rhythm of music.
[0005] In a first aspect, an embodiment of the present invention provides a method for controlling a map element to move with music rhythm, which may include:
[0006] Collecting spectrum data of music based on a preset sampling frequency to obtain spectrum data blocks of different sound wave frequencies of the music;
[0007] Performing feature extraction on the spectrum data block to determine spectrum feature data for the map element rhythm;
[0008] The map elements are rhythmically controlled based on the frequency spectrum feature data, so that the map elements move along with the music.
[0009] Optionally, the extracting features from the spectrum data block to determine the spectrum feature data for the map element rhythm may include:
[0010] Determine the sound wave frequency value of the sound wave frequency data in the spectrum data block based on the highest sound wave frequency value when the spectrum data is subjected to Fourier transformation and the number of data representing different sound wave frequency data in the spectrum data block;
[0011] Based on the valid range of amplitude in the spectrum data, the sound wave frequency data in the spectrum data block is screened to determine the valid sound wave frequency data in the spectrum data block;
[0012] The effective sound wave frequency data in the spectrum data block is used as the spectrum feature data of the map element rhythm.
[0013] Optionally, after determining the valid sound wave frequency data in the spectrum data block, the following method may also be included:
[0014] The valid sound wave spectrum data in the spectrum data block are divided into groups, so as to use the maximum frequency value or the average frequency value of each group of sound wave spectrum data as the spectrum feature data of the map element rhythm.
[0015] Optionally, the method may further include:
[0016] Presetting the stage size for the rhythmic movement of the map elements on the map interface;
[0017] Determining whether at least a portion of the map element is within the scope of the stage;
[0018] If so, the map element is controlled to move with the music; if not, the map element does not move with the music.
[0019] Optionally, the method may further include: dividing the stage based on the number of groups of valid sound wave spectrum data in the spectrum data block, so as to divide the stage into areas equal to the number of groups;
[0020] Accordingly, rhythmically controlling the map element based on the frequency spectrum feature data includes: controlling the map element to rhythmically move based on the position of the map element in different areas of the stage and the frequency spectrum feature data corresponding to the area.
[0021] Optionally, controlling the map element to move rhythmically based on the position of the map element in different areas of the stage and the frequency spectrum feature data corresponding to the area may include:
[0022] Based on the positions of different areas of the stage, determining the frequency spectrum feature data corresponding to the area;
[0023] Based on the frequency spectrum feature data corresponding to different areas, the map elements corresponding to the areas, and the preset height thresholds of the map elements in the areas, the rhythmic heights of the map elements when they are rhythmic are determined, so as to control the map elements to perform rhythmic movements based on the rhythmic heights.
[0024] Optionally, dividing the stage may include: dividing the stage based on the number of groups and screen camera parameters for screen imaging of a central control screen.
[0025] Optionally, the presetting of the stage size for the rhythmic movement of the map element on the map interface may include:
[0026] The stage size is preset based on screen camera parameters for screen imaging of the central control screen and window parameters of the central control screen.
[0027] Optionally, the method may further include: if it is determined that at least a portion of the map element is within the stage range, determining whether the map element is located in an adjacent map slice; if so, merging the map elements located in the adjacent map slices to rhythmically control the merged map elements as a whole.
[0028] In a second aspect, an embodiment of the present invention provides a device for controlling map elements to move with music, which may include:
[0029] An acquisition module, used for acquiring spectrum data of music based on a preset sampling frequency to obtain spectrum data blocks of different sound wave frequencies of the music;
[0030] A feature extraction module, used for performing feature extraction on the spectrum data block to determine spectrum feature data for the map element rhythm;
[0031] A rhythm module is used to perform rhythmic control on the map elements based on the frequency spectrum feature data, so as to enable the map elements to perform rhythmic movement with the music.
[0032] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for controlling map elements to follow the rhythm of music as described in the first aspect.
[0033] In a fourth aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for controlling the map elements to follow the rhythm of music as described in the first aspect is implemented.
[0034] Optionally, the computer device is a vehicle-mounted terminal.
[0035] The beneficial effects of the above technical solution provided by the embodiment of the present invention include at least:
[0036] The embodiments of the present invention provide a method, device and apparatus for controlling map elements to move with the rhythm of music. The method combines the spectrum data of music with map elements so that the map elements can move synchronously with the music, which not only provides users with a novel and unique driving experience in terms of vision and hearing, but also attracts the user's attention and improves the artistic display effect of the map elements.
[0037] When applied to the navigation interface, it presents a beautiful and dynamic display effect to users, which not only increases the fun of map elements, but also enhances the user's attention. Compared with the traditional navigation mode based on maps and text, the dynamic change of map elements with the rhythm of music enhances the user's driving experience and excitement.
[0038] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.
[0039] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0041] Figure 1 A flowchart of a method for controlling map elements to follow music rhythm provided in an embodiment of the present invention;
[0042] Figure 2 A schematic diagram showing a cliff-like reduction in the energy amplitude of spectrum data provided in an embodiment of the present invention;
[0043] Figure 3 A flowchart of a method for controlling the movement of map elements with music provided in a detailed manner in an embodiment of the present invention;
[0044] Figure 4 A schematic diagram of the size of a rhythmic stage on a map interface provided in an embodiment of the present invention;
[0045] Figure 5 A schematic diagram of the division of a rhythmic stage provided in an embodiment of the present invention;
[0046] Figure 6 A schematic diagram of the distribution of the rhythmic stage and map elements provided in an embodiment of the present invention;
[0047] Figure 7 A schematic diagram of a cross-tile map element provided in an embodiment of the present invention;
[0048] Figure 8 The easeOutExpo easing function provided in the embodiment of the present invention;
[0049] Fig. 9 It is a schematic diagram of the structure of a control device for controlling map elements to move with music rhythm provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0051] The inventors have discovered that in existing map display interfaces or navigation map interfaces, 3D images of various map elements such as buildings, trees, and signboards are all presented in a static form, and their display effect gives users a cold, monotonous and unchanging impression. Map elements that lack dynamic display lack vitality when displayed and cannot attract users' attention through dynamic changes. At the same time, the inventors believe that music, as an important part of human culture, can deeply attract users with its dynamic rhythm. Therefore, how to associate the rhythm of music with map elements so that the map elements move with the rhythm of music to enhance the user experience and further enhance the value of navigation software is a technical problem that needs to be solved urgently.
[0052] In view of the above technical problems, an embodiment of the present invention provides a method for controlling map elements to move with the rhythm of music. The method can be applied to all map elements in a 3D map and has a wide range of application scenarios, such as immersive city navigation and tourism navigation. Based on the existing navigation software, the inventor of the embodiment of the present invention combines the rhythm of music to achieve the effect of map elements moving with the rhythm of music, so as to enhance the user experience and improve the popularity and recognition of the navigation software. Figure 1 As shown, the method may include the following steps:
[0053] Step S11, collecting spectrum data of music based on a preset sampling frequency to obtain spectrum data blocks of different sound wave frequencies of music.
[0054] The execution subject of the method implemented in the embodiment of the present invention is explained by taking a vehicle-mounted terminal as an example. This step is to collect spectrum data of music. The music can be played through music software on the vehicle-mounted terminal, or through other smart terminals, or sung by passengers in the car. The source of the music is not specifically limited in the embodiment of the present invention.
[0055] The above preset sampling frequency refers to the number of times spectrum data is collected per second, in Hertz Hz. In the subsequent steps of the embodiment of the present invention, when the rhythmic control is performed on the map elements, each sampling will be reflected in the rhythmic effect of the map elements. Too high a sampling frequency will bring serious resource burden to the entire system, and too low a sampling frequency will lead to poor display effect of the rhythmic display of the map elements. The embodiment of the present invention adopts a sampling frequency of 24Hz in this step, because 24fps is the standard frame rate for movie playback, and its display effect is the best.
[0056] During data collection, it is necessary to use the FFT fast Fourier transform algorithm to process the sound data to obtain the spectrum data. The number of spectrum data must be 2 to the power of n. The minimum number of data is 64, and the maximum number of data is 8192. The more spectrum data is needed, the more different sound wave frequencies need to be collected, resulting in more sampling times and greater performance consumption. In order to achieve energy saving and efficiency improvement and effectively display the rhythmic effect of map elements in the embodiment of the present invention, the number of data in the above spectrum data block can be 64. Of course, if the equipment performance permits, other data numbers can also be used, and the embodiment of the present invention does not make specific limitations on this.
[0057] Step S12: extracting features from the spectrum data block to determine spectrum feature data for map element rhythm.
[0058] It should be noted that the above-mentioned map elements in the embodiment of the present invention include but are not limited to: 3D map elements in 3D map data such as buildings, trees, and signboards.
[0059] In the implementation of the present invention, due to the limitation of Nyquist sampling theorem, the highest sound wave frequency that can be Fourier transformed is 22050Hz, and Figure 2 As shown, the energy amplitude of the spectrum data in the spectrum data blocks exceeding 16000 Hz decreases drastically, so this step requires feature extraction of the spectrum data blocks to obtain feature data for controlling the rhythm of map elements.
[0060] Step S13: rhythmically controlling the map elements based on the frequency spectrum feature data, so that the map elements move with the music.
[0061] This step is to perform rhythmic control on the map elements based on the frequency spectrum feature data obtained in step S12, so as to show the effect of the map elements moving with the rhythm of the music.
[0062] The above method provided in the embodiment of the present invention combines the spectrum data of music with map elements so that the map elements can move synchronously with the music. This method achieves a unique map element display effect, which not only provides users with a novel and unique driving experience in terms of vision and hearing, but also attracts the user's attention and improves the artistic display effect of the map elements.
[0063] When applied to the navigation interface, it presents a beautiful and dynamic display effect to users, which not only increases the fun of map elements, but also enhances the user's attention and interactivity. Compared with the traditional navigation mode based on maps and text, the map elements move with the music, and the dynamic changes enhance the user's driving experience and excitement. It makes the 3D images in the immersive navigation interface more vibrant, thereby enhancing the user's driving experience.
[0064] In a detailed embodiment, referring to Figure 3 As shown, the above-mentioned method for controlling the map elements to follow the rhythm of music may include the following steps:
[0065] Step S301: Collect spectrum data of music based on a preset sampling frequency to obtain spectrum data blocks of different sound wave frequencies of music. The specific execution of this step can refer to the above step S11, which will not be repeated here.
[0066] Step S302: Determine the sound wave frequency value of the sound wave frequency data in the spectrum data block based on the highest sound wave frequency value when the spectrum data is subjected to Fourier transform and the number of data representing different sound wave frequency data in the spectrum data block.
[0067] Due to the limitation of Nyquist sampling theorem, the highest sound wave frequency that can be Fourier transformed is 22050 Hz, and the number of data in the spectrum data block determined in step S11 or step S301 (64) is used to determine the sound wave frequency value of the sound wave frequency data, that is, the number of data in the spectrum data block uses the minimum value of 64, and the sound wave frequency value represented by each element in the Samples array can be determined, as follows:
[0068] Samples[0]22050Hz / 64*1=344.53125Hz
[0069] Samples[1]22050Hz / 64*2=689.0625Hz
[0070] …
[0071] Samples
[45] 22050Hz / 64*46=15,848.4375Hz
[0072] Samples
[46] 22050Hz / 64*47=16,192.96875Hz
[0073] …
[0074] Samples
[63] 22050Hz / 64*64=22050Hz
[0075] Step S303: based on the valid range of the amplitude in the spectrum data, filter the sound wave frequency data in the spectrum data block to determine the valid sound wave frequency data in the spectrum data block.
[0076] In this step, the minimum value 64 is used based on the number of data in the spectrum data block. According to Num=64*16000 / 22050, the number of valid samples (sound wave frequencies) participating in the rhythm of map elements can be determined to be 46. This step is to screen and extract the sound wave spectrum data to screen out valid sound wave frequency data based on the threshold of 16000Hz.
[0077] Step S304: Use the valid sound wave frequency data in the spectrum data block as spectrum feature data of the map element rhythm.
[0078] Step S305: group and divide the valid sound wave spectrum data in the spectrum data block, so as to use the maximum frequency value or the average frequency value of each group of sound wave spectrum data as the spectrum feature data of the map element rhythm.
[0079] In order to consider the rhythmic effect of map elements and avoid too many sound wave frequencies making the rhythmic display effect messy, the spectrum feature data is divided in this step. For example, the above 46 valid sound wave frequency data are divided into groups of 5, which can be roughly divided into 9 groups. The maximum frequency or the spectrum average value in each group represents the spectrum feature data of the group. In this way, after each sampling is completed, 9 spectrum feature data are extracted for map element rhythm.
[0080] Step S306: pre-set the stage size for the rhythmic movement of the map elements on the map interface.
[0081] In the embodiment of the present invention, when performing the rhythm of map elements, all map elements in the display interface of the vehicle terminal can be rhythmically moved, but the display effect will be chaotic and poor. Therefore, the inventor pre-sets the rhythm range, that is, selects a rhythm stage.
[0082] Reference Figure 4As shown, a virtual "stage" needs to be created, and only the map elements within the "stage" (the building is used as an example in the embodiment of the present invention) participate in the rhythm, and the map elements outside the stage (the "building" in this embodiment) do not need to participate in the rhythm. This not only avoids the phenomenon of messy display effects, but also avoids the serious resource burden on the processor computing power caused by the participation of all map elements (buildings) in the map interface in the rhythm.
[0083] When setting the stage size, the stage size can be pre-set based on the screen camera parameters for the screen imaging of the central control screen and the window parameters of the central control (vehicle terminal) screen. The camera in this embodiment is a virtual camera used for screen imaging when the software implements 3D drawing. For example, refer to Figure 4 As shown, the diameter of the "stage" can be calculated based on the width and height of the camera and window (which can be directly obtained from the device, such as the central control). The specific calculation method is as follows: draw a ray from the camera position along the center of the left side of the window, and this ray intersects with the map at point A; similarly, draw another ray from the camera position along the center of the right side of the window, and this ray intersects with the map at point B; the length of the AB line segment is the diameter of the stage.
[0084] When the map pitch changes, the rotation of the Camera's x-axis is adjusted, and the zoom ratio of the map does not change, so there is no need to readjust the stage diameter at this time (when the camera's x-axis rotates, the corresponding stage size remains unchanged. If the map does not move, the map elements in the stage remain unchanged). However, when the scale of the map changes, because the zoom ratio of the map changes, in other words, the map range displayed in the window changes, so when the scale changes, the stage diameter needs to be recalculated (the calculation method is the same as above).
[0085] Step S307: Divide the stage based on the number of groups of valid sound wave spectrum data in the spectrum data block, so as to divide the stage into areas equal to the number of groups.
[0086] In the embodiment of the present invention, the stage is divided according to the number of groups (9 groups) of valid sound wave spectrum data in the spectrum data block determined in the above step S305, so that the 9 parts of the divided stage correspond one-to-one with the above 9 spectrum feature data. Since the spectrum feature data has 9 values, the stage is divided into 9 parts, which correspond one-to-one from left to right. The spectrum feature data is displayed from front to back, and the feature data here is from front to back, corresponding to the stage from left to right. The building finds the corresponding spectrum feature data according to its position on the stage, and then performs height rhythm adjustment.
[0087] When dividing the stage in the embodiment of the present invention, the stage may be divided specifically based on the number of groups and screen camera parameters for screen imaging of the central control screen.
[0088] Reference Figure 5 As shown, the stage is divided evenly according to the horizontal FOV of the camera. The horizontal FOV of the camera is calculated as follows (the vertical FOV (camera.fieldOfView) and the aspect ratio (camera.aspect) can be obtained. The horizontal FOV can be obtained by the following calculation based on the above two values):
[0089] float cameraHeight=2.0f*distance*Mathf.Tan(camera.fieldOfView*0.5f);
[0090] float cameraWidth=cameraHeight*camera.aspect;
[0091] horizontal floatFOV=2*Mathf.Atan(cameraWidth*0.5f / distance).
[0092] Step S308: Determine whether at least part of the map element is within the scope of the stage; if so, execute step S310; otherwise, execute step S311. Figure 6 As shown, the middle building is located within the range of the stage, while the building on the right is located outside the range of the stage.
[0093] Step S309: If it is determined that at least a portion of the map element is within the stage range, determine whether the map element is located in an adjacent map slice; if so, merge the map elements located in the adjacent map slices to perform rhythmic control on the merged map element as a whole.
[0094] Because the map elements across tiles will be split into multiple parts (the storage format of the map data itself). Figure 7 As shown in the figure, the building is divided into two parts, A and B, because it spans across tiles. If parts A and B move separately, the display effect will be extremely poor, and as the same map element, they no longer move at the same frequency, which does not conform to the design concept. Therefore, it is necessary to merge parts A and B first (perform the following rhythm processing as the same building), and then move them. The principle of merging is to determine whether two adjacent tiles contain a pseudo edge ( Figure 7 The same building as the lines covered by the middle building).
[0095] In the embodiment of the present invention, whether the map elements outside the stage range are located in adjacent map slices is not judged too much, nor is it merged too much, which saves the computing power of the device operation.
[0096] Step S310: Control the map elements to move with the music. Specifically, the map elements are controlled to move based on the positions of the map elements in different areas of the stage and the frequency spectrum feature data corresponding to the areas.
[0097] In the specific implementation, firstly, based on the position of different areas of the stage, the frequency spectrum feature data corresponding to the area is determined; then, based on the frequency spectrum feature data corresponding to the different areas, the map elements corresponding to the area, and the preset height threshold of the map elements in the area, the rhythmic height of the map elements when they move is determined, so as to control the map elements to move rhythmically based on the rhythmic height.
[0098] In a specific embodiment, the rhythmic height of a map element (taking a building as an example) can be implemented as follows: the height of the building is calculated based on the position of the building on the stage and the spectral feature data. First, 9 spectral feature data can be extracted for each sampling in step S305. In combination with the position of the building on the stage, the corresponding spectral feature data can be obtained. For example, when the building is located in area 4 of the stage, the corresponding spectral feature data is Samples[4]. The value range of Sample is 0 to 1.0 (the value range of 64 numbers in the sound wave frequency data). At the same time, the easeOutExpo easing function is used (refer to Figure 8 As shown), further provide a percent value, corresponding to the following step b.
[0099] a) Percent 1 = Samples[4];
[0100] b)Percent 2=1-Mathf.Pow(2,-10*percent1);
[0101] c) var height (final building height in the map) = building height (default value 100 meters) * percent2.
[0102] In the embodiment of the present invention, the map elements may have preset height thresholds, for example, the preset height value of the building is 100m, the preset height value of the tree is 20m, etc. Since the buildings in reality are also high and low, in order to make the building rhythm show the best effect, when the building enters the stage range, the building with a height less than 100 meters will be adjusted to be greater than or equal to 100 meters. In the above step c), if the height of the building after entering the stage is greater than 100, 100 meters is used for calculation, so as to avoid the building being too low to show the rhythm effect. Of course, the rhythmic height of the map element can also be determined according to the actual map element height (for example, the building is calculated by the number of floors of the building), and the embodiment of the present invention does not specifically limit this.
[0103] It should also be noted that when this step is executed, the designed algorithm can be made into a map element controller (building controller), and the controller can be associated and connected with the spectrum feature data to achieve the effect of the building moving with the rhythm of the music. Specifically, when the building (each building can be equipped with a controller) enters the stage range, the controller will register the spectrum feature data change notification with the stage. When the spectrum feature data notification is received, the controller adjusts the building height according to the algorithm designed above. In addition, when the building height changes, there needs to be an animation effect (slowly rising or falling), otherwise there will be an obvious sense of frustration. When the building leaves the stage range, the controller will cancel the spectrum feature data change notification to the stage and return the building to its normal height.
[0104] Step S311: The map elements do not move with the music.
[0105] In the above method provided in the embodiment of the present invention, the map interface with map elements moving with the rhythm of music can make map elements such as buildings and trees present the beauty brought by graceful dance during the navigation process. This not only increases the fun of map elements, but also enhances people's attention to map elements. Secondly, the traditional navigation interface generally only provides map and text navigation, which lacks fun and interactivity. The navigation interface with map elements moving with the rhythm of music can enhance the user's experience and excitement during the navigation process through dynamic changes in experience and music rhythm.
[0106] It should be noted here that the above method provided in the embodiment of the present invention can be used as an execution scheme for displaying 3D maps in navigation software. The scheme can be turned on or off on the navigation interface to display different navigation effects. The embodiment of the present invention does not specifically limit this.
[0107] Based on the same inventive concept, an embodiment of the present invention further provides a control device for map elements to move with the rhythm of music, referring to Fig. 9 As shown, the device may include: a collection module 91, a feature extraction module 92 and a rhythm module 93, and its working principle is as follows:
[0108] The acquisition module 91 is used to acquire spectrum data of music based on a preset sampling frequency to obtain spectrum data blocks of different sound wave frequencies of music;
[0109] The feature extraction module 92 is used to extract features from the spectrum data block to determine the spectrum feature data used for the map element rhythm;
[0110] The rhythm module 93 is used to perform rhythmic control on the map elements based on the frequency spectrum feature data, so as to achieve the rhythmic movement of the map elements along with the music.
[0111] In an optional embodiment, the feature extraction module 92 is specifically used for:
[0112] Determine the sound wave frequency value of the sound wave frequency data in the spectrum data block based on the highest sound wave frequency value when the spectrum data is subjected to Fourier transformation and the number of data representing different sound wave frequency data in the spectrum data block;
[0113] Based on the valid range of amplitude in the spectrum data, the sound wave frequency data in the spectrum data block is screened to determine the valid sound wave frequency data in the spectrum data block;
[0114] The effective sound wave frequency data in the spectrum data block is used as the spectrum feature data of the map element rhythm.
[0115] In another alternative embodiment, referring to Fig. 9 As shown, the device may also include: a division module 94, which is used to group and divide the valid sound wave spectrum data in the spectrum data block, so as to use the maximum frequency value or the average frequency value of each group of sound wave spectrum data as the spectrum feature data of the map element rhythm.
[0116] In another alternative embodiment, referring to Fig. 9 As shown, the device may also include: a setting module 95 and a judgment module 96, the setting module 95 is used to pre-set the stage size for the rhythmic movement of the map element on the map interface; the judgment module 96 is used to judge whether at least a part of the area of the map element is located within the range of the stage; if the judgment is yes, the rhythm module 93 is used to control the map element to move with the music; if not, the map element does not move with the music.
[0117] In another optional embodiment, the division module 94 is further used to divide the stage based on the number of groups of valid sound wave spectrum data in the spectrum data block, so as to divide the stage into areas equal to the number of groups; correspondingly, the rhythm module 93 controls the rhythm of the map element based on the position of the map element in different areas of the stage and the spectrum feature data corresponding to the area.
[0118] In another optional embodiment, the rhythm module 93 is specifically used for:
[0119] Based on the positions of different areas of the stage, determining the frequency spectrum feature data corresponding to the area;
[0120] Based on the frequency spectrum feature data corresponding to different areas, the map elements corresponding to the areas, and the preset height thresholds of the map elements in the areas, the rhythmic heights of the map elements when they are rhythmic are determined, so as to control the map elements to perform rhythmic movements based on the rhythmic heights.
[0121] In another optional embodiment, the division module 94 is specifically used to divide the stage based on the number of groups and screen camera parameters for screen imaging of the central control screen.
[0122] In another optional embodiment, the setting module 95 is specifically used to pre-set the stage size based on the screen camera parameters for screen imaging of the central control screen and the window parameters of the central control screen.
[0123] In another alternative embodiment, referring to Fig. 9 As shown, the device may also include: a merging module 97, if the judging module 96 judges that at least a part of the map element is located within the stage range, then it is judged whether the map element is located in an adjacent map slice; if so, the merging module 97 merges the map elements located in the adjacent map slices to perform rhythmic control on the merged map elements as a whole.
[0124] Based on the same inventive concept, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned method for controlling the map elements to follow the rhythm of music is implemented.
[0125] Based on the same inventive concept, a computer device is also provided in an embodiment of the present invention, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the method for controlling the map elements to follow the rhythm of music is implemented.
[0126] In an optional embodiment, the above-mentioned computer device is a vehicle-mounted terminal.
[0127] The principles of the problems solved by the above-mentioned devices, media, and related equipment in the embodiments of the present invention are similar to those of the above-mentioned methods, so their implementation can refer to the implementation of the above-mentioned methods, and the repeated parts will not be repeated.
[0128] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.
[0129] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0132] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for controlling map elements to follow the rhythm of music, characterized in that: include: Collecting spectrum data of music based on a preset sampling frequency to obtain spectrum data blocks of different sound wave frequencies of the music; Performing feature extraction on the spectrum data block to determine spectrum feature data for the map element rhythm; The map elements are rhythmically controlled based on the frequency spectrum feature data, so that the map elements move along with the music.
2. The method according to claim 1, characterized in that The extracting features from the spectrum data block to determine the spectrum feature data used for the map element rhythm includes: Determine the sound wave frequency value of the sound wave frequency data in the spectrum data block based on the highest sound wave frequency value when the spectrum data is subjected to Fourier transformation and the number of data representing different sound wave frequency data in the spectrum data block; Based on the valid range of amplitude in the spectrum data, the sound wave frequency data in the spectrum data block is screened to determine the valid sound wave frequency data in the spectrum data block; The effective sound wave frequency data in the spectrum data block is used as the spectrum feature data of the map element rhythm.
3. The method according to claim 2, characterized in that After determining the valid sound wave frequency data in the spectrum data block, the method further includes: The valid sound wave spectrum data in the spectrum data block are divided into groups, so as to use the maximum frequency value or the average frequency value of each group of sound wave spectrum data as the spectrum feature data of the map element rhythm.
4. The method according to claim 3, characterized in that Also includes: Presetting the stage size for the rhythmic movement of the map elements on the map interface; Determining whether at least a portion of the map element is within the scope of the stage; If yes, controlling the map elements to move with the music; If not, the map element does not move with the music.
5. The method according to claim 4, characterized in that Also includes: Based on the number of groups of valid sound wave spectrum data in the spectrum data block, dividing the stage into areas equal to the number of groups; Accordingly, rhythmically controlling the map element based on the frequency spectrum feature data includes: controlling the map element to rhythmically move based on the position of the map element in different areas of the stage and the frequency spectrum feature data corresponding to the area.
6. The method according to claim 5, characterized in that The controlling the map element to move rhythmically based on the position of the map element in different areas of the stage and the frequency spectrum feature data corresponding to the area includes: Based on the positions of different areas of the stage, determining the frequency spectrum feature data corresponding to the area; Based on the frequency spectrum feature data corresponding to different areas, the map elements corresponding to the areas, and the preset height thresholds of the map elements in the areas, the rhythmic heights of the map elements when they are rhythmic are determined, so as to control the map elements to perform rhythmic movements based on the rhythmic heights.
7. The method according to claim 5, characterized in that The dividing the stage includes: dividing the stage based on the number of groups and screen camera parameters for screen imaging of a central control screen.
8. The method according to claim 4, characterized in that The presetting of the stage size for the map element to perform rhythmic movement on the map interface includes: The stage size is preset based on screen camera parameters for screen imaging of the central control screen and window parameters of the central control screen.
9. The method according to any one of claims 4 to 8, characterized in that: Also includes: If it is determined that at least a portion of the map element is located within the stage range, determining whether the map element is located in an adjacent map slice; If so, the map elements located in adjacent map slices are merged so as to perform rhythmic control on the merged map elements as a whole.
10. A control device for map elements to move with music, characterized in that: include: An acquisition module, used for acquiring spectrum data of music based on a preset sampling frequency to obtain spectrum data blocks of different sound wave frequencies of the music; A feature extraction module, used for performing feature extraction on the spectrum data block to determine spectrum feature data for the map element rhythm; A rhythm module is used to perform rhythmic control on the map elements based on the frequency spectrum feature data, so as to enable the map elements to perform rhythmic movement with the music.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for controlling the map element to move with the rhythm of music as claimed in any one of claims 1 to 9 is implemented.
12. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for controlling the map element to move with the rhythm of music as claimed in any one of claims 1 to 9 is implemented.
13. The computer device according to claim 12, characterized in that The computer device is a vehicle-mounted terminal.
