CN104883391B - A kind of data transfer control method and equipment - Google Patents

A kind of data transfer control method and equipment Download PDF

Info

Publication number
CN104883391B
CN104883391B CN201510188209.XA CN201510188209A CN104883391B CN 104883391 B CN104883391 B CN 104883391B CN 201510188209 A CN201510188209 A CN 201510188209A CN 104883391 B CN104883391 B CN 104883391B
Authority
CN
China
Prior art keywords
audio data
equipment
external network
internal network
transmission path
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.)
Active
Application number
CN201510188209.XA
Other languages
Chinese (zh)
Other versions
CN104883391A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510188209.XA priority Critical patent/CN104883391B/en
Publication of CN104883391A publication Critical patent/CN104883391A/en
Application granted granted Critical
Publication of CN104883391B publication Critical patent/CN104883391B/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/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The embodiment of the invention discloses a kind of data transfer control method and equipment.Wherein, this method comprises: receiving the audio data that main equipment is sent by internal network, and when playing audio data, the state parameter of internal network transport is detected;It is preset for triggering the trigger condition for switching to external network and receiving audio data to judge whether the state parameter of the internal network transport meets;If so, the transmission path of audio data is switched to the transmission path by the received audio data of external network after the audio data plays.Implementing the embodiment of the present invention can be improved the efficiency of transmission of audio data.

Description

A kind of data transfer control method and equipment
Technical field
The present invention relates to Internet technical field more particularly to a kind of data transfer control method and equipment.
Background technique
With the raising of people's quality of the life, more and more users like placing multiple playback equipment (such as sounds at home Case), this multiple playback equipment constitutes one family music system.Playback equipment in this house music system simultaneously with it is wireless Routing device and internal network keep connection.Make in general, user can select a playback equipment in this house music system For main equipment, and using other playback equipments as from equipment, main equipment directly passes through wireless routing device from external web services Device obtains audio data, and the audio data obtained from equipment is mainly to receive what main equipment was sent by internal network.For In the above-mentioned audio data acquisition modes from equipment, if the transmission quality of current internal network is poor, or have multiple from equipment Audio data is downloaded from external network server simultaneously and occupies massive band width, will affect the transmission of audio data, is reduced and is passed Defeated efficiency.
Summary of the invention
The embodiment of the invention provides a kind of data transfer control method and equipment, and the transmission effect of audio data can be improved Rate.
First aspect of the embodiment of the present invention discloses a kind of data transfer control method, comprising:
The audio data that main equipment is sent is received by internal network, and when playing audio data, detects intranet The state parameter of network transmission;
Judge whether the state parameter of the internal network transport meets preset to switch to external network for triggering and connect Receive the trigger condition of audio data;
If so, the transmission path of audio data is switched to and passes through extranets after the audio data plays The transmission path of the received audio data of network.
Second aspect of the embodiment of the present invention discloses a kind of from equipment, comprising:
Detection unit, for receiving the audio data that main equipment is sent, and playing audio data by internal network When, detect the state parameter of internal network transport;
Judging unit, for judging it is preset for triggering switching whether the state parameter of the internal network transport meets The trigger condition of audio data is received to external network;
Switch unit, for judging that the state parameter of the internal network transport meets preset use when the judging unit When triggering switches to external network and receives the trigger condition of audio data, after the audio data plays, by audio The transmission path of data is switched to the transmission path by the received audio data of external network.
In the embodiment of the present invention, the audio data that main equipment is sent is received from equipment by internal network, and play audio When data, the state parameter of internal network transport is detected, judges whether the state parameter of internal network transport meets preset use The trigger condition that external network receives audio data is switched in triggering, if so, after audio data plays, by audio The transmission path of data is switched to the transmission path by the received audio data of external network.Through the embodiment of the present invention, from After audio data plays, the transmission path of audio data is cut when judging that internal network transport is second-rate for equipment It is changed to the transmission path by the received audio data of external network, directly to download audio data from external network server, So as to improve the efficiency of transmission of audio data.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of structural schematic diagram of system architecture disclosed by the embodiments of the present invention;
Fig. 2 is a kind of flow diagram of data transfer control method disclosed by the embodiments of the present invention;
Fig. 3 is the flow diagram of another data transfer control method disclosed by the embodiments of the present invention;
Fig. 4 is the flow diagram of another data transfer control method disclosed by the embodiments of the present invention;
Fig. 5 is a kind of structural schematic diagram from equipment disclosed by the embodiments of the present invention;
Fig. 6 is another structural schematic diagram from equipment disclosed by the embodiments of the present invention;
Fig. 7 is another structural schematic diagram from equipment disclosed by the embodiments of the present invention;
Fig. 8 is another structural schematic diagram from equipment disclosed by the embodiments of the present invention;
Fig. 9 is another structural schematic diagram from equipment disclosed by the embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a kind of data transfer control method and equipment, and the transmission effect of audio data can be improved Rate.It is described in detail separately below.
Referring to Figure 1, Fig. 1 is a kind of structural schematic diagram of system architecture disclosed by the embodiments of the present invention, as shown in Figure 1, The system architecture may include multiple playback equipments, wireless routing device and terminal, wherein the playback equipment may include but It is not limited to speaker, MP4, MP3, multimedia equipment and any equipment for having playing function etc., wireless routing device can wrap Wireless router and any equipment etc. with wireless coverage function are included but are not limited to, terminal may include smart phone, put down The smart machines such as plate computer, laptop, palm PC and mobile internet device (MID).System tray shown in Fig. 1 In structure, wirelessly (AD-HOC network form or MESH network form) establishes communication connection between playback equipment, meanwhile, This multiple playback equipment keeps connecting with wireless routing device, wherein the broadcasting being closer with wireless routing device is set Standby referred to as main equipment, the main equipment can establish connection by wired or wireless mode and wireless routing device, and other Playback equipment is referred to as from equipment, should wirelessly establish connection from equipment and wireless routing device.Control is installed The terminal of application and wireless routing device are established be wirelessly connected after, terminal can control main equipment, so by main equipment come Control carries out playback of songs from equipment.
Based on system architecture shown in FIG. 1, the embodiment of the invention discloses a kind of data transfer control methods.Refer to figure 2, Fig. 2 be a kind of flow diagram of data transfer control method disclosed by the embodiments of the present invention, as shown in Fig. 2, this method can With the following steps are included:
S201, the audio data that main equipment is sent is received by internal network, and when playing audio-fequency data, detects intranet The state parameter of network transmission.
In the embodiment of the present invention, user can place multiple playback equipments at home, this multiple playback equipment can be any Deployment, such as: in same floor, multiple playback equipments are individually positioned in different rooms, as playback equipment A and broadcasting are set Standby B is placed on parlor;Playback equipment C is placed on bedroom;Playback equipment D is placed on study;In the building of multilayer, broadcast multiple It puts equipment and is placed on different floors.This multiple playback equipment may be constructed one family music system, in house music system Playback equipment wirelessly communicated, form an internal network, same first song be played simultaneously so as to realize It is bent.
The Streaming Media music from internet can be played simultaneously in playback equipment in this internal network, can also synchronize The local music on a wherein playback equipment is played, such as: the music file being stored in inside playback equipment, or connection Music file onto the External memory equipment (such as USB flash disk, mobile hard disk) of playback equipment, or by such as AirPlay, bluetooth Or the music that the modes such as Miracast push.
All playback equipments (main equipment and from equipment) in this house music system are kept with wireless routing device Connection, main equipment can obtain audio data from external network server by wireless routing device, and obtain audio from equipment The mode of data can there are two types of, the first: pass through internal network receive main equipment send audio data;Second, pass through Wireless routing device is connected to the received audio data of external network.Under normal circumstances, since main equipment is from wireless routing device Be closer, main equipment accesses external network by wireless routing device and is higher than to obtain the efficiency of audio data from setting It is standby.
When house music system starts, default is all that main equipment is connected to wireless routing device, is obtained external The audio data of song on network server, the slave equipment being then forwarded in internal network.
In the embodiment of the present invention, the audio data that main equipment is sent is being received by internal network from equipment, and play sound Frequency according to when, detect the state parameter of internal network transport.Wherein, the state parameter of the internal network transport may include audio At least one of the average transmission delay of data and the packet loss of audio data.
As an alternative embodiment, when the state parameter of internal network transport includes the average transmission of audio data When delay, it may comprise steps of from the specific embodiment of the state parameter of equipment detection internal network transport:
11) every preset duration, it is recorded in the transmission delay value for the packets of audio data transmitted in preset duration;
12) according to transmission delay value, the average biography for the packets of audio data transmitted in the playing duration of audio data is calculated Defeated delay value.
In this embodiment, which can be the duration of system default, or the duration of user setting, Such as 30s.From equipment every preset duration, it is recorded in the transmission delay value for the packets of audio data transmitted in preset duration, further According to transmission delay value, the average transmission delay value for the packets of audio data transmitted in the playing duration of audio data is calculated.It lifts For example, it is assumed that the playing duration of audio data is 4min, and preset duration 30s is then recorded in 30s from equipment every 30s The transmission delay value of the packets of audio data of transmission will will record 8 transmission delay values from equipment in 4min, from equipment by this 8 A transmission delay value summation can be obtained by the average transmission delay value for the packets of audio data transmitted in 4min after being averaged.
As another optional embodiment, when the packet loss that the state parameter of internal network transport includes audio data When, it may comprise steps of from the specific embodiment of the state parameter of equipment detection internal network transport:
21) the data packet total amount of audio data is obtained;
22) number of dropped packets being recorded in the playing duration of audio data;
23) according to data packet total amount and number of dropped packets, packet loss when audio data transmits in playing duration is calculated.
In this embodiment, the data packet total amount that audio data can be first obtained from equipment, in playing audio-fequency data, note Then the number of dropped packets recorded in playing duration according to data packet total amount and number of dropped packets, can calculate audio data from equipment Packet loss when being transmitted in playing duration.For example, the data packet total amount of audio data is 100, in playing duration Number of dropped packets is 10, then can calculate packet loss when audio data transmits in playing duration is 0.1.
Optionally, it can recorde the number of dropped packets in preset duration from equipment, according to data packet total amount and number of dropped packets, calculate Packet loss when audio data transmits in preset duration.
S202, judge whether the state parameter of internal network transport meets and preset switch to external network for triggering and connect The trigger condition of audio data is received, if so, step S203 is executed, if it is not, returning to step S201.
In the embodiment of the present invention, if the transmission quality of internal network is too poor, (data transfer delay or packet loss are too big When), it will the normal transmission and result of broadcast of audio data are influenced, and then influences user experience.It can be by sentencing from equipment Whether the state parameter of disconnected internal network transport meets preset for triggering the touching for switching to external network and receiving audio data Clockwork spring part determines the transmission quality situation of current internal network, if judge that the state parameter of internal network transport meets from equipment It is preset to be used to trigger the trigger condition for switching to external network reception audio data, then show the transmission matter of current internal network Measure it is poor, from equipment need to switch to external network receive audio data;If judging the state ginseng of internal network transport from equipment Number is unsatisfactory for the preset trigger condition for being used to trigger and switching to external network reception audio data, then shows current internal network Transmission quality it is preferable, internal network can be continued through from equipment and receive the audio data that main equipment is sent, and play audio Data, while being also required to continue to test the state parameter of internal network transport.
As an alternative embodiment, when the state parameter of internal network transport includes the average transmission of audio data When delay, judges whether the state parameter of internal network transport meets from equipment and preset switch to external network for triggering and connect The specific embodiment of trigger condition for receiving audio data may include:
Judge whether average transmission delay value is greater than or equal to Preset Transfer delay threshold, if so, determining internal network The state parameter of transmission meets preset for triggering the trigger condition for switching to external network and receiving audio data.
In this embodiment, Preset Transfer delay threshold can be system default setting, or user is according to need To be arranged, the embodiment of the present invention is not construed as limiting.When judging that average transmission delay value prolongs more than or equal to Preset Transfer from equipment When threshold value when, show that the transmission quality of current internal network is poor, from equipment need to switch to external network receive audio data, Can think the state parameter of current internal network transmission meet it is preset for trigger switch to external network receive audio The trigger condition of data.
As another optional embodiment, when the packet loss that the state parameter of internal network transport includes audio data When, from equipment judge internal network transport state parameter whether meet it is preset for trigger switch to external network receive sound The specific embodiment of the trigger condition of frequency evidence may include:
Judge whether the packet loss is greater than or equal to default packet loss threshold value, if so, determining that the internal network passes Defeated state parameter meets preset for triggering the trigger condition for switching to external network and receiving audio data.
In this embodiment, presetting packet loss threshold value can be system default setting, or user is as needed It is arranged, the embodiment of the present invention is not construed as limiting.When judging that packet loss is greater than or equal to default packet loss threshold value from equipment, show The transmission quality of current internal network is poor, needs to switch to external network from equipment and receives audio data, it can thinks to work as The state parameter of preceding internal network transport meets preset for triggering the triggering item for switching to external network and receiving audio data Part.
S203, audio data play after, the transmission path of audio data is switched to and is received by external network Audio data transmission path.
In the embodiment of the present invention, from equipment after audio data plays, the transmission path of audio data is switched to Pass through the transmission path of the received audio data of external network.It should be noted that here " audio data broadcasting terminate Refer to after current this song song plays afterwards ".In order to avoid interrupting the broadcasting of current song, switch the audio data of song Acquiring way, it should be current song play after switch.
It should be noted that all playback equipments in house music system simultaneously with wireless routing device and internal network Connection is kept, therefore, playback equipment can switch the acquiring way of audio data according to network transmission state.
In the method flow described in Fig. 2, the audio data that main equipment is sent is received from equipment by internal network, and When playing audio-fequency data, the state parameter of internal network transport is detected, judges whether the state parameter of internal network transport meets It is preset to be used to trigger the trigger condition for switching to external network reception audio data, if so, terminating in audio data broadcasting Afterwards, the transmission path of audio data is switched to the transmission path by the received audio data of external network.Through the invention Embodiment, from equipment when judging that internal network transport is second-rate, after audio data plays, by the biography of audio data Defeated path is switched to the transmission path by the received audio data of external network, directly to download sound from external network server Frequency evidence, so as to improve the efficiency of transmission of audio data.
Based on system architecture shown in FIG. 1, the embodiment of the invention discloses a kind of data transfer control methods.Refer to figure 3, Fig. 3 be the flow diagram of another data transfer control method disclosed by the embodiments of the present invention, as shown in figure 3, this method It may comprise steps of:
S301, the audio data that main equipment is sent is received from equipment by internal network, and when playing audio-fequency data, detection The state parameter of internal network transport.
S302, judge from equipment the state parameter of internal network transport whether meet it is preset for trigger switch to outside Network receives the trigger condition of audio data, if so, step S303 is executed, if it is not, returning to step S301.
S303, from equipment audio data play after, the transmission path of audio data is switched to and passes through extranets The transmission path of the received audio data of network.
S304, target audio data acquisition request is sent from equipment external network server.
In the embodiment of the present invention, it is switched to from equipment by the transmission path of audio data through the received audio of external network After the transmission path of data, so that it may which external network server sends target audio data acquisition request, it may be assumed that target audio External network server where data sends target audio data acquisition request, and " target audio data " here refer to next Song to be played.Wherein, which carries the mark of target audio data, such as song title. External network server will inquire from database after receiving target audio data acquisition request and whether there is the mesh The mark for marking audio data, if inquiring presence, external network server can send target audio data to from equipment, if It inquires and is not present, then external network server can be to the prompt information sent from equipment for prompting query failure.
S305, judge that whether receiving external network server response target audio data within a preset time obtains from equipment The target audio data for taking request and sending, if it is not, step S306 is executed, if so, terminating this process.
In the embodiment of the present invention, after equipment external network server transmission target audio data acquisition request, judgement The target audio that external network server is sent in response to target audio data acquisition request whether is received within a preset time Data can execute step S306 if not receiving within a preset time.Wherein, the preset time can for system default when Between, or the time of user setting, the embodiment of the present invention are not construed as limiting.
In the embodiment of the present invention, due to from equipment at a distance from wireless routing device farther out, signal strength will be weaker, Therefore, external network is connected to by wireless routing device from equipment to access the success rate of external network server and will drop It is low, will exist and not receive the mesh that external web services are sent in response to target audio data acquisition request within a preset time The case where marking audio data.
S306, the transmission path for switching target audio data from equipment are to pass through internal network to receive the sound that main equipment is sent The transmission path of frequency evidence.
In the embodiment of the present invention, main equipment obtains audio number from external network server by wireless routing device in real time According to not receiving external network server within a preset time when from equipment judgement and sent out in response to target audio data acquisition request When the target audio data sent, the transmission path that can switch target audio data from equipment is to receive master by internal network to set The transmission path for the audio data that preparation is sent continues to execute step S301 at this point, can return from equipment.
It should be noted that when main equipment and from equipment by external network server obtain audio data when, generally For, the success rate that main equipment accesses external network server is greater than the success rate from equipment access external network server.
As another optional embodiment, after step S306, the method can with the following steps are included:
Prompt information is sent from the residue in addition to equipment from equipment to except currently, the prompt information can not connect for prompting It is connected to external network server.
In this embodiment, after other receive this prompt information from equipment, so that it may learn current extranets Network transmission quality is poor, it is not necessary to cut the transmission path for receiving the audio data that main equipment is sent by internal network It is changed to the transmission path by the received audio data of external network.
In the method flow described in Fig. 3, pass through extranets from equipment the transmission path of audio data to be switched to After the transmission path of the received audio data of network, external network server sends target audio data acquisition request, judgement The target that external network server responds the target audio data acquisition request and sends whether is received within a preset time Audio data, if it is not, the transmission path of switching target audio data is to receive the audio number that main equipment is sent by internal network According to transmission path.Through the embodiment of the present invention, it is stood from equipment when judgement can not obtain target audio data from external network The transmission path for switching target audio data is that the transmission path for the audio data that main equipment is sent is received by internal network, The efficiency of transmission of audio data can be improved, and then ensure the normal play of target audio data, improve result of broadcast.
Based on system architecture shown in FIG. 1, the embodiment of the invention discloses a kind of data transfer control methods.Refer to figure 4, Fig. 4 be the flow diagram of another data transfer control method disclosed by the embodiments of the present invention, as shown in figure 4, this method It may comprise steps of:
S401, the audio data that main equipment is sent is received from equipment by internal network, and when playing audio-fequency data, detection The state parameter of internal network transport.
S402, judge from equipment the state parameter of internal network transport whether meet it is preset for trigger switch to outside Network receives the trigger condition of audio data, if so, step S403 is executed, if it is not, returning to step S401.
S403, from equipment audio data play after, the transmission path of audio data is switched to and passes through extranets The transmission path of the received audio data of network.
S404, target audio data acquisition request is sent from equipment external network server.
S405, judge that whether is the transmission rate of target audio data during receiving target audio data from equipment Lower than Preset Transfer rate-valve value, if so, step S406 is executed, if it is not, terminating this process.
In the embodiment of the present invention, after equipment external network server transmission target audio data acquisition request, just The target audio data of external network server transmission can be received, wherein external network server sends target audio data It is to be sent as unit of frame.It, may be due to the signal of external network from equipment during receiving target audio data It is poor, cause the transmission rate of the target audio data of each frame may be different, it is possible to receive a certain frame target audio When data, transmission rate is extremely low, thus will affect the efficiency of transmission of target audio data, influences the normal play of song, Therefore, judge whether the transmission rate of target audio data is lower than during receiving target audio data from equipment needs Preset Transfer rate-valve value, the Preset Transfer rate-valve value can be system default, be also possible to user setting, the present invention Embodiment is not construed as limiting.
S406, the transmission path for switching target audio data from equipment are to pass through internal network to receive the sound that main equipment is sent The transmission path of frequency evidence.
In the embodiment of the present invention, main equipment obtains audio number from external network server by wireless routing device in real time According to judging during receiving target audio data when from equipment, the transmission rates of target audio data is lower than Preset Transfer When rate-valve value, show that the efficiency for the target audio data currently transmitted by external network is lower, in order to not influence song Normal play, the transmission path for needing to switch target audio data from equipment are to receive the sound that main equipment is sent by internal network The transmission path of frequency evidence continues to execute step S401 at this point, can return from equipment.
It should be noted that when main equipment and from equipment by external network server obtain audio data when, generally For, the success rate that main equipment accesses external network server is greater than the success rate from equipment access external network server.
In the method flow described in Fig. 4, pass through extranets from equipment the transmission path of audio data to be switched to After the transmission path of the received audio data of network, external network server sends target audio data acquisition request, judgement During receiving the target audio data, whether the transmission rate of target audio data is lower than Preset Transfer rate threshold Value, if so, the transmission path of switching target audio data is to receive the audio data that main equipment is sent by internal network Transmission path.Through the embodiment of the present invention, it is stood from equipment when the target audio data efficiency for judging that external network transmits is lower The transmission path for switching target audio data is that the transmission path for the audio data that main equipment is sent is received by internal network, The efficiency of transmission of audio data can be improved, and then ensure the normal play of target audio data, improve result of broadcast.
The following is an embodiment of the apparatus of the present invention, and apparatus of the present invention embodiment is for executing embodiment of the present invention method two to four The method of realization, for ease of description, only parts related to embodiments of the present invention are shown, and particular technique details does not disclose , please refer to the embodiment of the present invention two, embodiment three and example IV.
Fig. 5 is referred to, Fig. 5 is a kind of structural schematic diagram from equipment disclosed by the embodiments of the present invention, as shown in figure 5, should It may include: detection unit 501, judging unit 502 and switch unit 503 from equipment 500, in which:
Detection unit 501, for receiving the audio data that main equipment is sent, and playing audio-fequency data by internal network When, detect the state parameter of internal network transport.
In the embodiment of the present invention, user can place multiple playback equipments at home, this multiple playback equipment can be any Deployment, such as: in same floor, multiple playback equipments are individually positioned in different rooms, as playback equipment A and broadcasting are set Standby B is placed on parlor;Playback equipment C is placed on bedroom;Playback equipment D is placed on study;In the building of multilayer, broadcast multiple It puts equipment and is placed on different floors.This multiple playback equipment may be constructed one family music system, in house music system Playback equipment wirelessly communicated, form an internal network, same first song be played simultaneously so as to realize It is bent.
The Streaming Media music from internet can be played simultaneously in playback equipment in this internal network, can also synchronize The local music on a wherein playback equipment is played, such as: the music file being stored in inside playback equipment, or connection Music file onto the External memory equipment (such as USB flash disk, mobile hard disk) of playback equipment, or by such as AirPlay, bluetooth Or the music that the modes such as Miracast push.
All playback equipments (main equipment and from equipment) in this house music system are kept with wireless routing device Connection, main equipment can obtain audio data from external network server by wireless routing device, and obtain audio from equipment The mode of data can there are two types of, the first: pass through internal network receive main equipment send audio data;Second, pass through Wireless routing device is connected to the received audio data of external network.Under normal circumstances, since main equipment is from wireless routing device Be closer, main equipment accesses external network by wireless routing device and is higher than to obtain the efficiency of audio data from setting It is standby.
When house music system starts, default is all that main equipment is connected to wireless routing device, is obtained external The audio data of song on network server, the slave equipment being then forwarded in internal network.
In the embodiment of the present invention, detection unit 501 is receiving the audio data that main equipment is sent by internal network, and broadcasts When putting audio data, the state parameter of internal network transport is detected.Wherein, the state parameter of the internal network transport may include At least one of the average transmission delay of audio data and the packet loss of audio data.
Judging unit 502, for judging it is preset for triggering switching whether the state parameter of internal network transport meets The trigger condition of audio data is received to external network.
In the embodiment of the present invention, if the transmission quality of internal network is too poor, (data transfer delay or packet loss are too big When), it will the normal transmission and result of broadcast of audio data are influenced, and then influences user experience.Judging unit 502 can lead to Cross judge the state parameter of internal network transport whether meet it is preset for trigger switch to external network receive audio data Trigger condition determine the transmission quality situation of current internal network, if judging unit 502 judges the shape of internal network transport State parameter meets the preset trigger condition for being used to trigger and switching to external network reception audio data, then shows current internal net The transmission quality of network is poor, needs switch unit 503 to switch to external network and receives audio data;If judging unit 502 judges The state parameter of internal network transport is unsatisfactory for preset for triggering the triggering item for switching to external network and receiving audio data Part then shows that the transmission quality of current internal network is preferable, and detection unit 501 can receive main equipment by internal network and send Audio data, and when playing audio-fequency data, continue to test the state parameter of internal network transport.
Switch unit 503, for judging that the state parameter of internal network transport meets preset be used for when judging unit 502 When triggering switches to the trigger condition of external network reception audio data, after audio data plays, by audio data Transmission path is switched to the transmission path by the received audio data of external network.
In the embodiment of the present invention, switch unit 503 cuts the transmission path of audio data after audio data plays It is changed to the transmission path by the received audio data of external network.It should be noted that here " audio data play tie After beam " refer to after current this song song plays.In order to avoid interrupting the broadcasting of current song, switch the audio number of song According to acquiring way, it should be current song play after switch.
It should be noted that all playback equipments in house music system simultaneously with wireless routing device and internal network Connection is kept, therefore, playback equipment can switch the acquiring way of audio data according to network transmission state.
Fig. 6 is referred to, Fig. 6 is another structural schematic diagram from equipment disclosed by the embodiments of the present invention, wherein Fig. 6 institute The slave equipment shown be it is shown in Fig. 5 advanced optimize to obtain on the basis of equipment, with it is shown in fig. 5 from equipment compared with, Fig. 6 Shown in from equipment in addition to include Fig. 5 shown in other than all units of equipment, detection unit 501 shown in fig. 6 may include:
Delay record subelement 5011, for being recorded in the packets of audio data transmitted in preset duration every preset duration Transmission delay value.
Be delayed computation subunit 5012, for according to transmission delay value, calculating to be transmitted in the playing duration of audio data Packets of audio data average transmission delay value.
Above-mentioned judging unit 502 is specifically used for judging whether average transmission delay value is greater than or equal to Preset Transfer delay threshold Value, if so, determine internal network transport state parameter meet it is preset for trigger switch to external network receive audio The trigger condition of data.
In this embodiment, which can be the duration of system default, or the duration of user setting, Such as 30s.Delay record subelement 5011 can be recorded in the biography for the packets of audio data transmitted in preset duration every preset duration Defeated delay value, further, delay computation subunit 5012 calculate in the playing duration of audio data according to transmission delay value The average transmission delay value of the packets of audio data of transmission.As an example it is assumed that the playing duration of audio data is 4min, when presetting A length of 30s is then delayed and records the transmission delay value that subelement 5011 is recorded in the packets of audio data transmitted in 30s every 30s, In 4min, delay record subelement 5011 will will record 8 transmission delay values, and delay computation subunit 5012 transmits this 8 Delay value summation can be obtained by the average transmission delay value for the packets of audio data transmitted in 4min after being averaged.
In this embodiment, Preset Transfer delay threshold can be system default setting, or user is according to need To be arranged, the embodiment of the present invention is not construed as limiting.When judging unit 502 judges that average transmission delay value is greater than or equal to default pass When defeated delay threshold, show that the transmission quality of current internal network is poor, switch unit 503 needs to switch to external network reception Audio data, it can think the state parameter of current internal network transmission meet it is preset for trigger switch to external network Receive the trigger condition of audio data.
Fig. 7 is referred to, Fig. 7 is another structural schematic diagram from equipment disclosed by the embodiments of the present invention, wherein Fig. 7 institute The slave equipment shown be it is shown in Fig. 5 advanced optimize to obtain on the basis of equipment, with it is shown in fig. 5 from equipment compared with, Fig. 7 Shown in from equipment in addition to include Fig. 5 shown in other than all units of equipment, detection unit 501 shown in Fig. 7 may include:
Subelement 5013 is obtained, for obtaining the data packet total amount of audio data.
Packet loss records subelement 5014, the number of dropped packets for being recorded in the playing duration of audio data.
Packet loss computation subunit 5015, for calculating audio data in playing duration according to data packet total amount and number of dropped packets Packet loss when interior transmission.
Above-mentioned judging unit 502 is specifically used for judging whether packet loss is greater than or equal to default packet loss threshold value, if so, It is preset for triggering the triggering for switching to external network and receiving audio data to determine that the state parameter of internal network transport meets Condition.
In this embodiment, the data packet total amount of audio data can first be obtained by obtaining subelement 5013, play audio When data, packet loss record subelement 5014 can recorde the number of dropped packets in playing duration, then, packet loss computation subunit 5015 According to data packet total amount and number of dropped packets, packet loss when audio data transmits in playing duration is calculated.For example, audio The data packet total amount of data is 100, and the number of dropped packets in playing duration is 10, then packet loss computation subunit 5015 can calculate Packet loss when audio data transmits in playing duration is 0.1.
In this embodiment, presetting packet loss threshold value can be system default setting, or user is as needed It is arranged, the embodiment of the present invention is not construed as limiting.When judging unit 502 judges that packet loss is greater than or equal to default packet loss threshold value When, showing that the transmission quality of current internal network is poor, switch unit 503 needs to switch to external network and receives audio data, Can think the state parameter of current internal network transmission meet it is preset for trigger switch to external network receive audio The trigger condition of data.
Refer to Fig. 8, Fig. 8 is another structural schematic diagram from equipment disclosed by the embodiments of the present invention, it is shown in Fig. 8 from Equipment be it is shown in Fig. 5 advanced optimize to obtain on the basis of equipment, with it is shown in fig. 5 from equipment compared with, it is shown in Fig. 8 From equipment in addition to include Fig. 5 shown in other than all units of equipment, it is shown in Fig. 8 to include: from equipment 500
First transmission unit 504 passes through extranets for being switched to the transmission path of audio data in switch unit 503 After the transmission path of the received audio data of network, external network server sends target audio data acquisition request.
In the embodiment of the present invention, the transmission path of audio data is switched to and is received by external network by switch unit 503 Audio data transmission path after, the first transmission unit 504 can external network server send target audio data Acquisition request, it may be assumed that send target audio data acquisition request to the external network server where target audio data, here " target audio data " refer to next song to be played.Wherein, which carries target audio The mark of data, such as song title.External network server, will be from number after receiving target audio data acquisition request According in library inquiry whether there is the target audio data mark, if inquiring presence, external network server can to from Equipment sends target audio data, is not present if inquiring, and external network server can be sent to from equipment for prompting Inquire the prompt information of failure.
Above-mentioned judging unit 502 is also used to judge whether to receive external network server response mesh within a preset time The target audio data marking audio data acquisition request and sending.
In the embodiment of the present invention, 504 external network server of the first transmission unit sends target audio data acquisition and asks After asking, whether the judgement of judging unit 502 receives external network server response target audio data acquisition within a preset time The target audio data of request and transmission, wherein the preset time can be the time of system default, or user setting Time, the embodiment of the present invention is not construed as limiting.
In the embodiment of the present invention, due to from equipment at a distance from wireless routing device farther out, signal strength will be weaker, Therefore, external network is connected to by wireless routing device from equipment to access the success rate of external network server and will drop It is low, will exist and not receive the mesh that external web services are sent in response to target audio data acquisition request within a preset time The case where marking audio data.
Above-mentioned switch unit 503 is also used to not receive external network clothes within a preset time when the judgement of judging unit 502 When the target audio data that business device is sent in response to target audio data acquisition request, switch the transmission path of target audio data For the transmission path for receiving the audio data that main equipment is sent by internal network.
In the embodiment of the present invention, main equipment obtains audio number from external network server by wireless routing device in real time According to when judging unit 502 judges that not receiving external network server response target audio data acquisition within a preset time asks Ask and send target audio data when, switch unit 503 can switch target audio data transmission path be pass through inside Network receives the transmission path for the audio data that main equipment is sent.
It should be noted that when main equipment and from equipment by external network server obtain audio data when, generally For, the success rate that main equipment accesses external network server is greater than the success rate from equipment access external network server.
Refer to Fig. 9, Fig. 9 is another structural schematic diagram from equipment disclosed by the embodiments of the present invention, it is shown in Fig. 9 from Equipment be it is shown in Fig. 5 advanced optimize to obtain on the basis of equipment, with it is shown in fig. 5 from equipment compared with, it is shown in Fig. 9 From equipment in addition to include Fig. 5 shown in other than all units of equipment, it is shown in Fig. 9 to include: from equipment 500
Second transmission unit 505 passes through extranets for being switched to the transmission path of audio data in switch unit 503 After the transmission path of the received audio data of network, external network server sends target audio data acquisition request.
Above-mentioned judging unit 502 is also used to judge during receiving target audio data, the biography of target audio data Whether defeated rate is lower than Preset Transfer rate-valve value.
In the embodiment of the present invention, 505 external network server of the second transmission unit sends target audio data acquisition and asks After asking, the target audio data of external network server transmission will be received, wherein external network server sends target Audio data is sent as unit of frame.It, may be due to extranets from equipment during receiving target audio data The dtr signal of network causes the transmission rate of the target audio data of each frame may be different, it is possible to receive a certain frame When target audio data, transmission rate is extremely low, thus will affect the efficiency of transmission of target audio data, is influencing song just It often plays, therefore, the needs of judging unit 502 judge the transmission of target audio data during receiving target audio data Whether rate is lower than Preset Transfer rate-valve value, which can be system default, is also possible to user It is arranged, the embodiment of the present invention is not construed as limiting.
Above-mentioned switch unit 503 is also used to judge when above-mentioned judging unit 502 in the process for receiving target audio data In, when the transmission rate of target audio data is lower than Preset Transfer rate-valve value, the transmission path of switching target audio data is The transmission path for the audio data that main equipment is sent is received by internal network.
In the embodiment of the present invention, main equipment obtains audio number from external network server by wireless routing device in real time According to when judging unit 502 judges during receiving target audio data, the transmission rate of target audio data is lower than default When transmission rate threshold, show that the efficiency for the target audio data currently transmitted by external network is lower, in order to not influence song Bent normal play, the transmission path that switch unit 503 needs to switch target audio data is to receive master by internal network to set The transmission path for the audio data that preparation is sent.
It should be noted that when main equipment and from equipment by external network server obtain audio data when, generally For, the success rate that main equipment accesses external network server is greater than the success rate from equipment access external network server.
Fig. 5~shown in Fig. 9 from the device, detection unit 501 passes through internal network and receives the audio that main equipment is sent Data, and when playing audio-fequency data, the state parameter of internal network transport is detected, judging unit 502 judges internal network transport State parameter whether meet it is preset for trigger switch to external network reception audio data trigger condition, if so, The transmission path of audio data is switched to received by external network by switch unit 503 after audio data plays The transmission path of audio data.Through the embodiment of the present invention, judging unit 502 is when judging that internal network transport is second-rate, After audio data plays, the transmission path of audio data is switched to received by external network by switch unit 503 The transmission path of audio data, directly to download audio data from external network server, so as to improve audio data Efficiency of transmission.
It should be noted that for simple description, therefore, it is stated as a systems for each embodiment of the method above-mentioned The combination of actions of column, but those skilled in the art should understand that, the application is not limited by the described action sequence, because For according to the application, certain some step be can be performed in other orders or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, related movement and unit not necessarily this Shen It please be necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in some embodiment Part, reference can be made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.

Claims (8)

1. a kind of data transfer control method characterized by comprising
The audio data that main equipment is sent is received by internal network, and when playing audio data, detection internal network passes Defeated state parameter;The internal network is the communication connection established by MESH network form;
Judge the state parameter of the internal network transport whether meet it is preset for trigger switch to external network receive sound The trigger condition of frequency evidence;
If so, the transmission path of audio data is switched to and is connect by external network after the audio data plays The transmission path of the audio data of receipts;
The transmission path by the received audio data of external network, which refers to, to be directly connected to outside by wireless routing device Portion's network receives the audio data;
It is described to be switched to the transmission path of audio data after the transmission path by the received audio data of external network, institute State method further include:
External network server sends target audio data acquisition request;
Whether judgement receives the external network server within a preset time and responds the target audio data acquisition request And the target audio data sent;
If it is not, the transmission path for then switching the target audio data is to receive the audio number that main equipment is sent by internal network According to transmission path, Xiang Dangqian sends prompt information from equipment from remaining except equipment, and the prompt information is for prompting nothing Method is connected to external network server.
2. the method according to claim 1, wherein the state parameter when the internal network transport includes audio When the average transmission delay of data, the state parameter of the detection internal network transport, comprising:
Every preset duration, it is recorded in the transmission delay value for the packets of audio data transmitted in the preset duration;
According to the transmission delay value, the average biography for the packets of audio data transmitted in the playing duration of the audio data is calculated Defeated delay value;
Whether the state parameter for judging the internal network transport meets preset switch to external network and connects for triggering Receive the trigger condition of audio data, comprising:
Judge whether the average transmission delay value is greater than or equal to Preset Transfer delay threshold, if so, determining the inside The state parameter of network transmission meets preset for triggering the trigger condition for switching to external network and receiving audio data.
3. the method according to claim 1, wherein the state parameter when the internal network transport includes audio When the packet loss of data, the state parameter of the detection internal network transport, comprising:
Obtain the data packet total amount of the audio data;
The number of dropped packets being recorded in the playing duration of the audio data;
According to the data packet total amount and the number of dropped packets, the losing when audio data transmits in the playing duration is calculated Packet rate;
Whether the state parameter for judging the internal network transport meets preset switch to external network and connects for triggering Receive the trigger condition of audio data, comprising:
Judge whether the packet loss is greater than or equal to default packet loss threshold value, if so, determining the internal network transport State parameter meets preset for triggering the trigger condition for switching to external network and receiving audio data.
4. the method according to claim 1, wherein described be switched to the transmission path of audio data by outer After the transmission path of the received audio data of portion's network, the method also includes:
External network server sends target audio data acquisition request;
Judge it is default whether the transmission rate of the target audio data is lower than during receiving the target audio data Transmission rate threshold;
If so, the transmission path for switching the target audio data is to receive the audio number that main equipment is sent by internal network According to transmission path.
5. a kind of from equipment characterized by comprising detection unit, for receiving the sound that main equipment is sent by internal network Frequency evidence, and when playing audio data, detect the state parameter of internal network transport;The internal network is to pass through MESH The communication connection that latticed form is established;
Judging unit, for judge the state parameter of the internal network transport whether meet it is preset for trigger switch to it is outer The trigger condition of portion's network reception audio data;
Switch unit, for judging that it is preset for touching that the state parameter of the internal network transport meets when the judging unit When hair switches to the trigger condition of external network reception audio data, after the audio data plays, by audio data Transmission path be switched to the transmission path by the received audio data of external network;
The transmission path by the received audio data of external network, which refers to, to be directly connected to outside by wireless routing device Portion's network receives the audio data;
First transmission unit is received for being switched to the transmission path of audio data in the switch unit by external network Audio data transmission path after, external network server send target audio data acquisition request;
The judging unit is also used to judge whether to receive the external network server response mesh within a preset time The target audio data marking audio data acquisition request and sending;
The switch unit is also used to not receive the external web services within a preset time when judging unit judgement Device respond the target audio data acquisition request and send target audio data when, switch the biography of the target audio data Defeated path is the transmission path that the audio data that main equipment is sent is received by internal network, and Xiang Dangqian is from the residue except equipment Prompt information is sent from equipment, the prompt information cannot connect to external network server for prompting.
6. according to claim 5 from equipment, which is characterized in that when the state parameter of the internal network transport includes sound When the average transmission delay of frequency evidence, the detection unit includes:
Delay record subelement, for being recorded in the biography for the packets of audio data transmitted in the preset duration every preset duration Defeated delay value;
Be delayed computation subunit, for according to the transmission delay value, calculating to be transmitted in the playing duration of the audio data Packets of audio data average transmission delay value;
The judging unit is specifically used for judging whether the average transmission delay value is greater than or equal to Preset Transfer delay threshold, It preset switch to external network for triggering if so, determining that the state parameter of the internal network transport meets and receives audio The trigger condition of data.
7. according to claim 5 from equipment, which is characterized in that when the state parameter of the internal network transport includes sound When the packet loss of frequency evidence, the detection unit includes:
Subelement is obtained, for obtaining the data packet total amount of the audio data;
Packet loss records subelement, the number of dropped packets in playing duration for being recorded in the audio data;
Packet loss computation subunit, for calculating the audio data described according to the data packet total amount and the number of dropped packets Packet loss in playing duration when transmission;
The judging unit is specifically used for judging whether the packet loss is greater than or equal to default packet loss threshold value, if so, really The state parameter of the fixed internal network transport meets preset for triggering the touching for switching to external network and receiving audio data Clockwork spring part.
8. according to claim 5 from equipment, which is characterized in that described from equipment further include:
Second transmission unit is received for being switched to the transmission path of audio data in the switch unit by external network Audio data transmission path after, external network server send target audio data acquisition request;
The judging unit is also used to judge during receiving the target audio data, the target audio data Whether transmission rate is lower than Preset Transfer rate-valve value;
The switch unit is also used to judge during receiving the target audio data when the judging unit, described When the transmission rate of target audio data is lower than Preset Transfer rate-valve value, the transmission path for switching the target audio data is The transmission path for the audio data that main equipment is sent is received by internal network.
CN201510188209.XA 2015-04-20 2015-04-20 A kind of data transfer control method and equipment Active CN104883391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510188209.XA CN104883391B (en) 2015-04-20 2015-04-20 A kind of data transfer control method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510188209.XA CN104883391B (en) 2015-04-20 2015-04-20 A kind of data transfer control method and equipment

Publications (2)

Publication Number Publication Date
CN104883391A CN104883391A (en) 2015-09-02
CN104883391B true CN104883391B (en) 2019-10-18

Family

ID=53950724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510188209.XA Active CN104883391B (en) 2015-04-20 2015-04-20 A kind of data transfer control method and equipment

Country Status (1)

Country Link
CN (1) CN104883391B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337823B (en) * 2015-11-04 2018-03-27 广东欧珀移动通信有限公司 The control method and playback equipment of a kind of radio play system
CN106899384B (en) * 2017-01-24 2019-09-24 广东思派康电子科技有限公司 Acquiring brain waves communication system, the generating means of communication frame and reading device
CN113242573B (en) * 2021-03-29 2022-08-16 广州安凯微电子股份有限公司 Node based on Bluetooth Mesh network and control method thereof

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102870348A (en) * 2010-03-05 2013-01-09 韩国电子通信研究院 Wideband near field communication apparatus and method
CN104080012A (en) * 2014-06-30 2014-10-01 广东欧珀移动通信有限公司 Method, device and system for controlling multiple display devices

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5014244B2 (en) * 2008-05-02 2012-08-29 キヤノン株式会社 VIDEO DISTRIBUTION DEVICE, ITS CONTROL METHOD, VIDEO DISTRIBUTION SYSTEM, AND PROGRAM
CN102083152B (en) * 2011-03-07 2013-12-11 宇龙计算机通信科技(深圳)有限公司 Method for switching hotspots in wireless local area network (WLAN) and terminal
US9247492B2 (en) * 2011-12-29 2016-01-26 Sonos, Inc. Systems and methods for multi-network audio control
US9191699B2 (en) * 2011-12-29 2015-11-17 Sonos, Inc. Systems and methods for connecting an audio controller to a hidden audio network
CN102595544A (en) * 2012-03-21 2012-07-18 厦门市凌拓通信科技有限公司 Method for achieving automatic switching between WIFI and 4G network on mobile equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102870348A (en) * 2010-03-05 2013-01-09 韩国电子通信研究院 Wideband near field communication apparatus and method
CN104080012A (en) * 2014-06-30 2014-10-01 广东欧珀移动通信有限公司 Method, device and system for controlling multiple display devices

Also Published As

Publication number Publication date
CN104883391A (en) 2015-09-02

Similar Documents

Publication Publication Date Title
CN104299632B (en) Audio synchronization method, device and corresponding system
US9336113B2 (en) Method and device for selecting a networked media device
CN105723680B (en) Method and computer device for audio distribution
JP6216870B2 (en) Multi-house hold support
CN104867513B (en) A kind of control method for playing back and equipment
EP3520438A1 (en) Method for changing type of streamed content for audio system
CN104584590A (en) Methods and apparatus for communicating safety message information
TWI619395B (en) System and method for changing a channel configuration of a set of audio output devices
CN104883391B (en) A kind of data transfer control method and equipment
CN105337822B (en) A kind of selection method and relevant device of main playback equipment
CN105072146A (en) Music information sharing method and device
CN104918069A (en) Play scene reduction method, system, playing terminal and control terminal
CN105848225A (en) Wireless connection switching method and device applied to audio playing system
CN105828134A (en) Playing control method and device in audio-video playing system
CN105679350B (en) A kind of method and device that audio plays
CN104618736B (en) A kind of multimedia downloading method and its device
CN105812905B (en) Control method for playing back and device in a kind of audio-video frequency playing system
CN105429831B (en) A kind of system of selection of main playback equipment and playback equipment
CN105427873B (en) A kind of switching method and relevant device of main playback equipment
CN106161044B (en) A kind of information transferring method and device
CN105828129B (en) A kind of audio-video frequency playing system control method, device and audio-video frequency playing system
CN104954940B (en) A kind of broadcast information store method, system, playback terminal and control terminal
JP2018050317A (en) Identifying useful wired connection
CN105682010A (en) Bluetooth connection control method and device in audio playing system, and player
CN105337823B (en) The control method and playback equipment of a kind of radio play system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant