Music playing method, user terminal and storage medium

By converting fetal heart data into rhythm and playing, the problem of poor interaction between users and fetus in the prior art is solved, and a more dynamic and interesting interactive experience is achieved.

CN115515482BActive Publication Date: 2025-02-18SUZHOU YIWEI BIOTECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202080100694.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-11
Publication Date
2025-02-18
Estimated Expiration
2040-05-11

AI Technical Summary

Technical Problem

The prior art cannot dynamically establish interactions when users interact with the fetus, resulting in poor interaction effects.

Method used

By obtaining the target fetal heart data and obtaining the target fetal heart data according to the rhythm configuration rules, playing the rhythm file to convert the fetal heart data into a user-perceived rhythm.

Benefits of technology

It enhances users' perception of fetal data and improves the interaction between users and fetus.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115515482B_ABST
    Figure CN115515482B_ABST
Patent Text Reader

Abstract

The present application proposes a music playing method, a user terminal and a storage medium, which relate to the field of network technology. By obtaining target fetal heart data and according to a music configuration rule that records the correspondence between multiple fetal heart data and multiple music files, a target music file corresponding to the target fetal heart data is obtained, and the target music file is played. Compared with the prior art, the target fetal heart data is converted into music that can be perceived by the user, thereby enhancing the user's perception and improving the interactive effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network technology, and in particular to a music playing method, a user terminal and a storage medium. Background Art

[0002] In order to enhance the interaction between users and the fetus, some wearable smart devices can be used to collect data such as fetal heart rate and fetal movement data of the fetus, and then the collected fetal heart rate and fetal movement data can be used for interactive operations such as drawing. This allows users to not only use the interactive results to reflect the fetal heart rate and fetal movement data of the fetus, but also enhance the interactive fun with the fetus and improve the user experience.

[0003] However, the current interactive scheme only establishes the interaction between the user and the fetus at a static level, but cannot dynamically establish the interaction between the user and the fetus, resulting in poor interactive effects. Summary of the invention

[0004] The purpose of this application includes providing a music playing method, a user terminal and a storage medium, which can convert fetal heart data into music that can be perceived by the user, thereby enhancing the user's perception and improving the interactive effect.

[0005] In order to achieve at least one of the above purposes, the technical solution adopted by this application is as follows:

[0006] The present application provides a method for playing a melody, the method comprising:

[0007] Obtain target fetal heart rate data;

[0008] According to the temperament configuration rule, a target temperament file corresponding to the target fetal heart data is obtained; wherein the temperament configuration rule records the correspondence between a plurality of fetal heart data and a plurality of temperament files;

[0009] Play the target music file.

[0010] Optionally, the target fetal heart data includes multiple fetal heart values; the melody configuration rule records the correspondence between multiple fetal heart ranges and multiple melody files;

[0011] The step of obtaining a target temperament file corresponding to the target fetal heart data according to the temperament configuration rule comprises:

[0012] Obtaining an average fetal heart rate value of the plurality of fetal heart rate values ​​included in the target fetal heart rate data;

[0013] The melody file corresponding to the target fetal heart rate range in the melody configuration rule is determined as the target melody file; wherein the target fetal heart rate range is the fetal heart rate range where the average fetal heart rate value among the multiple fetal heart rate ranges is located.

[0014] Optionally, each melody file includes a first copy file and a second copy file;

[0015] The step of determining the melody file corresponding to the target fetal heart rate range in the melody configuration rule as the target melody file comprises:

[0016] Determining whether the target fetal heart data contains a fetal movement indicator;

[0017] When the target fetal heart data does not include a fetal movement identifier, determining the first copy file included in the melody file corresponding to the target fetal heart range as the target melody file;

[0018] When the target fetal heart data includes a fetal movement identifier, the second copy file included in the melody file corresponding to the target fetal heart range is determined as the target melody file.

[0019] Optionally, each melody file includes a plurality of sub-melody files;

[0020] The step of determining the melody file corresponding to the target fetal heart rate range in the melody configuration rule as the target melody file comprises:

[0021] The target melody file is determined from a plurality of sub-melody files included in the melody file corresponding to the target fetal heart rate range.

[0022] Optionally, the target fetal heart data includes multiple fetal heart values; the rhythm configuration rule records the correspondence between multiple fetal heart ranges and multiple musical note files;

[0023] The step of obtaining a target temperament file corresponding to the target fetal heart data according to the temperament configuration rule comprises:

[0024] Obtaining an average fetal heart rate value of the plurality of fetal heart rate values ​​included in the target fetal heart rate data;

[0025] The note file corresponding to the target fetal heart rate range in the melody configuration rule is determined as the target melody file; wherein the target fetal heart rate range is the fetal heart rate range where the average fetal heart rate value among the multiple fetal heart rate ranges is located.

[0026] Optionally, each note file includes a plurality of sub-note files;

[0027] The step of determining the musical note file corresponding to the target fetal heart rate range in the musical note configuration rule as the target musical note file comprises:

[0028] The target melody file is determined from a plurality of sub-note files included in the note file corresponding to the target fetal heart rate range.

[0029] Optionally, each sub-note file corresponds to configuration parameters;

[0030] The step of determining the target melody file from among the multiple sub-note files included in the note file corresponding to the target fetal heart rate range comprises:

[0031] Among the multiple sub-note files included in the note file corresponding to the target fetal heart rate range, the target sub-note file whose difference between the corresponding configuration parameter and the set configuration parameter is within the set range is determined as the target melody file.

[0032] Optionally, the method further comprises:

[0033] The set configuration parameters are updated according to the configuration parameters of the target temperament file.

[0034] Optionally, before the step of playing the target temperament file, the method further includes:

[0035] When the target fetal heart data contains a fetal movement mark, adjusting the scale of the target music file;

