WO2022237362A1 - Method for detecting user action on basis of music beats, and device - Google Patents

Method for detecting user action on basis of music beats, and device Download PDF

Info

Publication number
WO2022237362A1
WO2022237362A1 PCT/CN2022/083752 CN2022083752W WO2022237362A1 WO 2022237362 A1 WO2022237362 A1 WO 2022237362A1 CN 2022083752 W CN2022083752 W CN 2022083752W WO 2022237362 A1 WO2022237362 A1 WO 2022237362A1
Authority
WO
WIPO (PCT)
Prior art keywords
beat
user
feature
target
time
Prior art date
Application number
PCT/CN2022/083752
Other languages
French (fr)
Chinese (zh)
Inventor
肖志
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022237362A1 publication Critical patent/WO2022237362A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63BAPPARATUS FOR PHYSICAL TRAINING, GYMNASTICS, SWIMMING, CLIMBING, OR FENCING; BALL GAMES; TRAINING EQUIPMENT
    • A63B69/00Training appliances or apparatus for special sports
    • GPHYSICS
    • G04HOROLOGY
    • G04FTIME-INTERVAL MEASURING
    • G04F5/00Apparatus for producing preselected time intervals for use as timing standards
    • G04F5/02Metronomes
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B15/00Teaching music
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09BEDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
    • G09B9/00Simulators for teaching or training purposes
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/36Accompaniment arrangements
    • G10H1/40Rhythm
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination

Definitions

  • the present application relates to the field of wearable devices, in particular to a method and device for detecting user actions based on music beats.
  • the electronic metronome can generate vibrations of corresponding intensity according to the strength of the beat, so that the user can feel when wearing the electronic metronome.
  • the strength of the beat changes regularly to assist in training the user's sense of rhythm.
  • the actual actions made by the user may not keep up with the beat accurately, such as snap shots, drop shots, etc., or the strength of the retake is weak, and the strength of the weak beat is relatively strong.
  • the correction depends on the user's active perception. In most cases, the user may not be able to actively realize the existence of the problem, and will not correct it in a targeted manner.
  • the training effect of the sense of rhythm needs to be improved. How to detect whether the user keeps up with the beat has become an urgent problem to be solved.
  • the present application provides a method and device for detecting a user's action based on a music beat, which can detect whether the user follows the beat.
  • this technical solution provides a method for detecting user actions based on music beats, including: determining the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat; target feature, the target feature includes the first feature, the first feature is used to represent the corresponding time information when the user makes an action within the first unit time value; based on the beat category corresponding to each beat, each target feature and the predetermined reference feature Compare to obtain detection data; wherein, the reference features include time reference intervals corresponding to each beat category; the detection data is used to at least give feedback to the user whether they keep up with the beat in the time dimension.
  • the first feature includes a target time interval; the target time interval is used to represent the difference between the first moment specified by the user in the process of making an action within the first unit time value and the first starting moment.
  • the time difference between, wherein, the first starting moment is the starting moment of the first unit time value.
  • the first moment is determined based on the following method: within the first unit time value, any moment when the acceleration is detected as zero is taken as the first moment.
  • the first moment is determined based on the following method: within the first unit time value, detect the duration from the start of the vibration to the end of the vibration as the first duration, and use any specified value in the first duration A moment as the first moment.
  • the first moment is determined based on the following method: within the first unit time value, detect at least one moment when the acceleration is zero, and detect the duration from the start of the vibration to the end of the vibration as the first duration , taking the moment when the acceleration closest to the first duration or falling within the first duration is zero as the first moment.
  • determining the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat it also includes: determining the user's personal reference features.
  • determining the user-specific reference features includes: obtaining the single time intervals corresponding to multiple actions of any beat category performed by the user, and determining any The time reference interval corresponding to the beat category is used as a user-specific reference feature; among them, the single time interval is determined based on the following method: determine the second moment specified in the process of the user making a single action, and compare the second moment with the first The time difference between the two starting moments is taken as a single time interval; wherein, the second starting moment is the starting moment of collecting a single action.
  • determining the time reference interval corresponding to any beat category includes: calculating the average value of multiple single time intervals; based on the average value, calculating multiple single time intervals The mean square error corresponding to the time interval; based on the mean square error and the average value, determine the time reference interval corresponding to any beat category.
  • the time reference interval corresponding to any beat category including: the interval obtained by adding or subtracting N times the mean square error from the average value, as the time reference interval, 1 ⁇ N ⁇ 3.
  • the target feature also includes a second feature, and the second feature is used to characterize the corresponding force information when the user makes an action within the first unit time;
  • the reference feature also includes the corresponding Strength reference interval; based on the beat category corresponding to each beat, compare each target feature with a predetermined reference feature, and also include: based on the beat category corresponding to each beat, compare the second feature with the strength reference interval corresponding to the corresponding beat category ;
  • the detection data is also used to feed back to the user whether the action strength of each beat conforms to the strength of the beat.
  • it before obtaining the target features respectively corresponding to each beat in the target rhythm, it further includes: determining a user-specific dynamic reference interval.
  • determining the user-specific strength reference interval includes: obtaining the strength information corresponding to multiple actions of any type of beat by the user, and determining the corresponding strength information of any beat category based on multiple pieces of strength information.
  • the strength reference interval of is used as the user's personal strength reference interval; wherein, the strength information includes the corresponding acceleration information when the user makes an action of any beat type.
  • the target features corresponding to each beat in the target rhythm before acquiring the target features corresponding to each beat in the target rhythm, it also includes: acquiring the target speed when the user makes an action; comparing the target speed with a predetermined speed threshold to determine the target When the value of the speed is lower than the speed threshold, the step of acquiring the target features corresponding to each beat in the target rhythm is executed.
  • the target velocity includes a linear velocity or an angular velocity.
  • each target feature before comparing each target feature with a predetermined reference feature based on the beat category corresponding to each beat, it further includes: reading the user's personal reference feature according to the predetermined first path; When the feature reading fails, read the spare second reference feature according to the predetermined second path; the second reference feature is a pre-stored reference feature applicable to each user.
  • the mode of prompting includes at least one of vibration, sound playing and light emitting.
  • the detection data after obtaining the detection data, it further includes: according to the detection data, at least giving feedback to the user whether they keep up with the beat in the time dimension, and the feedback method includes at least one of display, vibration, sound playback, and light emission.
  • the beat subcategories include at least a strong beat, a second strong beat and an upbeat beat.
  • the technical solution also provides a wearable device, including: a display screen; at least one sensor; one or more processors; a memory; at least one application program; and one or more computer programs, wherein one or more One or more computer programs are stored in the memory, and one or more computer programs include instructions.
  • the device When the instructions are executed by the device, the device performs the following steps: determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat.
  • the target feature corresponding to each beat in the target rhythm includes the first feature, and the first feature is used to represent the corresponding time information when the user makes an action within the first unit time value; based on the beat category corresponding to each beat , comparing each target feature with a predetermined reference feature to obtain detection data; wherein, the reference feature includes a time reference interval corresponding to each beat category; the detection data is used to at least give feedback to the user whether to keep up with the beat in the time dimension.
  • the technical solution also provides a terminal device, including: a display screen; at least one sensor; one or more processors; memory; at least one application program; and one or more computer programs, wherein one or more The computer program is stored in the memory, and one or more computer programs include instructions.
  • the terminal device When the instructions are executed by the terminal device, the terminal device performs the following steps: determine the beat corresponding to the target rhythm to be detected and the first unit occupied by one beat value; obtain the target features corresponding to each beat in the target rhythm, the target features include the first feature, and the first feature is used to represent the corresponding time information when the user makes an action within the first unit time value; based on the beats corresponding to each beat category, each target feature is compared with a predetermined reference feature to obtain detection data; wherein, the reference feature includes the time reference interval corresponding to each beat category; the detection data is used to at least give feedback to the user whether to keep up with the beat in the time dimension.
  • the technical solution further provides a computer storage medium, including computer instructions, which, when the computer instructions are run on an electronic device, cause the electronic device to execute the method described in any one of the above first aspects.
  • the method and device provided in the embodiments of the present application detect whether the user is accurately following the beat by detecting the target feature of each beat in the target rhythm and comparing it with the reference feature, and then feed back the wrong beat point to the user, so that the user has a targeted It can be adjusted systematically, which improves the efficiency of training users' sense of rhythm.
  • FIG. 1 is a schematic diagram of an example application scenario of a wearable device provided by an embodiment of the present application
  • FIG. 2 is a schematic flowchart of an embodiment of a method for detecting user actions based on music beats provided in the embodiment of the present application;
  • Fig. 3 is a schematic diagram of the trajectory of a drumming action in the scene example provided by the embodiment of the present application;
  • Fig. 4 is the example of a group of target rhythms of the embodiment of the present application.
  • FIG. 5 is a schematic flow diagram of another embodiment of the method for detecting user actions based on music tempo provided by the embodiment of the present application;
  • Fig. 6 is a schematic diagram of a set of display interface examples of a wearable device provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a group of display interface examples of a terminal device provided by an embodiment of the present application.
  • Fig. 8 is a schematic diagram of another display interface provided by the embodiment of the present application.
  • Fig. 9 is a schematic diagram of comparing the target time interval with the time reference interval in the method provided by the embodiment of the present application.
  • FIG. 10 is a schematic diagram of an example interface for displaying a feedback report provided by an embodiment of the present application.
  • Fig. 11 is a schematic diagram of the hardware structure of a wearable device in an embodiment provided by the embodiment of the present application.
  • Fig. 12 is a schematic diagram of a hardware structure of a wearable device in another embodiment provided by the embodiment of the present application.
  • Beat and rhythm are an important part of a complete piece of music.
  • the cultivation of rhythm is the basis of music learning, which relies on brain inertia and muscle memory after a lot of practice.
  • the beat is the combination of the fixed unit time value and the law of strength and weakness in the music, and it is the unit to measure the rhythm.
  • Beat training is the basis for cultivating the sense of rhythm.
  • the meaning of rhythm includes broad meaning and narrow meaning.
  • the broad meaning of rhythm is a kind of regular change that goes hand in hand with rhythm in nature, society and human activities.
  • Various changing factors are organized in the form of repetition and correspondence. , forming a coherent and orderly whole, and the narrow meaning of rhythm specifically refers to the rhythmic characteristics of music.
  • rhythm can be understood as a combination of beats.
  • a metronome is a mechanical, electric or electronic device that can send out a stable beat in various performance speeds.
  • the metronome in the related art can be divided into a mechanical metronome and an electronic metronome.
  • the electronic metronome can be installed on An APP with a metronome function on a terminal device, such as a metronome APP installed on a mobile phone.
  • the performance speed refers to beats per minute, Beats Per Minute, BPM.
  • the mechanical metronome is made according to the principle of the pendulum, with a built-in mainspring drive.
  • the upstream code of the pendulum can be adjusted up and down to adjust the speed, and compared with the scale on the panel, the number of swings back and forth per minute can be known.
  • a metronome has a pyramid shape, a clock structure inside, gears and springs, and drives a pendulum.
  • the pendulum makes a sharp "dida" at the end of each swing.
  • the speed of these ticking sounds can be adjusted by moving the pendulum up and down according to the vernier scale engraved on the pendulum, and the speed is 40-210 beats per minute.
  • the metronome APP is an application program with the function of an electronic metronome. It is originally a beat tool for music lovers, which can truly simulate the beat track of a metronome. Define the beat type as 2/4 beat, 3/4 beat, 3/8 beat, etc. This metronome APP supports users to select the performance speed by setting the tempo, so as to realize the rapid positioning of the performance tempo (that is, the number of beats per minute BPM).
  • An electronic metronome in the related art is a wearable music device, which can be worn on the wrist of the human body and other parts, and supports the user to customize the performance speed (BPM) and the time signature of the beat through the touch display screen.
  • BPM performance speed
  • the set beat time signature and speed will give corresponding strong and weak regular vibration prompts.
  • Common beat time signatures are 1/4, 2/4, 3/4, 4/4, 3/8, 6/8, 7/8, 9/8, 12/8, etc., the length of each measure It is fixed, where the denominator indicates the note type, that is, which note is taken as a beat, and the numerator indicates how many beats are in each measure. For example, a denominator of 4 means a quarter note is a beat, and a denominator of 8 means an eighth note.
  • One beat, 2/4 beat means that a quarter note is a beat, and each measure has 2 beats.
  • the types of notes also include whole notes, half notes, sixteenth notes, rests, and the like.
  • beat is the unit for timing at a fixed frequency
  • performance speed BPM is the number of beats per minute.
  • the corresponding unit time value of one beat is determined.
  • the unit time value that is, the duration of a "beat" will not change with the note type. For example, when the playing speed is determined to be 120BPM, the note types in four-three beats or eight-three beats are different, but one The duration of shooting is 0.5s.
  • the method or device for detecting the user's performance based on the music tempo can be applied to various scenes that require the cultivation of a sense of rhythm, such as musical instrument performance or learning, band performance, square dance, dance performance, dance practice, military training, etc.
  • the musical instrument playing learning or practicing scenes include playing learning or playing scenes of various musical instruments such as percussion instruments, stringed instruments, and keyboard instruments.
  • the electronic metronome 10 provided by the embodiment of the present application is worn on the user's wrist.
  • the uniform step, forward step and running, as well as the footsteps such as stepping and stepping in the marching of the army have a certain sense of rhythm.
  • One step can be regarded as one beat. 1, 2, 1" have obvious rules of strength and weakness.
  • the slogan "1" is an accent
  • the slogan "2" is a weak sound, showing the law of strong, weak, strong and weak, which is equivalent to the 2 in the music beat.
  • the uniformity of the army's movements can be achieved by cultivating the sense of rhythm of all members.
  • the method or equipment provided in the embodiments of the present application can assist in military training. For example, each member wears the equipment provided in the embodiments of the present application.
  • the device synchronously gives strong and weak prompts (such as vibration, light or display), and detects the actions of each member, and provides personal feedback to the instructor, officer or soldier whether the member is keeping up with the beat detection data, and adjusts the wrong beat point in a targeted manner. It can assist in the detection of wrong actions of members who cannot be detected only by the instructor's vision or hearing, and improve the efficiency of military training.
  • strong and weak prompts such as vibration, light or display
  • the beat of the corresponding music is generally fixed, for example, the waltz is mostly in 3/4 time, and each member of the dance team can adjust the beat to the corresponding music by wearing the equipment provided by the embodiment of the present application.
  • Beat to accurately perceive the correct dance beat, and use the device to detect whether the dance movements of each member keep up with the beat, and then feedback the detection results to the user.
  • the detection results can be communicated to customers through voice broadcasts, display screens, and lighting. Let the user know at which tempo point a drop or snap shot occurs, and develop a sense of rhythm faster.
  • the device provided by the embodiment of the present application is used to synchronously detect whether the actions of each member keep up with the beat, and specifically prompt the user if there is a rush or drop in the performance action
  • the beat points to cultivate the members' sense of rhythm.
  • the device for detecting the user's performance based on the music beat may be a wearable device, for example, it may be a wearable electronic metronome, which can be worn on the user as an independent wearable device
  • the electronic metronome can be a head-mounted device, a wristband device, a smart bracelet, a smart ankle ring, electronic glasses, an electronic collar, etc., or it can be added to an existing wearable device as an additional function
  • a smart watch that supports video calls can also integrate hardware and software for implementing the method provided by the embodiment of the present application, so that while supporting video and audio calls, it also has the function of a metronome.
  • the device provided in the embodiment of the present application may also be a terminal device installed with a Metronome APP, and based on the terminal device, the application program can implement the method provided in the embodiment of the present application.
  • the metronome APP installed on the terminal device can also communicate with the physical product of the electronic metronome as a wearable device, so as to realize the synchronization between the physical product and the APP.
  • the electronic metronome is a smart bracelet
  • the user who holds the smart bracelet can install the metronome APP corresponding to the smart bracelet product on the mobile phone, and the metronome APP and the smart bracelet are connected via Bluetooth (bluetooth), near field communication (Near Field Communication, NFC), wifi and other short-distance wireless communication methods.
  • Bluetooth blue
  • NFC Near Field Communication
  • the metronome in the related art focuses on conveying accurate music beats to the user.
  • the electronic metronome can be worn on the arm, ankle, wrist, etc. according to the user's wishes, so that the user can perceive the rhythm of the beat.
  • the vibration of the metronome corresponds to the BPM.
  • the corresponding vibration conditions are shown in Table 1 below.
  • the electronic metronome provided can also realize the detection of the user's action while conveying the accurate music tempo to the user.
  • the electronic metronome provided by the embodiment of the present application determines the wearing position of the electronic metronome on the principle of making it easier to detect relevant actions of the user in various application scenarios. For example, in the application scenario of percussion music, in most cases, the user uses the wrist to drive the percussion components (such as drumsticks, etc.) or directly beats the instrument directly with the hand, so in this application scenario, the embodiment of the present application provides The electronic metronome can be worn on the user's wrist to better sense wrist movements. In other scenarios, such as military training scenarios, the electronic metronome provided by the embodiment of the present application can be worn on the user's ankle to more accurately perceive the user's leg or foot movements in various footwork training.
  • the electronic metronome provided by the embodiment of the present application can also be equipped with an expansion device, which is used to tie the wearable device to other parts of the user's body, for example, to improve the versatility of the product , the electronic metronome can be realized in the product form of a unified smart bracelet, and when the user needs to wear the electronic metronome on other parts, he can realize the firm wearing of other parts by expanding the device, for example, it can be attached with an armband or headband, ankle Bands, etc., to replace the wrist strap or detachably connect with the wrist strap.
  • an expansion device which is used to tie the wearable device to other parts of the user's body
  • the electronic metronome can be realized in the product form of a unified smart bracelet, and when the user needs to wear the electronic metronome on other parts, he can realize the firm wearing of other parts by expanding the device, for example, it can be attached with an armband or headband, ankle Bands, etc., to replace the wrist strap or detachably connect with the wrist
  • the electronic metronome provided by the embodiment of the present application can be worn on the user's leg or arm by extending the device to more accurately perceive the leg or arm movement.
  • the expansion device may also include auxiliary sensors and other devices for assisting in collecting user actions.
  • auxiliary sensors and other devices for assisting in collecting user actions.
  • most actions are fingers hitting keys on the piano, and only the movement of the wrist is sensed.
  • the action error will be relatively large, so in this scenario, an accessory can be added to the electronic metronome main device.
  • the accessory can be an additional sensor to sense the movement of each finger, for example, it can specifically include a vibration sensor and/or acceleration The patch of the sensor (attached to the finger by magnetic attraction or other means) or the ring, etc.
  • the performance action is mainly fingers plucking the strings, and an expansion device can also be installed on the finger to sense the finger movement, so as to assist the main device worn on the wrist to detect the user's movement.
  • the following is an example of a method for detecting a user's performance based on the music tempo provided by this application.
  • the various steps in this example are described in chronological order, but this chronological order is only one of them.
  • the feasible chronological order cannot be regarded as a necessary limitation for the method provided in the embodiment of the present application.
  • the method may include the following steps:
  • Step 201 determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat.
  • the user before using the device provided by the embodiment of the application for performance training or other activities, the user can at least perform basic settings on the two parameters of tempo and performance speed (BPM), and can also set performance duration, number of bars, etc. parameters, as well as setting the playing track, etc. Determination of the tempo and the first unit time value may be determined based on user input. That is, through the design of the UX (User Experience) layer, the user can set and change the tempo and BPM. Once the BPM is determined, the first unit time value is determined.
  • UX User Experience
  • rhythm refers to a combination of beats.
  • mixed beats, compound beats, transformed beats, etc. appear in the target rhythm, for example, the mixed beats in which 3/4 and 2/4 are combined to form 5/4.
  • determining the beat includes determining the time signature or type of the beat, and the time signature includes the time signatures of various commonly used music beats, such as 1/4, 2/4, 3/4, 4/4, 3/8, 6/ 8, etc., the user can realize the input of the time signature by selecting the number of the numerator and denominator of the time signature.
  • the electronic metronome can also support the input of beats of a custom type, for example, multiple unconventional candidates for beats of a custom type can be prestored in the electronic metronome, and the strong
  • the combination of weak patterns can be more complex or diverse, such as strong, weak, second-strongest, second-strongest, weaker, weaker, etc.; this custom type can also support user-defined, and then create user-specific original beat types.
  • the unit time value corresponding to one beat that is, determine the performance speed, that is, determine the beat number BPM per minute. After the BPM is determined, the unit time value corresponding to one beat is determined. For example, when the performance speed is determined to be 100BPM, the unit time value occupied by one beat is 0.6s. For clarity of description, in the embodiment of the present application, the unit time value corresponding to the target rhythm to be detected is defined as the first unit time value.
  • the unit time value can be used as the detection time unit, and the time length corresponding to the target rhythm to be detected can be divided into multiple unit time values on average, and the user's actions within the unit time value can be detected respectively.
  • Action target feature data can be used as the detection time unit, and the time length corresponding to the target rhythm to be detected can be divided into multiple unit time values on average, and the user's actions within the unit time value can be detected respectively.
  • whether the user keeps up with the beat or whether the beat is accurate includes whether the user is stuck in the time dimension and whether the strength meets the strength requirements of the beat in the strength dimension. Specifically, whether the user keeps up with the beat
  • the beat evaluation factors may include at least one of the following situations: snapping, missing beat, insufficient retake, too strong weak beat, too strong or too weak sub-beat. Among them, the downbeat and downbeat are evaluated from the time dimension, and whether the strength is appropriate is judged from another dimension. When at least one of the above situations occurs in the user, it is considered that the user fails to keep up with the beat.
  • the prompting method includes at least one of vibration, sound playing and light emitting.
  • the prompting method includes at least one of vibration, sound playing and light emitting. For example, when the user selects the beat as 2/4 beat, then according to the law of strength corresponding to 2/4 beat, strong, weak, strong and weak vibrations are performed, or different colors of light are emitted during strong beats and weak beats, for example , the strong beat emits red light, the weak beat emits green light, the next strong beat emits yellow light, etc.
  • the tempo parameter is at least the combination rule of strong and weak sounds corresponding to the beat
  • the device operating parameters may include vibrations corresponding to strong and weak sounds.
  • These device operating parameters can also be set by the user.
  • Step 202 acquiring target features corresponding to each beat in the target rhythm.
  • Acquiring target features within each first unit time value means collecting feature data of a single action made by the user within each first unit time value. Whether the user drops or grabs a shot is determined by the time when the user makes a single action (that is, the action corresponding to one shot). Therefore, in the time dimension, the feature data to be collected may include the time information of the user's action ( The first feature) to judge whether the single action made by the user is too early or too late in time. For example, the time of the user's action is too late for a dropped shot, which is later than the correct action time. The snap shot is due to the action time Too early, earlier than the correct action time.
  • the time dimension data to be detected may be the time interval between a moment specified by the user during a single action and the start moment (first start moment) of the first unit time value .
  • the time corresponding to the process of the user making a single action is an interval, which is composed of multiple time points.
  • One of the time points is designated as the first moment, and the time difference between the first moment and the starting moment of the unit time value It is the time information of the action corresponding to the beat.
  • any moment in the action process can be used as the designated first moment, but in the current technical implementation, only detectable time points can be used as the designated first moment.
  • the first moment is detected in the following ways:
  • the moment when the acceleration is zero is detected as the first moment.
  • the motion track of a drumming action can be approximated as shown in Fig. 3 as shown in dotted line a ⁇ b ⁇ c, wherein, point a is when the user holds the drumstick and starts to move downward The starting point of the action, point b is the point where the drumstick touches the drum surface, and point c is the highest point reached by the user lifting the drumstick.
  • point a is when the user holds the drumstick and starts to move downward
  • point b is the point where the drumstick touches the drum surface
  • point c is the highest point reached by the user lifting the drumstick.
  • the user holds the drumstick and exerts downward force.
  • the drumstick also receives the downward force from the user.
  • the drumstick After reaching point b, the drumstick contacts the drum surface , the drum surface will give the drumstick a rebound force, which will offset the gravity and the user's force, so that there is a moment when the acceleration of the drumstick and the wrist is 0, and the acceleration sensor can be used to collect the moment when the acceleration is 0, as Represents the first moment in time when the action occurred.
  • the user will give the drumstick an upward force, and at a certain moment, the user's upward force will offset the gravity, In the trajectory of b ⁇ c, there will be a moment when the acceleration is also 0, and the moment when the acceleration is 0 can also be used as the designated first moment.
  • the vibration sensor can detect that the drumstick drives the wrist.
  • the generated vibration is regarded as the moment when the vibration starts, until the end of the vibration is detected, the moment when the vibration ends is subtracted from the moment when the vibration starts, that is, the duration t 0 of the vibration process is determined, and the starting moment of the time interval t 0 for which the vibration process lasts , the end time or the midpoint time can be used as the designated first time.
  • point b represents the spatial point where the drumstick and the drumhead touch, and cannot be interpreted as a certain moment in t0 .
  • the acceleration detection and vibration detection methods are combined, within a unit time value, at least one moment when the acceleration is zero is detected, and the duration from the start of the vibration to the end of the vibration is detected as the first duration, The moment when the acceleration closest to the first duration or falling within the first duration is zero is taken as the first moment.
  • the moment when the acceleration is 0 is not unique. The moment, the first moment, more accurately reflects when the drumming action occurred.
  • the acceleration sensor may detect the moment when the acceleration is 0 before the vibration sensor.
  • the moment when the acceleration is 0 will not fall within the first duration corresponding to the vibration process.
  • the moment when the acceleration closest to the first duration on the time axis is 0 may be taken as the first moment.
  • the acceleration sensor may be delayed.
  • the vibration sensor detects the vibration first, and then the acceleration sensor detects the moment when the acceleration is 0.
  • the moment when the acceleration is 0 will fall into the first time corresponding to the vibration process.
  • the duration the moment when the acceleration is 0 can also be used as the first moment.
  • this implementation may also be the first time when the acceleration closest to the start time, end time or midpoint time of the first duration is detected to be 0 on the time axis.
  • the way of determining the first moment can be expressed in various ways, but on the premise that the technical essence does not change, all of them should fall within the scope of protection of the present application.
  • the time difference between the first moment and the starting moment of the unit time value can be used as the feature of the time dimension in the target feature.
  • the target features to be detected can include the strength dimension data (second feature).
  • the strength dimension data means that the user is within the unit time value.
  • the beat is composed of multiple beats according to certain rules of strength and weakness.
  • the heavy beat in the beat needs more strength than the weak beat to produce the accent.
  • the weak beat should be hit with relatively light strength, and the strength of the sub-strong beat should be between the accent and weak sound. If you hit it, it will also disrupt the rhythm, and you will not be able to play the exact beat.
  • the strength information is collected by an acceleration sensor, at least including information on the strength of the user's action within a unit time value, through which the acceleration sensor at least collects the acceleration corresponding to the user's action, or the direction of the acceleration can also be collected to obtain a more comprehensive strength information.
  • the acceleration is collected every 10 microseconds in a unit time value, and then the magnitudes of the multiple accelerations collected are averaged, and the average value is used as the collected strength information of the user's action.
  • Step 203 Based on the beat category corresponding to each beat, each target feature is compared with a predetermined reference feature to obtain detection data.
  • the target features corresponding to each beat are determined, the target features are compared with predetermined reference features.
  • the reference feature is a reference standard for judging whether the action of the user to be detected keeps up with the beat.
  • the reference feature can be a time interval, which is used to represent the time period corresponding to the correct single action within the unit time value, that is, if actions such as hitting are made within this time period, it is considered that the beat is not lost. Not snapped.
  • the reference features presented are different. For example, the time reference interval corresponding to the retake action and the time reference interval corresponding to the downbeat work are quite different.
  • the beats of the category are compared with the same reference feature, and the error will be relatively large, which makes the detection result less accurate.
  • the target feature and the reference feature based on the beat category, that is, to select the target feature of any unit time value according to the beat category corresponding to the unit time value, and select the reference corresponding to the beat of the corresponding category. feature to compare to improve detection accuracy.
  • the beat category is a category divided according to the strength and weakness of the beat.
  • the beat category includes strong beat (accent), second strong beat (subforte) and weak beat (weak tone).
  • the beat category can also include the case of additional dotted notes. Because the beat of the added dotted note is delayed, the actions in the delayed beat will also match the actions of the undelayed beat.
  • the beats with additional dots are regarded as a category alone, that is, the categories of beats include not only strong beats, sub-strong beats, and weak beats, but also further include strong beats with dotted notes. Multiple categories such as beat, second strong beat, weak beat, etc., as well as categories such as second strong beat and weak beat that cause the time value to be shortened due to the addition of dot notes.
  • Fig. 4 shows a plurality of notes arranged in the same sequence, processed according to different beats, 3 groups of rhythms obtained respectively, wherein 1. the beat of the group is a 3/4 beat, The beat of group 2 is 4/4 beat, the beat of group 3 is still 3/4 beat, and dotted notes are added after the rebeat of each measure.
  • the three groups of rhythms are taken as an example to illustrate how to compare the target features with the reference features.
  • the law of strength of 3/4 beat is strong, weak, weak, the first beat (note “1") in group 1 is a strong beat (that is, a strong beat), and the second beat (note “2") is a weak beat 1.
  • the third beat (the note "3") is a weak beat.
  • the strong beat The target feature corresponding to the beat is the time difference between the user's actual action and the starting moment of the beat, and the reference feature is the time reference interval corresponding to the strong beat; for the third beat (note "3"), select the time reference corresponding to the weak beat Because of the different beats, 4/4 beats correspond to strong, weak, second-strongest and weakest beats.
  • the beat corresponding to the third beat is the second-strongest beat.
  • the third beat should select the reference feature corresponding to the sub-downbeat, and compare it with the determined target feature.
  • the beat category corresponding to the first beat (note "1") is a strong beat with added dotted notes, and the unit time value occupied by the beat is changed from the original 1
  • the unit time value is extended to 3/2 unit time value.
  • the reference feature corresponding to the corresponding category of downbeats with added dotted notes should be selected.
  • the reference feature may include a reference feature, and the reference feature may be predetermined according to a personalized action feature of the user.
  • the data can be initialized and calibrated according to each user action, and a user-specific reference feature can be established, such as a user-specific time reference interval.
  • the electronic metronome can be set with the link of user personal data initialization, that is, the electronic metronome provided by the embodiment of the application supports user personal data initialization, and when the user turns on or logs in the electronic metronome for the first time, the user is prompted to enter personal data.
  • Initialize the data when the user makes multiple actions corresponding to any category such as strong beat, second strong beat, weak beat, etc., detect multiple single actions under the category of one beat, and determine the type based on multiple single actions
  • the reference feature corresponding to the category beat For example, the user is prompted to perform a single action of multiple downbeats, and according to the features corresponding to the single actions of multiple downbeats, the reference features corresponding to the user-specific downbeats are determined.
  • the reference feature can also be determined from the time dimension and the force dimension.
  • the time dimension based on multiple single actions made by the user, the corresponding time reference interval can be determined.
  • the first feature can be obtained based on time dimension data, for example, the first feature can be a single time interval, a single The time interval is the time it takes for the user to make a single action.
  • the duration occupied by a single user action is the time difference between the specified time point (second moment) corresponding to the user's single action and the starting moment (second starting moment).
  • the determination method of the first moment and the second moment should be consistent, that is, the second moment used to determine the single time interval in the reference feature determination process is the same as the first moment used to determine the target time interval in the target feature.
  • the methods of determining the moments should correspond to each other.
  • the second moment should also be the first moment when the acceleration is 0 during the work process; if the first moment is the end moment of the continuous vibration process from the start of the vibration to the end of the vibration, then the second moment should also be the end time of the continuous vibration process when a single action of the user is detected; or, the first moment is the beginning or middle of the continuous vibration process Point moment, then correspondingly, the second moment should also be the start or midpoint moment in the vibration continuation process.
  • the second starting moment is the time point at which the single action collection process starts to count.
  • the device After the voice is played, the device emits a beep sound. At the same time as the beep sound, the device starts timing.
  • the second time minus the start time of timing is the single time interval, which completes the collection process of a single action. Repeating the acquisition process of the single action can realize multiple action acquisitions.
  • the single time interval corresponding to a single action is based on the time when the timing of the single action is collected as the starting time, and the obtained single time interval has nothing to do with the unit time value of the beat, so there is no Affected by the unit time value of the beat in the target rhythm to be detected, that is to say, the time reference interval determined by the single time interval collected in this way is suitable for various performance speeds, and does not need to be specific to various performance speeds Collect user actions separately.
  • the single time interval includes the user's personal reaction time, which reduces the impact of the difference in the user's personal reaction time on the accuracy of the detection result.
  • the collection can also be performed based on a fixed BPM speed, that is, at a fixed unit time value (to avoid confusion, hereinafter referred to as the second unit time value) as the detection unit, prompting the user to continuously perform multiple single actions corresponding to a type of beat at a certain playing speed.
  • a fixed BPM speed that is, at a fixed unit time value (to avoid confusion, hereinafter referred to as the second unit time value) as the detection unit, prompting the user to continuously perform multiple single actions corresponding to a type of beat at a certain playing speed.
  • the BPM is set to 60
  • the corresponding second unit time value is 1s, prompting the user to perform continuous reshooting actions at a speed of 60 beats per minute, and then record the second moment of the user's single action within each unit time value of 1s.
  • a single time interval is obtained by subtracting the start moment (second start moment) of the second unit time value with a duration of 1 s from the second moment.
  • the average value of multiple single time intervals is calculated, and based on the average value, the average value corresponding to multiple single time intervals is calculated.
  • Variance or standard deviation
  • the mean square deviation or standard deviation
  • the time reference interval is transplanted into the corresponding first unit time value, and the first starting moment of the first unit time value
  • the time reference interval corresponding to the calculated retake i.e. downbeat
  • the time reference interval corresponding to the calculated retake is 0.35-0.55s, which means that the first moment corresponding to the retake action falls into the first unit time value In the 0.35s to 0.55s within the time, it is regarded as keeping up with the beat, otherwise it is regarded as a drop or rush.
  • the corresponding strength reference interval is determined.
  • the reference range of the force dimension for a single action may be determined based on the force information corresponding to multiple single actions made by the user. Specifically, it is possible to collect the strength information corresponding to a single action corresponding to any type of beat within a unit time value multiple times, and further extract or determine the second feature based on the strength information. Based on multiple second features, determine The velocity reference interval corresponding to any type of beat.
  • the force information may include the corresponding acceleration information when the user makes a single action within a unit time value, such as acceleration magnitude, acceleration direction, and the like.
  • detecting the acceleration of the wrist when the user is holding a drumstick and performing a knocking action can accurately reflect the degree of force of the user. Specifically, it is possible to collect multiple acceleration values within a unit time value, calculate the average value within the unit time value as the acceleration value of the word action corresponding to the unit time, and then calculate the acceleration values corresponding to the multiple word actions respectively. Average, and calculate the mean square error, the mean value plus or minus N times the mean square error can obtain the strength reference interval.
  • the user-specific reference features are determined.
  • the reference features determined based on the user's personal actions include the user's personal action characteristics and reaction time, which can be used as a reference feature to compare with the single action in the user's actual performance, which can reduce the user's individualized actions. errors due to features. In this way, individual differences are fully considered, and different users establish their own personalized standard data, so that the judgment result has higher accuracy.
  • a spare second reference feature may also be determined in advance based on music samples or multiple action samples as a general reference standard applicable to all users.
  • the spare second reference feature can be obtained by performing motion analysis on music samples, or can be determined from the motion samples of professionals whose performance levels meet the level requirements.
  • the general (standby) data can be read from the pre-designated storage address.
  • the second reference feature of Specifically, before step 203 is performed, the user-specific reference feature can be read from the specified storage address according to the predetermined first path, and when the reading of the reference feature fails, the spare second path is read according to the predetermined second path. Two reference features.
  • the target features are compared with the reference features corresponding to the beats of the corresponding category to obtain the detection data. It is used to feed back whether the user’s actions are rushed or lost in time, and is also used to feedback whether the strength of a single action made by the user in a unit time value conforms to the law of the strength of the beat, that is, to feedback whether the strength of the user’s action is strong or not.
  • the beat force is too small, the weak beat force is too strong, etc.
  • the reference feature may only include the time reference interval but not the strength reference interval, or only include the strength reference interval but not the time reference interval; correspondingly, the target feature may only include the first feature but not the The second feature, or only including the second feature but not including the first feature, that is, the method provided in the embodiment of the present application, can be detected in at least one of the time dimension and the strength dimension.
  • step of determining or reading the reference feature needs to be prior to step 203 , and may not be prior to step 201 or step 202 .
  • step 202 it may also include the step of collecting the target speed of the user when making an action, the target speed may be the linear speed or angular speed when the user makes a performance action, etc., and the target speed may be passed Linear velocity sensor or angular velocity sensor acquisition.
  • the speed and performance speed here are different technical concepts, and the performance speed is the number of beats per minute (BPM), and the two should not be confused.
  • step 202 Compare the collected target speed with the predetermined speed threshold corresponding to the user.
  • the target speed of the user's current action exceeds the speed threshold, it indicates that the current user's action speed is very fast.
  • the detection error of whether to keep up with the beat will be is larger, so when it is determined that the target speed exceeds the threshold, the subsequent detection steps are not performed.
  • step 202 When it is determined that the speed value corresponding to the target speed is lower than the speed threshold, step 202 and other subsequent steps are performed.
  • the user in the initialization stage of the user's personal data, can also be prompted to select the corresponding scene, for example, select a large category of scenes first, and display multiple alternative options, such as musical instrument playing scenes, military training scenes, dance training, etc.
  • Alternatives after the user selects one of the alternatives, continue to prompt the user to select a small category of scenes, for example, in the musical instrument performance scene, further prompt the user to select the corresponding musical instrument, percussion? keyboard instrument? stringed instrument?
  • the division of specific scenes can also improve the accuracy of detection.
  • a feedback report is generated according to the detection data.
  • the feedback report can convey the wrong tempo point to the user through a variety of prompts, such as text display, or voice broadcast, or the music that the user has just played Replay, light up or vibrate at the wrong beat of the user to inform the user that there is a mistake here, the prompt method can be more detailed, and different types of mistakes are indicated by emitting different colors of light, for example, red light means off beat, Green light means rushing to shoot, yellow light means insufficient force, purple light means too much force, etc., or vibrations of different intensities can prompt users to make different types of mistakes.
  • the above prompting methods can be combined arbitrarily.
  • this embodiment comprises the following steps:
  • Step 501 after determining that the device is turned on or the user opens the login interface, jump to step 502; in one implementable manner, the subsequent steps are performed only when the user starts the device for the first time or logs in to the device for the first time, and in another embodiment, every At predetermined intervals, when the user turns on the device or logs in to the device, the subsequent steps are executed.
  • step 502 the user is prompted to initialize personal data. For example, taking the actual product as a smart watch as an example, refer to the operation interface U10 in FIG. Action data?", and set two options of "Yes” and “No", and text prompts the user to "tap once to select “Yes”, tap twice to indicate "No", and confirm that a tap action from the user is sensed After that, enter step 503, otherwise, return to step 501, monitor the user's next startup or login behavior, and wait for the user to ask whether to perform personal data initialization again when the user starts or logs in next time.
  • step 502 personal data initialization is only performed when the user first Prompt when turning on the machine for the first time, if the user selects No in step 502, the collection process of the user's personal data can also be finished, and check whether a spare general reference feature is stored to the designated storage address.
  • the storage path of the spare general reference feature (That is, the second predetermined path) can be pre-agreed and written into the code of the application program. Or, as another possible way, the user can also directly click the "Yes" or "No” button to make a selection.
  • you can design A variety of user interaction modes are not listed in the embodiments of the present application. It should be noted that the circular interface shown in Fig. 6 is only an example, and the display interface of the electronic metronome can be designed in various shapes. Do not list them one by one.
  • the electronic metronome can install a corresponding APP on a terminal device (such as a mobile phone), that is, an application program with a metronome function can be installed on a terminal device such as a mobile phone.
  • a terminal device such as a mobile phone
  • the rooms can be connected through wireless communication methods such as bluetooth or wifi, and the above-mentioned user interaction process can also be completed based on terminal devices such as mobile phones.
  • the corresponding user operation interface is shown in FIG. 7 .
  • Step 503 collecting multiple single actions of the user. Specifically, the user is prompted to make multiple single actions corresponding to each category of beats.
  • the prompt method can be a combination of text and voice to prompt the user to start inputting actions, and during the process of inputting multiple single actions, voice broadcast, At least one of text display, vibration, luminescence and other methods prompts the user with the beat corresponding to each action. For example, as shown in interface U11 in Figure 6, while the text prompts on the operation interface, a voice broadcast "Please make an accent action according to the vibration prompt after hearing the prompt tone", at this time, the device will emit a beep as a prompt sound, and the device gives a vibration prompt, and counts at the moment when the vibration starts.
  • the user performs a tapping action after hearing the prompt sound and sensing the vibration.
  • the device records the precise time at the second moment according to the motion data in the action; Then vibrate again, start timing again and record a second moment, and so on for many times.
  • the motion data may be information such as vibration and/or acceleration generated by the user's motion collected by the sensor, and time information or strength information such as the second moment is further obtained based on the vibration and/or acceleration information and other information.
  • how to determine the action time and action strength based on the data collected by the sensor refers to the description in the aforementioned step 202 , which will not be repeated here.
  • the collection of beat motion data, and so on at least obtain the motion data of typical types of beats such as strong beat, weak beat, and sub-strong beat.
  • the user wears the smart watch and performs percussion with different strengths according to the instructions, such as heavy percussion, sub-forte percussion, soft percussion, etc., and obtains the belt of three beat categories.
  • Action sample data with user personal characteristics.
  • FIG. 7 for an operation interface of a terminal device such as a mobile phone.
  • Step 504 based on the multiple single actions collected in step 503, determine reference features.
  • the time interval or acceleration value of a single action can be determined first as a single sample, and then multiple samples are averaged and then the mean square error is calculated, and the corresponding time reference interval and Strength reference interval.
  • the time reference interval can be obtained in the following manner:
  • n represents the number of actions corresponding to a category beat made by the user
  • X i represents the word time interval corresponding to the i-th action.
  • the time reference interval or strength in the embodiment of this application, various mathematical algorithms for determining the characteristics of the overall sample based on multiple single samples can be applied to the time reference interval or strength in the embodiment of this application
  • the determination of the reference interval is not limited to the above method of adding/subtracting the mean square error from the mean value, for example, the corresponding sample interval can also be determined based on the mean square value and the mean square error.
  • Step 505 based on user input, determine beat and unit time value.
  • Determining the unit time value means determining the number of beats per minute (BPM).
  • Determining the beat includes determining the time signature of the beat, and may also include selecting from a user-defined beat type. Specifically, the time signature and unit time value can be adjusted on the interactive interface on the electronic metronome.
  • Step 506 detecting the target speed when the user is currently making an action, and the target speed may be a linear velocity (displacement velocity) or an angular velocity. If the linear velocity or angular velocity of the user's action is too high, it means that the user is currently in an abnormal high-speed performance state. At this time, the action frequency will be high, and the detection of whether to keep up with the beat is of little use, and the error will be relatively high, so , when it is determined that the speed of the user's current action exceeds the speed threshold, no subsequent detection is performed, and only when it is determined that the user's speed is lower than the speed threshold, subsequent detection is performed.
  • the speed threshold can also be to prompt the user to play at the fastest speed during the initialization stage of the user's personal data. For example, referring to the interface U12 in FIG. Voice prompt: "Please tap at the fastest speed after hearing the beep", and then the speed sensor senses the user's speed threshold and records it.
  • the speed sensor can be a linear speed sensor or an angular speed sensor.
  • Step 507 judge whether the target speed is lower than the speed threshold, if yes, execute step 508, otherwise, return to step 506 to continue detecting the target speed.
  • the electronic metronome can guide the user to continuously increase the tempo from a slow speed until a small change in the acceleration is detected or no acceleration can be detected, then it can be considered as reaching the user's speed threshold, and record the time speed.
  • the faster the speed tapping action the greater the BPM at this time, that is, the user's linear velocity or angular velocity is generally positively correlated with the BPM value.
  • the The collected linear velocity or angular velocity is converted into a BPM value, that is, the maximum number of notes the user can tap in one minute is used as the unit of measure for the user's limit speed.
  • Step 508 detecting target features.
  • detecting the feature of the target includes detecting the feature of the time dimension (first feature) and the feature of the force dimension (second feature).
  • first feature the feature of the time dimension
  • second feature the feature of the force dimension
  • Step 509 read the reference signature.
  • First read the user-specific reference feature if the reference feature reading fails, it means that the user has not initialized the personal data, or the initialization data entry is unsuccessful. At this time, it is necessary to read the second reference feature from the execution storage address, that is, execute step 509 . If the reference signature is read successfully, then the reference signature is preferentially used as the reference signature participating in the comparison, and the execution of step 511 or 512 is continued.
  • Step 510 read the second reference feature. If the reading is successful, continue to execute step 511 or 512. If the reading fails, the reference feature cannot be obtained, and the detection process ends (not shown in the figure).
  • Step 511 comparing the target time interval in the target feature corresponding to each single action with the time reference interval in the reference feature, and determining whether each single action is a missed shot or snap shot.
  • the performance speed of the target rhythm to be detected is 60 BPM, that is, the unit time value occupied by one beat is 1 s.
  • the beat subcategory corresponding to a unit time value shown in Figure 9 is reshoot (i.e. strong beat), the time reference interval corresponding to the reshoot determined in advance is Tf, the minimum value min of the reshoot reference interval, the maximum value max, if the time difference between the first moment corresponding to the user’s action within the unit time value and the starting time t1 of the unit time value (i.e.
  • the target time interval is T1
  • T2 the time length between the first moment and the starting moment t1 of the unit time value
  • max the maximum value max of Tf
  • the corresponding first moment The time difference from the starting moment t2 of the unit time value is T4, and the duration represented by T4 is higher (greater than) the maximum value of Tmf, then it is determined that the user has dropped a beat in this second strong beat.
  • the specific judgment logic is shown in Table 2 below.
  • Step 512 Compare the strength information in the target feature corresponding to each single movement with the strength reference interval in the reference feature to determine whether the strength of each single movement is too light or too heavy.
  • the force information may be an average value of the acceleration of a single action process. For example, in a possible implementation, a unit time value is divided into M time periods on average, the acceleration collected at the midpoint of each time period is obtained, and the average value of M accelerations is calculated as a single action strength information of the process.
  • each single sample value can be determined in the same way for the strength reference interval, and then the strength reference interval can be determined by referring to the method of determining the time reference interval based on multiple single time intervals.
  • the judgment logic between the strength reference interval and the strength information can refer to the judgment logic of the time dimension. For details, please refer to Table 3 below and will not repeat it.
  • Step 513 output a feedback report.
  • the feedback report is displayed on the interface of the electronic metronome.
  • the interface U13 the detection result of the group 2 rhythm shown in Fig. 4 is displayed, and below each beat that does not keep up with the beat, an error situation is displayed, wherein the first bar The third beat is dropped, the first beat of the second measure is not strong enough, and the second beat of the third measure is rushed.
  • the rhythm can be played again, and prompts such as voice, vibration or light are given at the wrong beat, so that the user can feel the wrong beat point more intuitively.
  • the embodiment of the present application also provides a wearable device, which includes: a display screen; at least one sensor; a processor; a memory; at least one application program; and one or more computer programs, wherein the one or more The computer programs are stored in memory, one or more computer programs comprising instructions.
  • the wearable device may perform the following steps: determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat; obtain the target rhythm through the at least one sensor Based on the target features corresponding to each beat, based on the beat subcategory corresponding to each beat, each target feature is compared with a predetermined reference feature to obtain detection data.
  • the hardware architecture of the wearable device 110 may include:
  • the display screen 111 is configured to display a feedback report to the user, for example, display the interface shown in FIG. 10 .
  • the display screen 111 may include a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the wearable device 110 may include at least one display screen 111 .
  • the sensor group 112 includes at least one sensor, specifically, at least a vibration sensor or an acceleration sensor.
  • the processor 113 includes one or more processing units.
  • the processor 113 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a digital Signal processor (digital signal processor, DSP), etc.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • graphics processing unit graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • DSP digital Signal processor
  • the memory 114 is used to store data such as the above instruction, reference features and detected target features.
  • the memory 114 may be an external memory independent of the processor 113 , or may be set in the processor 113 .
  • the memory built into the processor 113 may be a cache memory for storing instructions or data that the processor 113 has just used or recycled. If the processor 113 needs to use the instruction or data again, it can be called directly from the cache memory. Repeated access is avoided, and the waiting time of the processor 113 is reduced.
  • the memory may be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), or other types of memory that can store information and instructions
  • ROM read-only memory
  • RAM random access memory
  • a dynamic storage device can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage ( Including Compact Disc, Laser Disc, Optical Disc, Digital Versatile Disc, Blu-ray Disc, etc.), magnetic disk storage medium or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can Any other media accessed by a computer, etc.
  • EEPROM electrically erasable programmable read-only memory
  • CD-ROM compact disc read-only memory
  • CD-ROM compact disc read-only memory
  • optical disc storage Including Compact Disc, Laser Disc, Optical Disc, Digital Versatile Disc,
  • the power management module 115 receives the input of the battery and/or the charging management module, and supplies power to the processor 113 , the memory 114 , the display screen 111 , and the sensor group 112 .
  • the power management module 115 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 115 can also be set in the processor 113 .
  • the power management module 115 and the charging management module can also be set in the same device.
  • the wearable device 110 may include more or fewer components than shown in the illustration, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the wearable device 110 may further include:
  • Loudspeaker 116, and audio circuit, described loudspeaker 116 is connected with processor 113 through audio frequency circuit, is used for expressing the strength law of each beat in the beat in sound mode, and takes place in the way of sound (such as voice) to user's feedback or The tempo point for snapping and other issues. For example, while the display screen 111 of the wearable device 110 is displaying the interface shown in FIG. 10 , a voice broadcast is made "Hello, after detection, you fell off the third beat of the first bar.".
  • the motor 117 provides vibration power for the wearable device 110.
  • the motor of the motor is a 7G ERM motor, and its vibration capability is about 7 times stronger than that of an ordinary smart phone.
  • the input unit 118 is used for inputting user instructions. For example, both the beat and the first unit time value of the target rhythm to be detected can be determined according to user input, and the input unit is used for the user to input various instructions.
  • the input unit 118 and the display screen 111 may be integrated into a touch display screen; the input unit 118 may also include a pressure sensor (not shown in FIG. 12 ), through which the pressure generated by the user is felt The signal can convert the pressure signal into an electrical signal to complete user instruction input.
  • a pressure sensor can be disposed on the display screen 111 . There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors.
  • the wearable device 110 When a touch operation acts on the display screen 111, the wearable device 110 detects the intensity of the touch operation according to the pressure sensor. The wearable device 110 can also calculate the touched position according to the detection signal of the pressure sensor. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions.
  • an instruction to input a regular beat is executed, for example, the time signature numbers corresponding to a plurality of regular beat alternatives are displayed on the display screen 111, and the user can select Set the beat with the number corresponding to the time signature, for example, select 3 for the numerator and 8 for the denominator, then set the beat of the music to be played to 3/8.
  • an instruction for selecting a custom beat is executed, and an unconventional beat is selected from a pre-stored custom beat database.
  • the wireless communication unit 119 is configured to perform wireless communication with a metronome application installed on another terminal device.
  • the wearable device 110 is a smart watch with a metronome function
  • a metronome application program corresponding to the smart watch can be installed on the smart phone terminal, and the smart watch can communicate with the application program wirelessly through the wireless communication unit 119 .
  • the wireless communication unit 119 can support applications on the wearable device 110 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT) , global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication unit 119 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module receives electromagnetic waves through the antenna, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 113 .
  • the wireless communication module can also receive the signal to be sent from the processor 113, frequency-modulate it, amplify it, and convert it into electromagnetic wave to radiate out through the antenna.
  • multiple wearable devices can be connected to the same terminal device (such as smartphones, IPADs, laptops, etc.)
  • the application realizes the synchronous collaboration of multiple wearable devices.
  • the wearable devices of multiple members of a band are connected to the metronome APP of the same smartphone, so that multiple people can collaborate and perform at the same rhythm.
  • multiple wearable devices can also use one of the wearable devices as an intermediate station for wireless communication, and realize the cooperation of multiple wearable devices based on one of the wearable devices without resorting to the APP on the terminal device.
  • the flashlight 120 is used to remind the user of the strength of each beat in the beat in a light-emitting manner, and is also used to feed back to the user the beat point where the user loses a beat or snaps a beat and the strength is uncomfortable.
  • the display screen 111 displays At the same time as the displayed interface, replay the target rhythm played by the user, and then give a flash reminder at the beat point that does not keep up with the beat, to remind the user that the beat does not keep up with the beat, and different types of errors use different colors of flashes, For example, the red light flashes when the shot is missed, the green light flashes when the shot is snapped, the blue light is displayed when the force is not enough, the purple light is displayed when the force is too high, and so on.
  • the sensor group 112 includes a vibration sensor and an acceleration sensor, wherein the vibration sensor is used to sense the vibration or vibration of the wearable device 110.
  • the vibration sensor senses the vibration generated by the wearable device when the user is hitting the action.
  • the vibration is detected, it means that the drumstick held by the user is in contact with the drum surface, and vibration is generated under the rebound force of the drum surface, and the vibration continues.
  • the time of includes the contact time between the drumstick and the drum surface, and the specified moment in the duration of the vibration can be used to mark the time when the drumming action occurs.
  • the vibration sensor can also sense the vibration generated by the user during the stepping process such as kicking, and then identify the user's action time.
  • the vibration sensor may be a relative type, an inertial type, or an electric type, a piezoelectric type, an eddy current type, an inductive type, a capacitive type, a resistive type, a photoelectric type, or the like.
  • the acceleration sensor is used to collect acceleration information of the wearable device 110 .
  • the acceleration sensor can be used to collect acceleration information during the user's action, including the magnitude and/or direction of the acceleration.
  • the acceleration information reflects the strength of the user's action on the one hand, and on the other hand, the specific acceleration is 0.
  • the time can also be used as a mark of the user's action time.
  • the wearable device 110 may only include an acceleration sensor without a vibration sensor. In individual embodiments, only vibration sensors may be included without acceleration sensors.
  • the sensor group 112 also includes a distance sensor.
  • the distance sensor can be used as an accessory to sense the distance between the drumstick and the drumhead, and then determine the time information of the user's action based on the distance.
  • the processor 113 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, general-purpose input/output (general-purpose input/output, GPIO) interface, and/or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • general-purpose input/output general-purpose input/output
  • GPIO general-purpose input/output
  • USB universal serial bus
  • the processor 113 may include multiple sets of I2C buses, and the processor 113 may be respectively coupled to the sensor group 112, the power management module 115, the flashlight 120, etc. through different I2C bus interfaces.
  • the processor 113 may be coupled to the display screen 111 through an I2C interface, so that the processor 113 communicates with the display screen 111 through an I2C bus interface.
  • the processor 113 may include multiple sets of I2S buses, and the I2S interface may be used for audio communication.
  • the processor 113 can be coupled with the audio circuit through the I2S bus, so as to realize the communication between the processor 113 and the audio circuit, and then make the speaker 116 sound under control.
  • the wearable device also has a tuner function, which can be used to tune the musical instrument. Further, the wearable device can also be set with a volume decibel alarm, which is used to monitor the volume throughout the day, and once the volume reaches the dangerous level stipulated by the World Health Organization, an alarm will be issued.
  • the embodiment of the present application also provides a device, which includes:
  • the device is made to perform the following steps: determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat; obtain the time corresponding to each beat in the target rhythm through at least one sensor
  • the target feature includes the first feature, and the first feature is used to represent the corresponding time information when the user makes an action within the first unit time value; based on the beat category corresponding to each beat, combine each target feature with a predetermined reference feature Compare to obtain detection data; wherein, the detection data is used to represent whether the user's actions within the first unit time value keep up with the beat; the reference features include the time reference intervals occupied by the user's actions corresponding to each type of beat.
  • the embodiment of the present application also provides a computer storage medium, including computer instructions, and when the computer instructions are run on an electronic device, the electronic device is made to execute the method shown in FIG. 2 .
  • the method and device provided by the embodiment of the present application initializes the personal user data before playing, collects the time reference interval and speed threshold of percussion stress, weak sound, and subforte, and plays the music repeatedly. Accurate feedback can correct incorrect beats, avoid blind training, achieve the purpose of cultivating users' sense of rhythm faster, and help users learn music more efficiently or keep the team tidy.
  • unit in the embodiments of the present application may be implemented in the form of software and/or hardware, which is not specifically limited.
  • a "unit” may be a software program, a hardware circuit or a combination of both to realize the above functions.
  • the hardware circuitry may include application specific integrated circuits (ASICs), electronic circuits, processors (such as shared processors, dedicated processors, or group processors) for executing one or more software or firmware programs. etc.) and memory, incorporating logic, and/or other suitable components to support the described functionality.
  • ASICs application specific integrated circuits
  • processors such as shared processors, dedicated processors, or group processors
  • memory incorporating logic, and/or other suitable components to support the described functionality.
  • the units of each example described in the embodiments of the present application can be realized by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
  • "at least one” means one or more, and “multiple” means two or more.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three kinds of relationships, for example, A and/or B may indicate that A exists alone, A and B exist simultaneously, or B exists alone. Among them, A and B can be singular or plural.
  • the character “/” generally indicates that the contextual objects are an “or” relationship.
  • “At least one of the following” and similar expressions refer to any combination of these items, including any combination of single items or plural items.
  • At least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, and c may be single or multiple.
  • any function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Abstract

