Embodiment
Below by drawings and Examples, the technical scheme of the embodiment of the invention is described in further detail.
Fig. 1 is the process flow diagram of the embodiment of the invention one media play controlling method.As shown in Figure 1, present embodiment specifically comprises the steps:
Step 101, receive that signal wire on the earphone cord sends by the touch signal that touches health check-up and measure, obtain touching position information and touch action information according to this touch signal;
Step 102, according to touching position information and touch action information, media play is controlled processing.
Specifically, the touch health check-up on the earphone cord measures touch signal, and the signal wire by earphone cord sends to contact control module in the media player with touch signal; Contact control module obtains touching position information and touch action information according to touch signal; Media play module in the media player is controlled processing according to touching position information and touch action information to media play.
In the present embodiment, the user can touch the touch body on the earphone cord, touching health check-up measures touch signal and sends to contact control module in the media player, contact control module obtains touching position information and touch action information, the media play module is controlled processing to media play, has realized touching the function that earphone cord gets final product the adjusted in concert media play.
Fig. 2 is the process flow diagram of the embodiment of the invention two media play controlling methods.In the present embodiment, set in advance the corresponding relation of touching position information with touch action information and control processing mode in the media player, this corresponding relation can set in advance for the manufacturer of media player.Wherein, touching position information represents the user in the position that the touch body touches, and touch action information represents the action that the user touches at the touch body, and this action comprises presses, pulls and lift, can also further determine other actions according to these three actions, as click, double-click and grow and press.The control processing mode comprises carries out hand-off process, the media play volume is regulated processing, Media playing course is regulated processing, locking or release media play, time-out or continued media play and stop the processing mode such as media play media play.
As shown in Figure 2, present embodiment specifically comprises the steps:
Touch health check-up on step 201, the earphone cord measures touch signal, and the signal wire by earphone cord sends to contact control module in the media player with touch signal.
Present embodiment utilizes resistor pressure formula touch screen technology to realize the various regulatory functions of media (such as music), and its difference from prior art is, the touch-screen isolation of components is arranged.Particularly, will touch body and be arranged in the earphone cord, this touches body and does not link to each other with tone frequency channel wire in the earphone cord; Contact control module is arranged in the media player (such as mobile phone).
Touch body on the earphone cord is divided into several parts, and present embodiment is divided into three parts and is introduced as example will touch body.Fig. 3 is the structural representation that touches body in the embodiment of the invention two media play controlling methods.In actual applications, for the ease of distinguishing, three parts that touch body can arrange respectively different colors, as shown in Figure 3, first is used for the function that control is heightened volume, switched to a song and song rewind down, second portion is used for the function that control suspends, stops and locking media play, and third part is used for the function that control is turned down volume, switched to next song and song F.F..The above-mentioned three parts respectively function of correspondence are a kind of specific implementation, and the embodiment of the invention is not limited to this, and the function of above-mentioned three parts can be exchanged.
In actual applications, earphone cord comprises three tone frequency channel wires, is provided with the signal wire that touches body and touch body in the tone frequency channel wire periphery, and touch body periphery is provided with the earphone tree lace for the protection of earphone cord, and wherein the color of earphone tree lace is set according to Fig. 3 portions.
Fig. 4 is the structural representation of the interface of earphone cord and media player in the embodiment of the invention two media play controlling methods.As shown in Figure 4, the interface of earphone cord and media player is serial ports, and this serial ports comprises that the interface of three tone frequency channel wires, three firsts touch the interface of the interface of body signal wire, three second portions touch body signal wires, the interface that three third parts touch the body signal wires.In actual applications, the interface number is not limited only to 12, can set according to the number of the signal wire that touches body; The position of signal wire and interface also can arrange arbitrarily, and best mode closes on setting for the signal wire that will touch the body each several part.In this step, touch signal is exactly to send contact control module in the media player to by this interface.
Step 202, contact control module obtain touching position information and touch action information according to the touch signal of collecting.
This touch signal can comprise the touching position information of user touch point and touch interrupt level.
Contact control module extracts touching position information from touch signal, this touching position information can be specially the coordinate figure (can comprise directions X, Y-direction and Z direction) of user touch point, and contact control module sends this touching position information to the media play module.In the present embodiment, if user touch point is for touching the first of body, the touching position information of then obtaining is primary importance information; If user touch point is for touching the second portion of body, the touching position information of then obtaining is second place information; If user touch point is for touching the third part of body, the touching position information of then obtaining is the 3rd positional information.
Contact control module can also and touch interrupt level according to touching position information, judge the user in the action that touches body and touch, and namely obtains touch action information, and the touch action information that will be used to indicate touch action sends to the media play module.
Step 203, media play module adopt the control processing mode corresponding with the touching position information of obtaining and touch action information that media play is controlled processing according to the corresponding relation of touching position information and touch action information and control processing mode.
Can set in advance the corresponding relation of touching position information and touch action information and control processing mode, for example, when touching position information be primary importance information or the 3rd positional information and the indication of touch action information touch action when clicking, media play is carried out hand-off process;
When touching position information is that the touch action of primary importance information or the 3rd positional information and the indication of touch action information during less than the towing threshold value, is regulated processing to the media play volume for towing and towing duration;
When touching position information is that the touch action of primary importance information or the 3rd positional information and the indication of touch action information is pressed and longly pressed the duration and when pressing threshold value, Media playing course is regulated processing less than long for long;
When touching position information be the touch action of second place information and touch action information indication when double-clicking, locking or release media play;
When touching position information be the touch action of second place information and touch action information indication when clicking, suspend or the continuation media play;
When touching position information is that the touch action of second place information and touch action information indication is pressed and longly pressed the duration and when pressing threshold value, stop media play less than long for long;
The media play module is controlled processing according to the corresponding relation of this touching position information that sets in advance and touch action information and control processing mode to media play.
The touch screen technology that present embodiment adopts arranges the touch-screen isolation of components, touches body and is arranged in the earphone cord, and contact control module is arranged in the media player, so small and exquisite and attractive in appearance, the novel fashion of profile of earphone cord.The method of utilizing present embodiment to provide, the user can touch the touch body on the earphone cord, touching health check-up measures touch signal and sends to media player, media player obtains touching position information and touch action information, determine according to touching position information which part is touch action occur in, again according to the touching position information that sets in advance and the corresponding relation of touch action information and control processing mode, adopt corresponding control processing mode that media play is controlled processing, realized touching the function that earphone cord gets final product the adjusted in concert media play.
Fig. 5 is the process flow diagram of the embodiment of the invention three media play controlling methods.As shown in Figure 5, present embodiment specifically comprises the steps:
Touch health check-up on step 301, the earphone cord measures touch signal, and the signal wire by earphone cord sends to contact control module in the media player with touch signal.
This step can be identical with above-mentioned steps 201, do not repeat them here.
Step 302, contact control module obtain touching position information, and touching position information is sent to the media play module.
Step 303, media play module judge whether touching position information is primary importance information, if then execution in step 3031; Otherwise execution in step 304.
Step 3031, contact control module judge touch action, if touch action for pressing and pull, and the towing duration less than the towing threshold value, then execution in step 3032; If touch action is for pressing but not pull, then execution in step 3033.
In case the user contacts the touch body, interrupt service routine starts immediately timer and disappears and tremble, and particularly, arrives T1 after the time, and the height of the touch interrupt level by fracture in judging confirms whether the user presses.When touching interrupt level when low, contact control module determines that user's touch action is for pressing.
For after pressing, timer touches interrupt level and touching position information every the T2 time inquiring in definite touch action, if the touch terminal level be low always, and touching position information changes, and then definite user's touch action is for pressing and pulling; If it is low touching interrupt level, and touching position information do not change, and the touch action of then determining the user is for pressing but not pull.
In this step, contact control module can be followed the tracks of user's drag kick, until touch action is for lifting, and touching position information sends to the media play module will lift the time.When the user carries out when lifting action, postpone the T3 time by timer and disappear and tremble, arrive T3 after the time, if judge that it be high touching interrupt level, then definite user's touch action is for lifting.
Further, present embodiment can preset the towing threshold value, and when contact control module was followed the tracks of user's drag kick, the record towing duration, if pull the duration less than the towing threshold value, then execution in step 3032; If the towing duration is pulled threshold value more than or equal to this, then media play is not controlled processing, namely response is not done in this action, can prevent maloperation like this.
Step 3032, media play module receive the touch action information that is used for the expression towing that contact control module sends, and heighten the media play volume, timer zero clearing, execution in step 301.
In the present embodiment, the control processing mode of the primary importance information that sets in advance and towing correspondence is for heightening volume.
The media play module can receive the touching position information when lifting, and then calculates the coordinate figure when pressing and the coordinate figure when lifting poor, obtains the distance of towing.According to the distance of towing and the ratio of predeterminable range value, heighten the media volume.For instance, the corresponding relation that the distance that can preset towing and ratio and the volume of predeterminable range value are heightened progression when the ratio of the distance that obtains towing and predeterminable range value, is heightened progression according to volume corresponding to this ratio and is heightened the media volume.
Step 3033, contact control module are judged the touch action duration of pressing, if press threshold value greater than 1s and less than long, then execution in step 3034; If be less than or equal to 1s, then execution in step 3035.
If, then knowing user's's this moment touch action greater than 1s, presses for long the touch action duration of pressing; If the touch action duration of pressing is less than or equal to 1s, know that then user's's this moment touch action is for clicking.
Further, present embodiment can preset the long threshold value of pressing, and the contact control module record is long to be pressed the duration, presses threshold value if length is pressed the duration less than long, and then execution in step 3034; If length is pressed the duration and is pressed threshold value more than or equal to this length, then media play is not controlled processing, namely response is not done in this action, can prevent maloperation like this.
Step 3034, media play module receive the touch action information that expression length is pressed that is used for of contact control module transmission, Media playing course is carried out rewind down process timer zero clearing, execution in step 301.
In the present embodiment, the primary importance information that sets in advance and long control processing mode of pressing correspondence are rewind down.
The media play module can receive the length of the timer record of contact control module transmission and press the time, the T.T. of supposing media (such as a first song) is the Preset Time value, according to long time of pressing and the ratio of Preset Time value, Media playing course is carried out rewind down process.For instance, establishing long time of pressing and the ratio of Preset Time value is 1: 2, then Media playing course is fallen back on soon 1/2 place of current progress.
Step 3035, media play module receive the touch action information that expression is clicked that is used for of contact control module transmission, switch to a media file, execution in step 301.
In the present embodiment, the primary importance information that sets in advance and click corresponding control processing mode for switching to a upper media file.
Step 304, media play module judge whether touching position information is second place information, if then execution in step 3041; Otherwise execution in step 3051.
Step 3041, contact control module judge touch action, if touch action for pressing and double-clicking, then execution in step 3042; If touch action is for pressing but not double-click, then execution in step 3043.
In case the user contacts the touch body, interrupt service routine starts immediately timer and disappears and tremble, and particularly, arrives T1 after the time, and the height of the touch interrupt level by fracture in judging confirms whether the user presses.When touching interrupt level when low, contact control module determines that user's touch action is for pressing.
For after pressing, further whether judgement this time presses with the front time interval of once pressing in the scope of double-clicking the time interval, if determine that then user's touch action is for pressing and double-clicking in definite touch action; Otherwise the touch action of determining the user is for pressing but not double-click.
Step 3042, media play module receive the touch action information that is used for the expression double-click that contact control module sends, if playing, current media is in released state (i.e. the normal state that receives activation signal), then lock media play, enter lock-out state; If current media is play and is in the lock state, then release media play enters released state, execution in step 301.
In the present embodiment, control processing mode corresponding to the second place information that sets in advance and double-click is locking or release media play.
Wherein, released state refers to that the media play module receives touching position information and touch action information that contact control module transmits, and the state that media play is processed; Lock-out state refers to that the media play module receives touching position information and touch action information that contact control module transmits, and the touch action information of only double-clicking according to expression is processed the state that other information do not process.
Step 3043, contact control module are judged the touch action duration of pressing, if press threshold value greater than 2s and less than long, then execution in step 3044; If be less than or equal to 2s, then execution in step 3045.
If, then knowing user's's this moment touch action greater than 2s, presses for long the touch action duration of pressing; If the touch action duration of pressing is less than or equal to 2s, know that then user's's this moment touch action is for clicking.
Present embodiment presets the long threshold value of pressing, and the contact control module record is long to be pressed the duration, presses threshold value if length is pressed the duration less than long, and then execution in step 3044; If length is pressed the duration and is pressed threshold value more than or equal to this length, then media play is not controlled processing, namely response is not done in this action, can prevent maloperation like this.
Step 3044, media play module receive the touch action information that expression length is pressed that is used for of contact control module transmission, stop media play, execution in step 301.
In the present embodiment, the second place information that sets in advance and the long control processing mode of correspondence of pressing are for stopping media play.
Step 3045, media play module receive the touch action information that expression is clicked that is used for of contact control module transmission, if current media is in broadcast state, then suspend media play, if current media is in halted state, then continue media play, execution in step 301.
In the present embodiment, the second place information that sets in advance is to suspend or continue media play with clicking corresponding control processing mode.
Step 3051, contact control module judge that to touch action if touch action, reaches the towing duration for pressing and pulling less than the towing threshold value, then execution in step 3052; If touch action is for pressing but not pull, then execution in step 3053.
In case the user contacts the touch body, interrupt service routine starts immediately timer and disappears and tremble, and particularly, arrives T1 after the time, and the height of the touch interrupt level by fracture in judging confirms whether the user presses.When touching interrupt level when low, contact control module determines that user's touch action is for pressing.
For after pressing, timer touches interrupt level and touching position information every the T2 time inquiring in definite touch action, be low if touch interrupt level always, and touching position information changes, and then definite user's touch action is for pressing and pulling; If it is low touching interrupt level, and touching position information do not change, and the touch action of then determining the user is for pressing but not pull.
In this step, contact control module can be followed the tracks of user's drag kick, until touch action is for lifting, and touching position information sends to the media play module will lift the time.When the user carries out when lifting action, postpone the T3 time by timer and disappear and tremble, arrive T3 after the time, if judge that it be high touching interrupt level, then definite user's touch action is for lifting.
Further, present embodiment can preset the towing threshold value, and when contact control module was followed the tracks of user's drag kick, the record towing duration, if pull the duration less than the towing threshold value, then execution in step 3052; If the towing duration is pulled threshold value more than or equal to this, then response is not done in this action, can prevent maloperation like this.
Step 3052, media play module receive the touch action information that is used for the expression towing that contact control module sends, and turn down the media play volume, timer zero clearing, execution in step 301.
In the present embodiment, the control processing mode of the 3rd positional information that sets in advance and towing correspondence is for heightening volume.
The media play module can receive the touching position information when lifting, and then calculates the coordinate figure when pressing and the coordinate figure when lifting poor, obtains the distance of towing.According to the distance of towing and the ratio of predeterminable range value, turn down the media volume.For instance, can preset the distance and the ratio of predeterminable range value and the corresponding relation of turning down sound volume progression of towing, when the ratio of the distance that obtains towing and predeterminable range value, turn down the media volume according to the turning down sound volume progression that this ratio is corresponding.
Step 3053, contact control module are judged the touch action duration of pressing, if press threshold value greater than 1s and less than long, then execution in step 3054; If be less than or equal to 1s, then execution in step 3055.
If, then knowing user's's this moment touch action greater than 1s, presses for long the touch action duration of pressing; If the touch action duration of pressing is less than or equal to 1s, know that then user's's this moment touch action is for clicking.
Further, present embodiment can preset the long threshold value of pressing, and the contact control module record is long to be pressed the duration, presses threshold value if length is pressed the duration less than long, and then execution in step 3054; If length is pressed the duration and is pressed threshold value more than or equal to this length, then media play is not controlled processing, namely response is not done in this action, can prevent maloperation like this.
Step 3054, media play module receive the touch action information that expression length is pressed that is used for of contact control module transmission, Media playing course is carried out F.F. process timer zero clearing, execution in step 301.
In the present embodiment, the 3rd positional information that sets in advance and long control processing mode of pressing correspondence are F.F..
The media play module can receive the length of the timer record of contact control module transmission and press the time, the T.T. of supposing media (such as a first song) is the Preset Time value, according to long time of pressing and the ratio of Preset Time value, Media playing course is carried out F.F. process.
Step 3055, media play module receive the touch action information that expression is clicked that is used for of contact control module transmission, switch to next media file, execution in step 301.
In the present embodiment, the 3rd positional information that sets in advance and click corresponding control processing mode for switching to next media file.
The method that provides by present embodiment, realized the function that volume adjusting, switching media file, progress are regulated and suspended, stop to play media, the embodiment of the invention can also be on this basis, by being set, more control processing mode provides more function, such as audio switching, circulation pattern switching etc.
The touch screen technology that present embodiment adopts arranges the touch-screen isolation of components, touches body and is arranged in the earphone cord, and contact control module is arranged in the media player, so small and exquisite and attractive in appearance, the novel fashion of profile of earphone cord.The method of utilizing present embodiment to provide, the user can touch the touch body on the earphone cord, touching health check-up measures touch signal and sends to media player, media player obtains touching position information and touch action information, determine according to touching position information which part is touch action occur in, again according to the touching position information that sets in advance and the corresponding relation of touch action information and control processing mode, adopt corresponding control processing mode that media play is controlled processing, realized touching the function that earphone cord gets final product the adjusted in concert media play.
Fig. 6 is the structural representation of embodiment of the invention media player.As shown in Figure 6, present embodiment specifically comprises: contact control module 11 and media play module 12.Wherein, contact control module 11 is used for receiving that signal wire on the earphone cord sends by the touch signal that touches health check-up and measure, and obtains touching position information and touch action information according to touch signal; Media play module 12 is controlled processing for touching position information and the touch action information obtained according to contact control module 11 to media play.
The media play module 12 concrete corresponding relations that are used for according to touching position information and touch action information and control processing mode adopt the control processing mode corresponding with the touching position information of obtaining and touch action information that media play is controlled processing.
Particularly, media play module 12 can comprise handover module 13, volume adjusting module 14 and progress adjustment module 15, wherein, handover module 13 be used for when touching position information be primary importance information or the 3rd positional information and the touch action information touch action of indicating when clicking, media play is carried out hand-off process; Volume adjusting module 14 be used for when touching position information be primary importance information or the 3rd positional information and the indication of touch action information touch action for towing and towing duration when pulling threshold value, the media play volume is regulated processing; Progress adjustment module 15 be used for when touching position information be that the touch action of primary importance information or the 3rd positional information and the indication of touch action information is pressed and longly pressed the duration when pressing threshold value less than length for long, Media playing course is regulated processing.
Media play module 12 also can comprise locking module 16, suspend module 17 and stopping modular 18, wherein, when locking module 16 is double-click for the touch action that when touching position information is the indication of second place information and touch action information, locking or release media play; Suspend module 17 be used for when touching position information be the touch action of second place information and the indication of touch action information when clicking, time-out or continuation media play; Stopping modular 18 be used for when touching position information be that the touch action of second place information and the indication of touch action information is pressed and longly pressed the duration when pressing threshold value less than length for long, stop media play.
The media player that present embodiment provides can be the various electronic equipments such as mobile phone, music player or video player.In actual applications, contact control module is connected with earphone cord by serial ports, receives the touch signal that the touch body on the earphone cord sends by signal wire by this serial ports, and obtains touching position information and touch action information.Media play Model Implement mode can be cpu chip and dsp chip, according to touching position information and touch action information, media play is controlled processing.
In the present embodiment, contact control module receives the touch signal that the touch body on the earphone cord sends by signal wire, and obtain touching position information and touch action information, and media play is controlled processing, realized touching the function that earphone cord gets final product the adjusted in concert media play.
Fig. 7 is the structural representation of embodiment of the invention earphone wire device.As shown in Figure 7, present embodiment specifically comprises: touch body 21 and signal wire 22.Wherein, touch body 21 for detection of touch signal, this touch signal be used for to media play switch, volume adjusting, progress adjusting, locking or release, time-out or continue the processing of playing and stopping to play; Signal wire 22 is used for touching touch signal that body 21 detects to the contact control module transmission of media player.
Present embodiment can also comprise the serial ports 23 that is connected with signal wire 22, and this serial ports 23 comprises the interface of tone frequency channel wire and the interface of signal wire 22.
In addition, present embodiment can also comprise tone frequency channel wire, is provided with the signal wire 22 that touches body 21 and touch body in the tone frequency channel wire periphery, and touch body 21 peripheries are provided with the earphone tree lace for the protection of earphone cord.The earphone wire device that present embodiment provides is connected with media player by serial ports 23.
The concrete structure that wherein touches body can be referring to Fig. 3, and this touch body can adopt resistance-type pressure to touch material, and cost is lower.
In the present embodiment, the user can touch the touch body on the earphone cord, touching health check-up measures touch signal by signal wire and sends to contact control module in the media player, so that contact control module obtains touching position information and touch action information according to touch signal, and then so that the media play module in the media player according to touching position information and touch action information, media play is controlled processing, realized touching the function that earphone cord gets final product the adjusted in concert media play.
Fig. 8 is the structural representation of embodiment of the invention controlling media play system.As shown in Figure 8, present embodiment specifically comprises: earphone wire device 31 and media player 32.Wherein, earphone wire device 31 is for detection of touch signal, the touch signal that detects is sent to media player 32, this touch signal be used for to media play switch, volume adjusting, progress adjusting, locking or release, time-out or continue the processing of playing and stopping to play; The signal wire that media player 32 is used for receiving on the earphone wire device 31 sends the touch signal that measures by touching health check-up, obtain touching position information and touch action information according to touch signal, and according to touching position information and touch action information, media play is controlled processing.
The earphone wire device of present embodiment and the concrete structure of media player can referring to above-mentioned earphone wire device embodiment and media player embodiment, not repeat them here.
In the present embodiment, the user can touch the touch body on the earphone cord, touching health check-up measures touch signal by signal wire and sends to media player, so that media player obtains touching position information and touch action information according to touch signal, and according to touching position information and touch action information, media play is controlled processing, realized touching the function that earphone cord gets final product the adjusted in concert media play.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can be finished by the relevant hardware of programmed instruction, aforesaid program can be stored in the computer read/write memory medium, this program is when carrying out, execution comprises the step of said method embodiment, and aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above embodiment only in order to the technical scheme of the embodiment of the invention to be described, is not intended to limit; Although with reference to previous embodiment the embodiment of the invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of each embodiment technical scheme of the embodiment of the invention.