[0036] The step of playing the target music file comprises:

[0037] Play the target temperament file after adjusting the scale.

[0038] Optionally, the step of adjusting the scale of the target temperament file includes:

[0039] Raise the scale of the last note of the target temperament file.

[0040] Optionally, the step of adjusting the scale of the target temperament file includes:

[0041] A fetal movement identification sound is added to the last sound of the target rhythm file.

[0042] Optionally, before the step of obtaining a target temperament file corresponding to the target fetal heart data according to the temperament configuration rule, the method further includes:

[0043] The temperament configuration rule is determined in the timbre type strategy; wherein the timbre type strategy includes a plurality of configuration rules.

[0044] Optionally, before the step of obtaining target fetal heart data, the method further includes:

[0045] The received fetal heart data is saved in the first queue;

[0046] The steps of obtaining target fetal heart rate data include:

[0047] The first queue is read in chronological order to obtain the target fetal heart data.

[0048] Optionally, before the step of saving the received fetal heart data to the first queue, the method further includes:

[0049] Determine whether the remaining playback time is less than a first threshold;

[0050] When the answer is yes, the step of saving the received fetal heart data to the first queue is executed.

[0051] Optionally, before the step of obtaining target fetal heart data, the method further includes:

[0052] The read historical fetal heart data is saved to the first queue, and the number of data is updated; wherein the number of data is configured to indicate the quantity of historical fetal heart data saved in the first queue;

[0053] When the number of data reaches a second threshold, the step of obtaining target fetal heart data includes:

[0054] The historical fetal heart data stored in the first queue is read according to the second threshold value to obtain the target fetal heart data, and the first queue and the number of data are reset.

[0055] Optionally, after the step of obtaining a target temperament file corresponding to the target fetal heart data in a temperament file library, the method further comprises:

[0056] Saving the target rhythm file to a second queue; wherein the second queue is configured to save the rhythm file corresponding to the fetal heart data;

[0057] When a merge instruction is received, all the music files in the second queue are merged to generate an audio file.

[0058] The present application also provides a user terminal, including:

[0059] a memory configured to store one or more programs;

[0060] processor;

[0061] When the one or more programs are executed by the processor, the above-mentioned music playing method is implemented.

[0062] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned music playing method is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 A schematic diagram showing an application scenario of the music playing method provided by the present application;

[0064] Figure 2 A schematic structural block diagram of a user terminal provided by the present application is shown;

[0065] Figure 3 A schematic flow chart showing the music playing method provided by the present application;

[0066] Figure 4 Show Figure 3 A schematic flow chart of the sub-steps of step 204;

[0067] Figure 5 Show Figure 4 A schematic flow chart of the sub-steps of step 204-2;

[0068] Figure 6 Show Figure 3 Another schematic flow chart of the sub-steps of step 204;

[0069] Figure 7 Show Figure 3 Another schematic flow chart of the sub-steps of step 204;

[0070] Figure 8 Another schematic flow chart of the music playing method provided by the present application is shown;

[0071] Fig. 9 Another schematic flow chart of the music playing method provided by the present application is shown;

[0072] Fig.10 Another schematic flow chart of the music playing method provided by the present application is shown;

[0073] Fig.11 Another schematic flow chart of the music playing method provided by the present application is shown;

[0074] Fig.12 Another schematic flow chart of the music playing method provided by the present application is shown;

[0075] Fig.13 Another schematic flow chart of the music playing method provided by the present application is shown.

[0076] In the figure: 100 - user end; 101 - memory; 102 - processor; 103 - storage controller; 104 - peripheral interface; 105 - radio frequency unit; 106 - communication bus / signal line; 107 - playback unit. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions provided by the present application will be clearly and completely described below in conjunction with the drawings in some embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.

[0078] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents a portion of the embodiments selected by the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0079] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.

[0080] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0081] In scenarios such as the one mentioned above where fetal heart rate data and fetal movement data are used to allow users to interact with the fetus, current solutions generally perform drawing operations based on the fetal heart rate data and fetal movement data; based on the fetal heart rate data and fetal movement data, users can establish an emotional connection with the fetus and achieve interesting interactions, which can increase the emotional connection between the user and the fetus.

[0082] However, operations such as drawing only establish interaction between the user and the fetus at a static level. The user's perception of the fetal heart rate data and fetal movement data is not strong, and the interaction effect is poor.

[0083] To this end, a possible implementation method provided by the present application is: by obtaining target fetal heart data, and according to a music configuration rule that records the correspondence between multiple fetal heart data and multiple music files, obtaining a target music file corresponding to the target fetal heart data, thereby playing the target music file, and converting the target fetal heart data into music that can be perceived by the user, thereby enhancing the user's perception and improving the interactive effect.

[0084] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0085] See also Figure 1 , Figure 1 A schematic application scenario diagram of the music playing method provided in the present application is shown; in one embodiment, a front-end device establishes communication with a user end to realize data interaction between the front-end device and the user end.

[0086] For example, in one embodiment, the front-end device and the user terminal may be located in a wireless network or a wired network, and the front-end device and the user terminal perform data exchange through the wireless network or the wired network.

[0087] Alternatively, in another embodiment, the front-end device and the user end may establish communication by using, for example, Bluetooth or a local area network, to achieve data interaction between the front-end device and the user end.

[0088] In one embodiment, the user terminal may adopt a mobile terminal device, for example, it may include but not be shown as a smart phone, a personal computer (PC), a tablet computer, a personal digital assistant (PDA), a wearable mobile terminal, etc.

[0089] The present application provides a method for playing a melody, which can be applied to Figure 1 The user end shown has an application installed in it, which corresponds to the front-end device and can provide services to users. The music playing method provided in this application can be implemented by the application installed in the user end.

[0090] Schematically, see Figure 2 , Figure 2 A schematic structural block diagram of a user terminal 100 provided by the present application is shown; the user terminal 100 may include a memory 101, one or more (only one is shown in the figure) processors 102, a storage controller 103, a peripheral interface 104, a radio frequency unit 105, a playback unit 107, etc. These components may communicate with each other via one or more communication buses / signal lines 106.

[0091] The memory 101 can be configured to store software programs and modules, such as the program instructions / modules corresponding to the music playing method provided in the present application. The processor 102 executes various functional applications and image processing by running the software programs and modules stored in the memory 101 to implement the music playing method provided in the present application.

[0092] Among them, the memory 101 can be, but is not limited to, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), programmable read-only memory (Programmable Read-Only Memory, PROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable programmable read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc.

[0093] The processor 102 may be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 102 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a voice processor, and a video processor, etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The disclosed methods, steps, and logic block diagrams in the embodiments of the present application may be implemented or executed. A general-purpose processor may be a microprocessor or the processor 102 may also be any conventional processor, etc.

[0094] The peripheral interface 104 couples various input / output devices to the processor 102 and the memory 101. In some embodiments, the peripheral interface 104, the processor 102 and the memory controller 103 can be implemented in a single chip. In some other embodiments of the present application, they can also be implemented by separate chips.

[0095] The radio frequency unit 105 is configured to receive and send electromagnetic waves, realize mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices.

[0096] The playing unit 107 is configured to play a melody file or an audio file, etc., to output melody information or audio information, etc.

[0097] Understandably, Figure 2 The structure shown is for illustration only. The user terminal 100 may also include Figure 2 More or fewer components as shown, or with Figure 2 Different configurations are shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0098] Below Figure 2 The user terminal 100 shown is used as an illustrative execution entity to exemplarily illustrate the music playing method provided in the present application.

[0099] See also Figure 3 , Figure 3 A schematic flow chart showing the music playing method provided by the present application may include the following steps:

[0100] Step 202, obtaining target fetal heart rate data;

[0101] Step 204, obtaining a target temperament file corresponding to the target fetal heart data according to the temperament configuration rule;

[0102] Step 206, playing the target music file.

[0103] In one embodiment, when executing the music playing method provided by the present application, the user terminal can first obtain the target fetal heart data; then use the target fetal heart data to compose music, thereby obtaining a target music file corresponding to the target fetal heart data, so that the user terminal can play the target music file.

[0104] When the user obtains the target fetal heart data, Figure 1 In the scenario shown, the fetal heart data received from other devices such as the front-end device is used as the target fetal heart data; or, the user end can use the fetal heart data downloaded from the server as the target fetal heart data; or, the user end can use the fetal heart data stored by itself as the target fetal heart data.

[0105] In addition, the user end may save music configuration rules, which record the correspondence between multiple fetal heart data and multiple music files; when the user end obtains the target music file, it may determine the music file corresponding to the target fetal heart data in the music configuration rules as the target music file according to the music configuration rules.

[0106] In this way, the user end can play the target rhythm file, that is, convert the target fetal heart data into a rhythm that the user can perceive, thereby enhancing the user's perception and improving the interactive effect.

[0107] It should be noted that when the user terminal executes step 204, the target rhythm file corresponding to the target fetal heart data can be obtained in a variety of ways.

[0108] For example, in some applicable application scenarios, the fetal heart rate is generally between 110 beats / minute and 160 beats / minute; for this reason, in one embodiment, the user terminal can divide the complete fetal heart rate value range into multiple different fetal heart rate ranges, and pre-store different melody files for different fetal heart rate ranges, that is: different melody files can be pre-configured for different fetal heart rate ranges, and the melody configuration rules saved by the user terminal can record the correspondence between multiple fetal heart rate ranges and multiple melody files.

[0109] To this end, Figure 3 Based on Figure 4 , Figure 4 Show Figure 3 A schematic flowchart of the sub-steps of step 204 in FIG. 1 is provided. In one embodiment, step 204 may include the following sub-steps:

[0110] Step 204-1, obtaining an average fetal heart rate value of a plurality of fetal heart rate values ​​included in the target fetal heart rate data;

[0111] Step 204-2: determine the melody file corresponding to the target fetal heart rate range in the melody configuration rule as the target melody file.

[0112] In one embodiment, in order to avoid large rhythm fluctuations caused by a large range of fetal heart rate changes in a short period of time, the user terminal can use the obtained multiple fetal heart values ​​as target fetal heart data when executing step 202, such as using all fetal heart values ​​within a time range (e.g., every 5 seconds) as target fetal heart data. In this way, when executing step 204, the average fetal heart value of the multiple fetal heart values ​​included in the target fetal heart data can be first obtained.

[0113] Then, the user end may combine the saved rhythm configuration rule and determine the fetal heart rate range where the average fetal heart rate value is located among the multiple fetal heart rate ranges recorded by the rhythm configuration rule as the target fetal heart rate range.

[0114] In this way, the user end can determine the melody file corresponding to the target fetal heart rate range in the melody configuration rule as the target melody file according to the calculated average fetal heart rate value.

[0115] For example, it is assumed that the music configuration rules saved by the user end can be shown in Table 1 below:

[0116] Table 1

[0117] Fetal heart rate (N) range Temperament File Theme N<110 still 110<=N<120 Tick 120<=N<130 Soothing 130<=N<140 story 140<=N<150 wake 150<=N<160 sports 160<=N run

[0118] In combination with the music configuration rules in the example of Table 1, assuming that the average fetal heart rate value calculated by the user end is 136, the user end may select a melody file with the theme name "Story" as the target music file.

[0119] In addition, in some possible application scenarios, the fetal heart rate data measured by the front-end device may be accompanied by fetal movement data.