A method for detecting a user action on the basis of music beats, and a wearable device, a terminal device and a computer storage medium, which relate to the technical field of wearable devices, and can detect whether a user keeps up with beats. The method comprises: determining beats corresponding to a target rhythm to be detected and a first unit time occupied by a beat (201); acquiring a target feature that corresponds to each beat in the target rhythm, wherein the target feature comprises a first feature, and the first feature is used for representing corresponding time information of when a user performs an action within the first unit time (202); and on the basis of a beat category corresponding to each beat, comparing each target feature with a predetermined reference feature, so as to obtain detection data (203).

Description

基于音乐节拍检测用户动作的方法和设备Method and device for detecting user actions based on music tempo 技术领域technical field
本申请涉及可穿戴式设备领域,尤其涉及一种基于音乐节拍检测用户动作的方法和设备。The present application relates to the field of wearable devices, in particular to a method and device for detecting user actions based on music beats.
背景技术Background technique
目前,音乐学习、乐器演奏、舞蹈训练等很多场景中,需要培养用户的节奏感,电子节拍器能够根据节拍的强弱规律产生相应强度的振动,使用户在穿戴该电子节拍器时,能够感知节拍的强弱变化规律,以辅助训练用户的节奏感。而在训练过程中,用户自己做出的实际动作可能没有准确地跟上节拍,例如发生抢拍、掉拍等,或者在重拍的力度较弱、在弱拍的力度较大等,这些问题的改正依赖于用户的主动感知,多数情形下,用户可能并不能够主动意识到问题的存在,也就不会针对性地加以纠正,节奏感的训练效果有待提升。如何检测用户是否跟上节拍,成为亟待解决的问题。At present, in many scenes such as music learning, musical instrument performance, dance training, etc., it is necessary to cultivate the user's sense of rhythm. The electronic metronome can generate vibrations of corresponding intensity according to the strength of the beat, so that the user can feel when wearing the electronic metronome. The strength of the beat changes regularly to assist in training the user's sense of rhythm. However, during the training process, the actual actions made by the user may not keep up with the beat accurately, such as snap shots, drop shots, etc., or the strength of the retake is weak, and the strength of the weak beat is relatively strong. The correction depends on the user's active perception. In most cases, the user may not be able to actively realize the existence of the problem, and will not correct it in a targeted manner. The training effect of the sense of rhythm needs to be improved. How to detect whether the user keeps up with the beat has become an urgent problem to be solved.
发明内容Contents of the invention
本申请提供一种基于音乐节拍检测用户动作的方法和设备,能够检测出用户是否跟准节拍。The present application provides a method and device for detecting a user's action based on a music beat, which can detect whether the user follows the beat.
第一方面,本技术方案提供了一种基于音乐节拍检测用户动作的方法,包括:确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值;获取目标节奏中各拍分别对应的目标特征,目标特征包括第一特征,第一特征用于表征用户在第一单位时值内做动作时对应的时间信息;基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据;其中,参考特征包括各拍子类别分别对应的时间参考区间;检测数据用于至少向用户反馈在时间维度是否跟上节拍。In the first aspect, this technical solution provides a method for detecting user actions based on music beats, including: determining the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat; target feature, the target feature includes the first feature, the first feature is used to represent the corresponding time information when the user makes an action within the first unit time value; based on the beat category corresponding to each beat, each target feature and the predetermined reference feature Compare to obtain detection data; wherein, the reference features include time reference intervals corresponding to each beat category; the detection data is used to at least give feedback to the user whether they keep up with the beat in the time dimension.
在一种可能的实施方式中,第一特征包括目标时间间隔;目标时间间隔,用于表征用户在第一单位时值内做出动作的过程中指定的第一时刻,与第一起始时刻之间的时间差,其中,第一起始时刻为第一单位时值的起始时刻。In a possible implementation manner, the first feature includes a target time interval; the target time interval is used to represent the difference between the first moment specified by the user in the process of making an action within the first unit time value and the first starting moment. The time difference between, wherein, the first starting moment is the starting moment of the first unit time value.
在一种可能的实施方式中,第一时刻,基于如下方式确定:在第一单位时值内,检测到加速度为零的任一时刻,作为第一时刻。In a possible implementation manner, the first moment is determined based on the following method: within the first unit time value, any moment when the acceleration is detected as zero is taken as the first moment.
在一种可能的实施方式中,第一时刻,基于如下方式确定:在第一单位时值内,检测开始振动到振动结束的持续时间,作为第一时长,以第一时长中的指定的任一时刻作为第一时刻。In a possible implementation manner, the first moment is determined based on the following method: within the first unit time value, detect the duration from the start of the vibration to the end of the vibration as the first duration, and use any specified value in the first duration A moment as the first moment.
在一种可能的实施方式中,第一时刻,基于如下方式确定:在第一单位时值内,检测加速度为零的至少一个时刻,以及检测开始振动到振动结束的持续时间,作为第一时长,将距离第一时长最近或者落入第一时长之中的加速度为零的时刻作为第一时刻。In a possible implementation manner, the first moment is determined based on the following method: within the first unit time value, detect at least one moment when the acceleration is zero, and detect the duration from the start of the vibration to the end of the vibration as the first duration , taking the moment when the acceleration closest to the first duration or falling within the first duration is zero as the first moment.
在一种可能的实施方式中,确定待检测的目标节奏对应的节拍和一拍占用的第一 单位时值之前,还包括:确定用户个人专属的参考特征。In a possible implementation manner, before determining the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat, it also includes: determining the user's personal reference features.
在一种可能的实施方式中,确定用户个人专属的参考特征,包括:获取用户做出任一拍子类别的多次动作分别对应的单次时间间隔,基于多个单次时间间隔,确定任一拍子类别对应的时间参考区间,作为用户个人专属的参考特征;其中,单次时间间隔,基于如下方式确定:确定用户做出单次动作的过程中指定的第二时刻,将第二时刻与第二起始时刻之间的时间差作为单次时间间隔;其中,第二起始时刻为采集单次动作的起始时刻。In a possible implementation manner, determining the user-specific reference features includes: obtaining the single time intervals corresponding to multiple actions of any beat category performed by the user, and determining any The time reference interval corresponding to the beat category is used as a user-specific reference feature; among them, the single time interval is determined based on the following method: determine the second moment specified in the process of the user making a single action, and compare the second moment with the first The time difference between the two starting moments is taken as a single time interval; wherein, the second starting moment is the starting moment of collecting a single action.
在一种可能的实施方式中,基于多个单次时间间隔,确定任一拍子类别对应的时间参考区间,包括:计算多个单次时间间隔的平均值;基于平均值,计算多个单次时间间隔对应的均方差;基于均方差和平均值,确定任一拍子类别对应的时间参考区间。In a possible implementation manner, based on multiple single time intervals, determining the time reference interval corresponding to any beat category includes: calculating the average value of multiple single time intervals; based on the average value, calculating multiple single time intervals The mean square error corresponding to the time interval; based on the mean square error and the average value, determine the time reference interval corresponding to any beat category.
在一种可能的实施方式中,基于均方差和平均值,确定任一拍子类别对应的时间参考区间,包括:将平均值加、减N倍均方差获得的区间,作为时间参考区间,1≤N≤3。In a possible implementation, based on the mean square error and the average value, determine the time reference interval corresponding to any beat category, including: the interval obtained by adding or subtracting N times the mean square error from the average value, as the time reference interval, 1≤ N≤3.
在一种可能的实施方式中,目标特征还包括第二特征,第二特征用于表征用户在第一单位时值内做出动作时对应的力度信息;参考特征还包括各拍子类别分别对应的力度参考区间;基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,还包括:基于各拍对应的拍子类别,将第二特征与相应拍子类别对应的力度参考区间进行比较;检测数据还用于向用户反馈各拍的动作力度是否符合节拍的强弱规律。In a possible implementation manner, the target feature also includes a second feature, and the second feature is used to characterize the corresponding force information when the user makes an action within the first unit time; the reference feature also includes the corresponding Strength reference interval; based on the beat category corresponding to each beat, compare each target feature with a predetermined reference feature, and also include: based on the beat category corresponding to each beat, compare the second feature with the strength reference interval corresponding to the corresponding beat category ; The detection data is also used to feed back to the user whether the action strength of each beat conforms to the strength of the beat.
在一种可能的实施方式中,获取目标节奏中各拍分别对应的目标特征之前,还包括:确定用户个人专属的力度参考区间。In a possible implementation manner, before obtaining the target features respectively corresponding to each beat in the target rhythm, it further includes: determining a user-specific dynamic reference interval.
在一种可能的实施方式中,确定用户个人专属的力度参考区间,包括:获取用户做出任一类别拍子的多次动作分别对应的力度信息,基于多条力度信息,确定任一拍子类别对应的力度参考区间,作为用户个人专属的力度参考区间;其中,力度信息包括用户做出任一拍子类别的动作时对应的加速度信息。In a possible implementation manner, determining the user-specific strength reference interval includes: obtaining the strength information corresponding to multiple actions of any type of beat by the user, and determining the corresponding strength information of any beat category based on multiple pieces of strength information. The strength reference interval of is used as the user's personal strength reference interval; wherein, the strength information includes the corresponding acceleration information when the user makes an action of any beat type.
在一种可能的实施方式中,获取目标节奏中各拍分别对应的目标特征之前,还包括:获取用户在做出动作时的目标速度;将目标速度与预先确定的速度阈值进行比较,确定目标速度的值低于速度阈值时,则执行获取目标节奏中各拍分别对应的目标特征的步骤。In a possible implementation manner, before acquiring the target features corresponding to each beat in the target rhythm, it also includes: acquiring the target speed when the user makes an action; comparing the target speed with a predetermined speed threshold to determine the target When the value of the speed is lower than the speed threshold, the step of acquiring the target features corresponding to each beat in the target rhythm is executed.
在一种可能的实施方式中,目标速度包括线速度或者角速度。In a possible implementation manner, the target velocity includes a linear velocity or an angular velocity.
在一种可能的实施方式中,基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较之前,还包括:根据预定的第一路径,读取用户个人专属的参考特征;参考特征读取失败时,则根据预定的第二路径,读取备用的第二参考特征;第二参考特征,为预先存储的适用于各个用户的参考特征。In a possible implementation manner, before comparing each target feature with a predetermined reference feature based on the beat category corresponding to each beat, it further includes: reading the user's personal reference feature according to the predetermined first path; When the feature reading fails, read the spare second reference feature according to the predetermined second path; the second reference feature is a pre-stored reference feature applicable to each user.
在一种可能的实施方式中,确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值之后,还包括:按照节拍对应的强弱规律,在各个第一单位时值内分别进行相应强度的提示,提示的方式包括振动、声音播放、发光中的至少一种。In a possible implementation manner, after determining the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat, it also includes: according to the strength rule corresponding to the beat, within each first unit time value, respectively Prompting with corresponding intensity, the mode of prompting includes at least one of vibration, sound playing and light emitting.
在一种可能的实施方式中,获得检测数据之后,还包括:根据检测数据,至少向用户反馈在时间维度是否跟上节拍,反馈方式包括显示、振动、声音播放、发光中的至少一种。In a possible implementation manner, after obtaining the detection data, it further includes: according to the detection data, at least giving feedback to the user whether they keep up with the beat in the time dimension, and the feedback method includes at least one of display, vibration, sound playback, and light emission.
在一种可能的实施方式中,拍子类别至少包括强拍、次强拍和弱拍。In a possible implementation manner, the beat subcategories include at least a strong beat, a second strong beat and an upbeat beat.
第二方面,本技术方案还提供一种可穿戴设备,包括:显示屏;至少一个传感器;一个或多个处理器;存储器;至少一个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被设备执行时,使得设备执行以下步骤:确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值;获取目标节奏中各拍分别对应的目标特征,目标特征包括第一特征,第一特征用于表征用户在第一单位时值内做出动作时对应的时间信息;基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据;其中,参考特征包括各拍子类别分别对应的时间参考区间;检测数据用于至少向用户反馈在时间维度是否跟上节拍。In a second aspect, the technical solution also provides a wearable device, including: a display screen; at least one sensor; one or more processors; a memory; at least one application program; and one or more computer programs, wherein one or more One or more computer programs are stored in the memory, and one or more computer programs include instructions. When the instructions are executed by the device, the device performs the following steps: determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat. ; Obtain the target feature corresponding to each beat in the target rhythm, the target feature includes the first feature, and the first feature is used to represent the corresponding time information when the user makes an action within the first unit time value; based on the beat category corresponding to each beat , comparing each target feature with a predetermined reference feature to obtain detection data; wherein, the reference feature includes a time reference interval corresponding to each beat category; the detection data is used to at least give feedback to the user whether to keep up with the beat in the time dimension.
第三方面,本技术方案还提供一种终端设备,包括:显示屏;至少一个传感器;一个或多个处理器;存储器;至少一个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被终端设备执行时,使得终端设备执行以下步骤:确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值;获取目标节奏中各拍分别对应的目标特征,目标特征包括第一特征,第一特征用于表征用户在第一单位时值内做出动作时对应的时间信息;基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据;其中,参考特征包括各拍子类别分别对应的时间参考区间;检测数据用于至少向用户反馈在时间维度是否跟上节拍。In the third aspect, the technical solution also provides a terminal device, including: a display screen; at least one sensor; one or more processors; memory; at least one application program; and one or more computer programs, wherein one or more The computer program is stored in the memory, and one or more computer programs include instructions. When the instructions are executed by the terminal device, the terminal device performs the following steps: determine the beat corresponding to the target rhythm to be detected and the first unit occupied by one beat value; obtain the target features corresponding to each beat in the target rhythm, the target features include the first feature, and the first feature is used to represent the corresponding time information when the user makes an action within the first unit time value; based on the beats corresponding to each beat category, each target feature is compared with a predetermined reference feature to obtain detection data; wherein, the reference feature includes the time reference interval corresponding to each beat category; the detection data is used to at least give feedback to the user whether to keep up with the beat in the time dimension.
第四方面,本技术方案还提供一种计算机存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如上述第一方面任一项所述的方法。In a fourth aspect, the technical solution further provides a computer storage medium, including computer instructions, which, when the computer instructions are run on an electronic device, cause the electronic device to execute the method described in any one of the above first aspects.
本申请实施例提供的方法和设备,通过检测目标节奏中的各拍的目标特征,并与参考特征进行比较,来识别用户是否准确跟拍,进而向用户反馈错误的节拍点,使用户有针对性地加以调整,提高了训练用户节奏感的效率。The method and device provided in the embodiments of the present application detect whether the user is accurately following the beat by detecting the target feature of each beat in the target rhythm and comparing it with the reference feature, and then feed back the wrong beat point to the user, so that the user has a targeted It can be adjusted systematically, which improves the efficiency of training users' sense of rhythm.
附图说明Description of drawings
图1是本申请实施例提供的可穿戴设备的一个应用场景示例的示意图;FIG. 1 is a schematic diagram of an example application scenario of a wearable device provided by an embodiment of the present application;
图2是本申请实施例提供的基于音乐节拍检测用户动作的方法的一个实施例的流程示意图;FIG. 2 is a schematic flowchart of an embodiment of a method for detecting user actions based on music beats provided in the embodiment of the present application;
图3是本申请实施例提供的场景示例中一次击鼓动作的轨迹示意图;Fig. 3 is a schematic diagram of the trajectory of a drumming action in the scene example provided by the embodiment of the present application;
图4是本申请实施例的一组目标节奏的示例;Fig. 4 is the example of a group of target rhythms of the embodiment of the present application;
图5是本申请实施例提供的基于音乐节拍检测用户动作的方法的另一个实施例的流程示意图;FIG. 5 is a schematic flow diagram of another embodiment of the method for detecting user actions based on music tempo provided by the embodiment of the present application;
图6是本申请实施例提供的可穿戴设备的一组显示界面示例的示意图;Fig. 6 is a schematic diagram of a set of display interface examples of a wearable device provided by an embodiment of the present application;
图7是本申请实施例提供的终端设备的一组显示界面示例的示意图;FIG. 7 is a schematic diagram of a group of display interface examples of a terminal device provided by an embodiment of the present application;
图8是本申请实施例提供的另一个显示界面示意图;Fig. 8 is a schematic diagram of another display interface provided by the embodiment of the present application;
图9是本申请实施例提供的方法中将目标时间间隔与时间参考区间进行比较的示意图;Fig. 9 is a schematic diagram of comparing the target time interval with the time reference interval in the method provided by the embodiment of the present application;
图10是本申请实施例提供的显示反馈报告的界面示例的示意图;FIG. 10 is a schematic diagram of an example interface for displaying a feedback report provided by an embodiment of the present application;
图11是本申请实施例提供的一个实施例中可穿戴设备的硬件结构示意图;Fig. 11 is a schematic diagram of the hardware structure of a wearable device in an embodiment provided by the embodiment of the present application;
图12是本申请实施例提供的另一个实施例中可穿戴设备的硬件结构示意图。Fig. 12 is a schematic diagram of a hardware structure of a wearable device in another embodiment provided by the embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below with reference to the accompanying drawings.
为便于理解本申请实施例提供的基于音乐节拍检测用户演奏动作方法或者设备,先对本申请实施例中涉及的多个技术用语进行介绍。In order to facilitate understanding of the method or device for detecting a user's performance action based on the music tempo provided by the embodiment of the present application, a number of technical terms involved in the embodiment of the present application are firstly introduced.
节拍和节奏是一段完整音乐中重要的组成部分,节奏感的培养是音乐学习的基础,依赖大量练习后的大脑惯性以及肌肉记忆。其中,节拍是乐曲中固定单位时值和强弱规律的组合,是衡量节奏的单位,节拍训练是培养节奏感的基础。节奏的含义包含广义含义和狭义含义,节奏的广义含义,是自然、社会和人的活动中一种与韵律结伴而行的有规律的变化,用反复、对应等形式把各种变化因素加以组织,构成前后连贯的有序整体,节奏的狭义含义则特指音乐乐曲的律动特征。在本申请实施例中,节奏可以理解为节拍的组合。Beat and rhythm are an important part of a complete piece of music. The cultivation of rhythm is the basis of music learning, which relies on brain inertia and muscle memory after a lot of practice. Among them, the beat is the combination of the fixed unit time value and the law of strength and weakness in the music, and it is the unit to measure the rhythm. Beat training is the basis for cultivating the sense of rhythm. The meaning of rhythm includes broad meaning and narrow meaning. The broad meaning of rhythm is a kind of regular change that goes hand in hand with rhythm in nature, society and human activities. Various changing factors are organized in the form of repetition and correspondence. , forming a coherent and orderly whole, and the narrow meaning of rhythm specifically refers to the rhythmic characteristics of music. In the embodiment of the present application, rhythm can be understood as a combination of beats.
随着学习音乐的人越来越多,在学习初期有一个合适的节拍器来培养用户的节奏感很有必要。节拍器是一种能在各种演奏速度中发出一种稳定的节拍的机械、电动或电子装置,相关技术中的节拍器可以分为机械节拍器和电子节拍器,电子节拍器可以是安装于终端设备上的具有节拍器功能的APP,例如安装于手机上的节拍器APP。需要说明的是,本申请实施例中,演奏速度指每分钟节拍数,Beats Per Minute,BPM。As more and more people learn music, it is necessary to have a suitable metronome to cultivate the user's sense of rhythm in the early stage of learning. A metronome is a mechanical, electric or electronic device that can send out a stable beat in various performance speeds. The metronome in the related art can be divided into a mechanical metronome and an electronic metronome. The electronic metronome can be installed on An APP with a metronome function on a terminal device, such as a metronome APP installed on a mobile phone. It should be noted that, in the embodiment of this application, the performance speed refers to beats per minute, Beats Per Minute, BPM.
机械节拍器是根据钟摆原理而制,内置发条驱动,摆杆上游码可上下调动,以调整速度,并和面板上的刻度相对照,可知每分钟来回摆动的次数。机械节拍器的种类有多种,例如,一种节拍器外形呈金字塔形,内部为时钟结构,有齿轮及发条,带动一摆杆,摆杆每次摆动结束时发出尖锐的“滴哒”声,这些滴哒声的速度可根据刻在摆杆上的游尺刻度上下移动摆锤,进行调整,其速度每分钟40~210拍。The mechanical metronome is made according to the principle of the pendulum, with a built-in mainspring drive. The upstream code of the pendulum can be adjusted up and down to adjust the speed, and compared with the scale on the panel, the number of swings back and forth per minute can be known. There are many types of mechanical metronomes. For example, a metronome has a pyramid shape, a clock structure inside, gears and springs, and drives a pendulum. The pendulum makes a sharp "dida" at the end of each swing. The speed of these ticking sounds can be adjusted by moving the pendulum up and down according to the vernier scale engraved on the pendulum, and the speed is 40-210 beats per minute.
节拍器APP是具有电子节拍器功能的应用程序,最初是面向音乐爱好者提供的节拍工具,可真实模拟节拍器的节拍音轨,相关技术中的节拍器APP可自定义节拍类型,例如用户可定义节拍类型为2/4拍、3/4拍、3/8拍等等。该款节拍器APP支持用户通过设置拍子速度选择演奏速度,实现演奏速度(即每分钟节拍数BPM)的快速定位,还可使用可视画面观看节拍,并且发出振动使用户感受节拍。The metronome APP is an application program with the function of an electronic metronome. It is originally a beat tool for music lovers, which can truly simulate the beat track of a metronome. Define the beat type as 2/4 beat, 3/4 beat, 3/8 beat, etc. This metronome APP supports users to select the performance speed by setting the tempo, so as to realize the rapid positioning of the performance tempo (that is, the number of beats per minute BPM).
相关技术中的一种电子节拍器,为一款可穿戴音乐设备,可穿戴于人体的腕部等部位,支持用户通过触摸显示屏自定义设置演奏速度(BPM)和节拍的拍号,根据用户设置的节拍拍号和速度,进行相应强弱规律的振动提示。An electronic metronome in the related art is a wearable music device, which can be worn on the wrist of the human body and other parts, and supports the user to customize the performance speed (BPM) and the time signature of the beat through the touch display screen. The set beat time signature and speed will give corresponding strong and weak regular vibration prompts.
常见的节拍的拍号有1/4,2/4,3/4,4/4,3/8,6/8,7/8,9/8,12/8拍等等,每小节的长度是固定的,其中分母表示音符类型,即以哪种音符为一拍,分子表示每个小节有几拍,例如分母为4表示以四分音符为一拍,分母为8表示以八分音符为一拍,2/4拍就表示以四分音符为一拍,每个小节有2拍。音符的类型还包括全音符、二分音符、十六分音符、休止符等。其中,“拍”就是以固定频率进行计时的单位,演奏速度BPM,也就是每分钟的拍数,当BPM确定时,一拍对应的单位时值就确定了。单位时值,也就是一个“拍”占用的时长,不会随着音符类型发生变化,例如当确定演奏速度为120BPM时,则四三拍或八三拍中的音符类型是不同的,但一拍占用的时长 都是0.5s。Common beat time signatures are 1/4, 2/4, 3/4, 4/4, 3/8, 6/8, 7/8, 9/8, 12/8, etc., the length of each measure It is fixed, where the denominator indicates the note type, that is, which note is taken as a beat, and the numerator indicates how many beats are in each measure. For example, a denominator of 4 means a quarter note is a beat, and a denominator of 8 means an eighth note. One beat, 2/4 beat means that a quarter note is a beat, and each measure has 2 beats. The types of notes also include whole notes, half notes, sixteenth notes, rests, and the like. Among them, "beat" is the unit for timing at a fixed frequency, and the performance speed BPM is the number of beats per minute. When the BPM is determined, the corresponding unit time value of one beat is determined. The unit time value, that is, the duration of a "beat", will not change with the note type. For example, when the playing speed is determined to be 120BPM, the note types in four-three beats or eight-three beats are different, but one The duration of shooting is 0.5s.
本申请实施例提供的基于音乐节拍检测用户演奏动作的方法或设备,能够应用于乐器演奏或学习、乐队演出、广场舞、舞蹈演出、舞蹈练习、军训等需要培养节奏感的各种场景中,其中乐器演奏学习或练习场景包括打击乐器、弦乐器、键盘乐器等各种乐器的演奏学习或演奏场景。例如,作为典型的应用场景之一,参阅图1所示,在击鼓场景中,本申请实施例提供的电子节拍器10穿戴于用户的手腕处。The method or device for detecting the user's performance based on the music tempo provided by the embodiment of the present application can be applied to various scenes that require the cultivation of a sense of rhythm, such as musical instrument performance or learning, band performance, square dance, dance performance, dance practice, military training, etc. The musical instrument playing learning or practicing scenes include playing learning or playing scenes of various musical instruments such as percussion instruments, stringed instruments, and keyboard instruments. For example, as one of the typical application scenarios, as shown in FIG. 1 , in the drumming scenario, the electronic metronome 10 provided by the embodiment of the present application is worn on the user's wrist.
在军训场景中,军队行进中的齐步、正步和跑步,以及便步、踏步等步法,是带有一定节奏感的,一步可以作为一拍,例如踏步或便步时,行军口号的“1、2、1”,是有明显的强弱规律的,一般口号“1”是重音,而口号“2”为弱音,呈现强、弱、强、弱的规律,相当于音乐节拍中的2/4拍,军队动作的整齐划一可以通过培养全员的节奏感来实现,本申请实施例提供的方法或设备能够辅助进行军训,例如,各成员均穿戴本申请实施例提供的设备,多个设备同步进行强弱提示(例如振动、发光或显示),并对各个成员的动作进行检测,并向教官、军官或士兵个人反馈成员是否跟上节拍的检测数据,针对性调整错误的节拍点,可以辅助检测到仅依赖教官视觉或者听觉未能发现的成员错误动作,提高军训效率。In the military training scene, the uniform step, forward step and running, as well as the footsteps such as stepping and stepping in the marching of the army have a certain sense of rhythm. One step can be regarded as one beat. 1, 2, 1" have obvious rules of strength and weakness. Generally, the slogan "1" is an accent, while the slogan "2" is a weak sound, showing the law of strong, weak, strong and weak, which is equivalent to the 2 in the music beat. /4 beats, the uniformity of the army's movements can be achieved by cultivating the sense of rhythm of all members. The method or equipment provided in the embodiments of the present application can assist in military training. For example, each member wears the equipment provided in the embodiments of the present application. The device synchronously gives strong and weak prompts (such as vibration, light or display), and detects the actions of each member, and provides personal feedback to the instructor, officer or soldier whether the member is keeping up with the beat detection data, and adjusts the wrong beat point in a targeted manner. It can assist in the detection of wrong actions of members who cannot be detected only by the instructor's vision or hearing, and improve the efficiency of military training.
在广场舞场景中,相应的乐曲的节拍一般是固定的,例如圆舞曲多是3/4拍,舞蹈队伍中各个成员可以通过穿戴本申请实施例提供的设备,并且将节拍调节到相应的乐曲的节拍,来准确地感知正确的舞蹈节拍,并且通过设备检测各成员的舞蹈动作是否跟上节拍,进而向用户反馈检测结果,检测结果可以通过语音播报、显示屏显示、发光等方式传达给客户,使用户得知在哪个节拍点发生了掉拍或者抢拍,更快地培养节奏感。In the square dance scene, the beat of the corresponding music is generally fixed, for example, the waltz is mostly in 3/4 time, and each member of the dance team can adjust the beat to the corresponding music by wearing the equipment provided by the embodiment of the present application. Beat, to accurately perceive the correct dance beat, and use the device to detect whether the dance movements of each member keep up with the beat, and then feedback the detection results to the user. The detection results can be communicated to customers through voice broadcasts, display screens, and lighting. Let the user know at which tempo point a drop or snap shot occurs, and develop a sense of rhythm faster.
在乐器演奏或练习场景中,尤其是乐队协奏场景下,通过本申请实施例提供的设备来同步检测各个成员的动作是否跟上节拍,有针对性地提示用户演奏动作有抢拍或者掉拍的节拍点,以培养成员的节奏感。In the scene of musical instrument performance or practice, especially in the scene of band concerto, the device provided by the embodiment of the present application is used to synchronously detect whether the actions of each member keep up with the beat, and specifically prompt the user if there is a rush or drop in the performance action The beat points to cultivate the members' sense of rhythm.
本申请实施例提供的基于音乐节拍检测用户演奏动作的设备,可以是可穿戴式设备,例如,可以是一款可穿戴的电子节拍器,该电子节拍器可以作为独立的可穿戴设备穿戴于用户的身体部位上,例如该电子节拍器可以是头戴式设备、腕带式设备、智能手环、智能脚环、电子眼镜、电子项圈等,也可以作为附加功能附加到已有的可穿戴设备产品上,例如一款支持视频通话的智能手表,还可以集成用于实现本申请实施例提供的方法的软硬件,进而在支持视音频通话的同时,还兼具节拍器功能。The device for detecting the user's performance based on the music beat provided by the embodiment of the present application may be a wearable device, for example, it may be a wearable electronic metronome, which can be worn on the user as an independent wearable device For example, the electronic metronome can be a head-mounted device, a wristband device, a smart bracelet, a smart ankle ring, electronic glasses, an electronic collar, etc., or it can be added to an existing wearable device as an additional function In terms of products, for example, a smart watch that supports video calls can also integrate hardware and software for implementing the method provided by the embodiment of the present application, so that while supporting video and audio calls, it also has the function of a metronome.
需要说明的是,本申请实施例提供的设备,也可以是安装有节拍器APP的终端设备,基于终端设备,该应用程序可以实现本申请实施例提供的方法。可选的,安装于终端设备上的节拍器APP还可以与作为可穿戴设备的电子节拍器实体产品进行通信,以实现实体产品与APP的同步。例如,电子节拍器为一款智能手环,持有该智能手环的用户可在手机上安装与该智能手环产品对应的节拍器APP,该节拍器APP与该智能手环之间通过蓝牙(bluetooth)、近场通信(Near Field Communication,NFC)、wifi等近距离无线通信方式连接。It should be noted that the device provided in the embodiment of the present application may also be a terminal device installed with a Metronome APP, and based on the terminal device, the application program can implement the method provided in the embodiment of the present application. Optionally, the metronome APP installed on the terminal device can also communicate with the physical product of the electronic metronome as a wearable device, so as to realize the synchronization between the physical product and the APP. For example, the electronic metronome is a smart bracelet, and the user who holds the smart bracelet can install the metronome APP corresponding to the smart bracelet product on the mobile phone, and the metronome APP and the smart bracelet are connected via Bluetooth (bluetooth), near field communication (Near Field Communication, NFC), wifi and other short-distance wireless communication methods.
相关技术中的节拍器侧重于向用户传达准确的音乐节拍,在用户弹奏或演奏时,其电子节拍器可以根据用户意愿佩戴于手臂、脚踝、腕部等位置,以便于用户感知节 拍的律动。节拍器的振动与BPM对应,例如在以下几种不同的音符以及节拍、BPM的组合下,相应的振动情况参阅下表1所示。The metronome in the related art focuses on conveying accurate music beats to the user. When the user is playing or playing, the electronic metronome can be worn on the arm, ankle, wrist, etc. according to the user's wishes, so that the user can perceive the rhythm of the beat. . The vibration of the metronome corresponds to the BPM. For example, under the following combinations of different notes, beats, and BPM, the corresponding vibration conditions are shown in Table 1 below.
表1Table 1
Figure PCTCN2022083752-appb-000001
Figure PCTCN2022083752-appb-000001
与相关技术中的电子节拍器不同的是,而在本申请实施例中,提供的电子节拍器在向用户传达准确的音乐节拍的同时,还可实现对用户动作的检测。本申请实施例提供的电子节拍器,在各种应用场景中,以更便于检测到用户的相关动作为原则来确定电子节拍器的穿戴部位。例如,在打击乐应用场景下,多数情况下用户是利用手腕带动敲击部件(例如鼓槌等)或者直接用手直接敲击乐器进行演奏,因此在该应用场景下,本申请实施例提供的电子节拍器可以佩戴于用户的手腕部位,以较好地感知手腕动作。而在其他场景中,例如军训场景中,本申请实施例提供的电子节拍器可以穿戴于用户的脚踝上,以更准确地感知各种步法训练中,用户的腿部或者脚部动作。Different from the electronic metronome in the related art, in the embodiment of the present application, the electronic metronome provided can also realize the detection of the user's action while conveying the accurate music tempo to the user. The electronic metronome provided by the embodiment of the present application determines the wearing position of the electronic metronome on the principle of making it easier to detect relevant actions of the user in various application scenarios. For example, in the application scenario of percussion music, in most cases, the user uses the wrist to drive the percussion components (such as drumsticks, etc.) or directly beats the instrument directly with the hand, so in this application scenario, the embodiment of the present application provides The electronic metronome can be worn on the user's wrist to better sense wrist movements. In other scenarios, such as military training scenarios, the electronic metronome provided by the embodiment of the present application can be worn on the user's ankle to more accurately perceive the user's leg or foot movements in various footwork training.
需要说明的是,在不同的应用场景中,本申请实施例提供的电子节拍器还可以附带拓展设备,拓展设备用于将可穿戴设备绑于用户身体其他部位,例如,为提升产品的通用性,该电子节拍器可以统一智能手环的产品形式实现,而用户需要在其他部位穿戴该电子节拍器时,则可以通过拓展设备实现其他部位的牢固穿戴,例如可以附带臂带或者头带、脚踝带等,来替换腕带或者与腕带可拆解连接等。It should be noted that in different application scenarios, the electronic metronome provided by the embodiment of the present application can also be equipped with an expansion device, which is used to tie the wearable device to other parts of the user's body, for example, to improve the versatility of the product , the electronic metronome can be realized in the product form of a unified smart bracelet, and when the user needs to wear the electronic metronome on other parts, he can realize the firm wearing of other parts by expanding the device, for example, it can be attached with an armband or headband, ankle Bands, etc., to replace the wrist strap or detachably connect with the wrist strap.
例如,在乐队演奏或者广场舞学习场景中,本申请实施例提供的电子节拍器可以通过拓展设备穿戴于用户的腿部位置或者胳膊位置,以更准确地感知腿部或者臂部动作。For example, in the scene of band performance or square dance learning, the electronic metronome provided by the embodiment of the present application can be worn on the user's leg or arm by extending the device to more accurately perceive the leg or arm movement.
在另外的实施例中,拓展设备还可以包括辅助的传感器等设备,用于辅助采集用户的动作,例如,在钢琴演奏场景中,多数动作是手指敲击钢琴上的琴键,仅感应腕部的动作误差会比较大,因而在该场景下,可以在电子节拍器主设备的基础上附带配 件,该配件可以是附加的传感器来感应各手指的动作,例如具体可以是包含振动传感器和/或加速度传感器的贴片(以磁吸或者其他方式粘贴与手指上)或者指环等。在弦乐器的弹奏场景中,演奏动作则主要是手指拨动琴弦,则也可以通过安装拓展设备于手指部位来感应手指动作,以辅助佩戴于手腕部位的主设备检测用户动作。In another embodiment, the expansion device may also include auxiliary sensors and other devices for assisting in collecting user actions. For example, in a piano performance scene, most actions are fingers hitting keys on the piano, and only the movement of the wrist is sensed. The action error will be relatively large, so in this scenario, an accessory can be added to the electronic metronome main device. The accessory can be an additional sensor to sense the movement of each finger, for example, it can specifically include a vibration sensor and/or acceleration The patch of the sensor (attached to the finger by magnetic attraction or other means) or the ring, etc. In the playing scene of a stringed instrument, the performance action is mainly fingers plucking the strings, and an expansion device can also be installed on the finger to sense the finger movement, so as to assist the main device worn on the wrist to detect the user's movement.
下面对本申请实施例提供的基于音乐节拍检测用户演奏动作的方法和设备分别进行阐述。The method and device for detecting a user's performance action based on the music tempo provided by the embodiments of the present application are respectively described below.
具体地,下面通过列举本申请提供的基于音乐节拍检测用户演奏动作的方法的一个实施例,为便于理解,该实施例中的各个步骤按照时间顺序进行阐述,但该时间顺序仅为其中一种可行的时间先后顺序,不可作为对本申请实施例提供的方法的必要限定,具体地,参阅图2所示,该方法可以包括如下步骤:Specifically, the following is an example of a method for detecting a user's performance based on the music tempo provided by this application. For ease of understanding, the various steps in this example are described in chronological order, but this chronological order is only one of them. The feasible chronological order cannot be regarded as a necessary limitation for the method provided in the embodiment of the present application. Specifically, as shown in Figure 2, the method may include the following steps:
步骤201,确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值。 Step 201, determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat.
在实际应用场景中,用户在使用本申请实施例提供的设备进行演奏训练或其他行为之前,可以至少对节拍、演奏速度(BPM)两个参数进行基本设置,也可以设置演奏时长、小节数等参数,以及设置演奏的曲目等。节拍和第一单位时值的确定,可以基于用户的输入而确定。即通过UX(User Experience)层的设计,实现用户对于节拍和BPM的设置和更改。BPM确定了,第一单位时值就确定了。In a practical application scenario, before using the device provided by the embodiment of the application for performance training or other activities, the user can at least perform basic settings on the two parameters of tempo and performance speed (BPM), and can also set performance duration, number of bars, etc. parameters, as well as setting the playing track, etc. Determination of the tempo and the first unit time value may be determined based on user input. That is, through the design of the UX (User Experience) layer, the user can set and change the tempo and BPM. Once the BPM is determined, the first unit time value is determined.
用户将要演奏或者已经演奏出的一段节奏,该段节奏可以作为本申请检测方法的检测对象,即为目标节奏。在本申请实施例中,节奏指节拍的组合。在一种可实现方式中,支持目标节奏中出现混合拍、复拍子、变换拍子等,例如3/4与2/4组合为5/4的混合拍。A section of rhythm that the user is about to play or has already played can be used as the detection object of the detection method of the present application, that is, the target rhythm. In this embodiment of the application, rhythm refers to a combination of beats. In a practicable manner, mixed beats, compound beats, transformed beats, etc. appear in the target rhythm, for example, the mixed beats in which 3/4 and 2/4 are combined to form 5/4.
其中,确定节拍,包括确定节拍的拍号或类型,拍号包括各种常用的音乐节拍的拍号,例如1/4,2/4,3/4,4/4,3/8,6/8等,用户可以通过选择拍号的分子、分母的数字,实现对于拍号的输入。在部分实施例中,该电子节拍器还可以支持自定义类型的节拍的输入,例如可以在电子节拍器中预存多个非常规的自定义类型节拍的候选项,该多个候选项表征的强弱规律组合可以更为复杂或多样化,例如强、弱、次强、次强、弱、弱等;该自定义类型还可以支持用户进行自定义,进而创建用户专属的原创节拍类型。Wherein, determining the beat includes determining the time signature or type of the beat, and the time signature includes the time signatures of various commonly used music beats, such as 1/4, 2/4, 3/4, 4/4, 3/8, 6/ 8, etc., the user can realize the input of the time signature by selecting the number of the numerator and denominator of the time signature. In some embodiments, the electronic metronome can also support the input of beats of a custom type, for example, multiple unconventional candidates for beats of a custom type can be prestored in the electronic metronome, and the strong The combination of weak patterns can be more complex or diverse, such as strong, weak, second-strongest, second-strongest, weaker, weaker, etc.; this custom type can also support user-defined, and then create user-specific original beat types.
确定一拍对应的第一单位时值,即确定演奏速度,也就是确定每分钟的拍数BPM,当BPM确定后,一拍对应的单位时值就确定了。例如,确定演奏速度为100BPM时,则一拍占用的单位时值为0.6s。为描述清楚,本申请实施例中将待检测的目标节奏对应的单位时值定义为第一单位时值。Determine the first unit time value corresponding to one beat, that is, determine the performance speed, that is, determine the beat number BPM per minute. After the BPM is determined, the unit time value corresponding to one beat is determined. For example, when the performance speed is determined to be 100BPM, the unit time value occupied by one beat is 0.6s. For clarity of description, in the embodiment of the present application, the unit time value corresponding to the target rhythm to be detected is defined as the first unit time value.
在一种可实现方式中,可以以单位时值作为检测的时间单位,将待检测的目标节奏对应的时间长度平均划分为多个单位时值,分别检测在该一个单位时值内用户做出动作的目标特征数据。In an achievable manner, the unit time value can be used as the detection time unit, and the time length corresponding to the target rhythm to be detected can be divided into multiple unit time values on average, and the user's actions within the unit time value can be detected respectively. Action target feature data.
需要说明的是,本申请实施例中,用户是否跟上节拍或者是否跟准节拍,包括在时间维度是否卡点以及在力度维度是否力度符合节拍的强弱要求,具体而言,用户是否跟上节拍的评价因素可以包括以下情形中的至少一个:抢拍、掉拍、重拍力度不够、弱拍力度过大、次强拍力度过大或者过小。其中掉拍和强拍是从时间维度进行评价,力度是否合适则是从另一个维度进行评判。当用户出现上述情形的至少一个时,则认 为该用户未能跟上节拍。It should be noted that, in the embodiment of this application, whether the user keeps up with the beat or whether the beat is accurate includes whether the user is stuck in the time dimension and whether the strength meets the strength requirements of the beat in the strength dimension. Specifically, whether the user keeps up with the beat The beat evaluation factors may include at least one of the following situations: snapping, missing beat, insufficient retake, too strong weak beat, too strong or too weak sub-beat. Among them, the downbeat and downbeat are evaluated from the time dimension, and whether the strength is appropriate is judged from another dimension. When at least one of the above situations occurs in the user, it is considered that the user fails to keep up with the beat.
在一种可实现方式中,在确定了节拍和一拍占用的单位时值之后,在用户演奏过程中,可以按照节拍对应的强弱规律,在各个单位时值内分别进行相应强度的提示,提示方式包括振动、声音播放、发光中的至少一种。例如,当用户选择节拍为2/4拍时,则按照2/4拍对应的强弱规律,进行强、弱、强、弱振动,或者在强拍和弱拍时发出不同颜色的光,例如,强拍发出红光,弱拍发出绿光,次强拍发出黄光等。In an achievable manner, after the beat and the unit time value occupied by one beat are determined, during the user's performance, the corresponding intensity can be prompted in each unit time value according to the strength law corresponding to the beat, The prompting method includes at least one of vibration, sound playing and light emitting. For example, when the user selects the beat as 2/4 beat, then according to the law of strength corresponding to 2/4 beat, strong, weak, strong and weak vibrations are performed, or different colors of light are emitted during strong beats and weak beats, for example , the strong beat emits red light, the weak beat emits green light, the next strong beat emits yellow light, etc.
需要说明的是,本申请实施例提供的设备内预置各种节拍参数和设备运行参数,例如节拍参数至少是节拍对应的强弱音的组合规律,设备运行参数可以包括强弱音对应的振动强度参数、强弱音进行声音播放时的声音类型、发光颜色等,例如播放的声音是电音还是人声等,发光的颜色以及发光方式为闪烁等。这些设备运行参数也可以由用户来设置。It should be noted that various tempo parameters and device operating parameters are preset in the device provided in the embodiment of the present application. For example, the tempo parameter is at least the combination rule of strong and weak sounds corresponding to the beat, and the device operating parameters may include vibrations corresponding to strong and weak sounds. Intensity parameters, strong and weak sounds, sound types, light-emitting colors, etc., such as whether the played sound is electronic or human voice, etc., the light-emitting color and light-emitting mode are flashing, etc. These device operating parameters can also be set by the user.
步骤202,获取目标节奏中各拍分别对应的目标特征。 Step 202, acquiring target features corresponding to each beat in the target rhythm.
获取各个第一单位时值内的目标特征,即采集各个第一单位时值内用户做出的单次动作的特征数据。用户是否掉拍或者抢拍,是由用户做出单次动作(即一拍对应的动作)的时间决定的,因而,在时间维度,需要采集的特征数据可以包括用户做出动作的时间信息(第一特征),以判断用户做出的单次动作在时间上是否过早或过晚,例如掉拍是用户做出动作的时间过晚,晚于正确的动作时间,抢拍是由于动作时间过早,早于正确的动作时间。Acquiring target features within each first unit time value means collecting feature data of a single action made by the user within each first unit time value. Whether the user drops or grabs a shot is determined by the time when the user makes a single action (that is, the action corresponding to one shot). Therefore, in the time dimension, the feature data to be collected may include the time information of the user's action ( The first feature) to judge whether the single action made by the user is too early or too late in time. For example, the time of the user's action is too late for a dropped shot, which is later than the correct action time. The snap shot is due to the action time Too early, earlier than the correct action time.
在一种可实现方式中,需要检测的时间维度数据可以是用户做出单次动作过程中指定的一个时刻与该第一单位时值的起始时刻(第一起始时刻)之间的时间间隔。用户做出单次动作的过程对应的时间为一个区间,是由多个时间点组成的,指定其中一个时间点作为第一时刻,第一时刻与该单位时值的起始时刻之间的时间差即为该拍子对应的动作的时间信息。其中,理论上,动作过程中的任一一个时刻都可以作为指定的第一时刻,但目前的技术实现上,仅能以可以检测到的时间点作为指定的第一时刻。In a practicable manner, the time dimension data to be detected may be the time interval between a moment specified by the user during a single action and the start moment (first start moment) of the first unit time value . The time corresponding to the process of the user making a single action is an interval, which is composed of multiple time points. One of the time points is designated as the first moment, and the time difference between the first moment and the starting moment of the unit time value It is the time information of the action corresponding to the beat. Wherein, in theory, any moment in the action process can be used as the designated first moment, but in the current technical implementation, only detectable time points can be used as the designated first moment.
具体地,通过如下几种方式来检测第一时刻:Specifically, the first moment is detected in the following ways:
作为其中一种可实现方式,在一个单位时值内,检测加速度为零的时刻,作为第一时刻。例如,参阅图3所示,在击鼓场景中,一次击鼓动作的动作轨迹可近似于如图3中所示的虚线a→b→c,其中,a点为用户手持鼓槌开始向下动作的起始点,b点为鼓槌碰触鼓面的点,c点为用户将鼓槌抬起达到的最高点。在该轨迹过程中,点a到点b的过程中,用户手持鼓槌向下发力,鼓槌除受到重力还会受到用户向下的作用力,到达b点后,鼓槌与鼓面接触,鼓面会给鼓槌一个反弹力,该反弹力将重力和用户的作用力抵消,使得有一个时刻鼓槌连带手腕的加速度是为0的,可以通过加速度传感器采集该加速度为0的时刻,作为代表动作发生时间的第一时刻。需要说明的是,在一次击鼓工作中,由b点向c点的过程中,用户会给鼓槌一个向上的作用力,其中的某一个时刻,用户向上的作用力会与重力相抵消,使得b→c的轨迹中会有一个时刻的加速度也为0,该加速度为0的时刻也可以作为指定的第一时刻。As one of the implementable ways, within a unit time value, the moment when the acceleration is zero is detected as the first moment. For example, referring to Fig. 3, in the drumming scene, the motion track of a drumming action can be approximated as shown in Fig. 3 as shown in dotted line a→b→c, wherein, point a is when the user holds the drumstick and starts to move downward The starting point of the action, point b is the point where the drumstick touches the drum surface, and point c is the highest point reached by the user lifting the drumstick. In the process of this trajectory, during the process from point a to point b, the user holds the drumstick and exerts downward force. In addition to the gravity, the drumstick also receives the downward force from the user. After reaching point b, the drumstick contacts the drum surface , the drum surface will give the drumstick a rebound force, which will offset the gravity and the user's force, so that there is a moment when the acceleration of the drumstick and the wrist is 0, and the acceleration sensor can be used to collect the moment when the acceleration is 0, as Represents the first moment in time when the action occurred. It should be noted that, in a drumming work, during the process from point b to point c, the user will give the drumstick an upward force, and at a certain moment, the user's upward force will offset the gravity, In the trajectory of b→c, there will be a moment when the acceleration is also 0, and the moment when the acceleration is 0 can also be used as the designated first moment.
作为另一种可实现方式,在一个单位时值内,检测开始振动直至振动结束的持续时间,作为第一时长,以第一时长中的指定的任一时刻作为第一时刻。例如,可以第一时长的起始时刻、中点时刻或者结束时刻作为指定的第一时刻。例如,参阅图3所 示,在击鼓场景中,鼓槌与鼓面开始接触的时刻,受到鼓面的反弹力,鼓槌会带动手腕振动,此时可以通过振动传感器来检测鼓槌带动手腕产生的振动,作为振动开始的时刻,直至检测到振动结束,振动结束的时刻减去振动开始的时刻,即确定了振动过程的时长t 0,该振动过程持续的时间区间t 0的起始时刻、结束时刻或者中点时刻都可以作为指定的第一时刻。需要说明的是,b点表示鼓槌与鼓面碰触的空间点,不可理解为t 0中的某一个时刻。 As another practicable manner, within a unit time value, detect the duration from the start of the vibration to the end of the vibration as the first duration, and use any specified time in the first duration as the first moment. For example, the start time, midpoint time or end time of the first duration can be used as the designated first time. For example, as shown in Figure 3, in the drumming scene, when the drumstick comes into contact with the drum surface, the drumstick will drive the wrist to vibrate due to the rebound force of the drum surface. At this time, the vibration sensor can detect that the drumstick drives the wrist. The generated vibration is regarded as the moment when the vibration starts, until the end of the vibration is detected, the moment when the vibration ends is subtracted from the moment when the vibration starts, that is, the duration t 0 of the vibration process is determined, and the starting moment of the time interval t 0 for which the vibration process lasts , the end time or the midpoint time can be used as the designated first time. It should be noted that point b represents the spatial point where the drumstick and the drumhead touch, and cannot be interpreted as a certain moment in t0 .
作为再一种可实现方式,将加速度检测和振动检测方式结合,在一个单位时值内,检测加速度为零的至少一个时刻,并且检测到开始振动到振动结束的持续时间,作为第一时长,将距离第一时长最近或者落入第一时长之中的加速度为零的时刻作为第一时刻。例如,参阅图3所示,上述已经提及,一次击鼓动作中,加速度为0的时刻并不唯一,鼓槌与鼓面碰触过程中的加速度为0的时刻作为击鼓动作发生的代表时刻,也就是第一时刻,能够更准确地反映击鼓动作发生的时间。受到振动传感器和加速度传感器检测精度限制,加速度传感器有可能先于振动传感器检测到加速度为0的时刻,此种情形下,加速度为0的时刻不会落入到振动过程对应的第一时长内,此时可以将在时间轴上距离第一时长最近的加速度为0的时刻作为第一时刻。另外的情形中,有可能加速度传感器有所延迟,振动传感器先检测到振动,而后加速度传感器检测到加速度为0的时刻,此种情形下,加速度为0的时刻会落入振动过程对应的第一时长内,该加速度为0的时刻也可作为第一时刻。该种实现方式换种表述,也可以是检测到与第一时长的起始时刻、结束时刻或者中点时刻在时间轴上距离最近的加速度为0的时刻,作为第一时刻。该种第一时刻的确定方式可以通过多种表述方式表达,但其技术实质不发生变化的前提下,都应落入本申请的保护范围。As yet another achievable way, the acceleration detection and vibration detection methods are combined, within a unit time value, at least one moment when the acceleration is zero is detected, and the duration from the start of the vibration to the end of the vibration is detected as the first duration, The moment when the acceleration closest to the first duration or falling within the first duration is zero is taken as the first moment. For example, referring to Figure 3, it has been mentioned above that in a drumming action, the moment when the acceleration is 0 is not unique. The moment, the first moment, more accurately reflects when the drumming action occurred. Limited by the detection accuracy of the vibration sensor and the acceleration sensor, the acceleration sensor may detect the moment when the acceleration is 0 before the vibration sensor. In this case, the moment when the acceleration is 0 will not fall within the first duration corresponding to the vibration process. At this time, the moment when the acceleration closest to the first duration on the time axis is 0 may be taken as the first moment. In other cases, the acceleration sensor may be delayed. The vibration sensor detects the vibration first, and then the acceleration sensor detects the moment when the acceleration is 0. In this case, the moment when the acceleration is 0 will fall into the first time corresponding to the vibration process. In the duration, the moment when the acceleration is 0 can also be used as the first moment. In other words, this implementation may also be the first time when the acceleration closest to the start time, end time or midpoint time of the first duration is detected to be 0 on the time axis. The way of determining the first moment can be expressed in various ways, but on the premise that the technical essence does not change, all of them should fall within the scope of protection of the present application.
第一时刻确定后,第一时刻与单位时值的起始时刻之间的时间差值即可作为目标特征中时间维度的特征。After the first moment is determined, the time difference between the first moment and the starting moment of the unit time value can be used as the feature of the time dimension in the target feature.
在另外一种可实现方式中,用户是否跟上节拍,还可以从力度维度数据进行检测,需要检测的目标特征可以包括力度维度数据(第二特征),力度维度数据即用户在单位时值内做出该单次动作时的力度信息。节拍是由多个拍子按照一定的强弱规律组合而成的,一般情形下节拍中的重拍比弱拍需要更大的力度,才能发出重音,例如击鼓场景中,重拍需要用户用更大的力气去使用鼓槌击打鼓面,而弱拍以相对较轻的力度去击打,次强拍的力度则应该在重音和弱音之间,如果用户在强拍采用了较弱的力度敲击,也会打乱节奏,无法演奏出准确的节拍。In another achievable way, whether the user keeps up with the beat can also be detected from the strength dimension data. The target features to be detected can include the strength dimension data (second feature). The strength dimension data means that the user is within the unit time value. The force information when making this single action. The beat is composed of multiple beats according to certain rules of strength and weakness. In general, the heavy beat in the beat needs more strength than the weak beat to produce the accent. For example, in the scene of drumming, the heavy beat requires the user to use more Use the drumsticks with great force to hit the drum head, while the weak beat should be hit with relatively light strength, and the strength of the sub-strong beat should be between the accent and weak sound. If you hit it, it will also disrupt the rhythm, and you will not be able to play the exact beat.
具体地,力度信息通过加速度传感器来采集,至少包括单位时值内用户动作的力度大小信息,通过所述加速度传感器至少采集用户动作对应的加速度大小,或者,还可以采集加速度方向以获得更全面的力度信息。例如,在一个单位时值每隔10微妙采集一次加速度,然后将采集到的多个加速度的大小求均值,将均值作为采集到的用户动作的力度信息。Specifically, the strength information is collected by an acceleration sensor, at least including information on the strength of the user's action within a unit time value, through which the acceleration sensor at least collects the acceleration corresponding to the user's action, or the direction of the acceleration can also be collected to obtain a more comprehensive strength information. For example, the acceleration is collected every 10 microseconds in a unit time value, and then the magnitudes of the multiple accelerations collected are averaged, and the average value is used as the collected strength information of the user's action.
步骤203,基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据。Step 203 : Based on the beat category corresponding to each beat, each target feature is compared with a predetermined reference feature to obtain detection data.
在确定了各拍分别对应的目标特征之后,将目标特征与预定的参考特征进行比较。其中,参考特征即用于判断待检测的用户的动作是否跟上节拍的参考标准。在时间维 度,参考特征可以是一个时间区间,该时间区间用于表征在单位时值内正确单次动作对应的时间段,即在这个时间段内做出击打等动作,则认为未掉拍也未抢拍。After the target features corresponding to each beat are determined, the target features are compared with predetermined reference features. Wherein, the reference feature is a reference standard for judging whether the action of the user to be detected keeps up with the beat. In the time dimension, the reference feature can be a time interval, which is used to represent the time period corresponding to the correct single action within the unit time value, that is, if actions such as hitting are made within this time period, it is considered that the beat is not lost. Not snapped.
用户在进行不同类别的拍子相应的动作时,呈现出的参考特征是有差异的,例如重拍动作对应的时间参考区间与弱拍工作对应的时间参考区间,差异是比较明显的,若将不同类别的拍子采用同一参考特征作比较,误差会比较大,使检测结果精确度较低。When the user performs actions corresponding to different types of beats, the reference features presented are different. For example, the time reference interval corresponding to the retake action and the time reference interval corresponding to the downbeat work are quite different. The beats of the category are compared with the same reference feature, and the error will be relatively large, which makes the detection result less accurate.
本申请实施例中,提出基于拍子类别进行目标特征和参考特征的对比,也就是将任一单位时值的目标特征,按照该单位时值对应的拍子的类别,选择相应类别的拍子对应的参考特征,来进行比较,以提高检测精度。In the embodiment of the present application, it is proposed to compare the target feature and the reference feature based on the beat category, that is, to select the target feature of any unit time value according to the beat category corresponding to the unit time value, and select the reference corresponding to the beat of the corresponding category. feature to compare to improve detection accuracy.
其中,拍子类别,即按照拍子的强弱属性划分出的类别,在一种可实现方式中,拍子的类别包括强拍(重音)、次强拍(次强音)和弱拍(弱音)。在另外的可实现方式中,拍子的类别还可以包括附加符点音符的情形,附加符点音符的拍子因为有所延时,延时后的拍子内的动作也会与未延时的拍子动作有所差异,因此,在该实现方式中,将附加符点的拍子单独作为一个类别,也就是拍子的类别不仅包括强拍、次强拍、弱拍,还进一步包括附加了符点音符的强拍、次强拍、弱拍等多个类别,以及包括由于符点音符的加入,导致时值缩短的后面的次强拍、弱拍等类别。Wherein, the beat category is a category divided according to the strength and weakness of the beat. In a practicable manner, the beat category includes strong beat (accent), second strong beat (subforte) and weak beat (weak tone). In another possible way, the beat category can also include the case of additional dotted notes. Because the beat of the added dotted note is delayed, the actions in the delayed beat will also match the actions of the undelayed beat. There are some differences, therefore, in this implementation, the beats with additional dots are regarded as a category alone, that is, the categories of beats include not only strong beats, sub-strong beats, and weak beats, but also further include strong beats with dotted notes. Multiple categories such as beat, second strong beat, weak beat, etc., as well as categories such as second strong beat and weak beat that cause the time value to be shortened due to the addition of dot notes.
例如,参阅图4所示,图4中示出了按照相同的先后顺序排列的多个音符,按照不同的节拍处理,分别获得的3组节奏,其中第①组的节拍为3/4拍,第②组的节拍为4/4拍,第③组节拍仍然为3/4拍,在每个小节的重拍之后附加了符点音符。For example, referring to shown in Fig. 4, Fig. 4 shows a plurality of notes arranged in the same sequence, processed according to different beats, 3 groups of rhythms obtained respectively, wherein 1. the beat of the group is a 3/4 beat, The beat of group ② is 4/4 beat, the beat of group ③ is still 3/4 beat, and dotted notes are added after the rebeat of each measure.
以该3组节奏作为示例来说明如何进行目标特征与参考特征的比较。3/4拍的强弱规律为强、弱、弱,第①组中第一拍子(音符“1”)为强拍(即强拍),第二个拍子(音符“2”)为弱拍、第3个拍子(音符“3”)为弱拍,第1个拍子的目标特征确定后,则选择读取预先确定的强拍(即重音)对应的参考特征,例如,在时间维度,强拍对应的目标特征就是用户实际动作与该拍子的起始时刻之间的时间差,参考特征就是强拍对应的时间参考区间;第3个拍子(音符“3”)则选择弱拍对应的时间参考区间进行比较;而由于节拍不同,4/4拍对应的强弱规律为强、弱、次强、弱,在第②组节奏中,第3个拍子对应的拍子为次强拍,则在该组节奏中,第三个拍子(音符“3”)应选择次强拍对应的参考特征,与确定出的目标特征进行比较。而在第③组节奏中,由于附加了符点音符,第一拍(音符“1”)对应的拍子类别为附加了符点音符的强拍,其拍子占用的单位时值由原来的1个单位时值,延长到3/2个单位时值,此时,则进行特征比较时,应选择相应类别的附加了符点音符的强拍对应的参考特征。The three groups of rhythms are taken as an example to illustrate how to compare the target features with the reference features. The law of strength of 3/4 beat is strong, weak, weak, the first beat (note "1") in group ① is a strong beat (that is, a strong beat), and the second beat (note "2") is a weak beat 1. The third beat (the note "3") is a weak beat. After the target feature of the first beat is determined, choose to read the reference feature corresponding to the predetermined strong beat (ie, the accent). For example, in the time dimension, the strong beat The target feature corresponding to the beat is the time difference between the user's actual action and the starting moment of the beat, and the reference feature is the time reference interval corresponding to the strong beat; for the third beat (note "3"), select the time reference corresponding to the weak beat Because of the different beats, 4/4 beats correspond to strong, weak, second-strongest and weakest beats. In group ②, the beat corresponding to the third beat is the second-strongest beat. In the group rhythm, the third beat (the note "3") should select the reference feature corresponding to the sub-downbeat, and compare it with the determined target feature. In group ③ rhythm, due to the addition of dotted notes, the beat category corresponding to the first beat (note "1") is a strong beat with added dotted notes, and the unit time value occupied by the beat is changed from the original 1 The unit time value is extended to 3/2 unit time value. At this time, when performing feature comparison, the reference feature corresponding to the corresponding category of downbeats with added dotted notes should be selected.
下面阐述如何确定参考特征。作为一种可实现方式,参考特征可以包括参考特征,参考特征可以是根据用户个人的个性化动作特征而预先确定的。可以根据每个用户动作对数据进行初始化校准,建立用户个人专属的参考特征,例如用户个人专属的时间参考区间。该种实现方式中,电子节拍器可以设置用户个人数据初始化环节,即本申请实施例提供的电子节拍器支持用户个人数据初始化,在用户首次开启或者登录该电子节拍器时,提示用户可以录入个人初始化数据,在用户分别做出多个强拍、次强拍、弱拍等任一类别对应的动作时,检测该一拍类别下的多个单次动作,基于多个单次动作确定该种类别拍子对应的参考特征。例如,提示用户进行多个强拍的单次动作,根 据多个强拍的单次动作对应的特征,确定该用户专属的强拍对应的参考特征。How to determine the reference feature is explained below. As an implementable manner, the reference feature may include a reference feature, and the reference feature may be predetermined according to a personalized action feature of the user. The data can be initialized and calibrated according to each user action, and a user-specific reference feature can be established, such as a user-specific time reference interval. In this implementation mode, the electronic metronome can be set with the link of user personal data initialization, that is, the electronic metronome provided by the embodiment of the application supports user personal data initialization, and when the user turns on or logs in the electronic metronome for the first time, the user is prompted to enter personal data. Initialize the data, when the user makes multiple actions corresponding to any category such as strong beat, second strong beat, weak beat, etc., detect multiple single actions under the category of one beat, and determine the type based on multiple single actions The reference feature corresponding to the category beat. For example, the user is prompted to perform a single action of multiple downbeats, and according to the features corresponding to the single actions of multiple downbeats, the reference features corresponding to the user-specific downbeats are determined.
具体地,与目标特征相对应地,参考特征也可以从时间维度和力度维度两个维度来确定,在时间维度,基于该用户做出的多个单次动作,确定相应的时间参考区间,可以通过如下方式:Specifically, corresponding to the target feature, the reference feature can also be determined from the time dimension and the force dimension. In the time dimension, based on multiple single actions made by the user, the corresponding time reference interval can be determined. By the following way:
多次采集用户在单位时值内做出任一类别拍子对应的单次动作时对应的第一特征,第一特征可以基于时间维度数据获得,例如第一特征可以是单次时间间隔,单次时间间隔是用户做出单次动作占用的时长。Multiple collections of the first feature corresponding to when the user makes a single action corresponding to any type of beat within a unit time value, the first feature can be obtained based on time dimension data, for example, the first feature can be a single time interval, a single The time interval is the time it takes for the user to make a single action.
作为一种可实现方式,用户单次动作占用的时长为用户单次动作时对应的指定时间点(第二时刻)与起始时刻(第二起始时刻)之间的时间差,在采集用户单次动作时,先确定采集每个单次动作的起始时刻(第二起始时刻),将用户单次动作过程中的任一一个指定的时刻作为第二时刻,第二时刻与第二起始时刻之间的时间差即作为单次时间间隔。第二时刻的确定方式可以参考第一时刻的确定方式,此处不再赘述。As an achievable way, the duration occupied by a single user action is the time difference between the specified time point (second moment) corresponding to the user's single action and the starting moment (second starting moment). When performing a single action, first determine the starting time (second starting time) of collecting each single action, and take any one specified time in the single action process of the user as the second time, and the second time is the same as the second time The time difference between the starting moments is taken as a single time interval. The manner of determining the second moment may refer to the manner of determining the first moment, which will not be repeated here.
需要说明的是,第一时刻与第二时刻的确定方式应保持一致,即参考特征确定过程中用于确定单次时间间隔的第二时刻,与目标特征中用于确定目标时间间隔的第一时刻的确定方式应彼此对应,例如,如果第一时刻是动作过程中第1个加速度为0的时刻,则第二时刻也应为工作过程中第1个加速度为0的时刻;若第一时刻为振动开始到振动结束的振动持续过程的结束时刻,则第二时刻也应该为检测到用户单次动作的振动持续过程的结束时刻;或者,第一时刻为振动持续过程中的起始或中点时刻,则对应地,第二时刻也应该是振动持续过程中的起始或中点时刻。It should be noted that the determination method of the first moment and the second moment should be consistent, that is, the second moment used to determine the single time interval in the reference feature determination process is the same as the first moment used to determine the target time interval in the target feature. The methods of determining the moments should correspond to each other. For example, if the first moment is the first moment when the acceleration is 0 during the action, the second moment should also be the first moment when the acceleration is 0 during the work process; if the first moment is the end moment of the continuous vibration process from the start of the vibration to the end of the vibration, then the second moment should also be the end time of the continuous vibration process when a single action of the user is detected; or, the first moment is the beginning or middle of the continuous vibration process Point moment, then correspondingly, the second moment should also be the start or midpoint moment in the vibration continuation process.
需要说明的是,在一种可实现方式中,第二起始时刻即单次动作采集过程开始计时的时间点,例如电子节拍器向用户语音提示“请根据提示音做出敲击动作”,语音播放完毕,设备发出一声蜂鸣声,在发出蜂鸣声的同时,设备开始计时,用户在听到该蜂鸣声后开始敲击,电子节拍器记录敲击动作中的第二时刻,第二时刻减去计时的起始时刻,即为单次时间间隔,完成了一次单次动作的采集过程。重复执行该单次动作的采集过程,即可实现多次动作采集。该种实现方式中,单次动作对应的单次时间间隔,是以单次动作采集中开始计时的时刻作为起始时刻,获得的单次时间间隔与节拍的单位时值无关,因而也就不受待检测的目标节奏中的节拍的单位时值影响,也就是说,该种方式采集的单次时间间隔确定出的时间参考区间,适用于各种演奏速度,无需针对各种不同的演奏速度分别采集用户的动作。并且,该单次时间间隔中包含了用户个人的反应时间,减少了用户个人反应时间的差异对于检测结果准确度的影响。It should be noted that, in a practicable manner, the second starting moment is the time point at which the single action collection process starts to count. After the voice is played, the device emits a beep sound. At the same time as the beep sound, the device starts timing. The second time minus the start time of timing is the single time interval, which completes the collection process of a single action. Repeating the acquisition process of the single action can realize multiple action acquisitions. In this implementation, the single time interval corresponding to a single action is based on the time when the timing of the single action is collected as the starting time, and the obtained single time interval has nothing to do with the unit time value of the beat, so there is no Affected by the unit time value of the beat in the target rhythm to be detected, that is to say, the time reference interval determined by the single time interval collected in this way is suitable for various performance speeds, and does not need to be specific to various performance speeds Collect user actions separately. Moreover, the single time interval includes the user's personal reaction time, which reduces the impact of the difference in the user's personal reaction time on the accuracy of the detection result.
在另一种可实现方式中,在参考特征确定阶段,例如用户个人数据初始化阶段,采集用户做出的多个单次动作时,也可以基于固定的BPM速度进行采集,即以固定的单位时值(为避免混淆,以下称为第二单位时值)作为检测单位,提示用户在一定的演奏速度下连续做出一类拍子对应的多个单次动作,例如,设定BPM为60,则相应的第二单位时值为1s,提示用户在60拍每分钟的速度下进行连续的重拍动作,然后再各个时长为1s的单位时值内,记录用户单次动作的第二时刻,第二时刻减去该时长为1s的第二单位时值的起始时刻(第二起始时刻)即获得了单次时间间隔。需要说明的是,该种实施方式中,参考特征确定阶段的第二单位时值与目标特征获取阶段的第一单位时值保持一致的情形下,检测的精确度会更高,而如果用户输入的BPM与用户 个人数据初始化时的BPM不一致,则会在一定程度上影响检测的准确度,第一单位时值与第二单位时值的差距越大,则误差越大。In another practicable way, in the reference feature determination stage, such as the user personal data initialization stage, when collecting multiple single actions made by the user, the collection can also be performed based on a fixed BPM speed, that is, at a fixed unit time value (to avoid confusion, hereinafter referred to as the second unit time value) as the detection unit, prompting the user to continuously perform multiple single actions corresponding to a type of beat at a certain playing speed. For example, if the BPM is set to 60, then The corresponding second unit time value is 1s, prompting the user to perform continuous reshooting actions at a speed of 60 beats per minute, and then record the second moment of the user's single action within each unit time value of 1s. A single time interval is obtained by subtracting the start moment (second start moment) of the second unit time value with a duration of 1 s from the second moment. It should be noted that in this implementation, when the second unit time value of the reference feature determination stage is consistent with the first unit time value of the target feature acquisition stage, the detection accuracy will be higher, and if the user inputs The BPM of the user's personal data is inconsistent with the BPM when the user's personal data is initialized, which will affect the accuracy of the detection to a certain extent. The greater the difference between the first unit time value and the second unit time value, the greater the error.
在确定了各个拍子类别分别对应的多个单次时间间隔后,对于其中任一拍子类别,计算多个单次时间间隔的平均值,基于该平均值,计算多个单次时间间隔对应的均方差(或标准差);基于均方差(或标准差)和平均值,确定任一类别拍子对应的时间参考区间。例如,平均值加、减N倍均方差获得的区间,作为时间参考区间,其中1≤N≤3。After determining the multiple single time intervals corresponding to each beat category, for any one of the beat categories, the average value of multiple single time intervals is calculated, and based on the average value, the average value corresponding to multiple single time intervals is calculated. Variance (or standard deviation); based on the mean square deviation (or standard deviation) and the mean value, determine the time reference interval corresponding to any type of beat. For example, the interval obtained by adding or subtracting N times the mean square error from the average value is used as a time reference interval, where 1≤N≤3.
需要说明的是,将待检测的目标节奏中的目标时间间隔与时间参考区间进行比较时,将时间参考区间移植到相应的第一单位时值内,以第一单位时值的第一起始时刻作为时间参考区间的起始时刻,例如,计算出的重拍(即强拍)对应的时间参考区间为0.35-0.55s,表示做出重拍动作对应的第一时刻落入第一单位时值内的第0.35s至第0.55s内,则视为跟上节拍,否则视为掉拍或者抢拍等。It should be noted that when comparing the target time interval in the target rhythm to be detected with the time reference interval, the time reference interval is transplanted into the corresponding first unit time value, and the first starting moment of the first unit time value As the starting moment of the time reference interval, for example, the time reference interval corresponding to the calculated retake (i.e. downbeat) is 0.35-0.55s, which means that the first moment corresponding to the retake action falls into the first unit time value In the 0.35s to 0.55s within the time, it is regarded as keeping up with the beat, otherwise it is regarded as a drop or rush.
在力度维度,与目标特征对应地,基于该用户做出的多个单次动作,确定相应的力度参考区间,该力度参考区间用于表征在单位时值内做出相应类别的拍子对应的单次动作在力度维度的参考区间,可以基于用户做出的多个单次动作分别对应的力度信息而确定。具体地,可以多次采集用户在单位时值内做出任一类别拍子对应的单次动作时对应的力度信息,基于力度信息进一步提取或者确定出第二特征,基于多个第二特征,确定任一类别拍子对应的力度参考区间。力度信息可以包括用户在单位时值内做出单次动作时对应的加速度信息,例如加速度大小、加速度方向等。例如,在击鼓场景中,检测用户手持鼓槌进行敲击动作的过程中手腕处的加速度大小,能够比较准确地反映用户的用力程度。具体地,可以在一个单位时值内采集多个加速度大小的值,在单位时值内求均值作为该单位时间对应的单词动作的加速度值,然后将多个单词动作分别对应的加速度值进行求平均,并计算均方差,均值加、减N倍均方差即可获得力度参考区间。In the strength dimension, corresponding to the target feature, based on multiple single actions made by the user, the corresponding strength reference interval is determined. The reference range of the force dimension for a single action may be determined based on the force information corresponding to multiple single actions made by the user. Specifically, it is possible to collect the strength information corresponding to a single action corresponding to any type of beat within a unit time value multiple times, and further extract or determine the second feature based on the strength information. Based on multiple second features, determine The velocity reference interval corresponding to any type of beat. The force information may include the corresponding acceleration information when the user makes a single action within a unit time value, such as acceleration magnitude, acceleration direction, and the like. For example, in a drumming scene, detecting the acceleration of the wrist when the user is holding a drumstick and performing a knocking action can accurately reflect the degree of force of the user. Specifically, it is possible to collect multiple acceleration values within a unit time value, calculate the average value within the unit time value as the acceleration value of the word action corresponding to the unit time, and then calculate the acceleration values corresponding to the multiple word actions respectively. Average, and calculate the mean square error, the mean value plus or minus N times the mean square error can obtain the strength reference interval.
基于上述方式,确定出了用户个人专属的参考特征。基于用户个人的动作确定出的参考特征,包含了用户个人的动作特点和反应时间,将其作为参考特征,与用户自己实际演奏中的单次动作进行比较,能够减少由于用户个人的个性化动作特征导致的误差。如此,充分考虑个体的差异性,不同用户分别建立其个人化的标准数据,使得判断结果具有更高的准确性。Based on the above method, the user-specific reference features are determined. The reference features determined based on the user's personal actions include the user's personal action characteristics and reaction time, which can be used as a reference feature to compare with the single action in the user's actual performance, which can reduce the user's individualized actions. errors due to features. In this way, individual differences are fully considered, and different users establish their own personalized standard data, so that the judgment result has higher accuracy.
需要说明的是,作为一种辅助的可实现方式,还可以预先基于乐曲样本或者多个动作样本确定出一个备用的第二参考特征,作为适用于所有用户的通用的参考标准。该备用的第二参考特征,可以通过对乐曲样本进行动作分析而获得,或者通过多个演奏水平达到级别要求的专业人士的动作样本确定。当待检测的目标用户并未配合进行个人数据初始化时,或者其他情形导致用户个人专属的初始化数据提取的参考特征无法读取时,则可以到预先指定的存储地址中读取该通用(备用)的第二参考特征。具体地,可以在执行步骤203之前,根据预定的第一路径到指定的存储地址中读取用户专属的参考特征,当参考特征读取失败时,则根据预定的第二路径读取备用的第二参考特征。It should be noted that, as an auxiliary implementable manner, a spare second reference feature may also be determined in advance based on music samples or multiple action samples as a general reference standard applicable to all users. The spare second reference feature can be obtained by performing motion analysis on music samples, or can be determined from the motion samples of professionals whose performance levels meet the level requirements. When the target user to be detected does not cooperate with the initialization of personal data, or other circumstances make it impossible to read the reference features of the user's personal initialization data extraction, the general (standby) data can be read from the pre-designated storage address. The second reference feature of . Specifically, before step 203 is performed, the user-specific reference feature can be read from the specified storage address according to the predetermined first path, and when the reading of the reference feature fails, the spare second path is read according to the predetermined second path. Two reference features.
当确定的参考特征既包括时间参考区间,也包括力度参考区间时,基于单位时值 分别对应的拍子的类别,将目标特征与相应类别的拍子对应的参考特征进行比较而获得检测数据,不仅用于反馈用户动作在时间上是否抢拍、掉拍的信息,还用于反馈用户在单位时值做出的单次动作的力度是否符合节拍的强弱规律,即反馈用户动作的力度是否出现强拍力度过小、弱拍力度过大等问题。When the determined reference features include both the time reference interval and the strength reference interval, based on the categories of the beats corresponding to the unit time value, the target features are compared with the reference features corresponding to the beats of the corresponding category to obtain the detection data. It is used to feed back whether the user’s actions are rushed or lost in time, and is also used to feedback whether the strength of a single action made by the user in a unit time value conforms to the law of the strength of the beat, that is, to feedback whether the strength of the user’s action is strong or not. The beat force is too small, the weak beat force is too strong, etc.
在一种可实现方式中,参考特征可以仅包括时间参考区间而不包括力度参考区间,或者仅包括力度参考区间而不包括时间参考区间;对应地,目标特征可以仅包括第一特征而不包括第二特征,或者仅包括第二特征而不包括第一特征,即本申请实施例提供的方法,能够在时间维度、力度维度中的至少一个维度进行检测。In a practicable manner, the reference feature may only include the time reference interval but not the strength reference interval, or only include the strength reference interval but not the time reference interval; correspondingly, the target feature may only include the first feature but not the The second feature, or only including the second feature but not including the first feature, that is, the method provided in the embodiment of the present application, can be detected in at least one of the time dimension and the strength dimension.
需要说明的是,上述步骤的阐述先后顺序不作为对相应步骤执行时序的限定。在执行时序上,确定或读取参考特征的步骤,需要先于步骤203,可以不先于步骤201或步骤202。It should be noted that the sequence of the steps described above is not used as a limitation on the execution sequence of the corresponding steps. In terms of execution sequence, the step of determining or reading the reference feature needs to be prior to step 203 , and may not be prior to step 201 or step 202 .
作为一种可实现方式,步骤202之前,还可以包括步骤:采集用户在做出动作时的目标速度,该目标速度可以是用户做出演奏动作等动作时的线速度或者角速度,目标速度可以通过线速度传感器或角速度传感器采集。需要说明的是,此处的速度与演奏速度为不同的技术概念,演奏速度即每分钟拍数BPM,二者不可混淆。As an achievable way, before step 202, it may also include the step of collecting the target speed of the user when making an action, the target speed may be the linear speed or angular speed when the user makes a performance action, etc., and the target speed may be passed Linear velocity sensor or angular velocity sensor acquisition. It should be noted that the speed and performance speed here are different technical concepts, and the performance speed is the number of beats per minute (BPM), and the two should not be confused.
将采集到的目标速度与预先确定的用户对应的速度阈值进行比较,用户当前动作的目标速度超过速度阈值时,则说明书当前用户的动作速度很快,此时进行是否跟上节拍的检测误差会较大,因而在确定目标速度超过阈值时,不进行后续的检测步骤。当确定目标速度对应的速度值低于速度阈值时,则执行步骤202等后续步骤。Compare the collected target speed with the predetermined speed threshold corresponding to the user. When the target speed of the user's current action exceeds the speed threshold, it indicates that the current user's action speed is very fast. At this time, the detection error of whether to keep up with the beat will be is larger, so when it is determined that the target speed exceeds the threshold, the subsequent detection steps are not performed. When it is determined that the speed value corresponding to the target speed is lower than the speed threshold, step 202 and other subsequent steps are performed.
作为一种可实施方式,在用户个人数据初始化阶段,还可以提示用户选择相应的场景,例如先选择大类别的场景,显示多个备选项,例如乐器演奏场景、军训场景、舞蹈训练等多个备选项,在用户选择其中一个备选项之后,继续提示用户选择小类别的场景,例如,乐器演奏场景中,进一步提示用户选择相应的乐器,打击乐?琴键乐器?弦乐器?具体场景的划分,也可以提升检测的精确度。As an implementable mode, in the initialization stage of the user's personal data, the user can also be prompted to select the corresponding scene, for example, select a large category of scenes first, and display multiple alternative options, such as musical instrument playing scenes, military training scenes, dance training, etc. Alternatives, after the user selects one of the alternatives, continue to prompt the user to select a small category of scenes, for example, in the musical instrument performance scene, further prompt the user to select the corresponding musical instrument, percussion? keyboard instrument? stringed instrument? The division of specific scenes can also improve the accuracy of detection.
在获得检测数据之后,根据检测数据生成反馈报告,反馈报告可以通过多种提示方式向用户传达错误的节拍点,例如以文字显示方式,或者以语音播报的方式,或者将用户刚演奏结束的乐曲重新播放,在用户错误的拍子处发光或者振动,以告知用户在此处出现失误,提示方式可以更为细化,不同的失误类型通过发出不同颜色的光来表示,例如红光表示掉拍,绿光表示抢拍,黄光表示力度不够,紫光表示力度过大等等,或者通过不同强度的振动来提示用户不同的失误类型。上述提示方式可以任意组合。After the detection data is obtained, a feedback report is generated according to the detection data. The feedback report can convey the wrong tempo point to the user through a variety of prompts, such as text display, or voice broadcast, or the music that the user has just played Replay, light up or vibrate at the wrong beat of the user to inform the user that there is a mistake here, the prompt method can be more detailed, and different types of mistakes are indicated by emitting different colors of light, for example, red light means off beat, Green light means rushing to shoot, yellow light means insufficient force, purple light means too much force, etc., or vibrations of different intensities can prompt users to make different types of mistakes. The above prompting methods can be combined arbitrarily.
为进一步理解本申请实施例提供的方法,下面按照一种可行的步骤执行时序,列举一个实施例。In order to further understand the method provided by the embodiment of the present application, an embodiment is listed below according to a feasible step execution sequence.
参阅图5所示,该实施例包括以下步骤:Referring to shown in Figure 5, this embodiment comprises the following steps:
步骤501,确定设备开机或者用户打开登录界面后,跳转到步骤502;在一种可实现方式中,仅在用户首次开机或者首次登录设备时,执行后续步骤,在另外的实施方式中,每隔预定时间,在用户开机或者登录设备时,执行后续步骤。 Step 501, after determining that the device is turned on or the user opens the login interface, jump to step 502; in one implementable manner, the subsequent steps are performed only when the user starts the device for the first time or logs in to the device for the first time, and in another embodiment, every At predetermined intervals, when the user turns on the device or logs in to the device, the subsequent steps are executed.
步骤502,提示用户可以进行个人数据初始化,例如,以实际的产品为智能手表为例,参阅图6中操作界面U10所示,在智能手表上的表盘上显示文字“是否允许设 备采集您的个人动作数据?”,并设置“是”“否”两个候选项,并文字提示用户“轻拍一次选择“是”,轻拍两次表示“否”,确定感应到用户发出的一次轻拍动作后,则进入步骤503,否,则返回步骤501,监测用户的下一次开机或者登录行为,等待用户下一次开机或者登录时再次询问是否进行个人数据初始化。或者,个人数据初始化仅在用户第一次开机时提示,则在步骤502中若用户选择否,也可以结束用户个人数据的采集流程,到指定的存储地址查看是否存储有备用的通用参考特征。该备用的通用参考特征的存储路径(即第二预定路径)可以预先约定,写到应用程序的代码中。或者,作为另一种可实现方式,用户也可以通过直接点击“是”或者“否”的按钮直接进行选择,具体可以设计多种用户交互方式,本申请实施例不逐一列举。需要说明的是,图6中所示的圆形界面仅为示例,电子节拍器的显示界面可以做出多种形状设计,本申请实施例不逐一列举。In step 502, the user is prompted to initialize personal data. For example, taking the actual product as a smart watch as an example, refer to the operation interface U10 in FIG. Action data?", and set two options of "Yes" and "No", and text prompts the user to "tap once to select "Yes", tap twice to indicate "No", and confirm that a tap action from the user is sensed After that, enter step 503, otherwise, return to step 501, monitor the user's next startup or login behavior, and wait for the user to ask whether to perform personal data initialization again when the user starts or logs in next time. Or, personal data initialization is only performed when the user first Prompt when turning on the machine for the first time, if the user selects No in step 502, the collection process of the user's personal data can also be finished, and check whether a spare general reference feature is stored to the designated storage address. The storage path of the spare general reference feature ( That is, the second predetermined path) can be pre-agreed and written into the code of the application program. Or, as another possible way, the user can also directly click the "Yes" or "No" button to make a selection. Specifically, you can design A variety of user interaction modes are not listed in the embodiments of the present application. It should be noted that the circular interface shown in Fig. 6 is only an example, and the display interface of the electronic metronome can be designed in various shapes. Do not list them one by one.
另外需要说明的是,该电子节拍器可以在终端设备(例如手机)上安装相应的APP,也就是在手机等终端设备上安装具有节拍器功能的应用程序,该应用程序与该电子节拍器之间可以通过蓝牙或wifi等无线通信方式连接,上述用户交互过程,也可以基于手机等终端设备来完成。相应的用户操作界面参阅图7所示。In addition, it should be noted that the electronic metronome can install a corresponding APP on a terminal device (such as a mobile phone), that is, an application program with a metronome function can be installed on a terminal device such as a mobile phone. The rooms can be connected through wireless communication methods such as bluetooth or wifi, and the above-mentioned user interaction process can also be completed based on terminal devices such as mobile phones. The corresponding user operation interface is shown in FIG. 7 .
步骤503,采集用户多个单次动作。具体地,提示用户做出各个类别拍子分别对应的多个单次动作,提示方式可以是文字与语音结合提示用户可以开始录入动作,而在录入多个单次动作的过程中,以语音播报、文字显示、振动、发光等方式中的至少一种提示用户各个动作对应的拍子。例如,参阅图6中界面U11所示,在操作界面文字提示的同时,进行语音播报“请在听到提示音后,根据振动提示做出重音动作”,此时设备会发出蜂鸣声作为提示音,并且设备进行振动提示,并在振动开始的时刻进行计时,用户在听到该提示音并且感应到振动后进行敲击动作,设备根据动作中的动作数据,记录第二时刻的精确时间;然后再次振动,再次开始计时并记录下一个第二时刻,如此循环多次。动作数据可以是通过传感器采集用户动作产生的振动和/或加速度等信息,基于振动和/或加速度信息等信息进一步得到第二时刻等时间信息或力度信息。具体地,如何通过传感器采集到的数据确定动作时间以及动作力度,参照前述步骤202中的描述,此处不再赘述。 Step 503, collecting multiple single actions of the user. Specifically, the user is prompted to make multiple single actions corresponding to each category of beats. The prompt method can be a combination of text and voice to prompt the user to start inputting actions, and during the process of inputting multiple single actions, voice broadcast, At least one of text display, vibration, luminescence and other methods prompts the user with the beat corresponding to each action. For example, as shown in interface U11 in Figure 6, while the text prompts on the operation interface, a voice broadcast "Please make an accent action according to the vibration prompt after hearing the prompt tone", at this time, the device will emit a beep as a prompt sound, and the device gives a vibration prompt, and counts at the moment when the vibration starts. The user performs a tapping action after hearing the prompt sound and sensing the vibration. The device records the precise time at the second moment according to the motion data in the action; Then vibrate again, start timing again and record a second moment, and so on for many times. The motion data may be information such as vibration and/or acceleration generated by the user's motion collected by the sensor, and time information or strength information such as the second moment is further obtained based on the vibration and/or acceleration information and other information. Specifically, how to determine the action time and action strength based on the data collected by the sensor refers to the description in the aforementioned step 202 , which will not be repeated here.
确定采集到所需的数据(例如时间信息和加速度信息等)后,文字或者语音告知用户:“强拍动作录入成功,请在听到提示音后进行弱拍动作的录入”,之后再进行弱拍动作数据的采集,以此类推,至少获得强拍、弱拍、次强拍等典型类别拍子的动作数据。例如,在打击乐场景中,用户佩戴该智能手表按照指示在打击乐上分别进行不同力度的敲击,例如重音敲击,次强音敲击,弱音敲击等,获得3个拍子类别的带有用户个人特征的动作样本数据。对应地,在手机等终端设备的操作界面参阅图7所示。After confirming that the required data (such as time information and acceleration information, etc.) has been collected, the user will be notified in text or voice: "The strong beat action has been recorded successfully, please enter the weak beat action after hearing the prompt tone", and then perform the weak beat action. The collection of beat motion data, and so on, at least obtain the motion data of typical types of beats such as strong beat, weak beat, and sub-strong beat. For example, in the percussion scene, the user wears the smart watch and performs percussion with different strengths according to the instructions, such as heavy percussion, sub-forte percussion, soft percussion, etc., and obtains the belt of three beat categories. Action sample data with user personal characteristics. Correspondingly, refer to FIG. 7 for an operation interface of a terminal device such as a mobile phone.
步骤504,基于步骤503采集到的多个单次动作,确定参考特征。在一种可实现方式中,可以先确定单次动作的时间间隔或者加速度值,作为单次样本,然后多个样本求均值再求均方差,基于均值和均方差确定出相应的时间参考区间和力度参考区间。 Step 504, based on the multiple single actions collected in step 503, determine reference features. In an achievable way, the time interval or acceleration value of a single action can be determined first as a single sample, and then multiple samples are averaged and then the mean square error is calculated, and the corresponding time reference interval and Strength reference interval.
例如,在一种可实现方式中,时间参考区间,可以通过如下方式获得:For example, in a practicable manner, the time reference interval can be obtained in the following manner:
计算多个单次时间间隔的平均值
Figure PCTCN2022083752-appb-000002
利用下列公式计算出均方差σ:
Calculate the average of multiple single time intervals
Figure PCTCN2022083752-appb-000002
The mean square error σ was calculated using the following formula:
Figure PCTCN2022083752-appb-000003
Figure PCTCN2022083752-appb-000003
其中,n表示用户做出的一个类别拍子对应的动作次数;X i表示第i个动作对应的单词时间间隔。以平均值
Figure PCTCN2022083752-appb-000004
加减均方差σ的两倍作为时间参考区间,即时间参考区间为
Figure PCTCN2022083752-appb-000005
Among them, n represents the number of actions corresponding to a category beat made by the user; X i represents the word time interval corresponding to the i-th action. by average
Figure PCTCN2022083752-appb-000004
Adding and subtracting twice the mean square error σ as the time reference interval, that is, the time reference interval is
Figure PCTCN2022083752-appb-000005
需要说明的是,将单次动作对应的时间间隔或者加速度作为单次样本,基于多个单次样本来确定整体样本特征的各种数学算法都可以适用于本申请实施例中时间参考区间或者力度参考区间的确定,并不仅限于上述均值加/减均方差的方式,例如还可以基于均方值和均方差确定相应的样本区间。It should be noted that, taking the time interval or acceleration corresponding to a single action as a single sample, various mathematical algorithms for determining the characteristics of the overall sample based on multiple single samples can be applied to the time reference interval or strength in the embodiment of this application The determination of the reference interval is not limited to the above method of adding/subtracting the mean square error from the mean value, for example, the corresponding sample interval can also be determined based on the mean square value and the mean square error.
步骤505,基于用户输入,确定节拍和单位时值。确定单位时值,即确定每分钟节拍数BPM,确定节拍包括确定节拍的拍号,也可以包括从自定义的节拍类型中进行选择。具体地,可以在电子节拍器上的交互界面调整拍号和单位时值。 Step 505, based on user input, determine beat and unit time value. Determining the unit time value means determining the number of beats per minute (BPM). Determining the beat includes determining the time signature of the beat, and may also include selecting from a user-defined beat type. Specifically, the time signature and unit time value can be adjusted on the interactive interface on the electronic metronome.
步骤506,检测用户当前做出动作时的目标速度,目标速度可以是线速度(位移速度)或者角速度。用户动作的线速度或者角速度过大,则说明用户当前处于一种非常态的高速表演状态,此时的动作频率会较高,检测是否跟上节拍的作用不大,且误差会比较高,因而,在确定了用户当前动作的速度超过速度阈值时,则不进行后续检测,只有在确定用户的速度低于速度阈值时,才进行后续检测。 Step 506 , detecting the target speed when the user is currently making an action, and the target speed may be a linear velocity (displacement velocity) or an angular velocity. If the linear velocity or angular velocity of the user's action is too high, it means that the user is currently in an abnormal high-speed performance state. At this time, the action frequency will be high, and the detection of whether to keep up with the beat is of little use, and the error will be relatively high, so , when it is determined that the speed of the user's current action exceeds the speed threshold, no subsequent detection is performed, and only when it is determined that the user's speed is lower than the speed threshold, subsequent detection is performed.
其中,速度阈值,也可以是在用户个人数据初始化阶段,提示用户进行最快速度的演奏,例如参阅图8中界面U12所示,在击鼓场景中,在交互界面进行文字显示的同时,进行语音提示:“请在听到滴声后以最快的速度进行敲击”,然后通过速度传感器感应用户的速度阈值并记录。速度传感器可以是线速度传感器或角速度传感器。Wherein, the speed threshold can also be to prompt the user to play at the fastest speed during the initialization stage of the user's personal data. For example, referring to the interface U12 in FIG. Voice prompt: "Please tap at the fastest speed after hearing the beep", and then the speed sensor senses the user's speed threshold and records it. The speed sensor can be a linear speed sensor or an angular speed sensor.
步骤507,判断目标速度是否低于速度阈值,是,则执行步骤508,否,则返回步骤506继续检测目标速度。 Step 507, judge whether the target speed is lower than the speed threshold, if yes, execute step 508, otherwise, return to step 506 to continue detecting the target speed.
在一种可实现方式中,电子节拍器可以指导用户从慢速开始不断加快节拍速度,直到检测到加速度变化很小或者无法检测到加速度,则可认为是到达用户的速度阈值,记录下此时速度。需要说明的是,速度敲击动作越快,此时的BPM也越大,即用户的线速度或者角速度一般是与BPM值正相关,可以基于用户的目标速度与BPM之间的对应关系,将采集到的线速度或者角速度,转换为BPM值,即以用户一分钟最多能敲击多少个音符作为用户极限速度的衡量单位。在用户开始选择BPM值时,若用户选择的BPM值超过了用户的速度阈值,则可中止后续的检测工作,并且可以提醒用户“已超过您的速度上限,请确认节拍数”。In a practicable way, the electronic metronome can guide the user to continuously increase the tempo from a slow speed until a small change in the acceleration is detected or no acceleration can be detected, then it can be considered as reaching the user's speed threshold, and record the time speed. It should be noted that the faster the speed tapping action, the greater the BPM at this time, that is, the user's linear velocity or angular velocity is generally positively correlated with the BPM value. Based on the correspondence between the user's target speed and BPM, the The collected linear velocity or angular velocity is converted into a BPM value, that is, the maximum number of notes the user can tap in one minute is used as the unit of measure for the user's limit speed. When the user starts to select the BPM value, if the BPM value selected by the user exceeds the user's speed threshold, the subsequent detection work can be suspended, and the user can be reminded "Your speed limit has been exceeded, please confirm the number of beats".
步骤508,检测目标特征。在该实施例中,检测目标特征包括检测时间维度的特征(第一特征)和力度维度的特征(第二特征)。具体检测方式请参见前述步骤202,此处不再赘述。 Step 508, detecting target features. In this embodiment, detecting the feature of the target includes detecting the feature of the time dimension (first feature) and the feature of the force dimension (second feature). For the specific detection method, please refer to the aforementioned step 202, which will not be repeated here.
步骤509,读取参考特征。首先读取用户专属的参考特征,参考特征读取失败,说明用户未进行个人数据初始化,或者初始化数据录入不成功,此时需要到执行的存储地址中读取第二参考特征,即执行步骤509。参考特征读取成功,则优先使用参考 特征作为参与比较的参考特征,继续执行步骤511或512。 Step 509, read the reference signature. First read the user-specific reference feature, if the reference feature reading fails, it means that the user has not initialized the personal data, or the initialization data entry is unsuccessful. At this time, it is necessary to read the second reference feature from the execution storage address, that is, execute step 509 . If the reference signature is read successfully, then the reference signature is preferentially used as the reference signature participating in the comparison, and the execution of step 511 or 512 is continued.
步骤510,读取第二参考特征。读取成功,则继续执行步骤511或512。读取失败,则无法获取参考特征,结束检测流程(图中未示出)。 Step 510, read the second reference feature. If the reading is successful, continue to execute step 511 or 512. If the reading fails, the reference feature cannot be obtained, and the detection process ends (not shown in the figure).
步骤511,将各个单次动作对应的目标特征中的目标时间间隔分别和参考特征中的时间参考区间进行比较,确定各个单次动作是否掉拍或抢拍。 Step 511 , comparing the target time interval in the target feature corresponding to each single action with the time reference interval in the reference feature, and determining whether each single action is a missed shot or snap shot.
例如,参阅图9中所示,假设待检测的目标节奏的演奏速度为60BPM,即一拍占用的单位时值为1s。在该图9中示出的一个单位时值对应的拍子类别为重拍(即强拍),预先确定出的重拍对应的时间参考区间为Tf,该重拍参考区间的最小值min,最大值max,若用户在该单位时值内做出动作对应的第一时刻与该单位时值的起始时刻t1之间的时间差(即目标时间间隔)为T1,则判定用户在这个拍子跟上了节拍,未掉拍也未抢拍;若第一时刻与该单位时值的起始时刻t1之间的时间长度为T2,T2表示的时长高于(大于)Tf的最大值max,则判定用户在这个拍子掉拍,未在正确的区间内做出动作;若第一时刻与该单位时值的起始时刻t1之间的时间长度为T3,T3表示的时长低于(小于)Tf的最小值min,则判定该用户在这个拍子抢拍。在该图9中示出的另一个单位时值对应的拍子类别为次强拍,预先确定出的时间参考区间为Tmf,若用户在该另一个单位时值内做出动作对应的第一时刻与该单位时值的起始时刻t2之间的时间差为T4,T4表示的时长高于(大于)Tmf的最大值,则判定用户在这个次强拍发生了掉拍。具体的判断逻辑参见下表2所示。For example, referring to FIG. 9 , it is assumed that the performance speed of the target rhythm to be detected is 60 BPM, that is, the unit time value occupied by one beat is 1 s. The beat subcategory corresponding to a unit time value shown in Figure 9 is reshoot (i.e. strong beat), the time reference interval corresponding to the reshoot determined in advance is Tf, the minimum value min of the reshoot reference interval, the maximum value max, if the time difference between the first moment corresponding to the user’s action within the unit time value and the starting time t1 of the unit time value (i.e. the target time interval) is T1, then it is determined that the user is keeping up with this beat If the time length between the first moment and the starting moment t1 of the unit time value is T2, and the time length represented by T2 is higher than (greater than) the maximum value max of Tf, then it is judged The user fell off the beat and did not make an action in the correct interval; if the time length between the first moment and the starting moment t1 of the unit time value is T3, the duration represented by T3 is lower (less than) Tf If the minimum value is min, it is determined that the user snapped a shot at this beat. The beat category corresponding to another unit time value shown in FIG. 9 is the next strong beat, and the predetermined time reference interval is Tmf. If the user makes an action within the other unit time value, the corresponding first moment The time difference from the starting moment t2 of the unit time value is T4, and the duration represented by T4 is higher (greater than) the maximum value of Tmf, then it is determined that the user has dropped a beat in this second strong beat. The specific judgment logic is shown in Table 2 below.
表2Table 2
Figure PCTCN2022083752-appb-000006
Figure PCTCN2022083752-appb-000006
步骤512,将各个单次动作对应的目标特征中的力度信息分别和参考特征中的力度参考区间进行比较,确定各个单次动作是否力度过轻或过重。力度信息可以是单次动作过程的加速度大小的均值。例如,在一种可能的实现方式中,将一个单位时值平均分为M个时间段,获取每个时间段的中点时刻采集到的加速度大小,计算将M个加速度的均值作为单次动作过程的力度信息。相应地,力度参考区间也可采用相同的方式确定出各个单次样本值,然后可参照基于多个单次时间间隔确定时间参考区间的方式来确定力度参考区间。力度参考区间与力度信息之间的判断逻辑可参照时间维度的判断逻辑,具体可参见下表3,不再复述。Step 512: Compare the strength information in the target feature corresponding to each single movement with the strength reference interval in the reference feature to determine whether the strength of each single movement is too light or too heavy. The force information may be an average value of the acceleration of a single action process. For example, in a possible implementation, a unit time value is divided into M time periods on average, the acceleration collected at the midpoint of each time period is obtained, and the average value of M accelerations is calculated as a single action strength information of the process. Correspondingly, each single sample value can be determined in the same way for the strength reference interval, and then the strength reference interval can be determined by referring to the method of determining the time reference interval based on multiple single time intervals. The judgment logic between the strength reference interval and the strength information can refer to the judgment logic of the time dimension. For details, please refer to Table 3 below and will not repeat it.
表3table 3
Figure PCTCN2022083752-appb-000007
Figure PCTCN2022083752-appb-000007
Figure PCTCN2022083752-appb-000008
Figure PCTCN2022083752-appb-000008
步骤513,输出反馈报告。 Step 513, output a feedback report.
在一种可实现方式中,在电子节拍器的界面显示反馈报告。例如,参阅图10中所示,在界面U13中,显示了图4中所示的第②组节奏的检测结果,在未跟上节拍的各个拍子下方,显示了错误情况,其中第1个小节第3个拍子掉拍,第2个小节的第一拍的力度不够,第3个小节的第2拍抢拍。In a practicable manner, the feedback report is displayed on the interface of the electronic metronome. For example, referring to Fig. 10, in the interface U13, the detection result of the group ② rhythm shown in Fig. 4 is displayed, and below each beat that does not keep up with the beat, an error situation is displayed, wherein the first bar The third beat is dropped, the first beat of the second measure is not strong enough, and the second beat of the third measure is rushed.
作为一种可实现方式,可以将该节奏重新播放,在错误的拍子处进行语音、振动或发光等提示,使得用户更直观地感受到错误的节拍点。As an achievable way, the rhythm can be played again, and prompts such as voice, vibration or light are given at the wrong beat, so that the user can feel the wrong beat point more intuitively.
本申请实施例还提供一种可穿戴设备,该可穿戴设备包括:显示屏;至少一个传感器;处理器;存储器;至少一个应用程序;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令。其中,当所述指令被执行时,可穿戴设备可以执行以下步骤:确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值;通过所述至少一个传感器,获取所述目标节奏中各拍分别对应的目标特征,基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据。The embodiment of the present application also provides a wearable device, which includes: a display screen; at least one sensor; a processor; a memory; at least one application program; and one or more computer programs, wherein the one or more The computer programs are stored in memory, one or more computer programs comprising instructions. Wherein, when the instruction is executed, the wearable device may perform the following steps: determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat; obtain the target rhythm through the at least one sensor Based on the target features corresponding to each beat, based on the beat subcategory corresponding to each beat, each target feature is compared with a predetermined reference feature to obtain detection data.
本申请实施例提供的可穿戴设备110的一种可行的产品硬件架构参阅图11所示,该可穿戴设备110的硬件架构可以包括:A possible product hardware architecture of the wearable device 110 provided in the embodiment of the present application is shown in FIG. 11. The hardware architecture of the wearable device 110 may include:
显示屏111,用于向用户显示反馈报告,例如显示图10所示的界面。具体地,显示屏111可以包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,可穿戴设备110可以包括至少一个显示屏111。The display screen 111 is configured to display a feedback report to the user, for example, display the interface shown in FIG. 10 . Specifically, the display screen 111 may include a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the wearable device 110 may include at least one display screen 111 .
传感器组112,包括至少一个传感器,具体地,至少包括振动传感器或加速度传感器。The sensor group 112 includes at least one sensor, specifically, at least a vibration sensor or an acceleration sensor.
处理器113,包括一个或多个处理单元。例如:处理器113可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,数字信号处理器(digital signal processor,DSP)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 113 includes one or more processing units. For example: the processor 113 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a digital Signal processor (digital signal processor, DSP), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
存储器114,用于存储上述指令、参考特征和检测到的目标特征等数据。存储器114可以是独立于所述处理器113的外置存储器,也可以是设置于处理器113中。例 如,在一些实施例中,内置于处理器113中的存储器可以是高速缓冲存储器,用于保存处理器113刚用过或循环使用的指令或数据。如果处理器113需要再次使用该指令或数据,可从高速缓冲存储器中直接调用。避免了重复存取,减少了处理器113的等待时间。The memory 114 is used to store data such as the above instruction, reference features and detected target features. The memory 114 may be an external memory independent of the processor 113 , or may be set in the processor 113 . For example, in some embodiments, the memory built into the processor 113 may be a cache memory for storing instructions or data that the processor 113 has just used or recycled. If the processor 113 needs to use the instruction or data again, it can be called directly from the cache memory. Repeated access is avoided, and the waiting time of the processor 113 is reduced.
存储器可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质等。The memory may be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM), or other types of memory that can store information and instructions A dynamic storage device can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage ( Including Compact Disc, Laser Disc, Optical Disc, Digital Versatile Disc, Blu-ray Disc, etc.), magnetic disk storage medium or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can Any other media accessed by a computer, etc.
电源管理模块115,接收电池和/或充电管理模块的输入,为处理器113,存储器114,显示屏111,传感器组112供电。电源管理模块115还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块115也可以设置于处理器113中。在另一些实施例中,电源管理模块115和充电管理模块也可以设置于同一个器件中。The power management module 115 receives the input of the battery and/or the charging management module, and supplies power to the processor 113 , the memory 114 , the display screen 111 , and the sensor group 112 . The power management module 115 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 115 can also be set in the processor 113 . In some other embodiments, the power management module 115 and the charging management module can also be set in the same device.
可以理解的是,本申请实施例各附图示意的结构并不构成对可穿戴设备110的具限定。在本申请另一些实施例中,可穿戴设备110可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures shown in the drawings in the embodiments of the present application do not constitute a limitation on the wearable device 110 . In other embodiments of the present application, the wearable device 110 may include more or fewer components than shown in the illustration, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
例如,在一种可实现方式中,参阅图12所示,可穿戴设备110还可以包括:For example, in an implementable manner, as shown in FIG. 12, the wearable device 110 may further include:
扬声器116,以及音频电路,所述扬声器116通过音频电路与处理器113连接,用于以声音方式表示节拍中各个拍子的强弱规律,以及以声音(例如语音)方式向用户反馈发生掉拍或者抢拍等问题的节拍点。例如,在可穿戴设备110的显示屏111显示图10所示的界面同时,进行语音播报“您好,经检测,您在第1小节第3个拍子掉拍哦……”。 Loudspeaker 116, and audio circuit, described loudspeaker 116 is connected with processor 113 through audio frequency circuit, is used for expressing the strength law of each beat in the beat in sound mode, and takes place in the way of sound (such as voice) to user's feedback or The tempo point for snapping and other issues. For example, while the display screen 111 of the wearable device 110 is displaying the interface shown in FIG. 10 , a voice broadcast is made "Hello, after detection, you fell off the third beat of the first bar...".
马达117,为可穿戴设备110提供振动动力,作为一种可实现方式,马达的电机为7G ERM电机,其振动能力比普通智能手机强7倍左右。The motor 117 provides vibration power for the wearable device 110. As a practical way, the motor of the motor is a 7G ERM motor, and its vibration capability is about 7 times stronger than that of an ordinary smart phone.
输入单元118,输入单元用于输入用户指令。例如,待检测的目标节奏的节拍和第一单位时值都可以根据用户输入来确定,输入单元即用于用户输入各种指令。具体地,作为一种可实现方式,输入单元118可以与显示屏111集成为触摸显示屏;输入单元118也可以包括压力传感器(图12中未示出),通过压力传感器来感受用户产生的压力信号,可以将压力信号转换成电信号,完成用户指令输入。在一些实施例中,压力传感器可以设置于显示屏111。压力传感器的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。当有触摸操作作用于显示屏111,可穿戴设备110根据压力传感器检测所述触摸操作强度。可穿戴设备110也可以根据压力传感器的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第 一压力阈值的触摸操作作用于节拍图标时,执行输入常规节拍的指令,例如在显示屏111显示多个常规节拍备选项对应的拍号数字,用户可以通过选择拍号对应的数字来设置节拍,例如分子选择3,分母选择8,则设置将要演奏的乐曲的节拍为3/8拍。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于节拍图标时,则执行选择自定义节拍的指令,从预存的自定义节拍数据库中选择非常规节拍。The input unit 118 is used for inputting user instructions. For example, both the beat and the first unit time value of the target rhythm to be detected can be determined according to user input, and the input unit is used for the user to input various instructions. Specifically, as a practicable manner, the input unit 118 and the display screen 111 may be integrated into a touch display screen; the input unit 118 may also include a pressure sensor (not shown in FIG. 12 ), through which the pressure generated by the user is felt The signal can convert the pressure signal into an electrical signal to complete user instruction input. In some embodiments, a pressure sensor can be disposed on the display screen 111 . There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. When a touch operation acts on the display screen 111, the wearable device 110 detects the intensity of the touch operation according to the pressure sensor. The wearable device 110 can also calculate the touched position according to the detection signal of the pressure sensor. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the beat icon, an instruction to input a regular beat is executed, for example, the time signature numbers corresponding to a plurality of regular beat alternatives are displayed on the display screen 111, and the user can select Set the beat with the number corresponding to the time signature, for example, select 3 for the numerator and 8 for the denominator, then set the beat of the music to be played to 3/8. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the beat icon, an instruction for selecting a custom beat is executed, and an unconventional beat is selected from a pre-stored custom beat database.
无线通信单元119,用于与安装于另一终端设备的节拍器应用程序进行无线通信。例如,可穿戴设备110为一款具有节拍器功能的智能手表,可以在智能手机终端安装该智能手表对应的节拍器应用程序,该智能手表可以通过无线通信单元119与该应用程序进行无线通信。具体地,无线通信单元119可以支持应用在可穿戴设备110上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信单元119可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器113。无线通信模块还可以从处理器113接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。The wireless communication unit 119 is configured to perform wireless communication with a metronome application installed on another terminal device. For example, the wearable device 110 is a smart watch with a metronome function, a metronome application program corresponding to the smart watch can be installed on the smart phone terminal, and the smart watch can communicate with the application program wirelessly through the wireless communication unit 119 . Specifically, the wireless communication unit 119 can support applications on the wearable device 110 including wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT) , global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication unit 119 may be one or more devices integrating at least one communication processing module. The wireless communication module receives electromagnetic waves through the antenna, frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 113 . The wireless communication module can also receive the signal to be sent from the processor 113, frequency-modulate it, amplify it, and convert it into electromagnetic wave to radiate out through the antenna.
基于可穿戴设备的无线通信能力,可以在实际应用场景中,将多个可穿戴设备连接同一台终端设备(例如智能手机、IPAD、笔记本电脑等),以通过安装在该终端设备上的节拍器应用程序实现多个可穿戴设备的同步协作,例如一个乐队的多个成员的穿戴设备连接同一台智能手机的节拍器APP,以实现可以多人协作,使用同一节奏进行演奏。或者,多个可穿戴设备也可以其中一台可穿戴设备作为无线通信的中间站,基于其中一台可穿戴设备实现多台可穿戴设备的协作,而无需借助于终端设备上的APP。Based on the wireless communication capabilities of wearable devices, multiple wearable devices can be connected to the same terminal device (such as smartphones, IPADs, laptops, etc.) The application realizes the synchronous collaboration of multiple wearable devices. For example, the wearable devices of multiple members of a band are connected to the metronome APP of the same smartphone, so that multiple people can collaborate and perform at the same rhythm. Alternatively, multiple wearable devices can also use one of the wearable devices as an intermediate station for wireless communication, and realize the cooperation of multiple wearable devices based on one of the wearable devices without resorting to the APP on the terminal device.
闪光灯120,用于以发光方式提示用户节拍中各个拍子的强弱,以及,还用于向用户反馈用户发生掉拍或者抢拍以及力度不适的节拍点,例如,在显示屏111显示图10所示的界面的同时,重新播放用户演奏出的目标节奏,然后在未跟上节拍的节拍点进行闪光提示,以提示用户此拍子处未跟上节拍,并且不同类型的错误采用不同颜色的闪光,例如掉拍闪烁红光,抢拍闪烁绿光,力度不够显示蓝光,力度过大显示紫光等等。The flashlight 120 is used to remind the user of the strength of each beat in the beat in a light-emitting manner, and is also used to feed back to the user the beat point where the user loses a beat or snaps a beat and the strength is uncomfortable. For example, the display screen 111 displays At the same time as the displayed interface, replay the target rhythm played by the user, and then give a flash reminder at the beat point that does not keep up with the beat, to remind the user that the beat does not keep up with the beat, and different types of errors use different colors of flashes, For example, the red light flashes when the shot is missed, the green light flashes when the shot is snapped, the blue light is displayed when the force is not enough, the purple light is displayed when the force is too high, and so on.
在一种可实现方式中,传感器组112包括振动传感器和加速度传感器,其中,振动传感器用于感应可穿戴设备110的振动或振动,例如,以击鼓场景为例,在检测用户动作时,可以通过振动传感器感应用户在进行击打动作时带动可穿戴设备产生的振动,检测到振动时说明用户所持的鼓槌与鼓面开始接触,并在鼓面的反弹力作用下产生了振动,振动持续的时间包含了鼓槌与鼓面的接触时间,振动持续的时长中的指定时刻可以用于标记击鼓动作发生的时间。在军训场景中,也可以通过振动传感器感应用户在踢正步等步法过程中产生的振动,进而识别用户动作时间。具体地,振动传感器可以是相对式、惯性式,或者电动式、压电式、电涡流式、电感式、电容式、电阻式、光电式等。In a practicable manner, the sensor group 112 includes a vibration sensor and an acceleration sensor, wherein the vibration sensor is used to sense the vibration or vibration of the wearable device 110. For example, taking a drumming scene as an example, when detecting a user action, it may The vibration sensor senses the vibration generated by the wearable device when the user is hitting the action. When the vibration is detected, it means that the drumstick held by the user is in contact with the drum surface, and vibration is generated under the rebound force of the drum surface, and the vibration continues. The time of includes the contact time between the drumstick and the drum surface, and the specified moment in the duration of the vibration can be used to mark the time when the drumming action occurs. In the military training scene, the vibration sensor can also sense the vibration generated by the user during the stepping process such as kicking, and then identify the user's action time. Specifically, the vibration sensor may be a relative type, an inertial type, or an electric type, a piezoelectric type, an eddy current type, an inductive type, a capacitive type, a resistive type, a photoelectric type, or the like.
加速度传感器用于采集可穿戴设备110的加速度信息。加速度传感器可以用于采集用户动作过程中的加速度信息,包括加速度大小和/或方向,用户做出动作的过程中,加速度信息一方面反应了用户动作力度,另一方面,特定的加速度为0的时刻,也可以作为用户动作时间的标记。在一部分实施例中,可穿戴设备110可以仅包括加速度传感器而不包含振动传感器。在个别实施例中,也可以仅包括振动传感器而不包括加速度传感器。The acceleration sensor is used to collect acceleration information of the wearable device 110 . The acceleration sensor can be used to collect acceleration information during the user's action, including the magnitude and/or direction of the acceleration. When the user is making an action, the acceleration information reflects the strength of the user's action on the one hand, and on the other hand, the specific acceleration is 0. The time can also be used as a mark of the user's action time. In some embodiments, the wearable device 110 may only include an acceleration sensor without a vibration sensor. In individual embodiments, only vibration sensors may be included without acceleration sensors.
可选的,传感器组112中还包括距离传感器。距离传感器可以作为附件,用于感应鼓槌与鼓面之间的距离,进而基于距离确定用户动作的时间信息。Optionally, the sensor group 112 also includes a distance sensor. The distance sensor can be used as an accessory to sense the distance between the drumstick and the drumhead, and then determine the time information of the user's action based on the distance.
在一种可实现方式中,处理器113可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,通用输入输出(general-purpose input/output,GPIO)接口,和/或通用串行总线(universal serial bus,USB)接口等。In one implementable manner, the processor 113 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, general-purpose input/output (general-purpose input/output, GPIO) interface, and/or universal serial bus (universal serial bus, USB) interface, etc.
其中,处理器113可以包含多组I2C总线,处理器113可以通过不同的I2C总线接口分别耦合传感器组112,电源管理模块115,闪光灯120等。例如:处理器113可以通过I2C接口耦合显示屏111,使处理器113与显示屏111通过I2C总线接口通信。Wherein, the processor 113 may include multiple sets of I2C buses, and the processor 113 may be respectively coupled to the sensor group 112, the power management module 115, the flashlight 120, etc. through different I2C bus interfaces. For example, the processor 113 may be coupled to the display screen 111 through an I2C interface, so that the processor 113 communicates with the display screen 111 through an I2C bus interface.
在一种可实现方式中,处理器113可以包含多组I2S总线,I2S接口可以用于音频通信。处理器113可以通过I2S总线与音频电路耦合,实现处理器113与音频电路之间的通信,进而使得扬声器116受控发声。In an implementable manner, the processor 113 may include multiple sets of I2S buses, and the I2S interface may be used for audio communication. The processor 113 can be coupled with the audio circuit through the I2S bus, so as to realize the communication between the processor 113 and the audio circuit, and then make the speaker 116 sound under control.
在一种可实现方式中,该可穿戴设备还具有调音器功能,可用于对乐器进行调音。进一步地,该可穿戴设备还可以设置音量分贝警报器,用于全天监听音量,一旦音量达到世界卫生组织规定的危险水平,就发出警报。In a practicable manner, the wearable device also has a tuner function, which can be used to tune the musical instrument. Further, the wearable device can also be set with a volume decibel alarm, which is used to monitor the volume throughout the day, and once the volume reaches the dangerous level stipulated by the World Health Organization, an alarm will be issued.
本申请实施例还提供一种设备,该设备包括:The embodiment of the present application also provides a device, which includes:
显示屏;至少一个传感器;一个或多个处理器;存储器;至少一个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当指令被设备执行时,使得设备执行以下步骤:确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值;通过至少一个传感器,获取所述目标节奏中各拍分别对应的目标特征,目标特征包括第一特征,第一特征用于表征用户在第一单位时值内做出动作时对应的时间信息;基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据;其中,检测数据用于表征用户在第一单位时值内做出的动作是否跟上节拍;参考特征包括用户做出各类别拍子分别对应的动作占用的时间参考区间。display screen; at least one sensor; one or more processors; memory; at least one application program; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions , when the instruction is executed by the device, the device is made to perform the following steps: determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat; obtain the time corresponding to each beat in the target rhythm through at least one sensor The target feature, the target feature includes the first feature, and the first feature is used to represent the corresponding time information when the user makes an action within the first unit time value; based on the beat category corresponding to each beat, combine each target feature with a predetermined reference feature Compare to obtain detection data; wherein, the detection data is used to represent whether the user's actions within the first unit time value keep up with the beat; the reference features include the time reference intervals occupied by the user's actions corresponding to each type of beat.
本申请实施例还提供一种计算机存储介质,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如图2所示的方法。The embodiment of the present application also provides a computer storage medium, including computer instructions, and when the computer instructions are run on an electronic device, the electronic device is made to execute the method shown in FIG. 2 .
综上,本申请实施例提供的方法和设备,在演奏前初始化个人用户数据,采集敲击重音、弱音、次强音的时间参考区间以及速度阈值,反复演奏乐曲,根据演奏中用户节拍节奏是否踩准的反馈,可以纠正不正确的节拍,避免盲目训练,达到更快培养用户节奏感目的,帮助用户更加高效的进行音乐学习或者保持团队整齐。To sum up, the method and device provided by the embodiment of the present application initializes the personal user data before playing, collects the time reference interval and speed threshold of percussion stress, weak sound, and subforte, and plays the music repeatedly. Accurate feedback can correct incorrect beats, avoid blind training, achieve the purpose of cultivating users' sense of rhythm faster, and help users learn music more efficiently or keep the team tidy.
应理解,在本申请的各实施例中,“第一”、“第二”等仅是为了指代不同的对象,并不表示对指代的对象有其它限定。It should be understood that in each embodiment of the present application, "first", "second", etc. are only used to refer to different objects, and do not mean that there are other limitations on the referred objects.
应理解,本申请实施例中的术语“单元”可以通过软件和/或硬件形式实现,对此不作具体限定。例如,“单元”可以是实现上述功能的软件程序、硬件电路或二者结合。所述硬件电路可能包括应用特有集成电路(application specific integrated circuit,ASIC)、电子电路、用于执行一个或多个软件或固件程序的处理器(例如共享处理器、专有处理器或组处理器等)和存储器、合并逻辑电路和/或其它支持所描述的功能的合适组件。It should be understood that the term "unit" in the embodiments of the present application may be implemented in the form of software and/or hardware, which is not specifically limited. For example, a "unit" may be a software program, a hardware circuit or a combination of both to realize the above functions. The hardware circuitry may include application specific integrated circuits (ASICs), electronic circuits, processors (such as shared processors, dedicated processors, or group processors) for executing one or more software or firmware programs. etc.) and memory, incorporating logic, and/or other suitable components to support the described functionality.
因此,在本申请的实施例中描述的各示例的单元,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Therefore, the units of each example described in the embodiments of the present application can be realized by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three kinds of relationships, for example, A and/or B may indicate that A exists alone, A and B exist simultaneously, or B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, and c may be single or multiple.
本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can appreciate that each unit and algorithm steps described in the embodiments disclosed herein can be realized by a combination of electronic hardware, computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In several embodiments provided in this application, if any function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The foregoing is only a specific implementation of the present application. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should be covered by the protection scope of the present application. The protection scope of the present application shall be based on the protection scope of the claims.

