CN109327519A - Flow data synchronous method, device, equipment and storage medium - Google Patents

Flow data synchronous method, device, equipment and storage medium Download PDF

Info

Publication number
CN109327519A
CN109327519A CN201811188719.7A CN201811188719A CN109327519A CN 109327519 A CN109327519 A CN 109327519A CN 201811188719 A CN201811188719 A CN 201811188719A CN 109327519 A CN109327519 A CN 109327519A
Authority
CN
China
Prior art keywords
flow data
buffer
buffer zone
communication channel
sample frequency
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.)
Granted
Application number
CN201811188719.7A
Other languages
Chinese (zh)
Other versions
CN109327519B (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.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
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 Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201811188719.7A priority Critical patent/CN109327519B/en
Publication of CN109327519A publication Critical patent/CN109327519A/en
Application granted granted Critical
Publication of CN109327519B publication Critical patent/CN109327519B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the present application provides a kind of flow data synchronous method, device, equipment and storage medium.Wherein, method, comprising: during flow data synchronous with external equipment, detect the buffer data size in local cache region, be cached with the flow data synchronous with the external equipment by the first communication channel in the buffer zone;When buffer data size in the buffer zone is unsatisfactory for preset condition, the flow data sample frequency for adjusting the second communication channel between local flow data codec unit and the buffer zone, so that the buffer data size in the buffer zone reaches the preset condition.Technical solution provided by the embodiments of the present application can judge whether the clock source of local and external equipment shifts by the buffer data size in local cache region, and when finding clock skew, local flow data sample frequency is adjusted, to avoid the flow data sample frequency because of both ends it is not reciprocity caused by flow data noise or it is unintelligible the problems such as.

Description

Flow data synchronous method, device, equipment and storage medium
Technical field
This application involves electronic technology fields more particularly to a kind of flow data synchronous method, device, equipment and storage to be situated between Matter.
Background technique
Currently, can be synchronous by establishing communication channel progress data between two electronic equipments, such as: computer can be by it The audio data that ground plays, which is synchronized to wear, shows that equipment plays out;Wearing display equipment can be same by collected audio data It walks and is recorded to computer;The video data synchronization that mobile phone can locally play it is played out to TV.
The clock source of two electronic equipments is independent from each other.In synchronizing process, if extraneous factor causes two electronics The deviation of the clock source of equipment then will lead to the not reciprocity problem of the flow data sample frequency at both ends, cause the flow data played Or record flow data in occur noise or it is unintelligible the problems such as.
Summary of the invention
The application provides a kind of flow data synchronous method, device, equipment and storage medium, for solve in the prior art because Flow data noise caused by the offset of local device and external equipment clock source or it is unintelligible the problems such as.
The one aspect of the application provides a kind of flow data synchronous method, comprising:
During flow data synchronous with external equipment, the buffer data size in local cache region is detected, it is described slow It deposits and is cached with the flow data synchronous with the external equipment by the first communication channel in region;
When buffer data size in the buffer zone is unsatisfactory for preset condition, adjust local flow data codec unit with The flow data sample frequency of the second communication channel between the buffer zone, so that the buffer data size in the buffer zone Reach the preset condition.
Further, the stream of the second communication channel between local flow data codec unit and the buffer zone is adjusted Data sampling frequency, comprising:
Obtain the adjustment amplitude determined according to the flow data sample frequency of first communication channel;
According to the buffer data size in the buffer zone, adjustment direction is determined.
According to the adjustment amplitude and the adjustment direction, the flow data sample frequency of second communication channel is adjusted.
Further, the adjustment amplitude is percent N of the flow data sample frequency of first communication channel, and N is Less than or equal to the positive number of first threshold.
Further, the stream of the second communication channel between local flow data codec unit and the buffer zone is adjusted Data sampling frequency, comprising:
Determine data volume range locating for the buffer data size in the buffer zone;
Using the corresponding flow data sample frequency of the data volume range as the stream of second communication channel adjusted Data sampling frequency.
Further, the above method, further includes:
Judge whether the buffer data size in the buffer zone is located between lower threshold and upper limit threshold;
When buffer data size in the buffer zone is not located between the lower threshold and the upper limit threshold, determine Buffer data size in the buffer zone is unsatisfactory for the preset condition.
Further, the above method, further includes:
By the external equipment by the first communication channel synchronize come flow data be stored in the buffer zone;
When the buffer data size is unsatisfactory for preset condition, local flow data codec unit and the buffer zone are adjusted Between the second communication channel flow data sample frequency, comprising:
When the buffer data size is unsatisfactory for the preset condition, the flow data codec unit is adjusted from the caching Read the corresponding flow data sample frequency of flow data in region.
Further, the above method, further includes:
Flow data in the buffer zone is synchronized to the external equipment by the first communication channel, so that institute External equipment is stated to be recorded;
When the buffer data size is unsatisfactory for preset condition, local flow data codec unit and the buffer zone are adjusted Between the second communication channel flow data sample frequency, comprising:
When the buffer data size is unsatisfactory for the preset condition, the flow data codec unit is adjusted to the caching The corresponding flow data sample frequency of flow data is written in region, wherein the flow data is by the flow data codec unit pair What the local collected original stream data of acquisition unit was handled.
The another aspect of the application provides a kind of flow data synchronizing device.The device, comprising:
Detection module, for detecting the caching in local cache region during flow data synchronous with external equipment Data volume is cached with the flow data synchronous with the external equipment by the first communication channel in the buffer zone;
Module is adjusted, when being unsatisfactory for preset condition for the buffer data size in the buffer zone, adjusts local fluxion According to the flow data sample frequency of the second communication channel between codec unit and the buffer zone, so that the buffer zone In buffer data size reach the preset condition.
The another aspect of the application provides a kind of electronic equipment.The electronic equipment, comprising: memory and processor;Institute State memory for store one or more computer instruction, one or more computer instruction executed by the processor When can be realized step in flow data synchronous method described in any of the above-described.
The another aspect of the application provides a kind of computer readable storage medium for being stored with computer program.The meter Calculation machine program can be realized when being computer-executed:
During flow data synchronous with external equipment, the buffer data size in local cache region is detected, it is described slow It deposits and is cached with the flow data synchronous with the external equipment by the first communication channel in region;
When buffer data size in the buffer zone is unsatisfactory for preset condition, adjust local flow data codec unit with The flow data sample frequency of the second communication channel between the buffer zone, so that the buffer data size in the buffer zone Reach the preset condition.
In technical solution provided by the embodiments of the present application, by the buffer data size in detection local cache region, to sentence Whether disconnected local and external equipment clock shifts;And when finding clock skew, to local flow data codec unit The flow data sample frequency of the second communication channel between buffer zone, i.e., local flow data sample frequency are adjusted, with Balance is local and the flow data sample frequency of external equipment, can avoid because the flow data sample frequency at both ends it is not reciprocity caused by make an uproar Sound or it is unintelligible the problems such as.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this Shen Some embodiments please for those of ordinary skill in the art without creative efforts can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow diagram for the flow data synchronous method that one embodiment of the application provides;
Fig. 2 is the buffer zone schematic diagram that one embodiment of the application provides;
Fig. 3 is the synchronization system that one embodiment of the application provides;
Fig. 4 is the structural block diagram for the flow data synchronizing device that one embodiment of the application provides;
Fig. 5 is the structural block diagram for the electronic equipment that one embodiment of the application provides;
Fig. 6 is the inside configuration structure block diagram for wearing display equipment that one embodiment of the application provides.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
The term used in the embodiment of the present application is only to be not intended to be limiting merely for for the purpose of describing particular embodiments The application.In the embodiment of the present application and the "an" of singular used in the attached claims, " described " and "the" It is also intended to including most forms, unless the context clearly indicates other meaning, " a variety of " generally comprise at least two, but not It excludes to include at least one situation.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, indicate There may be three kinds of relationships, for example, A and/or B, can indicate: individualism A, exist simultaneously A and B, individualism B these three Situation.In addition, character "/" herein, typicallys represent the relationship that forward-backward correlation object is a kind of "or".
Depending on context, word as used in this " if ", " if " can be construed to " ... when " or " when ... " or " in response to determination " or " in response to monitoring ".Similarly, context is depended on, phrase " if it is determined that " or " such as Fruit monitoring (condition or event of statement) " can be construed to " when determining " or " in response to determination " or " when monitoring (statement Condition or event) when " or " in response to monitoring (condition or event of statement) ".
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Include, so that commodity or system including a series of elements not only include those elements, but also including not clear The other element listed, or further include for this commodity or the intrinsic element of system.In the feelings not limited more Under condition, the element that is limited by sentence "including a ...", it is not excluded that in the commodity or system for including the element also There are other identical elements.
Fig. 1 is the flow diagram for the flow data synchronous method that one embodiment of the application provides.As shown in Figure 1, this method Include:
1101, during flow data synchronous with external equipment, the buffer data size in local cache region is detected.
1102, when the buffer data size in the buffer zone is unsatisfactory for preset condition, local flow data encoding and decoding are adjusted The flow data sample frequency of the second communication channel between unit and the buffer zone, so that the caching in the buffer zone Data volume reaches the preset condition.
Wherein, the flow data synchronous with the external equipment by the first communication channel is cached in the buffer zone. Flow data can be by external equipment by the first communication channel synchronize come;Alternatively, flow data can be local be intended to by the One communication channel is synchronized to external equipment.
In a scenario, flow data is written to buffer zone in the first communication channel, and the second communication channel is from buffer zone Read flow data;Under another scene, when the first communication channel reads flow data from buffer zone, the second communication channel is to slow Deposit region write-in flow data.It that is to say: if flow data is that external equipment is synchronized by the first communication channel come the first communication The flow data sample frequency in channel refers to the first communication channel to the corresponding flow data sampling frequency of buffer zone write-in flow data Rate, and the flow data sample frequency of the second communication channel refers to that the second communication channel is corresponding from buffer zone reading flow data Flow data sample frequency.If flow data is that local device is intended to be synchronized to external equipment by the first communication channel, first is logical The flow data sample frequency in letter channel refers to that the first communication channel reads the corresponding flow data sampling of flow data from buffer zone Frequency, and the flow data sample frequency of the second communication channel refers to that the second communication channel is corresponding to buffer zone write-in flow data Flow data sample frequency.
First communication channel can be with are as follows: usb communication channel, bluetooth communication channel or wifi communication channel, the application are implemented Example is not especially limited this.
In above-mentioned 1101, flow data is one group of sequence, a large amount of, data sequence that continuously reaches, such as: audio data, view Frequency according to etc..During flow data synchronous with external equipment, can buffer data size in real-time detection local cache region, To guarantee to find the case where buffer data size in buffer zone is unsatisfactory for preset condition in time.
Since the spatial cache size of buffer zone is fixed value, and buffer zone is usually First Input First Output, can root The size of buffer data size is determined according to the cache tag position in buffer zone.Cache tag bit flag it is last in buffer zone It is stored in the data entered location in the queue.
As shown in Fig. 2, buffer zone is a First Input First Output, the outlet port of queue is 1, and queue entries position is 20.When cache tag position is 4, buffer data size is 4;When cache tag position is 16, buffer data size is 16.
It may include upper limit threshold and/or lower threshold in above-mentioned 1102, in preset condition.It can be in advance according to buffer zone Spatial cache size sets preset condition.Such as: the spatial cache size of buffer zone is X, and lower threshold is set as X/5 (namely correspond at the position of buffer zone 1/5th, such as: in Fig. 2 at 4 position), upper limit threshold is set as 4X/5 (namely correspond at the position of buffer zone 4/5ths, such as: in Fig. 2 at 16 position).The setting of preset condition can root It is set according to actual conditions, the embodiment of the present application is not especially limited this.
When preset condition only includes upper limit threshold, judge whether the buffer data size of buffer zone is greater than upper limit threshold; If the buffer data size of buffer zone is greater than upper limit threshold, determine that the buffer data size in buffer zone is unsatisfactory for default item Part;If the buffer data size of buffer zone is less than or equal to upper limit threshold, determine that the buffer data size in buffer zone meets Preset condition.
When only including lower threshold in preset condition, under judging whether the buffer data size of buffer zone is less than or equal to Limit threshold value;If the buffer data size of buffer zone is less than or equal to lower threshold, the buffer data size in buffer zone is determined It is unsatisfactory for preset condition;If the buffer data size of buffer zone is greater than lower threshold, determine data cached in buffer zone Amount meets preset condition.
When including lower threshold and upper limit threshold in preset condition, then judge whether the buffer data size of buffer zone is located at Between lower threshold and upper limit threshold;When the buffer data size of buffer zone is between lower threshold and upper limit threshold, determine Buffer data size in buffer zone meets preset condition;The buffer data size of buffer zone is not located at lower threshold and upper limit threshold When between value, determine that the buffer data size in buffer zone is unsatisfactory for preset condition.Specifically, it is located at lower threshold and upper limit threshold Refer to that buffer data size is greater than lower threshold and is less than or equal to upper limit threshold between value.
When buffer data size in buffer zone is unsatisfactory for preset condition, adjust local flow data codec unit with it is described The flow data sample frequency of the second communication channel between buffer zone may make the speed to buffer zone write-in flow data in this way Rate reaches dynamic equilibrium with the rate for reading flow data from buffer zone, so that the data volume in buffer zone reaches default Condition.Adjustment in this way can guarantee that the data volume in buffer zone is in dynamic stability in entire data synchronization process In.
In technical solution provided by the embodiments of the present application, by the buffer data size in detection local cache region, to sentence Whether disconnected local and external equipment clock source shifts;And when finding clock source offset, to local flow data encoding and decoding The flow data sample frequency of the second communication channel between unit and buffer zone, i.e., local flow data sample frequency are adjusted It is whole, to balance the flow data sample frequency of local and external equipment, can avoid leading because the flow data sample frequency at both ends is not reciprocity The flow data noise of cause or it is unintelligible the problems such as.
It should be noted that the first communication channel is PERCOM peripheral communication channel, local device is difficult to control effectively to it, Therefore, what is adjusted in the embodiment of the present application is the flow data sample frequency of the second communication channel inside local device, not only may be used Reduce adjustment difficulty, moreover it is possible to improve the validity of adjustment.
When practical application, the adjustment amplitude of the flow data sample frequency of the second communication channel can be default adjustment amplitude; Alternatively, the offset of preset condition is deviateed to determine according to the buffer data size in buffer zone, and such as: buffer data size deviates The offset of preset condition is bigger, and adjustment amplitude is bigger;Alternatively, being determined according to the flow data sample frequency of the first communication channel Adjustment amplitude.It should be noted that determining that adjustment amplitude can be in data according to the flow data sample frequency of the first communication channel Starting calculates when starting synchronous, calculates alternatively, starting when needing to be adjusted.Due in buffer zone buffer data size it is big It is small related to the flow data sample frequency of the first communication channel, it is obtained according to the determination of the flow data sample frequency of the first communication channel Adjustment amplitude it is inevitable more reasonable, may make the buffer data size in buffer zone to reach preset condition as early as possible.
In a kind of achievable scheme, " local flow data codec unit and the buffer area are adjusted in above-mentioned 1102 Following steps can be used specifically to realize in the flow data sample frequency of the second communication channel between domain ":
S11, the adjustment amplitude determined according to the flow data sample frequency of first communication channel is obtained.
S12, according to the buffer data size in the buffer zone, determine adjustment direction.
S13, according to the adjustment amplitude and the adjustment direction, the flow data for adjusting second communication channel samples frequency Rate.
In above-mentioned S11, if adjustment amplitude is calculated in the synchronous beginning of data, directly acquire;If the amplitude of adjustment is not It is computed, is then calculated according to the flow data sample frequency of the first communication channel.The flow data of first communication channel is adopted Sample frequency is bigger, and adjustment amplitude is also bigger.
Specifically, adjustment amplitude can for the first communication channel flow data sample frequency percent N, N be less than or Equal to the positive number of first threshold.First threshold can be set according to actual needs.Such as: N 1.
In above-mentioned S12, flow data and the second communication channel is written from buffer area to buffer zone in the first communication channel Domain is read under the scene of flow data, when the buffer data size in buffer zone is greater than the upper limit threshold in preset condition, will be adjusted Direction is determined as increasing;And/or the buffer data size in buffer zone be less than or equal to preset condition in lower threshold when, Then adjustment direction is determined as reducing.
Flow data and the first communication channel is written to buffer zone in the second communication channel and reads fluxion from buffer zone According to scene under, buffer data size in buffer zone is greater than the upper limit threshold in preset condition, then is determined as adjustment direction It reduces;And/or the buffer data size in buffer zone is less than or equal to the lower threshold in preset condition, then by adjustment direction It is determined as increasing.
In above-mentioned S13, according to adjustment amplitude and adjustment direction, the flow data for adjusting second communication channel samples frequency Rate.
For example: adjustment amplitude is akHz, and adjustment direction is to increase, and the flow data sample frequency of the second communication channel is 48kHz, the flow data sample frequency of the second communication channel adjusted are as follows: (48+a) kHz.
In another achievable scheme, " local flow data codec unit and the caching are adjusted in above-mentioned 1102 Following steps can be used specifically to realize in the flow data sample frequency of the second communication channel between region ":
S21, data volume range locating for buffer data size in the buffer zone is determined.
S22, using the corresponding flow data sample frequency of the data volume range as second communication channel adjusted Flow data sample frequency.
In above-mentioned S21, the memory space of buffer zone can be divided into multiple data volume ranges in advance, such as: it divides At three data volume ranges.
For example: the spatial cache size of buffer zone is the first numerical value, includes lower threshold in preset condition and upper Limit threshold value.Can be by zero to the first data volume range is used as between lower threshold, it will be between lower threshold and upper limit threshold as the Two data volume ranges will be used as third data volume range between upper limit threshold and the first numerical value.First data volume range is corresponding Flow data sample frequency is A, the corresponding flow data sample frequency of the second data volume range is B, third data volume range is corresponding Flow data sample frequency is C.
For example:
Flow data and the second communication channel is written to buffer zone in the first communication channel and reads fluxion from buffer zone According to scene under, the corresponding flow data sample frequency of the first data volume range is that (48-a) kHz, the second data volume range are corresponding Flow data sample frequency is 48kHz, the corresponding flow data sample frequency of third data volume range is (48+a) kHz.
Flow data and the first communication channel is written to buffer zone in the second communication channel and reads fluxion from buffer zone According to scene under, the corresponding flow data sample frequency of the first data volume range is that (48+a) kHz, the second data volume range are corresponding Flow data sample frequency is 48kHz, the corresponding flow data sample frequency of third data volume range is (48-a) kHz.
Wherein, a is positive number, and the numerical value of a can also be determined according to the flow data sample frequency of the first communication channel, specifically may be used Referring to the determination process for adjusting amplitude in above-described embodiment, details are not described herein.
In one embodiment, the above method further include:
1103, by the external equipment by the first communication channel synchronize come flow data be stored in the buffer area Domain.
Correspondingly, " when the buffer data size is unsatisfactory for preset condition, adjusting local flow data encoding and decoding in above-mentioned 1102 The flow data sample frequency of the second communication channel between unit and the buffer zone ", specifically:
When the buffer data size is unsatisfactory for the preset condition, the flow data codec unit is adjusted from the caching Read the corresponding flow data sample frequency of flow data in region.
In the present embodiment, the flow data that external equipment is played is synchronized to local, local to pass through flow data encoding and decoding Unit is decoded to the flow data come is synchronized, and loudspeaker, display unit or earphone can be transmitted to after decoding again to synchronize It plays.
In another embodiment, the above method further include:
1104, the flow data in the buffer zone is synchronized to the external equipment by the first communication channel, So that the external equipment is recorded.
Correspondingly, " when the buffer data size is unsatisfactory for preset condition, adjusting local flow data encoding and decoding in above-mentioned 1102 The flow data sample frequency of the second communication channel between unit and the buffer zone ", specifically:
When the buffer data size is unsatisfactory for the preset condition, the flow data codec unit is adjusted to the caching The corresponding flow data sample frequency of flow data is written in region, wherein the flow data is by the flow data codec unit pair What the local collected original stream data of acquisition unit was handled.
In the present embodiment, local that the collected flow data of local acquisition unit is synchronized to external equipment, by outside Equipment is recorded.Local acquisition unit can be camera or microphone.
It describes in detail this programme for display equipment synchronized audio data below in conjunction with computer and wearing:
As shown in figure 3, wear display equipment be virtual reality capital equipment, for experiencer provide visual pattern with And audio data.The audio data for wearing display equipment 100 is obtained from computer 200.When computer 200 is when playing music, lead to Cross USB interface 300 (i.e. the first communication channel) audio data is synchronized to wear display equipment 100, USB Audio module 1006 Audio data write-in is worn to the buffer zone in the main control chip 1001 inside display equipment 100, is worn in display equipment 100 The audio data of buffer zone is transferred to by the main control chip 1001 in portion by I2S communication channel 400 (i.e. the second communication channel) Audio codec 1002 (i.e. local flow data codec unit), after audio codec 1002 is decoded audio data It is sent to local loudspeaker (speaker) unit 1003 or earphone (Headphone) unit 1004 plays out.In synchronizing process In, if detecting, the buffer data size of buffer zone is greater than upper limit threshold, increases the sample frequency of I2S communication channel;If inspection The buffer data size for finding buffer zone is less than or equal to lower threshold, then reduces the sample frequency of I2S communication channel.
Currently, being further typically provided with microphone 1005 on head-mounted display 100, microphone 1005 can be by collected audio Data are transferred to the audio codec 1002 for wearing display equipment 100, to be encoded by audio codec 1002 and be incited somebody to action Audio data after coding is written by I2S communication channel 400 to buffer zone, is worn display equipment 100 and is passed through USB interface again The audio data of buffer zone is synchronized to computer 200 by 300, and computer 200 is recorded.In synchronizing process, if detecting slow The buffer data size for depositing region is greater than upper limit threshold, then reduces the sample frequency of I2S communication channel;If checking buffer zone Buffer data size is less than or equal to lower threshold, then increases the sample frequency of I2S communication channel.
In conclusion when extraneous factor causes the clock of local device or external equipment to change, it is logical by adjusting second The flow data sample frequency for believing channel, to improve the precision of sampling frequency synchronization.Can effectively avoid in audio occur noise or The unsharp problem of person, improves acoustical quality.Also, the embodiment of the present application realizes the synchronization of clock by software approach, The problems such as avoiding through peripheral circuit hardware design difficulty caused by realizing and hardware cost.
Fig. 4 shows the structural schematic diagram for the flow data synchronizing device that the another embodiment of the application provides.As shown in figure 4, The device, comprising: detection module 401 and adjustment module 402.Wherein,
Detection module 401, it is slow in local cache region for detecting during flow data synchronous with external equipment Deposit data amount is cached with the flow data synchronous with the external equipment by the first communication channel in the buffer zone.
Module 402 is adjusted, when being unsatisfactory for preset condition for the buffer data size in the buffer zone, adjusts local stream The flow data sample frequency of the second communication channel between data codec unit and the buffer zone, so that the buffer area Buffer data size in domain reaches the preset condition.
In technical solution provided by the embodiments of the present application, by the buffer data size in detection local cache region, to sentence Whether disconnected local and external equipment clock shifts;And when finding clock skew, to local flow data codec unit The flow data sample frequency of the second communication channel between buffer zone, i.e., local flow data sample frequency are adjusted, with Balance is local and the flow data sample frequency of external equipment, can avoid because the flow data sample frequency at both ends it is not reciprocity caused by make an uproar Sound or it is unintelligible the problems such as.
Further, above-mentioned adjustment module 402, comprising:
Acquiring unit, for obtaining the adjustment amplitude determined according to the flow data sample frequency of first communication channel;
First determination unit, for determining adjustment direction according to the buffer data size in the buffer zone;
Adjustment unit, for adjusting the stream of second communication channel according to the adjustment amplitude and the adjustment direction Data sampling frequency.
Further, the adjustment amplitude is percent N of the flow data sample frequency of first communication channel, and N is Less than or equal to the positive number of first threshold.
Further, module 402 is adjusted, comprising:
Second determination unit, for determining data volume range locating for the buffer data size in the buffer zone;And it will The corresponding flow data sample frequency of the data volume range samples frequency as the flow data of second communication channel adjusted Rate.
Further, above-mentioned apparatus, further includes:
Whether judgment module, the buffer data size for judging in the buffer zone are located at lower threshold and upper limit threshold Between;
Determination module is not located at the lower threshold and the upper limit threshold for the buffer data size in the buffer zone When between value, determine that the buffer data size in the buffer zone is unsatisfactory for the preset condition.
Further, above-mentioned apparatus, further includes:
Cache module, for by the external equipment by the first communication channel synchronize come flow data deposit described in Buffer zone;
Above-mentioned adjustment module 402, is specifically used for:
When the buffer data size is unsatisfactory for the preset condition, the flow data codec unit is adjusted from the caching Read the corresponding flow data sample frequency of flow data in region.
Further, above-mentioned apparatus, further includes:
First synchronization module, for the flow data in the buffer zone to be synchronized to institute by the first communication channel External equipment is stated, so that the external equipment is recorded;
Above-mentioned adjustment module 402, is specifically used for:
When the buffer data size is unsatisfactory for the preset condition, the flow data codec unit is adjusted to the caching The corresponding flow data sample frequency of flow data is written in region, wherein the flow data is by the flow data codec unit pair What the local collected original stream data of acquisition unit was handled.
What needs to be explained here is that: synchronizing device provided by the above embodiment can be realized to be described in above-mentioned each method embodiment Technical solution, above-mentioned each module or unit specific implementation principle can be found in the corresponding contents in above-mentioned each method embodiment, Details are not described herein again.
Fig. 5 shows the electronic equipment that the another embodiment of the application provides.As shown in figure 5, the electronic equipment includes processing Device 501 and memory 502, the memory 502, which is used to store, supports processor 501 to execute the synchronization that the various embodiments described above provide The program of method, the processor 501 are configurable for executing the program stored in the memory 502.
Described program includes one or more computer instruction, wherein described in one or more computer instruction supplies Processor 501, which calls, to be executed.One or more computer instruction can be realized the above-mentioned side of synchronization when being executed by processor 501 Step in method.
Memory 502 is used as a kind of non-volatile computer readable storage medium storing program for executing, can be used for storing non-volatile software journey Sequence, non-volatile computer executable program and module, as the corresponding program instruction of synchronous method in the embodiment of the present invention/ Module (for example, attached detection module shown in Fig. 4 401, adjustment module 402).Processor 501 is stored in memory by operation Non-volatile software program, instruction and module in 502, thereby executing the various function application and number for wearing display equipment According to processing, that is, realize the synchronous method of above method embodiment.
The processor 501 is used for: during flow data synchronous with external equipment, being detected in local cache region Buffer data size is cached with the flow data synchronous with the external equipment by the first communication channel in the buffer zone;
When buffer data size in the buffer zone is unsatisfactory for preset condition, adjust local flow data codec unit with The flow data sample frequency of the second communication channel between the buffer zone, so that the buffer data size in the buffer zone Reach the preset condition.
Method provided by the embodiment of the present invention can be performed in processor 501, have the corresponding functional module of execution method and Beneficial effect, the not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present application.
When above-mentioned electronic equipment is to wear display equipment 100, Fig. 6 shows the inside configuration for wearing display equipment 100 Structural schematic diagram.
Display unit 101 may include display panel, display panel setting user oriented face on wearing display equipment 100 The side surface in portion can be an entire panel or to respectively correspond the left panel of user's left eye and right eye and right panel.Display Panel can be that electroluminescent (EL) element, liquid crystal display or miniscope with similar structure or retina can It directly displays or similar laser scan type display.
Virtual image optical unit 102 allows user to observe figure shown by display unit 101 by the virtual image of amplification Picture.As the display image being output on display unit 101, can be from content reproducing device (Blu-ray Disc or DVD broadcasting Device) or streaming media server provide virtual scene image or the reality scene shot using external camera 110 figure Picture.In some embodiments, virtual image optical unit 102 may include lens unit, for example, spherical lens, non-spherical lens, Fresnel Lenses etc..
Input operating unit 103 include at least one be used to execute input operation operating member, such as key, button, Switch or other components with similar functions, are received user instructions by operating member, and are exported to control unit 107 Instruction.
State information acquisition unit 104 is used to obtain the status information that wearing wears the user of display equipment 100.State letter Ceasing acquiring unit 104 may include various types of sensors, be used for itself detecting state information, and can pass through communication unit 105 obtain status information from external equipment (such as other multi-functional terminal ends of smart phone, watch and user's wearing).State letter Cease the location information and/or posture information on the head of the available user of acquiring unit 104.State information acquisition unit 104 can To include gyro sensor, acceleration transducer, global positioning system (GPS) sensor, geomagnetic sensor, Doppler effect Sensor, infrared sensor, one or more in radio-frequency field intensity sensor.In addition, state information acquisition unit 104 obtains The status information for wearing the user of display equipment 100 is taken, such as obtains the mode of operation of such as user (whether user, which dresses, is worn Display equipment 100), the action state of user (it is such as static, walk, run and suchlike moving condition, hand or finger tip Posture, eyes open or closed state, direction of visual lines, pupil size), (it is shown whether user is immersed in observation to the state of mind Image and the like) or even physiological status.
Communication unit 105 executes the coding with the communication process of external device (ED), modulation and demodulation processing and signal of communication And decoding process.In addition, control unit 107 can send transmission data from communication unit 105 to external device (ED).Communication mode can To be wired or wireless, such as mobile high definition link (MHL) or universal serial bus (USB), high-definition media interface (HDMI), the mesh network of Wireless Fidelity (Wi-Fi), Bluetooth communication or low-power consumption bluetooth communication and IEEE802.11s standard Deng.In addition, communication unit 105 can be according to wideband code division multiple access (W-CDMA), long term evolution (LTE) and similar standard operation Cellular radio transceiver.
In some embodiments, wearing display equipment 100 can also include storage unit, and storage unit 106 is arranged to have There is the mass-memory unit of solid state drive (SSD) etc..In some embodiments, storage unit 106 can store application program Or various types of data.For example, user can store using the content that display equipment 100 is watched is worn in storage unit 106 In.
In some embodiments, wearing display equipment 100 can also include control unit, and control unit 107 may include meter Calculation machine processing unit (CPU) or other equipment with similar functions.In some embodiments, control unit 107 can be used for The application program or control unit 107 for executing the storage of storage unit 106 can be also used for executing some embodiments public affairs of the application The circuit of the method, function and operation opened.
Image processing unit 108 is used to execute signal processing, such as related to the picture signal exported from control unit 107 Image quality correction, and by its conversion of resolution be the resolution ratio according to the screen of display unit 101.Then, display is driven Moving cell 109 successively selects every row pixel of display unit 101, and successively scans every row pixel of display unit 101 line by line, because And provide the picture element signal based on the picture signal through signal processing.
In some embodiments, wearing display equipment 100 can also include external camera.External camera 110 can be set Display 100 main body front surface of equipment is worn, external camera 110 can be one or more.External camera 110 available three Information is tieed up, and is also used as range sensor.In addition, the position sensitive detector of reflection signal of the detection from object (PSD) or other kinds of range sensor can be used together with external camera 110.External camera 110 and Distance-sensing Device can be used for detecting body position, posture and the shape for wearing the user of display equipment 100.In addition, user under certain condition 110 direct viewing of external camera or preview reality scene can be passed through.
In some embodiments, wearing display equipment 100 can also include sound processing unit, and sound processing unit 111 can To execute the sound quality correction of voice signal export from control unit 107 or sound amplifies and input audio signal Signal processing etc..Then, voice input/output unit 112 is output to the outside sound and input from wheat after acoustic processing The sound of gram wind.
It should be noted that structure or component in Fig. 6 shown in dotted line frame can independently of wear display equipment 100 it Outside, for example, can be set in the outside manage system (such as computer system) in wear show equipment 100 be used cooperatively;Or Person, structure or component shown in dotted line frame can be set on wearing 100 inside of display equipment or surface.
Finally, it should be noted that above embodiments are only to illustrate the technical solution of the application, rather than its limitations;Although The application is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, each embodiment technical solution of the application that it does not separate the essence of the corresponding technical solution spirit and Range.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.

Claims (10)

1. a kind of flow data synchronous method characterized by comprising
During flow data synchronous with external equipment, the buffer data size in local cache region, the buffer area are detected The flow data synchronous with the external equipment by the first communication channel is cached in domain;
When buffer data size in the buffer zone is unsatisfactory for preset condition, adjust local flow data codec unit with it is described The flow data sample frequency of the second communication channel between buffer zone, so that the buffer data size in the buffer zone reaches The preset condition.
2. the method according to claim 1, wherein adjusting local flow data codec unit and the buffer area The flow data sample frequency of the second communication channel between domain, comprising:
Obtain the adjustment amplitude determined according to the flow data sample frequency of first communication channel;
According to the buffer data size in the buffer zone, adjustment direction is determined;
According to the adjustment amplitude and the adjustment direction, the flow data sample frequency of second communication channel is adjusted.
3. according to the method described in claim 2, it is characterized in that, the adjustment amplitude is the fluxion of first communication channel It is the positive number less than or equal to first threshold according to percent N of sample frequency, N.
4. the method according to claim 1, wherein adjusting local flow data codec unit and the buffer area The flow data sample frequency of the second communication channel between domain, comprising:
Determine data volume range locating for the buffer data size in the buffer zone;
Using the corresponding flow data sample frequency of the data volume range as the flow data of second communication channel adjusted Sample frequency.
5. method according to claim 1 to 4, which is characterized in that further include:
Judge whether the buffer data size in the buffer zone is located between lower threshold and upper limit threshold;
When buffer data size in the buffer zone is not located between the lower threshold and the upper limit threshold, described in judgement Buffer data size in buffer zone is unsatisfactory for the preset condition.
6. method according to claim 1 to 4, which is characterized in that further include:
By the external equipment by the first communication channel synchronize come flow data be stored in the buffer zone;
When the buffer data size is unsatisfactory for preset condition, adjust between local flow data codec unit and the buffer zone The second communication channel flow data sample frequency, comprising:
When the buffer data size is unsatisfactory for the preset condition, the flow data codec unit is adjusted from the buffer zone Read the corresponding flow data sample frequency of flow data.
7. method according to claim 1 to 4, which is characterized in that further include:
Flow data in the buffer zone is synchronized to the external equipment by the first communication channel, so that described outer Portion's equipment is recorded;
When the buffer data size is unsatisfactory for preset condition, adjust between local flow data codec unit and the buffer zone The second communication channel flow data sample frequency, comprising:
When the buffer data size is unsatisfactory for the preset condition, the flow data codec unit is adjusted to the buffer zone The corresponding flow data sample frequency of flow data is written, wherein the flow data is by the flow data codec unit to local The collected original stream data of acquisition unit is handled.
8. a kind of flow data synchronizing device characterized by comprising
Detection module, it is data cached in local cache region for detecting during flow data synchronous with external equipment It measures, is cached with the flow data synchronous with the external equipment by the first communication channel in the buffer zone;
Module is adjusted, when being unsatisfactory for preset condition for the buffer data size in the buffer zone, local flow data is adjusted and compiles The flow data sample frequency of the second communication channel between decoding unit and the buffer zone, so that in the buffer zone Buffer data size reaches the preset condition.
9. a kind of electronic equipment, which is characterized in that including memory and processor;The memory is for storing one or more Computer instruction, one or more computer instruction can be realized the claims 1-7 when being executed by the processor Step in any one flow data synchronous method.
10. a kind of computer readable storage medium for being stored with computer program, which is characterized in that the computer program is counted Calculation machine can be realized when executing:
During flow data synchronous with external equipment, the buffer data size in local cache region, the buffer area are detected The flow data synchronous with the external equipment by the first communication channel is cached in domain;
When buffer data size in the buffer zone is unsatisfactory for preset condition, adjust local flow data codec unit with it is described The flow data sample frequency of the second communication channel between buffer zone, so that the buffer data size in the buffer zone reaches The preset condition.
CN201811188719.7A 2018-10-12 2018-10-12 Stream data synchronization method, device, equipment and storage medium Active CN109327519B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811188719.7A CN109327519B (en) 2018-10-12 2018-10-12 Stream data synchronization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811188719.7A CN109327519B (en) 2018-10-12 2018-10-12 Stream data synchronization method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109327519A true CN109327519A (en) 2019-02-12
CN109327519B CN109327519B (en) 2021-07-13

Family

ID=65261451

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811188719.7A Active CN109327519B (en) 2018-10-12 2018-10-12 Stream data synchronization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109327519B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447253A (en) * 2020-02-28 2020-07-24 清华大学 Buffer management method, system, device and storage medium
WO2022048247A1 (en) * 2020-09-02 2022-03-10 深圳市朗强科技有限公司 Clock frequency synchronization method and apparatus, device, and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5442747A (en) * 1993-09-27 1995-08-15 Auravision Corporation Flexible multiport multiformat burst buffer
CN101416510A (en) * 2006-03-29 2009-04-22 索尼爱立信移动通讯有限公司 Method and system for managing audio data
CN104394346A (en) * 2014-11-24 2015-03-04 龙迅半导体科技(合肥)有限公司 Clock signal control method and device
CN105047209A (en) * 2015-08-13 2015-11-11 珠海市杰理科技有限公司 Bluetooth audio playing synchronization method and apparatus and Bluetooth audio playing apparatus
CN105812902A (en) * 2016-03-17 2016-07-27 联发科技(新加坡)私人有限公司 Data play method, device and system
CN106330379A (en) * 2016-09-27 2017-01-11 华为技术有限公司 Service clock transparent transmission system in optical transmission network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5442747A (en) * 1993-09-27 1995-08-15 Auravision Corporation Flexible multiport multiformat burst buffer
CN101416510A (en) * 2006-03-29 2009-04-22 索尼爱立信移动通讯有限公司 Method and system for managing audio data
CN104394346A (en) * 2014-11-24 2015-03-04 龙迅半导体科技(合肥)有限公司 Clock signal control method and device
CN105047209A (en) * 2015-08-13 2015-11-11 珠海市杰理科技有限公司 Bluetooth audio playing synchronization method and apparatus and Bluetooth audio playing apparatus
CN105812902A (en) * 2016-03-17 2016-07-27 联发科技(新加坡)私人有限公司 Data play method, device and system
CN106330379A (en) * 2016-09-27 2017-01-11 华为技术有限公司 Service clock transparent transmission system in optical transmission network

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111447253A (en) * 2020-02-28 2020-07-24 清华大学 Buffer management method, system, device and storage medium
CN111447253B (en) * 2020-02-28 2021-06-25 清华大学 Buffer management method, system, device and storage medium
WO2022048247A1 (en) * 2020-09-02 2022-03-10 深圳市朗强科技有限公司 Clock frequency synchronization method and apparatus, device, and computer storage medium
CN114205065A (en) * 2020-09-02 2022-03-18 深圳市朗强科技有限公司 Clock frequency synchronization method, device, equipment and computer storage medium

Also Published As

Publication number Publication date
CN109327519B (en) 2021-07-13

Similar Documents

Publication Publication Date Title
US11100714B2 (en) Adjusting video rendering rate of virtual reality content and processing of a stereoscopic image
CN109522426B (en) Multimedia data recommendation method, device, equipment and computer readable storage medium
US8471783B2 (en) Systems and methods for adaptive transmission of data
US10534428B2 (en) Image processing device and image processing method, display device and display method, and image display system
US20150334486A1 (en) Glasses apparatus and method for controlling glasses apparatus, audio apparatus and method for providing audio signal and display apparatus
US8856815B2 (en) Selective adjustment of picture quality features of a display
KR20140113361A (en) Apparatus and method controlling display
US8914818B2 (en) Media device power management techniques
US10242689B2 (en) Position-robust multiple microphone noise estimation techniques
CN105049932B (en) It is a kind of to change equipment, the method and apparatus that audio-video is presented
CN109002164A (en) It wears the display methods for showing equipment, device and wears display equipment
CN102655576A (en) Information processing apparatus, information processing method, and program
CN109327519A (en) Flow data synchronous method, device, equipment and storage medium
US20230049339A1 (en) Low power machine learning using real-time captured regions of interest
US20240045502A1 (en) Peripheral luminance or color remapping for power saving
CN108021346A (en) VR helmets show method, VR helmets and the system of image
JP7400721B2 (en) Information processing device, information processing method and program
CN109696959A (en) A kind of picture exhibition method, equipment and storage medium
CN107844177A (en) Device parameter method of adjustment, device and electronic equipment
CN112203020B (en) Method, device and system for configuring camera configuration parameters of terminal equipment
CN107743223A (en) Image write-in control method, device and electronic equipment
CN109739737A (en) Wear method of testing delay, equipment and the computer storage medium of display equipment
WO2019056577A1 (en) Method for displaying high definition image in vr integrated machine, and vr integrated machine
WO2023019247A1 (en) Low power machine learning using real-time captured regions of interest
CN114556188A (en) Personal device assisted point of regard optimization for TV streaming and rendered content

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20201028

Address after: 261061 north of Yuqing East Street, east of Dongming Road, Weifang High tech Zone, Weifang City, Shandong Province (Room 502, Geer electronic office building)

Applicant after: GoerTek Optical Technology Co.,Ltd.

Address before: 266104 Laoshan Qingdao District North House Street investment service center room, Room 308, Shandong

Applicant before: GOERTEK TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
CB02 Change of applicant information

Address after: 261061 east of Dongming Road, north of Yuqing East Street, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronics office building)

Applicant after: GoerTek Optical Technology Co.,Ltd.

Address before: 261061 east of Dongming Road, north of Yuqing East Street, Weifang High tech Zone, Weifang City, Shandong Province (Room 502, Geer electronics office building)

Applicant before: GoerTek Optical Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20221121

Address after: 266104 No. 500, Songling Road, Laoshan District, Qingdao, Shandong

Patentee after: GOERTEK TECHNOLOGY Co.,Ltd.

Address before: 261061 east of Dongming Road, north of Yuqing East Street, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronics office building)

Patentee before: GoerTek Optical Technology Co.,Ltd.

TR01 Transfer of patent right