[0120] Therefore, in order to enable the fetal movement to be reflected in the music played on the user side, in one embodiment, different copy files can be used to distinguish between target fetal heart data containing fetal movement markers and target fetal heart data without fetal movement markers; that is: in the music configuration rules recorded on the user side, each melody file can include a first copy file and a second copy file. For example, in the example of Table 1 above, the music file with the theme name "Story" includes two copy files, one of which indicates that there is no fetal movement marker in the corresponding fetal heart data, and the other indicates that the corresponding fetal heart data contains a fetal movement marker.

[0121] For example, it can be assumed that the first copy file of each rhythm file indicates that the corresponding fetal heart data does not contain a fetal movement marker, while the second copy file indicates that the corresponding fetal heart data contains a fetal movement marker.

[0122] So, in Figure 4 Based on Figure 5 , Figure 5 Show Figure 4 A schematic flowchart of the sub-steps of step 204-2 in FIG. 1 . In one embodiment, step 204-2 may include the following sub-steps:

[0123] Step 204-2a, determining whether the target fetal heart data contains a fetal movement mark; if not, executing step 204-2b; if yes, executing step 204-2c;

[0124] Step 204-2b, determining the first copy file included in the melody file corresponding to the target fetal heart rate range as the target melody file;

[0125] Step 204-2c: determine the second copy file included in the melody file corresponding to the target fetal heart rate range as the target melody file.

[0126] In one embodiment, when executing step 204-2, the user terminal can determine whether the target fetal heart data contains a fetal movement marker; when the user terminal determines that the target fetal heart data does not contain a fetal movement marker, the user terminal can choose to determine the first copy file included in the melody file corresponding to the target fetal heart range as the target music file, such as the first copy file included in the melody file with the theme name "Story" in the above example is determined as the target music file; when the user terminal determines that the target fetal heart data contains a fetal movement marker, the user terminal can choose to determine the second copy file included in the melody file corresponding to the target fetal heart range as the target music file, such as the second copy file included in the melody file with the theme name "Story" in the above example is determined as the target music file.

[0127] It should be noted that the fetal movement indicator included in the target fetal heart data can be, for example, Figure 1 When the front-end device in the illustrated scenario collects fetal heart data, each time a fetal movement data is collected, a fetal movement identifier is recorded for the fetal heart data at the corresponding time point to indicate that a fetal movement occurred at the time point corresponding to the fetal heart data.

[0128] Alternatively, different time series can be used to record fetal heart data and fetal movement data respectively, with fetal heart data recorded once every second and fetal movement data recorded once each time it occurs; when executing step 202, the user end can simultaneously read the time series of fetal heart data and the time series of fetal movement data, and when obtaining the target fetal heart data, use the fetal movement variable to record the number of fetal movements read, so that when executing step 204-2a, the user end can use the value of the fetal movement variable to determine whether the target fetal heart data contains a fetal movement identifier; for example, if the value of the fetal movement variable read by the user end is 0, it indicates that the target fetal heart data does not contain a fetal movement identifier; if the value of the fetal movement variable read by the user end is greater than 0, it indicates that the target fetal heart data contains a fetal movement identifier.

[0129] In this way, the user end uses different copy files to distinguish between situations where fetal heart data contains fetal movement indicators and situations where it does not contain fetal movement indicators, so that the user can use different copy files to distinguish whether the fetus has fetal movement when collecting the corresponding fetal heart data, thereby enhancing user perception and improving the interactive effect.

[0130] Furthermore, in order to avoid that each fetal heart rate range corresponds to only a single melody file, so that the melody generated during continuous playback is relatively simple, each melody file saved by the user end may include multiple sub-melody files.

[0131] To this end, when executing step 204 - 2 , the user end may determine the target melody file from the multiple sub-melody files included in the melody file corresponding to the target fetal heart rate range.

[0132] For example, three sub-melody files can be saved in advance for each melody file; in the above example in which the melody file with the theme name "Story" is the melody file corresponding to the target fetal heart data, when executing step 204-2, the user end can use, for example, a random algorithm to randomly select one from the three sub-melody files contained in "Story" as the target music file.

[0133] For example, assuming that the three sub-melody files contained in the melody file with the theme of "Story" are numbered 0, 1, and 2 respectively, and the quantity is recorded as total; when the user terminal executes step 204-2, the current system timestamp accurate to milliseconds is currentTsInMillSecond, and the calculation formula for the number of the target melody file can satisfy the following:

[0134] index=(currentTsInMillSecond*31)%total

[0135] That is, the product of currentTsInMillSecond multiplied by 31 is divided by total to obtain the remainder, and then the sub-melody file with the corresponding number is selected as the target music file according to the result of the remainder.

[0136] In this way, the user end can play different melodies in different playback cycles even if different target fetal heart data correspond to the same fetal heart range, and can avoid the generation of a single melody when the melody is played continuously.

[0137] It is understandable that the above implementation provided by the present application is to pre-configure different melody files for different fetal heart rate ranges for music playback. In some other possible implementations of the present application, the user end may also pre-store different note files for different fetal heart rate ranges, that is, the music may also be played by configuring notes, and the music configuration rules saved by the user end may record the correspondence between multiple fetal heart rate ranges and multiple note files.

[0138] To this end, Figure 3 Based on Figure 6 , Figure 6 Show Figure 3 Another schematic flow chart of the sub-steps of step 204 in FIG. 1 , in another embodiment, step 204 may further include the following sub-steps:

[0139] Step 204-6, obtaining an average fetal heart rate value of a plurality of fetal heart rate values ​​included in the target fetal heart rate data;

[0140] Step 204-7, determining the musical note file corresponding to the target fetal heart rate range in the musical note configuration rule as the target musical note file;

[0141] In another embodiment, in order to avoid large rhythm fluctuations caused by excessive fetal heart rate changes in a short period of time, the user terminal can use the obtained multiple fetal heart rate values ​​as target fetal heart rate data and calculate the average fetal heart rate value of the multiple fetal heart rate values ​​included in the target fetal heart rate data.

[0142] Then, the user end may determine the fetal heart rate range where the average fetal heart rate value is located as the target fetal heart rate range, and determine the musical note file corresponding to the target fetal heart rate range in the musical rhythm configuration rule as the target musical scale file.

[0143] It should be noted that, in the above two implementation methods listed in the present application, the scheme provided by steps 204-1 to 204-2 is to play the complete melody, that is, the complete melody is pre-stored; and the scheme provided by steps 204-6 to 204-7 is to play based on notes, that is, the notes are pre-stored, and the music is arranged by playing the notes continuously, rather than playing the complete melody.

[0144] In addition, in order to increase the diversity when using note files to arrange music, each note file saved by the user end may include multiple sub-note files.

[0145] Thus, when the user terminal executes step 204-7, the target melody file can be determined from the multiple sub-note files included in the note file corresponding to the target fetal heart rate range; for example, the target melody file can be determined by using the random algorithm in the above example.

[0146] Furthermore, in one embodiment, in order to avoid the situation where the musical effect played by the user end is poor due to the large difference in the scale of two adjacent matching files during continuous playback, corresponding configuration parameters can be set for each sub-note file, so that the user end can make the difference in the configuration parameters of two consecutive note files within a set range during continuous playback based on the set configuration parameters.

[0147] For example, all sub-note files can be divided into three octave sub-note files, namely bass, middle and treble types, each type contains complete notes.

[0148] Each sub-note file is a note in the musical note, such as 1 (do) for bass, 3 (mi) for middle, and 5 (so) for treble; each note can contain multiple different sub-note files, the difference is the duration, for example, 2 seconds to 6 seconds; assuming that 0.5 seconds is a unit of sound speed, then: the sound speed of 2 seconds is 4, and the sound speed of 4 seconds is 8.

[0149] In this way, each sub-note file can be named in the format of pitch (lastScale)-volume (lastVolume)-speed (lastSpeed); for example, the middle note 1 with a volume of 3 and a speed of 8, its corresponding sub-note file can be named (middle note 1+3+8), that is, the configuration parameters corresponding to the sub-note file are volume 3 and speed 8.

[0150] Therefore, when executing step 204-7, the user terminal may determine the target sub-note file whose difference between the corresponding configuration parameters and the set configuration parameters in the multiple sub-note files included in the note file corresponding to the target fetal heart rate range is within the set range as the target music file.

[0151] For example, it can be assumed that the set range is 3 degrees, that is, the scale of the target temperament file and the set configuration parameters do not exceed 3 degrees.

[0152] Assume that the temperament configuration rules saved by the user end may also include the following content:

[0153] (1) When the average fetal heart rate is less than 110, use a low pitch, a volume intensity not greater than 4, and a sound speed value not less than 12;

[0154] (2) When the average fetal heart rate is greater than or equal to 110 and less than 125, use a low pitch, a volume intensity between 2 and 5, and a speed value of not less than 10;

[0155] (3) When the average fetal heart rate is greater than or equal to 125 and less than 145, use a medium pitch scale with a volume intensity between 3 and 7 and a speed value between 8 and 10;

[0156] (4) When the average fetal heart rate is greater than or equal to 145 and less than 160, choose a high pitch with a volume intensity between 5 and 8 and a speed value not greater than 8;

[0157] (5) When the average fetal heart rate is greater than 160, select a high-pitched scale with a volume intensity of not less than 6 and a speed of sound of not more than 6.

[0158] In this way, the user end can be based on the above-mentioned music configuration rules, according to the target fetal heart rate range where the target fetal heart rate data is located, and the configuration parameters of each sub-note file in dimensions such as pitch, intensity, and speed, combined with the set configuration parameters, and use the sub-note file whose difference between the corresponding configuration parameters and the set configuration parameters is within the set range as the target music file.

[0159] Among them, the configuration parameters of the setting can be fixed parameter values ​​set by the user, or the user end can choose to use the configuration parameters of the sub-note file that was last determined as the target music file as the configuration parameters of the setting in order to avoid too large a difference in the scale of two adjacent note files played when the user end is composing continuously.

[0160] So, in Figure 6 Based on Figure 7 , Figure 7 Show Figure 3 Another schematic flow chart of the sub-steps of step 204 in FIG. 1 is provided. In one embodiment, the melody playing method may further include the following sub-steps:

[0161] Step 204-8, updating the set configuration parameters according to the configuration parameters of the target temperament file.

[0162] Through continuous iteration, after the user terminal determines the target temperament file in step 204-7, it can update the set configuration parameters according to the configuration parameters of the target temperament file, for example, update the set configuration parameters to the configuration parameters of the target temperament file.

[0163] In addition, in the implementation method of composing music using musical notes, in order to reflect the fetal movement when measuring fetal heart data, as a possible implementation method, Figure 6 Based on Figure 8 , Figure 8 Another schematic flow chart of the music playing method provided by the present application is shown. Before executing step 206, the music playing method may further include the following steps:

[0164] Step 205: When the target fetal heart data contains a fetal movement mark, adjust the scale of the target music file.

[0165] Among them, the user end can adopt, for example, the above-mentioned implementation method provided in this application to determine whether the target fetal heart data contains a fetal movement mark, and this application will not elaborate on it here.

[0166] Therefore, when the user terminal determines that the target fetal heart data contains a fetal movement marker, the scale of the target music file can be adjusted, and when executing step 206, the target music file with the adjusted scale is played, so that the user can perceive the fetal movement within the time period corresponding to the target fetal heart data through the changes in the scale of the played music, thereby enhancing the user's perception.