Claims (21)

  1. 一种基于音乐节拍检测用户动作的方法,其特征在于,包括:A method for detecting user actions based on music beats, comprising:
    确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值;Determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat;
    获取所述目标节奏中各拍分别对应的目标特征,所述目标特征包括第一特征,所述第一特征用于表征所述用户在所述第一单位时值内做动作时对应的时间信息;Obtain the target features corresponding to each beat in the target rhythm, the target features include a first feature, and the first feature is used to represent the corresponding time information when the user performs an action within the first unit time value ;
    基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据;其中,所述参考特征包括各拍子类别分别对应的时间参考区间;所述检测数据用于至少向用户反馈在时间维度是否跟上所述节拍。Based on the beat category corresponding to each beat, each target feature is compared with a predetermined reference feature to obtain detection data; wherein, the reference feature includes a time reference interval corresponding to each beat category; the detection data is used to at least provide information to the user Feedback whether to keep up with the beat in the time dimension.
  2. 如权利要求1所述的方法,其特征在于,所述第一特征包括目标时间间隔;所述目标时间间隔,用于表征所述用户在所述第一单位时值内做出动作的过程中指定的第一时刻,与第一起始时刻之间的时间差,其中,所述第一起始时刻为所述第一单位时值的起始时刻。The method according to claim 1, wherein the first feature comprises a target time interval; the target time interval is used to characterize the process of the user performing an action within the first unit time value The time difference between the specified first moment and the first start moment, wherein the first start moment is the start moment of the first unit time value.
  3. 如权利要求2所述的方法,其特征在于,所述第一时刻,基于如下方式确定:The method according to claim 2, wherein the first moment is determined based on the following method:
    在所述第一单位时值内,检测到加速度为零的任一时刻,作为第一时刻。Within the first unit time value, any moment when the acceleration is zero is detected as the first moment.
  4. 如权利要求2所述的方法,其特征在于,所述第一时刻,基于如下方式确定:The method according to claim 2, wherein the first moment is determined based on the following method:
    在所述第一单位时值内,检测开始振动到振动结束的持续时间,作为第一时长,以所述第一时长中的指定的任一时刻作为第一时刻。Within the first unit time value, the duration from the start of the vibration to the end of the vibration is detected as the first time length, and any specified time in the first time length is used as the first time.
  5. 如权利要求2所述的方法,其特征在于,所述第一时刻,基于如下方式确定:The method according to claim 2, wherein the first moment is determined based on the following method:
    在所述第一单位时值内,检测加速度为零的至少一个时刻,以及检测开始振动到振动结束的持续时间,作为第一时长,将距离所述第一时长最近或者落入所述第一时长之中的加速度为零的时刻作为第一时刻。Within the first unit time value, detect at least one moment when the acceleration is zero, and detect the duration from the start of the vibration to the end of the vibration, as the first duration, which will be the closest to the first duration or fall within the first The moment when the acceleration in the duration is zero is taken as the first moment.
  6. 如权利要求1所述的方法,其特征在于,所述确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值之前,还包括:The method according to claim 1, wherein, before determining the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat, further comprising:
    确定所述用户个人专属的参考特征。A reference characteristic specific to the user is determined.
  7. 如权利要求6所述的方法,其特征在于,所述确定所述用户个人专属的参考特征,包括:The method according to claim 6, wherein said determining said user-specific reference features comprises:
    获取所述用户做出任一拍子类别的多次动作分别对应的单次时间间隔,基于多个单次时间间隔,确定所述任一拍子类别对应的时间参考区间,作为所述用户个人专属的参考特征;其中,所述单次时间间隔,基于如下方式确定:Obtain the single time intervals corresponding to multiple actions of any beat category by the user, and determine the time reference interval corresponding to any beat category based on the multiple single time intervals, as the user's personal Reference feature; wherein, the single time interval is determined based on the following method:
    确定所述用户做出单次动作的过程中指定的第二时刻,将所述第二时刻与第二起始时刻之间的时间差作为单次时间间隔;其中,所述第二起始时刻为采集单次动作的起始时刻。Determining the second moment specified in the process of the user making a single action, using the time difference between the second moment and the second starting moment as a single time interval; wherein, the second starting moment is Collect the starting moment of a single action.
  8. 如权利要求7所述的方法,其特征在于,所述基于多个单次时间间隔,确定所述任一拍子类别对应的时间参考区间,包括:The method according to claim 7, wherein said determining a time reference interval corresponding to any beat category based on a plurality of single time intervals comprises:
    计算所述多个单次时间间隔的平均值;calculating an average of the plurality of single time intervals;
    基于所述平均值,计算所述多个单次时间间隔对应的均方差;Based on the average value, calculate the mean square error corresponding to the plurality of single time intervals;
    基于所述均方差和所述平均值,确定所述任一拍子类别对应的时间参考区间。Based on the mean square error and the average value, determine a time reference interval corresponding to any beat category.
  9. 如权利要求8所述的方法,其特征在于,所述基于所述均方差和所述平均值,确定所述任一拍子类别对应的时间参考区间,包括:The method according to claim 8, wherein said determining the time reference interval corresponding to any beat category based on said mean square error and said average value comprises:
    将所述平均值加、减N倍所述均方差获得的区间,作为所述时间参考区间,1≤N≤3。The interval obtained by adding or subtracting N times the mean square error from the average value is used as the time reference interval, and 1≤N≤3.
  10. 如权利要求1所述的方法,其特征在于,所述目标特征还包括第二特征,所述第二特征用于表征所述用户在所述第一单位时值内做出动作时对应的力度信息;所述参考特征还包括各拍子类别分别对应的力度参考区间;The method according to claim 1, wherein the target feature further includes a second feature, and the second feature is used to characterize the corresponding strength of the user when making an action within the first unit time value information; the reference feature also includes a strength reference interval corresponding to each beat category;
    基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,还包括:Based on the beat category corresponding to each beat, each target feature is compared with a predetermined reference feature, which also includes:
    基于各拍对应的拍子类别,将第二特征与相应拍子类别对应的力度参考区间进行比较;所述检测数据还用于向用户反馈各拍的动作力度是否符合所述节拍的强弱规律。Based on the beat subcategory corresponding to each beat, the second feature is compared with the strength reference interval corresponding to the corresponding beat subcategory; the detection data is also used to feed back to the user whether the action strength of each beat conforms to the strength rule of the beat.
  11. 如权利要求10所述的方法,其特征在于,所述获取所述目标节奏中各拍分别对应的目标特征之前,还包括:The method according to claim 10, wherein, before acquiring the target features corresponding to each beat in the target rhythm, further comprising:
    确定所述用户个人专属的力度参考区间。Determine the user-specific strength reference interval.
  12. 如权利要求11所述的方法,其特征在于,所述确定所述用户个人专属的力度参考区间,包括:The method according to claim 11, wherein the determination of the user-specific strength reference interval comprises:
    获取所述用户做出任一类别拍子的多次动作分别对应的力度信息,基于多条力度信息,确定所述任一拍子类别对应的力度参考区间,作为所述用户个人专属的力度参考区间;其中,所述力度信息包括所述用户做出任一拍子类别的动作时对应的加速度信息。Acquiring dynamic information corresponding to multiple actions of any type of beat by the user, and determining a dynamic reference interval corresponding to any type of beat based on the multiple pieces of dynamic information, as the user's personal dynamic reference interval; Wherein, the strength information includes the corresponding acceleration information when the user makes an action of any beat category.
  13. 如权利要求1所述的方法,其特征在于,所述获取所述目标节奏中各拍分别对应的目标特征之前,还包括:The method according to claim 1, wherein, before acquiring the target features corresponding to each beat in the target rhythm, further comprising:
    获取所述用户在做出动作时的目标速度;Acquiring the target speed of the user when making an action;
    将所述目标速度与预先确定的速度阈值进行比较,确定所述目标速度的值低于所述速度阈值时,则执行所述获取所述目标节奏中各拍分别对应的目标特征的步骤。The target speed is compared with a predetermined speed threshold, and when it is determined that the value of the target speed is lower than the speed threshold, the step of acquiring target features corresponding to each beat in the target rhythm is executed.
  14. 如权利要求13所述的方法,其特征在于,所述目标速度包括线速度或者角速度。The method according to claim 13, wherein the target speed includes a linear speed or an angular speed.
  15. 如权利要求6所述的方法,其特征在于,基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较之前,还包括:The method according to claim 6, wherein, before comparing each target feature with a predetermined reference feature based on the beat category corresponding to each beat, further comprising:
    根据预定的第一路径,读取所述用户个人专属的参考特征;Reading the user-specific reference feature according to the predetermined first path;
    所述参考特征读取失败时,则根据预定的第二路径,读取备用的第二参考特征;所述第二参考特征,为预先存储的适用于各个用户的参考特征。When the reading of the reference signature fails, a spare second reference signature is read according to a predetermined second path; the second reference signature is a pre-stored reference signature applicable to each user.
  16. 如权利要求1-15中任一项所述的方法,其特征在于,所述确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值之后,还包括:The method according to any one of claims 1-15, characterized in that, after determining the beat corresponding to the target rhythm to be detected and the first unit duration occupied by one beat, further comprising:
    按照所述节拍对应的强弱规律,在各个第一单位时值内分别进行相应强度的提示,提示的方式包括振动、声音播放、发光中的至少一种。According to the law of intensity corresponding to the beat, a reminder of the corresponding intensity is carried out within each first unit time value, and the manner of the reminder includes at least one of vibration, sound playback, and light emission.
  17. 如权利要求1-15中任一项所述的方法,其特征在于,所述获得检测数据之后,还包括:The method according to any one of claims 1-15, characterized in that, after obtaining the detection data, further comprising:
    根据所述检测数据,至少向用户反馈在时间维度是否跟上所述节拍,反馈方式包括显示、振动、声音播放、发光中的至少一种。According to the detection data, at least feedback is given to the user whether they keep up with the beat in the time dimension, and the feedback method includes at least one of display, vibration, sound playback, and light emission.
  18. 如权利要求1-15中任一项所述的方法,其特征在于,所述拍子类别至少包括强拍、次强拍和弱拍。The method according to any one of claims 1-15, characterized in that, the beat subcategories at least include strong beats, sub-strong beats and weak beats.
  19. 一种可穿戴设备,其特征在于,包括:A wearable device, characterized in that, comprising:
    显示屏;至少一个传感器;一个或多个处理器;存储器;至少一个应用程序;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述设备执行时,使得所述设备执行以下步骤:display screen; at least one sensor; one or more processors; memory; at least one application program; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more A plurality of computer programs comprising instructions which, when executed by the device, cause the device to perform the following steps:
    确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值;Determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat;
    获取所述目标节奏中各拍分别对应的目标特征,所述目标特征包括第一特征,所述第一特征用于表征所述用户在所述第一单位时值内做出动作时对应的时间信息;Obtain target features corresponding to each beat in the target rhythm, where the target features include a first feature, and the first feature is used to characterize the corresponding time when the user makes an action within the first unit time value information;
    基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据;其中,所述参考特征包括各拍子类别分别对应的时间参考区间;所述检测数据用于至少向用户反馈在时间维度是否跟上所述节拍。Based on the beat category corresponding to each beat, each target feature is compared with a predetermined reference feature to obtain detection data; wherein, the reference feature includes a time reference interval corresponding to each beat category; the detection data is used to at least provide information to the user Feedback whether to keep up with the beat in the time dimension.
  20. 一种终端设备,其特征在于,包括:A terminal device, characterized in that it includes:
    显示屏;至少一个传感器;一个或多个处理器;存储器;至少一个应用程序;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述终端设备执行时,使得所述终端设备执行以下步骤:display screen; at least one sensor; one or more processors; memory; at least one application program; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more A plurality of computer programs include instructions, which, when executed by the terminal device, cause the terminal device to perform the following steps:
    确定待检测的目标节奏对应的节拍和一拍占用的第一单位时值;Determine the beat corresponding to the target rhythm to be detected and the first unit time value occupied by one beat;
    获取所述目标节奏中各拍分别对应的目标特征,所述目标特征包括第一特征,所述第一特征用于表征所述用户在所述第一单位时值内做出动作时对应的时间信息;Obtain target features corresponding to each beat in the target rhythm, where the target features include a first feature, and the first feature is used to characterize the corresponding time when the user makes an action within the first unit time value information;
    基于各拍对应的拍子类别,将各目标特征与预定的参考特征进行比较,获得检测数据;其中,所述参考特征包括各拍子类别分别对应的时间参考区间;所述检测数据用于至少向用户反馈在时间维度是否跟上所述节拍。Based on the beat category corresponding to each beat, each target feature is compared with a predetermined reference feature to obtain detection data; wherein, the reference feature includes a time reference interval corresponding to each beat category; the detection data is used to at least provide information to the user Feedback whether to keep up with the beat in the time dimension.
  21. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至18中任一项所述的方法。A computer storage medium, characterized by comprising computer instructions, and when the computer instructions are run on an electronic device, the electronic device is made to execute the method according to any one of claims 1 to 18.
