Audio file construction method, audio processing device, and storage medium
By splitting an electrocardiogram (ECG) into image segments and matching sub-audio to synthesize a commemorative audio file, the problem of poor information expression in ECGs was solved, achieving a highly efficient improvement in user experience and a reduction in cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, electrocardiograms are poor at conveying information when used as souvenirs, making it difficult for people without professional backgrounds to extract information from them, resulting in a poor user experience.
By acquiring the target user's electrocardiogram (ECG), splitting it into ECG image segments, and using a pre-trained classification model or template matching to obtain the corresponding sub-audio, a commemorative audio file is synthesized, thereby improving the information expression capability.
Converting electrocardiograms into commemorative audio files that match the actual heartbeat sound at the time of electrocardiogram acquisition improves the information expression and user experience of electronic keepsakes, while reducing the cost and convenience of heart sound data collection.
Smart Images

Figure CN119811358B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more particularly to a method for constructing audio files, an audio processing device, and a storage medium. Background Technology
[0002] An electrocardiogram (ECG) is a graphical representation of the heart's electrical activity. It works by placing electrodes on the body's surface to detect electrical signals from the heart; these signals are then recorded and formed into a series of waveforms and line segments. In some commemorative occasions, there is a need to preserve ECGs from specific times to remember a particular moment, such as the first detection of fetal heartbeat. However, because ECGs are displayed as waveforms and line segments, it is difficult for people without a professional background to extract information from them, resulting in a limited ability to convey meaningful information when an ECG is used as a keepsake. Summary of the Invention
[0003] The main purpose of this application is to provide a method for constructing audio files, an audio processing device, and a storage medium, aiming to solve the technical problem in related technologies where the noise reduction control scheme does not match the user's expectations, resulting in a poor user experience.
[0004] To achieve the above objectives, embodiments of this application provide a method for constructing an audio file, the method comprising:
[0005] Obtain the electrocardiogram (ECG) of the target user;
[0006] Based on the electrocardiogram, at least one sub-audio tone that matches the electrocardiogram is obtained;
[0007] A commemorative audio file corresponding to the electrocardiogram is synthesized based on the sub-audio.
[0008] In this embodiment of the application, the step of obtaining at least one sub-audio frequency matching the electrocardiogram (ECG) includes:
[0009] Based on the cardiac cycle, the electrocardiogram is divided into at least two electrocardiogram segments, wherein each electrocardiogram segment consists of electrocardiogram data corresponding to one or more cardiac cycles;
[0010] The sub-audio is obtained based on the electrocardiogram segment.
[0011] In this embodiment of the application, the step of obtaining the sub-audio based on the electrocardiogram segment includes:
[0012] The target ECG segment template is determined based on the matching degree between the ECG segment and the pre-stored ECG segment template;
[0013] obtaining the sub-audio associated with the target electrocardiogram picture segment template.
[0014] In the embodiments of the present application, the step of obtaining the sub-audio according to the electrocardiogram picture segment comprises:
[0015] inputting the electrocardiogram picture segment into a pre-trained classification model to obtain a classification corresponding to the electrocardiogram picture segment;
[0016] obtaining the sub-audio associated with the classification.
[0017] In the embodiments of the present application, the step of synthesizing the commemorative audio file corresponding to the electrocardiogram according to the sub-audio comprises:
[0018] determining a splicing order of the sub-audio according to a position of the electrocardiogram picture segment in the electrocardiogram;
[0019] splicing the sub-audio in the splicing order to obtain the commemorative audio file.
[0020] In the embodiments of the present application, the step of obtaining the electrocardiogram corresponding to the target user further comprises:
[0021] obtaining a number of cardiac cycles and / or a detection time length corresponding to the electrocardiogram;
[0022] if the number of cardiac cycles is greater than a preset number and / or the detection time length is greater than a preset time length, performing the step of obtaining at least one sub-audio matched with the electrocardiogram according to the electrocardiogram;
[0023] otherwise, outputting a prompt information.
[0024] In the embodiments of the present application, the step of obtaining the electrocardiogram corresponding to the target user comprises:
[0025] in response to a commemorative audio file generation instruction, obtaining a biological signal collected by a smart wearable device;
[0026] generating the electrocardiogram according to the biological signal.
[0027] In the embodiments of the present application, the step of synthesizing the commemorative audio file corresponding to the electrocardiogram according to the sub-audio further comprises:
[0028] in response to a file saving instruction, saving the commemorative audio file in association with identification information of a triggering end of the file saving instruction; and / or
[0029] in response to the file saving instruction, saving the commemorative audio file to a local.
[0030] The embodiment of the present application further provides an audio processing device, which comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the method for constructing an audio file.
[0031] The embodiment of the present application further provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method for constructing an audio file.
[0032] The embodiment of the present application discloses a method for constructing an audio file and an audio processing device. First, an electrocardiogram corresponding to a target user is acquired, and then at least one sub-audio matched with the electrocardiogram is acquired according to the electrocardiogram, and further a commemorative audio file corresponding to the electrocardiogram is synthesized according to the sub-audio. Thus, the electrocardiogram is converted into a commemorative audio file that matches the actual heartbeat sound at the electrocardiogram collection time. This effectively improves the information expression capability of the electronic souvenir and improves the user experience. At the same time, compared with the scheme of directly collecting heart sounds, the present scheme does not need to additionally increase a heart sound collection device, improves the convenience of heart sound data collection, and also reduces the cost of heart sound data collection. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 is a flowchart of an embodiment of the method for constructing an audio file related to the embodiment of the present application;
[0034] Figure 2 is a flowchart of another embodiment related to the embodiment of the present application;
[0035] Figure 3 is a flowchart of still another embodiment related to the embodiment of the present application;
[0036] Figure 4 is a schematic diagram of a save interface related to still another embodiment of the present application;
[0037] Figure 5 is a structural schematic diagram of the audio processing device of the present application.
[0038] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0039] It should be understood that the specific embodiments described herein are merely intended to explain the present application, and are not intended to limit the present application.
[0040] The beating of the heart is a manifestation of life. The need to preserve the sound of the heartbeat for commemoration can arise in various situations, often closely linked to life, emotion, important moments, or artistic innovation. By preserving the sound of the heartbeat, people can more deeply feel the preciousness of life, the depth of emotion, and the passage of time.
[0041] The heartbeat of a newborn symbolizes the beginning of a new life and is of great commemorative value to parents and family members. Recording the heartbeat of a child during their growth can serve as a witness to their growth and leave precious memories.
[0042] When someone experiences a serious health problem or surgery and successfully recovers, recording their heartbeat can serve as a commemoration of an important milestone. For heart disease patients or those who have undergone heart surgery, the heartbeat can symbolize the resilience of life and the hope of recovery.
[0043] In romantic relationships, recording the heartbeat of a partner as a keepsake can express deep love and intimacy. In family relationships, recording the heartbeats of family members can strengthen their connection and bond. On important commemorative days, birthdays, or celebration events, recording heartbeats can serve as a unique commemorative method, capturing the emotions and atmosphere of that moment. At important turning points in life, such as graduation, marriage, or the birth of a child, heartbeats can serve as a witness to personal growth.
[0044] In related technologies, to commemorate the heartbeat at the response moment, only the electrocardiogram at the response moment can be collected through a smart bracelet or other collection devices for commemoration. The electrocardiogram is a graphical representation method of recording heart electrical activity. It detects the electrical signals of the heart by placing electrodes on the body surface, which are then recorded and formed into a series of waveforms and lines. However, since the electrocardiogram is displayed by waveforms and lines, it is difficult for people without professional background to obtain information from the electrocardiogram, resulting in the defect of poor information expression ability when using the electrocardiogram as a keepsake.
[0045] To solve the above problems in the related art, the present application proposes a control scheme for an audio processing device. In the scheme proposed in the present application, after the audio processing device obtains the electrocardiogram of the target user, the corresponding sub-audio is obtained based on the electrocardiogram, and then the commemorative audio is constructed according to the sub-audio. Thus, the sound of the heartbeat at the corresponding moment is obtained to commemorate the corresponding moment. Since sound has better information transmission ability than electrocardiogram, the user can review the corresponding moment by playing the corresponding commemorative audio file to resonate with the emotions of the corresponding moment. This effectively improves the information expression ability of the keepsake and achieves the effect of improving user experience.
[0046] For the convenience of understanding, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0047] Please refer to Figure 1 In an optional embodiment, the method for constructing an audio file comprises the following steps S10-S30:
[0048] S10: obtaining an electrocardiogram corresponding to a target user;
[0049] In the present embodiment, the method for constructing an audio file described above can be applied to control a smart wearable device to synthesize a commemorative audio file, or can also be executed on a server, a mobile phone, a tablet computer or the like to construct a commemorative audio file. In some variant embodiments, a server, a smart device and / or a smart wearable device or the like can jointly construct a system, and then the purpose of synthesizing a commemorative audio file is realized based on the system. The gist of the scheme provided in the present embodiment is to synthesize a corresponding commemorative audio file according to an electrocardiogram corresponding to a target user. Any implementation based on the method provided in the present embodiment and variants thereof all belong to the protection scope of the present application.
[0050] Optionally, as an embodiment based on a smart watch or a smart bracelet, if a commemorative audio file generation instruction is triggered, a biological signal collected by a smart wearable device can be obtained, and then the electrocardiogram is generated according to the biological signal.
[0051] Illustratively, the smart bracelet can be in communication connection with a smart terminal, and a user triggers a commemorative audio file generation instruction through an interactive interface in the smart terminal, and then the instruction is forwarded to the smart bracelet. When the smart bracelet receives the commemorative audio file generation instruction, ECG data is collected and then sent to the smart terminal for the smart terminal to generate an electrocardiogram. Alternatively, the smart bracelet can first generate an electrocardiogram after collecting ECG data and then send the electrocardiogram to the smart terminal. Similarly, the smart bracelet can also collect basic data for generating an electrocardiogram or directly generate an electrocardiogram in response to a control instruction of a server or other terminal, and then feed back the corresponding data to the corresponding triggering end. Alternatively, a commemorative audio file generation instruction can also be triggered directly through an interactive interface of the smart bracelet, and then the smart bracelet collects ECG data or generates an electrocardiogram in response to the instruction. It can be understood that in this way, depending on the specific implementation architecture, different terminals can realize the triggering of a commemorative audio file generation instruction and subsequent data processing actions. The smart bracelet is a terminal for collecting basic data.
[0052] For example, a smart bracelet is equipped with a memorial audio file generation instruction ECG sensor. In response to the memorial audio file generation instruction, the smart bracelet system sends a start signal to the ECG sensor, and the sensor starts collecting the user's electrocardiogram signal. The collected electrocardiogram signal is first subjected to amplification and filtering processing to improve the signal-to-noise ratio of the signal. The analog signal after amplification and filtering is sent to an analog-to-digital converter (ADC) for analog-to-digital conversion to a digital signal.
[0053] If the data processing stage is executed on the smart bracelet, the converted digital signal is first cached in the local memory of the bracelet. The system further processes the cached data, such as denoising, baseline correction, etc., to obtain more accurate ECG waveforms. Then the system identifies key features in the ECG waveform, such as R wave (ventricular depolarization wave), and calculates heart rate, RR interval and other parameters, and generates an electrocardiogram based on the corresponding description. Optionally, the bracelet can send the processed data to the user's smart phone or other smart devices through the Bluetooth module; it can be selected to upload the data to the cloud server for further storage and analysis.
[0054] Optionally, in another optional embodiment, the smart bracelet automatically collects the user's electrocardiogram when it identifies that it is currently in an important memorial day, birthday or celebration.
[0055] Exemplarily, the smart bracelet is connected with the user's smart phone through Bluetooth or Wi-Fi, and integrates the calendar application of the smart phone. Then the user's calendar events, including important memorial days, birthdays and celebrations, etc., are synchronized.
[0056] The bracelet software continuously monitors the synchronized calendar events to find important dates that are about to occur or are occurring. When an event matching the preset keywords (such as "birthday", "memorial day", "celebration") is detected, the electrocardiogram collection preparation process is triggered.
[0057] A certain period of time (such as 30 minutes) before the start of the event, the bracelet notifies the user through vibration and screen prompt that the electrocardiogram will be automatically collected soon. To provide the user with the option of whether to continue collecting, to ensure the user's privacy and autonomy. If the user chooses to continue, the bracelet software will remind the user again of the privacy policy of electrocardiogram collection, to ensure that the user understands how the data will be used and stored.
[0058] As an optional setting, user guidance can also be provided through the bracelet screen or the matching APP, to inform how to correctly wear the bracelet to ensure the accuracy of electrocardiogram collection. For example, suggestions such as adjusting the position of the bracelet and keeping still can be output.
[0059] It should be noted that other automatic ECG collection modes can also be set based on functional design requirements. For example, the user's heart rate and / or blood oxygen saturation can be detected as a trigger condition for ECG collection. For example, when the heart rate changes meet the change rule of the excitement scene, it is determined that the current is in a memorable period, thereby automatically triggering the collection of ECG. Or when the blood oxygen saturation is lower than the threshold, it is determined that the current is in a dangerous stage, and the ECG can be collected for diagnostic assistance while serving as the basis for generating a commemorative audio file.
[0060] Optionally, in a scenario independent of the smart bracelet, an ECG upload interface can be set in the user interaction interface. So that the user can upload the picture type ECG or other data type ECG to the audio processing device based on the upload interface, so that the audio processing device can obtain the ECG of the target user.
[0061] S20: According to the ECG, at least one sub-audio matched with the ECG is obtained;
[0062] After obtaining the ECG, at least one sub-audio used to construct a commemorative audio file can be obtained according to the ECG. Wherein, the sub-audio is a pre-saved heartbeat sound.
[0063] As an optional solution, the obtained ECG is split into at least two ECG picture segments according to the cardiac cycle, wherein the ECG picture segment is composed of ECG data corresponding to one or more cardiac cycles, and then the sub-audio is obtained according to the ECG picture segment.
[0064] For example, the R-wave detection algorithm can be used to automatically identify the R-wave position in the ECG, and the R-wave is the wave peak in the ECG that marks the ventricular depolarization, which marks the start of the cardiac cycle. Then the start point and end point of each cardiac cycle are determined according to the R-wave position to calculate the length of the cardiac cycle.
[0065] Then, according to the preset n value (n is a positive integer, representing the number of cardiac cycles in each segment), the total length of each segment is calculated. Then, starting from the starting position of the ECG, the ECG signal is divided into multiple ECG picture segments containing n cardiac cycles according to the calculated segment length. For the last segment, if the remaining signal is not enough to form a complete cardiac cycle, or the remaining signal is not enough for a cardiac cycle, it can be discarded or processed separately as an incomplete segment. Optionally, considering that the length of the cardiac cycle may vary, a dynamic calculation method can be used, that is, the average length of the first m (m≥n) cardiac cycles is used to estimate the approximate length of each segment.
[0066] In an embodiment, after the electrocardiogram is split into multiple electrocardiogram picture segments, a target electrocardiogram picture segment template can be determined according to the matching degree between the electrocardiogram picture segment and a pre-stored electrocardiogram picture segment template, and the sub-audio associated with the target electrocardiogram picture segment template is obtained.
[0067] Exemplarily, the pre-stored electrocardiogram picture segment template is loaded from the database first. The electrocardiogram picture segment template is associated with a sub-audio. The sub-audio is the sound of one heartbeat or the sound of multiple heartbeats. The sound characteristics of the heartbeat sound in the sub-audio associated with different electrocardiogram picture segment templates are different.
[0068] After the electrocardiogram picture segment and the electrocardiogram picture segment template are obtained, feature extraction can be performed, and the matching degree between the two is determined based on the extracted features. It can be understood that the matching degree calculation is the core link in the electrocardiogram analysis software. In order to improve the accuracy of matching, more complex algorithms and more feature parameters can be introduced to improve the accuracy and robustness of matching. In the following, the present embodiment provides an optional scheme for determining the matching degree:
[0069] In the feature extraction stage, features used for calculating the matching degree can be set based on the time domain, frequency domain and morphological information of the electrocardiogram signal. For example, the amplitude, interval and other basic features of P wave, QRS complex and T wave are extracted as the features for calculating the matching degree. Alternatively, to improve the accuracy, multi-scale features such as wavelet transform coefficients, frequency domain features (such as power spectral density), morphological features (such as area, perimeter) and the like can be further extracted on this basis. The more features used for judgment, the more accurate the matching degree calculation result. Alternatively, after the features are extracted, standardization processing can also be performed. That is, the extracted features are standardized to eliminate the dimensional difference and numerical range difference between different features.
[0070] After the feature extraction is completed, the matching degree between the electrocardiogram picture segment and the pre-stored electrocardiogram picture segment template can be calculated based on the difference between the features and the weight value corresponding to each feature. The electrocardiogram picture segment template with the highest matching degree is taken as the target electrocardiogram picture segment template. And the sub-audio associated with the target electrocardiogram picture segment template is obtained.
[0071] In another embodiment, after the electrocardiogram is split into multiple electrocardiogram picture segments, the electrocardiogram picture segment can be input into a pre-trained classification model to obtain the classification corresponding to the electrocardiogram picture segment, and the sub-audio associated with the classification is obtained.
[0072] Exemplarily, in a test environment, the heart sound corresponding to the electrocardiogram data can be acquired based on the sound amplification device collecting the heart beat sound, so as to obtain the heart sound corresponding to different electrocardiogram data. The two are associated in the form of key-value pair to generate the electrocardiogram data-heart sound data pair. It can be understood that, in order to guarantee the richness of the sample, the electrocardiogram data-heart sound data pair of the same individual in different states can be acquired, and the electrocardiogram data-heart sound data pair corresponding to different types and states can be acquired as sample data based on gender, age, etc. Then, the classification model is trained based on the sample data. The classification model can realize the classification of the electrocardiogram picture segment. The classification model can be selected from a convolutional neural network (CNN), a support vector machine (SVM), or a random forest, etc. The embodiment is not limited in this regard.
[0073] After the training is completed, the split electrocardiogram picture segment can be input into the pre-trained classification model, so as to obtain the corresponding classification result. Since the training data is the electrocardiogram data-heart sound data pair, after the classification is completed, the model automatically takes the classification result and the corresponding heart sound data as the label thereof. In this way, the purpose of determining the corresponding sub-audio based on the electrocardiogram picture segment is achieved.
[0074] It should be noted that, in the electrocardiogram splitting process of the embodiment, when n is greater than 1, at least two heart cycles (except for incomplete fragments) are contained in one electrocardiogram picture segment. When n is 1, each heart cycle is matched with a sub-audio, so that the final synthesized memorial audio file is closest to the actual heart beat sound. When the value of n increases, the data processing overhead decreases and the processing speed increases. However, the deviation of the final synthesized memorial audio file from the actual heart beat sound also increases. That is, the deviation between the actual heart beat sound and the heart beat sound corresponding to the memorial audio file is positively correlated.
[0075] S30: synthesizing the memorial audio file corresponding to the electrocardiogram according to the sub-audio.
[0076] After the sub-audio is acquired, the serial number corresponding to each sub-audio can be determined according to the position of the electrocardiogram picture segment corresponding to the sub-audio in the electrocardiogram, and then the combination position corresponding to each sub-audio can be determined according to the serial number. That is, after the sub-audio is sorted based on the serial number, the sub-audio is combined in the order of sorting.
[0077] As an optional implementation, in the electrocardiogram picture segment splitting process, a plurality of electrocardiogram picture segments can be sequentially split based on the time sequence. The sequentially split electrocardiogram picture segments are labeled based on the time sequence to determine the order of the electrocardiogram picture segments. After the sub-audio segments are acquired based on the electrocardiogram picture segments, the combination order of the sub-audio can be determined according to the order of the electrocardiogram picture segments.
[0078] Exemplarily, after obtaining the audio segments, initialization is performed first. In the initialization stage, an empty data structure (such as a list, an array, etc.) can be created first, which is used to store the audio segments to be combined. This data structure will serve as a container for the audio segments. Then a variable is defined, which is used to represent the total number of audio segments to be processed.
[0079] Further, the corresponding sub-audio files of the sub-audios are read from the file system or downloaded from the network. Optionally, the integrity and format compatibility of each obtained sub-audio file can also be verified. Then the audio segments that pass the verification are stored in the empty data structure created previously.
[0080] In the combination stage, the data structure storing the audio segments is traversed, and each audio segment is read in the order of acquisition. The contents of the read audio segments are connected using the functions or methods provided by the audio processing library or tool to form a continuous audio stream. When connecting the audio segments, a mute interval or other transition effect can be added as needed to ensure smooth transition between segments.
[0081] Optionally, the embodiment also provides an optional solution. When the electrocardiogram corresponding to the target user is obtained, the complete electrocardiogram is directly matched with the pre-stored electrocardiogram template to determine the target template. In this embodiment, the length of the collected electrocardiogram (which can be described based on the collection time or based on the number of cardiac cycles recorded, and the embodiment does not limit this) may not be consistent with the electrocardiogram template. In this embodiment, three alignment measures can be taken. First, during the collection process, the length is used to limit the collection process of the electrocardiogram used to synthesize the commemorative audio file, so that the collected electrocardiogram is adapted to the template. Second, after obtaining the electrocardiogram, a segment of the electrocardiogram that is adapted to the length of the template can be selected for synthesizing the commemorative audio file. Third, only the front segment of the electrocardiogram that is equal in length to the template is used as the matching basis for matching.
[0082] When the target electrocardiogram segment template is determined, a sub-audio is obtained directly according to the target electrocardiogram segment template, and the sub-audio is used as the commemorative audio file. It can be understood that in this implementation scheme, the splitting process is not involved, but a sub-audio of a certain length is obtained directly after one matching. The advantage of this is that the computational overhead is less than that of determining multiple sub-audios based on the split segments, and then combining and synthesizing the commemorative audio file based on the multiple sub-audios.
[0083] In the scheme provided in the embodiment, the electrocardiogram corresponding to the target user is first acquired, and then at least one sub-audio matching the electrocardiogram is acquired according to the electrocardiogram, and further a commemorative audio file corresponding to the electrocardiogram is synthesized according to the sub-audio. Thus, the electrocardiogram is converted into a commemorative audio file that matches the actual heartbeat sound at the electrocardiogram collection moment. This effectively improves the information expression capability of the electronic souvenir and improves the user experience. At the same time, compared with the scheme of directly collecting heart sounds, the scheme does not need to additionally increase a heart sound collection device, improves the convenience of heart sound data collection, and also reduces the cost of heart sound data collection.
[0084] Please refer to Figure 2 In another embodiment of the present application, based on the above embodiment, after the step S10, the method further comprises:
[0085] S40: acquiring the number of cardiac cycles and / or the detection duration corresponding to the electrocardiogram;
[0086] S50: outputting prompt information.
[0087] In order to guarantee the quality of the synthesized commemorative audio file, after the electrocardiogram is acquired, the data amount of the electrocardiogram can be first verified to see whether it meets the minimum requirement for synthesizing the commemorative audio file. The number of cardiac cycles corresponding to the electrocardiogram or the detection duration of the electrocardiogram can be used to determine whether the data amount meets the requirement.
[0088] Exemplarily, the electrocardiogram signal is first preprocessed, including filtering and denoising and normalization processing, to ensure the signal quality. Subsequently, a strategy combining the differential threshold method and amplitude and position verification is adopted to accurately detect the R wave. For the continuously detected R wave, the time interval, i.e., the R-R interval, is calculated, and the abnormally long interval is specially processed. On this basis, the total number of cardiac cycles is counted, and the average value of the R-R interval is calculated as a reference index of the number of cardiac cycles. Then, the calculated number of cardiac cycles (or average value) is compared with a preset threshold value.
[0089] In the scheme of determining the detection duration, starting from the starting point of the electrocardiogram signal, point-by-point or segment-by-segment analysis is performed. Then, the feature detection stage is entered, and the main target is to identify the key feature points in the electrocardiogram, such as the R wave. The R wave is a significant peak value of the QRS complex in the electrocardiogram, which marks the beginning of ventricular contraction. By setting a suitable threshold value and adopting a suitable detection method, such as the differential threshold method or the template matching method, the algorithm can accurately identify the position of each R wave.
[0090] Once the R wave is identified, the algorithm can calculate the time interval between adjacent R waves, i.e. R-R interval. These intervals represent the time interval between successive ventricular contractions, and by recording and counting all R-R intervals, the algorithm can calculate the detection duration of the entire electrocardiogram signal.
[0091] It can be understood that the two judgment conditions of the number of cardiac cycles and the detection duration can be implemented in a case where any one of them is greater than the corresponding threshold, i.e. the subsequent steps of acquiring at least one sub-audio matching the electrocardiogram according to the electrocardiogram, and synthesizing a commemorative audio file corresponding to the electrocardiogram according to the sub-audio are executed. Or it can also be set that only in the case where both conditions are met, the subsequent steps of acquiring at least one sub-audio matching the electrocardiogram according to the electrocardiogram, and synthesizing a commemorative audio file corresponding to the electrocardiogram according to the sub-audio are executed. In addition, whether to judge as meeting the condition when the endpoint value is equal to the corresponding threshold value, and the setting of the specific value of the threshold value, are all content that can be customized according to requirements.
[0092] Optionally, in the case where the conditions are not met, a prompt information can be output. The content expressed by the prompt information can be re-entering the electrocardiogram, restarting the collection process or other content. The prompt information is used to prompt that the current electrocardiogram does not meet the requirements. Similarly, the output mode of the prompt information can also be customized according to the implementation architecture. For example, the action of synthesizing the commemorative audio file is triggered by the smart watch, i.e. it can be output on the smart watch or other terminal connected thereto. The embodiment does not limit this.
[0093] In the technical scheme provided in the embodiment, after the electrocardiogram is acquired, the electrocardiogram is screened first. If it does not meet the requirements, a prompt is output, and only if it meets the requirements, the subsequent action of producing the commemorative audio is executed. In this way, the quality of the finally synthesized commemorative audio is guaranteed.
[0094] Please refer to Figure 3 In still another embodiment of the present application, based on the above embodiment, the step S30 further comprises:
[0095] S60: in response to a file saving instruction, saving the commemorative audio file in association with the identification information of the trigger end of the file saving instruction; and / or
[0096] S70: in response to a file saving instruction, saving the commemorative audio file to the local.
[0097] After the commemorative audio file is synthesized, a saving interface can be displayed. The file saving instruction can be triggered through the saving interface, and then the trigger device is controlled to save the commemorative audio to the local. Or to the cloud.
[0098] Please refer toFigure 4 The saving interface is provided with a local saving button and / or a cloud saving button. The user can trigger the above-mentioned file saving instruction through the local saving button and / or the cloud saving button. When the triggering device detects that the corresponding button is triggered, the saving action is performed.
[0099] Optionally, in the case of triggering local saving, if the commemorative audio file is generated locally, it can be directly saved. Or it can be saved in association with the corresponding electrocardiogram to the local. If the association saving scheme is adopted, in the subsequent playing interface, the electrocardiogram can be used as the background or cover of the playing interface to render the playing interface of the commemorative audio file. If the commemorative audio file is generated in the cloud, the commemorative audio file is first requested and downloaded from the cloud, and then the local saving action is performed.
[0100] In the case of triggering cloud saving, if the file is generated in the server, the identification information of the triggering end of the file saving instruction is first obtained, and then the commemorative audio file is saved in association with the identification information of the triggering end of the file saving instruction. The identification information can be a login account or a device identification. This embodiment is not limited thereto.
[0101] Optionally, in the saving interface, an audio icon display area and an electrocardiogram display area can also be provided. The audio icon display area can be used to display the icon corresponding to the commemorative audio file. The electrocardiogram display area can also be provided in the saving interface, and the electrocardiogram used to synthesize the commemorative audio file can be displayed in the area.
[0102] Optionally, the saving interface is also provided with a playing control button, so that the playing state and progress of the commemorative audio file can be controlled through the start, pause, progress control and other buttons. At the same time, the electrocardiogram curve corresponding to the current playing progress can also be highlighted according to the playing progress, so as to realize the linkage with the display effect of the electrocardiogram display area.
[0103] Optionally, in some embodiments, a delete button can also be provided in the saving interface. When the delete button is triggered, the synthesized commemorative audio file is deleted. Alternatively, before the saving button is triggered, when the user's instruction to exit the saving interface is received, the commemorative audio file is directly deleted or deleted after the client is inquired.
[0104] In the scheme provided in this embodiment, the user can choose to save the synthesized commemorative audio file in the local storage and / or cloud storage mode, thereby improving the saving convenience of the commemorative audio file.
[0105] The application provides an audio processing device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method for constructing an audio file in the above-mentioned embodiment one.
[0106] Reference will be made to the following description Figure 5 , which shows a structural schematic diagram of an audio processing device suitable for implementing the embodiments of the application. The audio processing device in the embodiments of the application can include, but is not limited to, devices such as a mobile phone, a tablet, a PC, a server and a smart wearable device. Figure 5 The audio processing device shown is merely an example and should not impose any limitation on the functions and use range of the embodiments of the application.
[0107] As shown in Figure 5 , the audio processing device can include a processing apparatus 1001 (for example, a central processor, a graphics processor, etc.), which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 1002 or loaded from a storage apparatus 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for operation of the audio processing device are also stored. The processing apparatus 1001, the ROM 1002 and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input apparatus 1007 including, for example, a touch screen, a touch pad, etc.; an output apparatus 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the audio processing device to communicate with other devices wirelessly or by wire to exchange data. Although the audio processing device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be alternatively implemented or provided.
[0108] In particular, according to the embodiments of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiments of the present application are executed.
[0109] The audio processing device provided by the present application adopts the audio processing device method in the above embodiments, and can solve the technical problem of poor expression of electrocardiogram information, resulting in poor user experience in the electronic souvenir generation scheme. Compared with the related art, the audio processing device provided by the present application has the same beneficial effects as the audio file construction method provided by the above embodiments, and other technical features in the audio processing device are the same as the features disclosed in the previous embodiment method, which will not be repeated here.
[0110] It should be understood that parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0111] The above describes only the specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
[0112] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for executing the audio file construction method in the above embodiments.
[0113] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to electrical wires, optical cables, RF (Radio Frequency), and the like, or any suitable combination of the above.
[0114] The above computer readable storage medium can be contained in the audio processing device, or can exist separately without being assembled into the audio processing device.
[0115] The above computer readable storage medium carries one or more programs, which, when executed by the audio processing device, enable the audio processing device to synthesize a commemorative audio file according to an electrocardiogram, thereby improving the user's experience of generating electronic souvenirs.
[0116] Computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including object oriented programming languages such as Java, Smalltalk, C++ or conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0117] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present application. In this regard, each block in the flow diagrams or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flow diagrams, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.
[0118] The modules involved in the embodiments of the present application can be implemented in the form of software or in the form of hardware. In some cases, the name of the module does not constitute a limitation on the unit itself.
[0119] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the above-mentioned audio file construction method, and can solve the technical problem of poor user experience. Compared with the related art, the computer readable storage medium provided by the present application has the same beneficial effects as the audio file construction method provided by the above-mentioned embodiments, which will not be repeated here.
[0120] The embodiments of the present application provide a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned audio file construction method.
[0121] The computer program product provided by the present application can solve the technical problem of how to improve the user experience. Compared with the related art, the computer program product provided by the embodiments of the present application has the same beneficial effects as the audio file construction method provided by the above-mentioned embodiments, which will not be repeated here.
[0122] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent flow transformation according to the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, is also included in the patent processing scope of the present application
[0123] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or system that includes the element. In the intervals given in this application, the boundary values are included unless expressly limited.
[0124] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases the former is a better embodiment.
[0125] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for constructing an audio file, characterized in that, The method for constructing the audio file includes: Obtaining the electrocardiogram (ECG) corresponding to the target user includes, in response to a command to generate a commemorative audio file, acquiring biological signals collected by a smart wearable device; and generating the ECG based on the biological signals. Obtain the number of cardiac cycles and / or the detection duration corresponding to the electrocardiogram; If the number of cardiac cycles is greater than a preset number, and / or the detection duration is greater than a preset duration, the electrocardiogram is split into at least two electrocardiogram segments according to the cardiac cycle, wherein the electrocardiogram segment consists of electrocardiogram data corresponding to one or more cardiac cycles; Based on the electrocardiogram (ECG) image segment, sub-audio is obtained, including determining a target ECG image segment template based on the matching degree between the ECG image segment and a pre-stored ECG image segment template; obtaining the sub-audio associated with the target ECG image segment template, or inputting the ECG image segment into a pre-trained classification model to obtain the classification corresponding to the ECG image segment; and obtaining the sub-audio associated with the classification. The order in which the sub-audio segments are spliced is determined based on their positions in the electrocardiogram. The sub-audio files are sequentially assembled according to the splicing order to obtain the commemorative audio file; If the number of cardiac cycles is less than or equal to a preset number, and / or the detection duration is less than or equal to a preset duration, a prompt message will be output.
2. The method for constructing an audio file as described in claim 1, characterized in that, After the step of synthesizing the commemorative audio file corresponding to the electrocardiogram based on the sub-audio, the method further includes: In response to a file save command, the commemorative audio file is associated with and saved using the identification information of the triggering end of the file save command; and / or In response to the file save command, the commemorative audio file is saved locally.
3. An audio processing device, characterized in that, The audio processing device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for constructing an audio file as described in any one of claims 1 to 2.
4. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the method for constructing an audio file as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Intelligent wearable equipment and heart rate monitoring method thereof
CN107007275A
Audio processing method and device, storage medium and electronic equipment
CN111859011A