[0167] In one embodiment, when the user terminal adjusts the scale of the target music file, the user terminal may raise the scale of the last note of the target music file, for example, raising the last note by 8 degrees.

[0168] Alternatively, in another embodiment, when the user terminal adjusts the scale of the target music file, the user terminal can add a fetal movement identification sound to the last sound of the target music file, such as adding a pre-set fetal movement special sound, so that the user can determine whether the fetus moves within the corresponding time period by identifying the fetal movement identification sound.

[0169] In one embodiment, in order to enhance the user experience, configuration rules of multiple different timbre types may be pre-recorded on the user end, so that the user end can generate melodies of different timbre types.

[0170] To this end, Figure 3 Based on Fig. 9 , Fig. 9 Another schematic flow chart of the melody playing method provided by the present application is shown. Before executing step 202, the melody playing method may further include the following steps:

[0171] Step 200, determining the temperament configuration rule in the timbre type strategy.

[0172] In one embodiment, the user terminal may store a timbre type strategy, which includes multiple configuration rules, such as a handpan timbre configuration rule, a piano timbre configuration rule, a harmonica timbre configuration rule, a violin timbre configuration rule, etc.

[0173] When the user terminal executes the music playing method provided by the present application, a configuration rule can be determined in the timbre type strategy as the music configuration rule.

[0174] For example, one of the configuration rules selected by the user may be received as the music configuration rule; or, a configuration rule may be selected as the music configuration rule based on the current timestamp when the user terminal executes the music playing method, such as the above-mentioned random algorithm.

[0175] In this way, the user end can generate a target temperament file corresponding to the target fetal heart data according to the temperament configuration rule determined from the timbre type strategy, so that the user end can play temperaments of different timbre types.

[0176] It should be noted that, as described above, the target fetal heart data obtained by the user end may be fetal heart data received by the user end, for example, sent by a front-end device, or fetal heart data downloaded by the user end from a server, or fetal heart data stored by the user end itself.

[0177] To this end, in application scenarios such as a user receiving fetal heart data sent by a front-end device, as a possible implementation method, Figure 3 Based on Fig.10 , Fig.10Another schematic flow chart of the melody playing method provided by the present application is shown. Before executing step 202, the melody playing method may further include the following steps:

[0178] Step 201-2, saving the received fetal heart data to the first queue;

[0179] In one embodiment, the user terminal may set a first queue, and the first queue may be configured to store received fetal heart data. Thus, when the user terminal receives fetal heart data, the user terminal may store the received fetal heart data in the first queue.

[0180] Therefore, when executing step 202, the user end may read the first queue in time sequence, thereby reading the fetal heart data stored in the first queue to obtain the target fetal heart data.

[0181] It should be noted that, as mentioned above, the fetal heart data is generally measured once every second; in some possible implementations, in order to avoid large rhythm fluctuations caused by excessive changes in the fetal heart rate in a short period of time, the user end can select the fetal heart value over a period of time as the target fetal heart data.

[0182] However, when the user end plays the target music file, the duration of the target music file that can be played may be longer than the duration of the target fetal heart data collection; for example, the target fetal heart data collected for 5 seconds can be used to obtain a target music file that can be played for 20 seconds, that is, a small amount of fetal heart data is used to play a longer music. Therefore, in some possible implementations, the user end can discard some received fetal heart data.

[0183] To this end, Fig.10 Based on Fig.11 , Fig.11 Another schematic flow chart of the melody playing method provided by the present application is shown. Before executing step 201-2, the melody playing method may further include the following steps:

[0184] Step 201-1, determining whether the remaining playback time is less than a first threshold; if yes, executing step 201-2; if no, executing step 201-3;

[0185] Step 201-2, saving the received fetal heart data to the first queue;

[0186] Step 201-3, discarding the received fetal heart data.

[0187] In one embodiment, when playing a music file, the user terminal can record the remaining playback time of the music file; then, whenever fetal heart data is received, the user terminal compares the recorded remaining playback time with a first threshold value. When the remaining playback time is less than the first threshold value, the user terminal executes step 201-2 to save the received fetal heart data to the first queue; conversely, when the remaining playback time is greater than or equal to the first threshold value, the user terminal executes step 201-3 to discard the received fetal heart data.

[0188] For example, taking the above-mentioned target fetal heart data including 5 fetal heart values ​​as an example, it is assumed that the first threshold is set to 5 seconds; every time the user terminal receives fetal heart data, it determines whether the remaining playback time of the music file is less than 5 seconds; if the remaining playback time is less than 5 seconds, the user terminal saves the received fetal heart data to the first queue; if the remaining playback time is greater than or equal to 5 seconds, the user terminal discards the received fetal heart data.

[0189] In addition, in application scenarios such as a user downloading fetal heart data from a server, or using fetal heart data stored in the user terminal, as another possible implementation method, Figure 3 Based on Fig.12 , Fig.12 Another schematic flow chart of the melody playing method provided by the present application is shown. Before executing step 202, the melody playing method may further include the following steps:

[0190] Step 201-6, save the read historical fetal heart data to the first queue and update the number of data;

[0191] In one embodiment, the user terminal can use the fetal heart data stored by itself, or the fetal heart data downloaded from the server as the historical fetal heart data; then, the user terminal can read the historical fetal heart data, save the read historical fetal heart data to the first queue according to the time series, and update the number of data, wherein the number of data is configured to indicate the number of historical fetal heart data saved in the first queue; for example, when the number of data is "4", it indicates that the number of historical fetal heart data saved in the first queue is 4, that is, the first queue saves 4 seconds of fetal heart data.

[0192] Therefore, the user end can monitor the number of data. When the number of data reaches the second threshold, the user end can execute step 202 and read the historical fetal heart data stored in the first queue according to the second threshold to obtain the target fetal heart data and reset the first queue and the number of data.

[0193] For example, assuming that the second threshold is set to "5", when the number of data monitored by the user end reaches "5", the user end can read the "5" historical fetal heart data saved in the first queue, thereby taking the "5" historical fetal heart data as the target fetal heart data, and then clearing the first queue and resetting the number of data to "0".

[0194] In addition, in some possible implementations, the user may also choose to save the continuously played music file so that the user can share it or play it again.

[0195] Therefore, as a possible implementation method, Figure 3 Based on Fig.13 , Fig.13 Another schematic flow chart of the melody playing method provided by the present application is shown. After executing step 206, the melody playing method may further include the following steps:

[0196] Step 208, saving the target music file to the second queue;

[0197] Step 210: When a merge instruction is received, all the music files in the second queue are merged to generate an audio file.

[0198] In one embodiment, the user terminal may be provided with a second queue, and the second queue is configured to store the rhythm file corresponding to the fetal heart data.

[0199] To this end, after executing step 206 to obtain the target music file, the user end may save the target music file to the second queue; and when the user end receives a merge instruction, the user end may merge all the music files in the second queue to generate an audio file.

[0200] For example, the user end may use the received composition end instruction as a merge instruction. When the composition end instruction is received, the user end may execute step 210 to merge all the music files in the second queue to generate an audio file, and save the generated audio file locally, or upload it to a cloud server for storage; or, when the user end uses historical fetal heart data to play music, if the user end finishes reading the historical fetal heart data, that is, finishes traversing all fetal heart data, the user end can determine that the merge instruction is obtained, thereby executing step 210.

[0201] In the embodiments provided in the present application, it should be understood that the disclosed method can also be implemented in other ways. The method embodiments described above are merely schematic, for example, the flow charts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the functional modules, methods and computer program products according to some embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of a code includes one or more executable instructions that can implement the specified logical functions.

[0202] It should also be noted that in some alternative implementations, the functions marked in the blocks may also occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved.

[0203] It should also be noted that each box in the block diagram and / or flowchart, and combinations of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0204] In addition, in some embodiments of the present application, the functional modules can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.

[0205] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.

[0206] Furthermore, the above is only a part of the embodiments of the present application, and does not limit all implementations of the present application. For those skilled in the art, the present application may have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0207] It will be apparent to those skilled in the art that the present application is not limited to the details of the exemplary embodiments described above, and that the present application can be implemented in other specific forms without departing from the spirit or essential features of the present application. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the present application is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims be included in the present application. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0208] Industrial Applicability

[0209] The present application provides a music playing method, a user terminal and a storage medium, which obtains target fetal heart data and obtains a target music file corresponding to the target fetal heart data according to a music configuration rule that records the correspondence between multiple fetal heart data and multiple music files, thereby playing the target music file. Compared with the prior art, the target fetal heart data is converted into music that can be perceived by the user, thereby enhancing the user's perception and improving the interactive effect.

[0210] In addition, the user end uses different copy files to distinguish between situations where the fetal heart data contains fetal movement data and situations where it does not contain fetal movement data, so that the user can use different copy files to distinguish whether the fetus has fetal movement when collecting the corresponding fetal heart data, thereby enhancing user perception and improving the interactive effect.

Claims

1. A melody playing method, characterized in that: The method comprises: Obtaining target fetal heart data, wherein the target fetal heart data includes a plurality of fetal heart values, and the target fetal heart data includes target fetal heart data containing a fetal movement mark and target fetal heart data not containing a fetal movement mark; According to the rhythm configuration rule, a target rhythm file corresponding to the target fetal heart data is obtained; wherein the rhythm configuration rule records the correspondence between multiple fetal heart data and multiple rhythm files, and the target rhythm file uses different copy files to distinguish between the target fetal heart data containing the fetal movement mark and the target fetal heart data without the fetal movement mark; Play the target music file to enhance the user's perception of the fetus. The melody configuration rule records the correspondence between multiple fetal heart ranges and multiple melody files; and Wherein, according to the temperament configuration rule, the step of obtaining the target temperament file corresponding to the target fetal heart data comprises: Obtaining an average fetal heart rate value of the plurality of fetal heart rate values ​​included in the target fetal heart rate data; The melody file corresponding to the target fetal heart rate range in the melody configuration rule is determined as the target melody file; wherein the target fetal heart rate range is the fetal heart rate range where the average fetal heart rate value among the multiple fetal heart rate ranges is located.

2. The method according to claim 1, characterized in that Each melody file includes a first copy file and a second copy file; The step of determining the melody file corresponding to the target fetal heart rate range in the melody configuration rule as the target melody file comprises: Determining whether the target fetal heart data contains a fetal movement indicator; When the target fetal heart data does not include a fetal movement identifier, determining the first copy file included in the melody file corresponding to the target fetal heart range as the target melody file; When the target fetal heart data includes a fetal movement identifier, the second copy file included in the melody file corresponding to the target fetal heart range is determined as the target melody file.

3. The method according to claim 1 or 2, characterized in that Each melody file includes a plurality of sub-melody files; The step of determining the melody file corresponding to the target fetal heart rate range in the melody configuration rule as the target melody file comprises: The target melody file is determined from a plurality of sub-melody files included in the melody file corresponding to the target fetal heart rate range.

4. The method according to claim 1, characterized in that Before the step of obtaining a target temperament file corresponding to the target fetal heart data according to the temperament configuration rule, the method further includes: The temperament configuration rule is determined in the timbre type strategy; wherein the timbre type strategy includes a plurality of configuration rules.

5. The method according to claim 1 or 2, characterized in that: Before the step of obtaining target fetal heart data, the method further includes: The received fetal heart data is saved in the first queue; The steps of obtaining target fetal heart rate data include: The first queue is read in chronological order to obtain the target fetal heart data.

6. The method according to claim 5, characterized in that Before the step of saving the received fetal heart data to the first queue, the method further includes: Determine whether the remaining playback time is less than a first threshold; When the answer is yes, the step of saving the received fetal heart data to the first queue is executed.

7. The method according to claim 1 or 2, characterized in that: Before the step of obtaining target fetal heart data, the method further includes: The read historical fetal heart data is saved to the first queue, and the number of data is updated; wherein the number of data is configured to indicate the quantity of historical fetal heart data saved in the first queue; When the number of data reaches a second threshold, the step of obtaining target fetal heart data includes: The historical fetal heart data stored in the first queue is read according to the second threshold value to obtain the target fetal heart data, and the first queue and the number of data are reset.

8. The method according to claim 1, characterized in that After the step of obtaining a target temperament file corresponding to the target fetal heart data in a temperament file library, the method further comprises: Saving the target rhythm file to a second queue; wherein the second queue is configured to save the rhythm file corresponding to the fetal heart data; When a merge instruction is received, all the music files in the second queue are merged to generate an audio file.

9. A melody playing method, characterized in that: The method comprises: Obtaining target fetal heart data, wherein the target fetal heart data includes a plurality of fetal heart values, and the target fetal heart data includes target fetal heart data containing a fetal movement mark and target fetal heart data not containing a fetal movement mark; According to the rhythm configuration rule, a target rhythm file corresponding to the target fetal heart data is obtained; wherein the rhythm configuration rule records the correspondence between a plurality of fetal heart data and a plurality of rhythm files, and the target rhythm file uses different scales to distinguish the target fetal heart data containing a fetal movement mark and the target fetal heart data not containing a fetal movement mark; Play the target music file to enhance the user's perception of the fetus. The musical temperament configuration rule records the correspondence between a plurality of fetal heart ranges and a plurality of musical note files; and Wherein, according to the temperament configuration rule, the step of obtaining the target temperament file corresponding to the target fetal heart data comprises: Obtaining an average fetal heart rate value of the plurality of fetal heart rate values ​​included in the target fetal heart rate data; The note file corresponding to the target fetal heart rate range in the melody configuration rule is determined as the target melody file; wherein the target fetal heart rate range is the fetal heart rate range where the average fetal heart rate value among the multiple fetal heart rate ranges is located.

10. The method according to claim 9, characterized in that Each note file includes a plurality of sub-note files; The step of determining the musical note file corresponding to the target fetal heart rate range in the musical note configuration rule as the target musical note file comprises: The target melody file is determined from a plurality of sub-note files included in the note file corresponding to the target fetal heart rate range.

11. The method according to claim 10, characterized in that Each sub-note file corresponds to configuration parameters; The step of determining the target melody file from among the multiple sub-note files included in the note file corresponding to the target fetal heart rate range comprises: Among the multiple sub-note files included in the note file corresponding to the target fetal heart rate range, the target sub-note file whose difference between the corresponding configuration parameter and the set configuration parameter is within the set range is determined as the target melody file.

12. The method according to claim 11, characterized in that The method further comprises: The set configuration parameters are updated according to the configuration parameters of the target temperament file.

13. The method according to any one of claims 9 to 12, characterized in that: Before the step of playing the target temperament file, the method further comprises: When the target fetal heart data contains a fetal movement mark, adjusting the scale of the target music file; The step of playing the target music file comprises: Play the target temperament file after adjusting the scale.

14. The method according to claim 13, characterized in that The step of adjusting the scale of the target temperament file comprises: Raise the scale of the last note of the target temperament file.

15. The method according to claim 13, characterized in that The step of adjusting the scale of the target temperament file comprises: A fetal movement identification sound is added to the last sound of the target rhythm file.

16. The method according to claim 9, characterized in that Before the step of obtaining a target temperament file corresponding to the target fetal heart data according to the temperament configuration rule, the method further includes: The temperament configuration rule is determined in the timbre type strategy; wherein the timbre type strategy includes a plurality of configuration rules.

17. The method according to any one of claims 9 to 12, characterized in that Before the step of obtaining target fetal heart data, the method further includes: The received fetal heart data is saved in the first queue; The steps of obtaining target fetal heart rate data include: The first queue is read in chronological order to obtain the target fetal heart data.

18. The method according to claim 17, characterized in that Before the step of saving the received fetal heart data to the first queue, the method further includes: Determine whether the remaining playback time is less than a first threshold; When the answer is yes, the step of saving the received fetal heart data to the first queue is executed.

19. The method according to any one of claims 9 to 12, characterized in that: Before the step of obtaining target fetal heart data, the method further includes: The read historical fetal heart data is saved to the first queue, and the number of data is updated; wherein the number of data is configured to indicate the quantity of historical fetal heart data saved in the first queue; When the number of data reaches a second threshold, the step of obtaining target fetal heart data includes: The historical fetal heart data stored in the first queue is read according to the second threshold value to obtain the target fetal heart data, and the first queue and the number of data are reset.

20. The method of claim 9, wherein: After the step of obtaining a target temperament file corresponding to the target fetal heart data in a temperament file library, the method further comprises: Saving the target rhythm file to a second queue; wherein the second queue is configured to save the rhythm file corresponding to the fetal heart data; When a merge instruction is received, all the music files in the second queue are merged to generate an audio file.

21. A user terminal, characterized in that: include: a memory configured to store one or more programs; processor; When the one or more programs are executed by the processor, the method according to any one of claims 1 to 20 is implemented.

22. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 20 is implemented.

Citation Information

Patent Citations

  • Method capable of changing musical style of music according to heart rate value and mobile terminal

    CN104133551A

  • Intelligent wearable equipment and heart rate monitoring method thereof

    CN107007275A

  • Physiological data processing method and device

    CN107174238A

  • Fetal heart rate monitoring method and device thereof, terminal, and computer readable storage medium

    CN109549641A