CN100428664C - Method for triggering data stream synchronizing information and inserting synchronizing information - Google Patents

Method for triggering data stream synchronizing information and inserting synchronizing information Download PDF

Info

Publication number
CN100428664C
CN100428664C CNB011124032A CN01112403A CN100428664C CN 100428664 C CN100428664 C CN 100428664C CN B011124032 A CNB011124032 A CN B011124032A CN 01112403 A CN01112403 A CN 01112403A CN 100428664 C CN100428664 C CN 100428664C
Authority
CN
China
Prior art keywords
frame
data
message
command
data flow
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CNB011124032A
Other languages
Chinese (zh)
Other versions
CN1378360A (en
Inventor
杨明哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Winbond Electronics Corp
Original Assignee
Winbond Electronics Corp
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 Winbond Electronics Corp filed Critical Winbond Electronics Corp
Priority to CNB011124032A priority Critical patent/CN100428664C/en
Publication of CN1378360A publication Critical patent/CN1378360A/en
Application granted granted Critical
Publication of CN100428664C publication Critical patent/CN100428664C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Toys (AREA)
  • Studio Circuits (AREA)

Abstract

The present invention relates to a data flow synchronous information triggering method which treats a data frame and a command frame of a data flow. After the data flow is read, when a frame of the data flow is judged to be the data frame, the data of the data frame is read. When the frame of the data flow is judged to be the command frame, a command identifying code of the command frame is obtained so as to execute a program corresponding to the command identifying code. In addition, a method of the data flow for inserting synchronous information of the present invention comprises: data is played firstly; at a proper time point, a command frame is inserted, and before the command frame is inserted, a data frame is separated from the data; finally, the data frame and the command frame are recombined so as to generate the data flow comprising the data frame and the command frame.

Description

The synchronous message of data flow triggers and inserts the method for synchronous message
Technical field
The synchronous message that the present invention relates to a kind of data flow triggers and inserts the method for synchronous message, refers to a kind of method of carrying out relevent information in the Data Stream Processing process synchronously especially, and the method for arranging this synchronous message in data flow.
Background technology
In the application of sounding product, requiring to accomplish through regular meeting can be synchronous between sound and other action.For example a toy robot often needs its four limbs, face to cooperate simultaneously and makes some actions when speaking.This series products adds some peripheral devices by microprocessor (uP) mostly and is formed.This microprocessor is by the ingenious arrangement of its program, and the synthetic video signal exports loud speaker on the one hand; On the other hand in due course between control its specific output pin voltage potential.If the external light-emitting diode of this output pin (LED), the then light on and off of may command LED; If this output pin connects motor, the then activation of controllable motor or stop.
Yet, how to cooperate the carrying out of sound, at the voltage of ' appropriate time ' change output pin, be a numerous and diverse job.With present known technology, the programmer must measure earlier from sound and begin to be played to the time difference that action begins to activate.Utilize a timer (Timer) again, insert a conversion value of representing this time difference, pick up counting in the same time of sound playing.(the expression timing finishes) then carries out the current potential that an interrupt routine changes output pin when timer generation overflow.
Though said method can be reached microprocessor (uP) instruction and the synchronous purpose of sound, still has following shortcoming:
One, expend the plenty of time: each needs the synchronous action must Measuring Time, and adjusts the numerical value of timer repeatedly.So the mode of attempting (try-and-error) with mistake neither directly also inefficiency can say.
Two, be not enough to deal with complicated application: when programming becomes increasingly complex, uP handles multinomial work probably simultaneously, so may make the playback rate of sound become slow slightly, but the time that timer sets in advance can be not slack-off, thereby cause the action still can't be synchronous with sound.In addition, when allowing to allow the user change arbitrarily as if sound playing speed, then identical problem also can take place.
Summary of the invention
Purpose of the present invention is promptly according to above-mentioned known technology, one new mode of operation is proposed, cooperate special data structure and disposal skill, in data flow, arrange synchronous action more efficiently, the broadcast of sound and the time point of action generation can be controlled fully, do not have the problem that action and sound can't be synchronous.
For reaching above-mentioned purpose, the synchronous message triggering method of data flow of the present invention is in a data flow (data stream), divide into a Frame and a command frame, when reading this data flow, if be judged as a frame (frame) in this data flow when this Frame, read the data of this Frame, and if judge when this frame in this data flow is this command frame, obtain an order identification code of this command frame, to carry out the pairing program of this order identification code.
Simultaneously, the method that data flow of the present invention is inserted synchronous message is by playing the mode of data, with this data conversion is a digital data stream, make it comprise a Frame of forming by Frame message and numerical data, and select reasonable time point, in this Frame, insert a command frame, last this Frame of recombinant and this command frame are to produce a data flow that comprises this Frame and this command frame.Wherein, this Frame be complete data frame and deficiency of data frame one of them.
Thus, promptly comprised Frame and command frame in the data flow simultaneously, microprocessor can be according to data flow when reading data flow, the attribute of each frame, carry out corresponding processing, when being judged to be general data, directly read these data, and when being judged to be an order, can go to carry out one section program according to this order, produce corresponding synchronization action, and then reach purpose of the present invention.
In the synchronous message triggering method of data flow of the present invention, this data flow is a digital data stream.This Frame comprises a Frame message and a voice data.This Frame message comprises a frame identification position and a voice data length data, and this frame identification position is used and judged that this frame is this Frame.This command frame comprises-comprises the command frame message of this order identification code.This command frame message also comprises a frame identification position, and this frame identification position is used and judged that this frame is this command frame.
Insert in the method for synchronous message in data flow of the present invention, these data are one whole section voice data.This Frame comprises a Frame message and a fragment voice data.This Frame message comprises a frame identification position and a voice data length data, and this frame identification position is used and judged that this frame is this Frame.This command frame comprises a command frame message.This command frame message comprises a frame identification position and an order identification code, and this frame identification position is used and judged that this frame is this command frame.This data flow is a digital data stream.The mode of this broadcast is presented in the form of these data with a sound wave on one screen.This mode of inserting this command frame ties up on this sound wave and clicks, and adds this command frame in this reasonable time point of correspondence.This Frame is divided into a complete data frame and a non-complete data frame.
Description of drawings
The present invention will be by following detailed description with reference to accompanying drawing, with more deep understanding:
Fig. 1 (A) is for inserting the schematic diagram of order in the voice data of preferred embodiment of the present invention.
Fig. 1 (B) is the data flow of corresponding diagram one.
Fig. 2 is the various frames of preferred embodiment of the present invention.
Fig. 3 is the process chart of preferred embodiment of the present invention.
Embodiment
See also Fig. 1 (A), in operating aspect, the idea that the triggering message and the voice data of synchronization action are combined closely in the present invention's proposition, and the mode that the one dimension time relationship between sound and the synchronization action is changed with two dimensional image shows, and can allow the user to design the activationary time of synchronization action in this two dimensional image.
At first, auxiliary by personal computer (PC) program means shows the waveform of sound on screen 21, and promptly sound wave 22, and by the audio device of PC, allows the user can listen to this sound waveform repeatedly.Secondly, according to the idea that the triggering message and the voice data of synchronization action are combined closely, the user is after listening to this sound, can be by the PC program means auxiliary, the triggering message of a plurality of synchronization actions is directly inserted the appropriate location of this sound waveform, for example insert order 00 in time T 1, time T 2 is inserted order 01, and time T 3 is inserted order 02.At last, by the PC program means original sound data and the new synchronous triggering message of inserting are produced data flow of the present invention with the data structure mode that the present invention proposes, can be saved as new archives, its corresponding data flow is shown in Fig. 1 (B).In Fig. 1 (B), Frame has four, and each the inside may comprise a plurality of complete data frames and a non-complete data frame (being generally last).
See also Fig. 2, data structure proposed by the invention is divided into three kinds of coding kenels with data.The archives that produced after all voice datas combine with the synchronous activation message of insertion, all three kinds of coding kenels are formed thus.These three kinds of kenels are respectively complete data frame 31 (complete data frame), non-complete data frame 32 (incomplete data frame) and command frame 33 (command frame).Among each frame, there is the position of two fixed positions to be used for distinguishing the kenel of looking this frame.Details are as follows for various frames:
I) complete data frame 31: the content of this frame is mainly the voice data of certain length-specific (for example 256 sampling points).In addition, in certain fixed position of entire frame (usually foremost), the position that has some to write down the special message of this frame comprises two picture format attitude identification code, is called ' the frame message (frame information).
Ii) non-complete data frame 32: the content of this frame be on-fixed and also less than the voice data of the sound length of complete data frame and this frame ' the frame message '.Non-complete data frame ' the frame message ' must than complete data frame ' frame message ' more figure places, in order to write down the voice data length in this frame.
Iii) command frame 33: the content of this frame can only comprise ' the command frame message ', but can be ' the command frame message ' with the combination of voice data.In the command frame message of command frame, contain the order identification code to represent different orders.On behalf of different synchronization actions, different orders then trigger message, and corresponds to different microprocessor programs.
In addition, in the producing method of frame, the user can insert a plurality of order flags in the sound waveform, and can arbitrarily adjust the position of each flag.By the PC program means voice data and order data are reconfigured coding, produce a new mixed data files.Its combinational logic is as follows:
I) the voice data length of supposing a complete data frame is decided to be 256 sampling points.Begin between the 256th sampling point from first sampling point of sound, if not having the order flag occurs, then can the footpath these 256 sampling points be weaved into a complete data frame, and add several frame message, wherein comprise the frame identification code of two positions in the foremost of this frame.Begin from the 257th sampling point next time, down encodes according to principle of identity.
Ii) between 256 sampling points of first sampling point to the of sound, if the order flag occurs, then with first sampling point to the previous sampling point of ordering the flag position, weave into a non-complete data frame, and add in the foremost of this frame and several Frame message wherein to comprise the frame identification code of two positions and the voice data length of 8 positions.The sampling point of order flag and position thereof is weaved into a command frame, and add several command frame message, wherein comprise the frame identification code of two positions in the foremost of this frame.Next time, the next sampling point from this order flag position began, and down encoded according to mentioned above principle.
See also Fig. 3.The flow process of data streams of the present invention is as follows:
S1: the frame message in the reading data flow at first, by the data in the frame message, can judge that this frame belongs to Frame or command frame.Wherein Frame can be divided into complete data frame and non-complete data frame again.
S2: if complete data frame, representing the voice data in this frame is 256 complete points, data can be exported totally.If non-complete data frame is represented voice data less than 256 points in this frame, must read voice data length this moment again from the Frame message, with counting of these length decision output sound data.At last, if to judge from the frame message promptly be not complete data frame, neither non-complete data frame, then this frame is a command frame, then can be from the command frame message reading order identification code the command frame 33, and carry out corresponding program.
S3: if this command frame includes voice data, then with its voice data output.Certainly, the voice data of obtaining from complete data frame or non-complete data frame also is an output sound in this step.
S4: after judging that voice data converts, perhaps in this command frame during no any voice data, promptly finish the action of a frame, can get back to step S1 at this moment and read next frame, repeat same step, till entire stream is finished dealing with.
In sum, in the present invention's the data flow, at the reasonable time point, can insert the order flag of representing an action, reading in the process of data flow, microprocessor can be handled corresponding action according to the form of various frames.If what read is a Frame,,, and, then can carry out a corresponding programs according to the order in this frame if what read is a command frame with voice data output then according to the data in this frame.This program then can go to drive a light, or voice, perhaps mechanical action, and this is applied on the toy, can make the action of toy and voice synchronous fully, does not have the problem of the time drop between action and the sound.In addition, Frame of the present invention system be divided into complete and non-complete the two, and on real the work, also can only adopt non-complete Frame, complete Frame in fact is a special case of non-complete data frame.Certainly, the present invention on can be applicable to audio data stream, also can be applicable to others, imaging data stream for example in like manner, can insert number order, to produce corresponding synchronization action when playing video.
But the present invention those skilled in the art that carry out various variations, but these variations all should comprise within the scope of the appended claims.

Claims (7)

1. a data flow is inserted the method for synchronous message, comprises the following step:
Play data;
With this data conversion is a digital data stream, makes it comprise a Frame of being made up of Frame message and numerical data;
Select the reasonable time point, in this Frame, insert command frame; And
Make up this Frame and this command frame, to produce a data flow that comprises this Frame and this command frame, wherein this Frame be for complete data frame and non-complete data frame one of them.
2. data flow as claimed in claim 1 is inserted the method for synchronous message, it is characterized in that these data are one whole section voice data.
3. data flow as claimed in claim 1 is inserted the method for synchronous message, it is characterized in that this Frame comprises a Frame message and a fragment voice data.
4. data flow as claimed in claim 3 is inserted the method for synchronous message, it is characterized in that this Frame message comprises a frame identification position and a voice data length data, and this frame identification position is used and judged that this frame is this Frame.
5. data flow as claimed in claim 1 is inserted the method for synchronous message, it is characterized in that this command frame comprises a command frame message.
6. data flow as claimed in claim 5 is inserted the method for synchronous message, it is characterized in that, this command frame message comprises a frame identification position and an order identification code, and this frame identification position is to use to judge that this frame is this command frame.
7. data flow as claimed in claim 1 is inserted the method for synchronous message, it is characterized in that the mode of this broadcast is that the form of these data with a sound wave is presented on the screen.
CNB011124032A 2001-03-29 2001-03-29 Method for triggering data stream synchronizing information and inserting synchronizing information Expired - Fee Related CN100428664C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB011124032A CN100428664C (en) 2001-03-29 2001-03-29 Method for triggering data stream synchronizing information and inserting synchronizing information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB011124032A CN100428664C (en) 2001-03-29 2001-03-29 Method for triggering data stream synchronizing information and inserting synchronizing information

Publications (2)

Publication Number Publication Date
CN1378360A CN1378360A (en) 2002-11-06
CN100428664C true CN100428664C (en) 2008-10-22

Family

ID=4659278

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB011124032A Expired - Fee Related CN100428664C (en) 2001-03-29 2001-03-29 Method for triggering data stream synchronizing information and inserting synchronizing information

Country Status (1)

Country Link
CN (1) CN100428664C (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1212589A (en) * 1997-08-02 1999-03-31 三星电子株式会社 Transmitter with increased traffic throughtput in digital mobile telecommunication system and method for operating the same
CN1044544C (en) * 1992-12-21 1999-08-04 索尼公司 Transmitting method, receiving method, and communication method for BI-directional bus system, and BI-directional bus system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1044544C (en) * 1992-12-21 1999-08-04 索尼公司 Transmitting method, receiving method, and communication method for BI-directional bus system, and BI-directional bus system
CN1212589A (en) * 1997-08-02 1999-03-31 三星电子株式会社 Transmitter with increased traffic throughtput in digital mobile telecommunication system and method for operating the same

Also Published As

Publication number Publication date
CN1378360A (en) 2002-11-06

Similar Documents

Publication Publication Date Title
US6064854A (en) Computer assisted interactive entertainment/educational character goods
CN101828382B (en) Synchronization of haptic effect data in a media transport stream
Steinmetz et al. Multimedia: computing, communications and applications
KR101384434B1 (en) Systems and methods for enhanced haptic effects, and recording medium
CN107027046B (en) Audio and video processing method and device for assisting live broadcast
AU5261098A (en) System and method for scheduling and processing image and sound data
KR20050086942A (en) Method and system for augmenting an audio signal
CN111475675B (en) Video processing system
CN100504883C (en) Synchronous plan for multimedia caption and audio frequency description
WO2017062961A1 (en) Methods and systems for interactive multimedia creation
US7169999B2 (en) Digital signal processing method and apparatus thereof, control data generation method and apparatus thereof, and program recording medium
CN104091608B (en) A kind of video editing method and device based on ios device
JP2014146066A (en) Document data generation device, document data generation method, and program
EP1217604A1 (en) Musical sound generator
US7458090B2 (en) Method and apparatus of displaying bit stream data, method and apparatus for generating bit stream data, and storage medium
CN100428664C (en) Method for triggering data stream synchronizing information and inserting synchronizing information
US6353635B1 (en) Method for simultaneously controlling multiple devices using a single communication channel
CN102737688B (en) Display apparatus and display method
CN101471115B (en) Photographing apparatus and photographing method
JP2003529863A (en) Method and apparatus for automatically creating virtual audiovisual sequences in real time from text messages and external events and broadcasting such sequences
CN101656090A (en) Multimedia player, multimedia output method and multimedia system
Collins et al. klipp av: Live algorithmic splicing and audiovisual event capture
CN1916885B (en) Method for synchronous playing image, sound, and text
JP2005099264A (en) Music playing program
JPH04208782A (en) Synchronizing device for image information processing system

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081022

Termination date: 20200329