PCT/CN2022/083752 2021-05-14 2022-03-29 Method for detecting user action on basis of music beats, and device WO2022237362A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110529905.8A CN115346553A (en) 2021-05-14 2021-05-14 Method and device for detecting user action based on music beat
CN202110529905.8 2021-05-14

Publications (1)

Publication Number Publication Date
WO2022237362A1 true WO2022237362A1 (en) 2022-11-17

Family

ID=83977773

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/083752 WO2022237362A1 (en) 2021-05-14 2022-03-29 Method for detecting user action on basis of music beats, and device

Country Status (2)

Country Link
CN (1) CN115346553A (en)
WO (1) WO2022237362A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719420A (en) * 2023-08-09 2023-09-08 世优(北京)科技有限公司 User action recognition method and system based on virtual reality

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013252366A (en) * 2012-06-08 2013-12-19 Pioneer Electronic Corp Action determining method, mobile terminal and program
CN105405337A (en) * 2015-10-22 2016-03-16 小天才科技有限公司 Auxiliary music playing method and system
JP2016126255A (en) * 2015-01-08 2016-07-11 株式会社コルグ Portable terminal device and program
CN108461011A (en) * 2018-03-26 2018-08-28 广东小天才科技有限公司 A kind of method and wearable device of automatic identification music rhythm
CN109446914A (en) * 2018-09-28 2019-03-08 中山乐心电子有限公司 The method, apparatus and intelligent wearable device of detection movement accuracy
CN110033669A (en) * 2018-01-11 2019-07-19 和硕联合科技股份有限公司 Assisted learning system
CN110503864A (en) * 2019-09-06 2019-11-26 黄淮学院 A kind of music rhythm training device
CN110796918A (en) * 2019-10-29 2020-02-14 维沃移动通信有限公司 Training method and device and mobile terminal
CN111800693A (en) * 2020-06-30 2020-10-20 韶关市启之信息技术有限公司 Bluetooth headset-based motion posture judgment method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013252366A (en) * 2012-06-08 2013-12-19 Pioneer Electronic Corp Action determining method, mobile terminal and program
JP2016126255A (en) * 2015-01-08 2016-07-11 株式会社コルグ Portable terminal device and program
CN105405337A (en) * 2015-10-22 2016-03-16 小天才科技有限公司 Auxiliary music playing method and system
CN110033669A (en) * 2018-01-11 2019-07-19 和硕联合科技股份有限公司 Assisted learning system
CN108461011A (en) * 2018-03-26 2018-08-28 广东小天才科技有限公司 A kind of method and wearable device of automatic identification music rhythm
CN109446914A (en) * 2018-09-28 2019-03-08 中山乐心电子有限公司 The method, apparatus and intelligent wearable device of detection movement accuracy
CN110503864A (en) * 2019-09-06 2019-11-26 黄淮学院 A kind of music rhythm training device
CN110796918A (en) * 2019-10-29 2020-02-14 维沃移动通信有限公司 Training method and device and mobile terminal
CN111800693A (en) * 2020-06-30 2020-10-20 韶关市启之信息技术有限公司 Bluetooth headset-based motion posture judgment method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116719420A (en) * 2023-08-09 2023-09-08 世优(北京)科技有限公司 User action recognition method and system based on virtual reality
CN116719420B (en) * 2023-08-09 2023-11-21 世优(北京)科技有限公司 User action recognition method and system based on virtual reality

Also Published As

Publication number Publication date
CN115346553A (en) 2022-11-15

Similar Documents

Publication Publication Date Title
US10856602B2 (en) Footwear, sound output system, and sound output method
US8378795B2 (en) Method and apparatus for distributing haptic synchronous signals
JP6122106B2 (en) Method and apparatus for indicating swing tempo
US20070213110A1 (en) Jump and bob interface for handheld media player devices
JP5786361B2 (en) Notification signal control device
US10878718B2 (en) System and method for synchronizing audio, movement, and patterns
WO2016092912A1 (en) Program and information processing system
CN108008930A (en) The method and apparatus for determining K song score values
JP4626087B2 (en) Musical sound control system and musical sound control device
JP2015521088A5 (en)
KR20130080847A (en) Electronic acoustic signal generating device and electronic acoustic signal generating method
US20160335557A1 (en) Information processing apparatus, information processing method, and program
US20230271059A1 (en) Cycling detection method, electronic device and computer-readable storage medium
WO2022237362A1 (en) Method for detecting user action on basis of music beats, and device
CN110796918A (en) Training method and device and mobile terminal
US20170043217A1 (en) Electronic device providing exercise guide and method of operating the electronic device
CN106210266A (en) A kind of acoustic signal processing method and audio signal processor
JP2011239993A (en) Sound generation control unit
JP4374010B2 (en) Motor motion evaluation system, motor motion evaluation method and program thereof
CN100538560C (en) Electronic beat sound-calibrator and control method thereof
CN108735194B (en) Beat prompting method and device
JP5768266B2 (en) Golf support system, golf support apparatus and program
WO2020088695A1 (en) Music control system and method
CN214344200U (en) Human body limb movement and instrument movement simulated sound motion capability enhancing device
US20180315406A1 (en) Notation for gesture-based composition

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22806332

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE