CN109756488A - A kind of data flow acquisition methods, device, equipment and medium - Google Patents

A kind of data flow acquisition methods, device, equipment and medium Download PDF

Info

Publication number
CN109756488A
CN109756488A CN201811593075.XA CN201811593075A CN109756488A CN 109756488 A CN109756488 A CN 109756488A CN 201811593075 A CN201811593075 A CN 201811593075A CN 109756488 A CN109756488 A CN 109756488A
Authority
CN
China
Prior art keywords
data
data stream
access address
transcoded
user terminal
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
CN201811593075.XA
Other languages
Chinese (zh)
Other versions
CN109756488B (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.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology 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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201811593075.XA priority Critical patent/CN109756488B/en
Publication of CN109756488A publication Critical patent/CN109756488A/en
Application granted granted Critical
Publication of CN109756488B publication Critical patent/CN109756488B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of data flow acquisition methods, device, equipment and media, the step of this method includes: to respond user terminal to the access request of destination multimedia data, access address is set by transcoding resource link, and obtains the transcoded data stream of destination multimedia data according to access address;Judge the acquisition to transcoded data stream with the presence or absence of abnormal;If it is, being source material link by the content modification of access address, and the original data stream of destination multimedia data is obtained according to access address;Original data stream is back to user terminal;Otherwise, transcoded data stream is back to user terminal.Original data stream can be supplied to user in time in the case where that can not provide a user transcoded data stream by this method, ensure normal acquisition of the user for multi-medium data, and then the opposite high-timeliness requirement for meeting streaming media service with this.In addition, the present invention also provides a kind of data flow acquisition device, equipment and medium, beneficial effect are same as above.

Description

A kind of data flow acquisition methods, device, equipment and medium
Technical field
The present invention relates to data communication fields, more particularly to a kind of data flow acquisition methods, device, equipment and medium.
Background technique
With the development of network technology, network brings the more various information of people, when user is for obtaining network data Efficiency requirements also gradually increasing, the appearance of Streaming Media greatly facilitates the work and life of people.
Streaming Media refers to that continuous play in real time includes the multimedias such as audio, video on network using streaming technology Media formats including file, essence are that continuous multi-medium data is uploaded to streaming media service after compression processing Device, and then when resource link of the user terminal to destination multimedia data accesses, the streaming media server is whole to user End sequence or the in real time original data stream of transfer destination multi-medium data, and then user can see in real time while downloading It sees, listen to.Due to consideration that the having differences property of playing environment between all types of user terminal, in order to ensure each user terminal tool There is better result of broadcast or generate smaller resource overhead, currently generally requires the characteristic according to user terminal playing environment, Carry out dynamic transcoding to original data stream is made with generating transcoded data stream, and then transcoded data stream being supplied to user terminal With.But due to current dynamic transcoding during, it is understood that there may be because not simultaneous between transcoding mechanism used and original data stream Hold, and lead to the generation of the abnormal conditions such as dynamic transcoding interruption, user terminal can not normally get transcoding number in the case According to stream, therefore it is unable to ensure normal acquisition of the user for multi-medium data, it is difficult to which the high-timeliness for meeting streaming media service is wanted It asks.
It can be seen that a kind of data flow acquisition methods are provided, to ensure normal acquisition of the user for multi-medium data, And then meet the high-timeliness requirement of streaming media service, it is those skilled in the art's urgent problem to be solved.
Summary of the invention
The object of the present invention is to provide a kind of data flow acquisition methods, to ensure user for the normal of multi-medium data It obtains, and then meets the high-timeliness requirement of streaming media service.
In order to solve the above technical problems, the present invention provides a kind of data flow acquisition methods, which is characterized in that method includes:
User terminal is responded to the access request of destination multimedia data, sets access address for transcoding resource link, And the transcoded data stream of destination multimedia data is obtained according to access address;
Judge the acquisition to transcoded data stream with the presence or absence of abnormal;
If it is, being source material link by the content modification of access address, and more according to access address acquisition target The original data stream of media data;
Original data stream is back to user terminal;
Otherwise, transcoded data stream is back to user terminal.
Preferably, it is source material link by the content modification of access address, and the more matchmakers of target is obtained according to access address The original data stream of volume data includes:
Rewrite by calling Nginx service requests to be source material link by the content modification of access address, and The original data stream of destination multimedia data is obtained according to access address.
Preferably, before setting access address for transcoding resource link, method further include:
Judge whether destination multimedia data have transcoded data stream;
Access address is set by transcoding resource link if it is, executing, and the more matchmakers of target are obtained according to access address The step of transcoded data stream of volume data;
Otherwise, access address is set by source material link, and destination multimedia data is obtained according to access address Original data stream;
The step of original data stream is back to user terminal by execution.
Preferably, by calling the rewrite of Nginx service to request the content modification of access address to be original money Before linking sources, method further include:
Judge whether there is the other transcoding resource links mutually compatible with the transcoding rate of user terminal;
If it is, by calling rewrite to request the content modification of access address to be other transcoding resource links, And other transcoded data streams of destination multimedia data are obtained according to access address;
Other transcoded data streams are back to user terminal;
Otherwise, it executes by calling the rewrite of Nginx service to request the content modification of access address to be original money The step of linking sources.
Preferably, include: according to the transcoded data stream that access address obtains destination multimedia data
Transcoded data stream is obtained in preset first multimedia server according to access address;
Correspondingly, including: according to the original data stream that access address obtains destination multimedia data
Original data stream is obtained in preset second multimedia server according to access address.
Preferably, destination multimedia data include net cast data.
In addition, device includes memory, processor and bus the present invention also provides a kind of data flow acquisition device, deposit The data flow acquisition program that can be transmitted in bus and run on a processor is stored on reservoir, data flow obtains program quilt Such as above-mentioned method is realized when processor executes.
Preferably, device is the node for forming CDN network or block chain network.
In addition, the present invention also provides a kind of data flows to obtain system, system includes:
Setting unit is responded, for responding user terminal to the access request of destination multimedia data, by transcoding resource chain It connects and is set as access address, and obtain the transcoded data stream of destination multimedia data according to access address;
Abnormal deciding means, for judging the acquisition to transcoded data stream with the presence or absence of exception, if it is, successively holding Row address modifies unit and initial data return unit, otherwise, executes transcoded data return unit;
Unit is modified in address, for being source material link by the content modification of access address, and is obtained according to access address Take the original data stream of destination multimedia data;
Initial data return unit, for original data stream to be back to user terminal;
Transcoded data return unit, for transcoded data stream to be back to user terminal.
In addition, being stored with number on computer readable storage medium the present invention also provides a kind of computer readable storage medium Program is obtained according to stream, data flow obtains program and can be executed by one or more processor, to realize as above-mentioned data flow obtains Take method.
In addition, the present invention also provides a kind of computer program product, including computer instruction, when it is transported on computers When row, computer is allowed to execute above-mentioned data flow acquisition methods.
Data flow acquisition methods provided by the present invention ask the access of destination multimedia data in response user terminal After asking, access address is set by transcoding resource link, and then the transcoding number of destination multimedia data is obtained according to access address It is then that source material links by the content modification of access address when the process for obtaining transcoded data stream is deposited when abnormal according to stream, And then the original data stream for obtaining the multi-medium data is linked according to source material, and be back to user terminal;When acquisition transcoding When the process of data flow is normal, then the transcoded data stream that will acquire is back to user terminal.As it can be seen that when passing through transcoding resource When the transcoded data stream that link obtains multi-medium data occurs abnormal, this method is original by the way that transcoding resource link to be revised as Resource link obtains the original data stream for capableing of basic guarantee user terminal normal use with this, and then is back to user's end End, therefore, original data stream can be supplied to by this method in time in the case where that can not provide a user transcoded data stream User ensures normal acquisition of the user for multi-medium data, and then the opposite high timeliness for meeting streaming media service with this Property require.In addition, the present invention also provides a kind of data flow acquisition device, equipment and medium, beneficial effect are same as above.
Detailed description of the invention
In order to illustrate the embodiments of the present invention more clearly, attached drawing needed in the embodiment will be done simply below Introduction, it should be apparent that, drawings in the following description are only some embodiments of the invention, skill common for this field For art personnel, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of data flow acquisition methods provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another data flow acquisition methods provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another data flow acquisition methods provided in an embodiment of the present invention;
Fig. 4 is the topology diagram of scene embodiment provided in an embodiment of the present invention;
Fig. 5 is a kind of structure chart of data flow acquisition device provided in an embodiment of the present invention;
Fig. 6 is the structure chart that a kind of data flow provided in an embodiment of the present invention obtains system.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, The present invention will be described in further detail.It should be appreciated that described herein, specific examples are only used to explain the present invention, It is not intended to limit the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative labor Every other embodiment obtained under the premise of dynamic, shall fall within the protection scope of the present invention.
The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should Understand that the data used in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to herein Sequence other than diagram or the content of description is implemented.In addition, term " includes " and " having " and their any deformation, meaning Figure be to cover it is non-exclusive include, for example, containing the process, method of a series of steps or units, system, product or setting It is standby those of to be not necessarily limited to be clearly listed step or unit, but may include be not clearly listed or for these mistakes The intrinsic other step or units of journey, method, product or equipment.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, without It can be interpreted as its relative importance of indication or suggestion or implicitly indicate the quantity of indicated technical characteristic.It defines as a result, The feature of " first ", " second " can explicitly or implicitly include at least one of the features.In addition, between each embodiment Technical solution can be combined with each other, but must based on can be realized by those of ordinary skill in the art, work as technical side There is conflicting or cannot achieve when and will be understood that the combination of this technical solution is not present in the combination of case, also not in this hair Within the protection scope of bright requirement.
Embodiment one
The present invention provides a kind of data flow acquisition methods.
Referring to Fig.1, Fig. 1 is a kind of flow chart of data flow acquisition methods provided in an embodiment of the present invention.
In example 1, this method comprises:
Step S10 responds user terminal to the access request of destination multimedia data, sets transcoding resource link to Access address, and according to the transcoded data stream of access address acquisition destination multimedia data.
It should be noted that the user terminal in this step is the access promoter for destination multimedia data, and this The executing subject of step can be to be previously stored with multi-medium data and directly can carry out providing respective objects to user terminal more The Multimedia data server of media data is also possible to that user terminal is replaced to access mesh to corresponding Multimedia data server Mark multi-medium data is simultaneously back to the proxy server of the user terminal, specifically should be according to the actual demand of user and specific Communication topology scene depending on.
In addition, the transcoded data stream in this step is to carry out the data flow that corresponding encoded converts to original data stream, And the original data stream mentioned in subsequent step is then most basic multimedia data stream, original data stream can be had The user terminal of any playing environment plays, but since original data stream lacks corresponding code optimization, in transmission or Generally require to generate biggish expense during broadcasting, and then current often according to the difference of user terminal playing environment, with Corresponding encoding mechanism carries out dynamic coding to the original data stream generated in real time, generates transcoded data stream, and then be defaulted as using Family terminal provides transcoded data stream to reduce whole resource overhead.Original data stream and transcoded data stream are real-time production Raw data flow, and have corresponding resource link, and then user can obtain respective class according to specific resource link The data flow of type, this content known to those skilled in the art are not done excessively repeat herein.
Step S11 judges the acquisition to transcoded data stream with the presence or absence of exception, if it is, successively executing step S12 And step S13;Otherwise, step S14 is executed.
The content modification of access address is source material link by step S12, and more according to access address acquisition target The original data stream of media data.
Original data stream is back to user terminal by step S13.
Transcoded data stream is back to user terminal by step S14.
It is understood that since transcoded data stream is the number for carrying out dynamic coding to original data stream and generating in real time According to stream type, it is thus possible to exist because of transcoding mechanism and initial data is incompatible or transcoding mistake due to causes in transcoded data stream Generation that is disconnected or generating the abnormal conditions such as messy code, and then normally provide transcoded data stream without normal direction user terminal, in order to ensure It still is able to reliably provide multi-medium data to user terminal under above-mentioned abnormal conditions, this method obtains transcoded data stream It takes process to be judged, when depositing when abnormal, the access address of multi-medium data is revised as source material link, in turn The original data stream that destination multimedia data are obtained according to access address, since original data stream is for the various of user terminal Playing environment has universality, therefore can be in the case where that normally can not obtain transcoded data stream, it is ensured that user terminal energy Enough stable playback destination multimedia data.It should be noted that judge that the acquisition to transcoded data stream whether there is exception, it can With particular by judging whether data flow accessed by transcoding resource link can not parse, i.e., if the data got Stream can not be parsed or be parsed mistake by user terminal, then it is assumed that exist to the acquisition of transcoded data stream abnormal;It is also possible to judge Whether corresponding transcoded data stream can not be got by transcoding resource link, i.e., if it can not be by transcoding resource link When getting data flow in multimedia server, then it is assumed that exist to the acquisition of transcoded data stream abnormal.In addition, in this method Signified transcoding resource link and source material link can be specially URL resource link;It, " will be original in this method Data flow is back to user terminal " and " transcoded data stream is back to user terminal " in " return " refer to be based on Original data stream and transcoded data are streamed to user terminal, due to such as by the correspondence established between user terminal It is not this method emphasis of interest that carries out data communication between devices, and is known to one of skill in the art Content, therefore this will not be repeated here.
Data flow acquisition methods provided by the present invention ask the access of destination multimedia data in response user terminal After asking, access address is set by transcoding resource link, and then the transcoding number of destination multimedia data is obtained according to access address It is then that source material links by the content modification of access address when the process for obtaining transcoded data stream is deposited when abnormal according to stream, And then the original data stream for obtaining the multi-medium data is linked according to source material, and be back to user terminal;When acquisition transcoding When the process of data flow is normal, then the transcoded data stream that will acquire is back to user terminal.As it can be seen that when passing through transcoding resource When the transcoded data stream that link obtains multi-medium data occurs abnormal, this method is original by the way that transcoding resource link to be revised as Resource link obtains the original data stream for capableing of basic guarantee user terminal normal use with this, and then is back to user's end End, therefore, original data stream can be supplied to by this method in time in the case where that can not provide a user transcoded data stream User ensures normal acquisition of the user for multi-medium data, and then the opposite high timeliness for meeting streaming media service with this Property require.
Embodiment two
Referring to Fig. 2, Fig. 2 is the flow chart of another data flow acquisition methods provided in an embodiment of the present invention.
As shown in Figure 2, as a preferred embodiment, step S12 includes:
Step S20, by calling the rewrite of Nginx service to request the content modification of access address to be source material Link, and according to the original data stream of access address acquisition destination multimedia data.
It should be noted that in view of in actual application scenarios, the quantity of user terminal is often more, Jin Eryou The access request quantity that each user terminal is initiated is also relatively large, it is thus possible to server apparatus be caused to be asked in processing access Operating pressure when asking is relatively large, and present embodiment is to be serviced when obtaining transcoded data stream appearance exception using Nginx Access address is revised as source material address by provided rewrite request, and then is obtained by modified access address The original data stream of destination multimedia data, since Nginx is serviced for other external network proxy services with higher Concurrent responding ability, therefore can more efficiently to each user terminal initiate access request handle, and then really Protect whole efficiency and stability of the server apparatus when responding the access request of user terminal.In the specific implementation, originally The proxy server that the preferred executing subject of embodiment can have Nginx to service for operation, and then proxy server is responding After the access request of each user terminal, the Multimedia data server of multi-medium data is stored with instead of each user terminal access, And the data flow for the destination multimedia data being accessed is back to the user terminal of response, due to acting on behalf of clothes in the case The action of business device is relatively single, therefore can utmostly guarantee the response efficiency to user terminal.
In addition, as a preferred embodiment, also being wrapped before setting access address for transcoding resource link It includes:
Judge whether destination multimedia data have transcoded data stream;
Access address is set by transcoding resource link if it is, executing, and the more matchmakers of target are obtained according to access address The step of transcoded data stream of volume data;
Otherwise, access address is set by source material link, and destination multimedia data is obtained according to access address Original data stream;
The step of original data stream is back to user terminal by execution.
It should be noted that due to consideration that in practical applications, it is understood that there may be the more matchmakers of the target that user terminal is accessed The case where volume data is without corresponding transcoding mechanism, therefore only original data stream, and without corresponding transcoded data stream, in this situation Under get time overhead required for multi-medium data for relative reduction user terminal, present embodiment is getting use It when the access request of family terminal, prejudges whether destination multimedia data have transcoded data stream, is directly incited somebody to action if without if Source material link is set as access address, and then the original data stream of destination multimedia data is obtained according to access address, and User terminal is returned to, obtains efficiency so as to improve the data flow of user terminal.
Referring to Fig. 3, Fig. 3 is the flow chart of another data flow acquisition methods provided in an embodiment of the present invention.
As shown in figure 3, as a preferred embodiment, before step S20, further includes:
Step S30 judges whether there is the other transcoding resource links mutually compatible with the transcoding rate of user terminal, if It is then successively to execute step S31 and step S32;Otherwise, step S20 is executed.
Step S31, by calling rewrite to request the content modification of access address to be other transcoding resource links, and Other transcoded data streams of destination multimedia data are obtained according to access address;
Other transcoded data streams are back to user terminal by step S32.
It should be noted that present embodiment allows in practical applications, there may be bases for destination multimedia data In the data flow for the various code rate that original data stream transcoding obtains, therefore present embodiment ought judge to obtain transcoded data stream It takes to deposit and further determines whether there are the other transcoding resource links mutually compatible with the transcoding rate of user terminal when abnormal, this Other transcoding resource links that place refers to correspond to its for being based on that original data stream transcoding is obtained, in addition to transcoded data stream Its transcoded data stream then passes through calling when there is the other transcoding resource link mutually compatible with the transcoding rate of user terminal The content modification of access address is other transcoding resource links, and obtains the more matchmakers of target according to access address by rewrite request Other transcoded data streams of volume data, and then other transcoded data streams are back to user terminal.Present embodiment can be Ensure to continue as user terminal when transcoded data obtains abnormal and the data flow optimized by transcoding, phase are provided to a certain extent To the whole resource overhead reduced when user obtains destination multimedia data.
In addition, as a preferred embodiment, obtaining the transcoded data of destination multimedia data according to access address Stream includes:
Transcoded data stream is obtained in preset first multimedia server according to access address;
Correspondingly, including: according to the original data stream that access address obtains destination multimedia data
Original data stream is obtained in preset second multimedia server according to access address.
It should be noted that the purpose of present embodiment is to obtain transcoded data stream in different multimedia servers And original data stream, therefore there are multiple multimedia servers to provide jointly for user terminal for default in present embodiment Destination multimedia data, and respectively in different multimedia servers obtain destination multimedia data transcoded data stream with And original data stream, it can be ensured that each multimedia server is only provided out a type of data flow, opposite to improve respectively The job stability of a multimedia server, and can ensure whole reliable when user terminal obtains destination multimedia data Property.
In addition, on the basis of a series of above-mentioned embodiments, as a preferred embodiment, destination multimedia Data include net cast data.
Due to consideration that user terminal requires more in terms of the real-time for obtaining video content in net cast field Height, therefore destination multimedia data are limited to net cast data by present embodiment, i.e., this method are applied to net cast When acquisition to video data, can guarantee the real-time and stability of net cast.
Embodiment three
Content based on the above embodiment, the scene embodiment that the present invention also provides a kind of under concrete application scene, tool The equipment topological relation of body scene is referring to FIG. 4, Fig. 4 is the topology diagram of scene embodiment provided in an embodiment of the present invention.
Topology diagram based on shown in Fig. 4, the main interaction flow of the present embodiment are as follows:
1. the proxy server that user terminal has Nginx to service to operation initiates a live streaming of the initiation based on GET request Stream is requested, and includes the transcoding resource link of URL form in live stream request;
2. the Nginx in proxy server, which is serviced, is transmitted to rewrite module for the transcoding resource link of URL form, allow Rewrite module determines whether to be adjusted;
3.rewrite returns to adjustment or the URL transcoding resource link without adjustment is serviced to Nginx;
4.Nginx service sends direct broadcast server for the URL transcoding resource link returned by rewrite module to make The transcoded data stream that live data is accessed for access address, is not present as direct broadcast server does not respond or return transcoded data stream Status information when, Nginx service URL transcoding resource link is sent to rewrite module again, to be adjusted to corresponding URL Source material link, and then Nginx service is again by URL source material linking request direct broadcast server, live data Original data stream and return to user terminal.
Example IV
Hereinbefore the embodiment of data flow acquisition methods is described in detail, the present invention also provides one kind Data flow acquisition device corresponding with this method, since the embodiment of components of system as directed is corresponded to each other with the embodiment of method part, Therefore the embodiment of device part refers to the description of the embodiment of method part, wouldn't repeat here.
Fig. 5 is a kind of structure chart of data flow acquisition device provided in an embodiment of the present invention.
It is as shown in Figure 5, data flow acquisition device 1 provided by the present invention, including memory 11, processor 12 and Bus 13, being stored on memory 11 can transmit and the data flow run on processor 12 obtains program, number in bus 13 It is obtained when program is executed by processor 12 according to stream and realizes such as above-mentioned data flow acquisition methods.
Data flow acquisition device provided by the present invention asks the access of destination multimedia data in response user terminal After asking, access address is set by transcoding resource link, and then the transcoding number of destination multimedia data is obtained according to access address It is then that source material links by the content modification of access address when the process for obtaining transcoded data stream is deposited when abnormal according to stream, And then the original data stream for obtaining the multi-medium data is linked according to source material, and be back to user terminal;When acquisition transcoding When the process of data flow is normal, then the transcoded data stream that will acquire is back to user terminal.As it can be seen that when passing through transcoding resource When the transcoded data stream that link obtains multi-medium data occurs abnormal, the present apparatus is original by the way that transcoding resource link to be revised as Resource link obtains the original data stream for capableing of basic guarantee user terminal normal use with this, and then is back to user's end End, therefore, original data stream can be supplied to by the present apparatus in time in the case where that can not provide a user transcoded data stream User ensures normal acquisition of the user for multi-medium data, and then the opposite high timeliness for meeting streaming media service with this Property require.
In the present embodiment, data flow acquisition device 1 can be PC (PersonalComputer, PC), can also To be that smart phone, tablet computer, palm PC, portable computer, intelligent router, mine machine, network storage equipment terminal are set It is standby.
The device 1 can be the node of composition CDN network or block chain network.
Wherein, memory 11 includes at least a type of readable storage medium storing program for executing, and readable storage medium storing program for executing includes flash memory, hard Disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 It can be the internal storage unit of data flow acquisition device 1 in some embodiments, such as the data flow acquisition device 1 is hard Disk.Memory 11 is also possible to the External memory equipment of data flow acquisition device 1, such as data flow in further embodiments The plug-in type hard disk being equipped on acquisition device 1, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include that data flow obtains dress The internal storage unit for setting 1 also includes External memory equipment.Memory 11 can be not only used for storage and be installed on data flow acquisition The application software and Various types of data of device 1, such as data flow obtain the code etc. of program, can be also used for temporarily storing Data through exporting or will export.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, such as execute data flow and obtain program etc..
The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, letter Claim PCI) and bus or expanding the industrial standard structure (extended industry standard architecture, referred to as EISA) bus etc..The bus can be divided into address bus, data/address bus, control bus etc..Only to be used in Fig. 5 convenient for indicating One thick line indicates, it is not intended that an only bus or a type of bus.
Further, data flow acquisition device can also include network interface, and network interface optionally may include wired Interface and/or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in the device 1 and other electronic equipments it Between establish communication connection.
Optionally, which can also include user interface, and user interface may include display (Display), defeated Enter unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It can Selection of land, in some embodiments, display can be LED display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..Wherein, display can also fit When be known as display screen or display unit, for be shown in the information handled in data flow acquisition device 1 and for show can Depending on the user interface changed.
Embodiment five
In addition, the present invention also provides a kind of data flows to obtain system, Fig. 6 is a kind of data provided in an embodiment of the present invention Flow the structure chart of acquisition system.
As shown in fig. 6, data flow provided in an embodiment of the present invention obtains system, comprising:
Setting unit 20 is responded, for responding user terminal to the access request of destination multimedia data, by transcoding resource Link is set as access address, and the transcoded data stream of destination multimedia data is obtained according to access address.
Abnormal deciding means 21, for judging the acquisition to transcoded data stream with the presence or absence of exception, if it is, successively Address modification unit 22 and initial data return unit 23 are executed, otherwise, executes transcoded data return unit 24.
Unit 22 is modified in address, for being source material link by the content modification of access address, and according to access address Obtain the original data stream of destination multimedia data.
Initial data return unit 23, for original data stream to be back to user terminal.
Transcoded data return unit 24, for transcoded data stream to be back to user terminal.
Data flow provided by the present invention obtains system, asks in response user terminal to the access of destination multimedia data After asking, access address is set by transcoding resource link, and then the transcoding number of destination multimedia data is obtained according to access address It is then that source material links by the content modification of access address when the process for obtaining transcoded data stream is deposited when abnormal according to stream, And then the original data stream for obtaining the multi-medium data is linked according to source material, and be back to user terminal;When acquisition transcoding When the process of data flow is normal, then the transcoded data stream that will acquire is back to user terminal.As it can be seen that when passing through transcoding resource When the transcoded data stream that link obtains multi-medium data occurs abnormal, this system is original by the way that transcoding resource link to be revised as Resource link obtains the original data stream for capableing of basic guarantee user terminal normal use with this, and then is back to user's end End, therefore, original data stream can be supplied to by this system in time in the case where that can not provide a user transcoded data stream User ensures normal acquisition of the user for multi-medium data, and then the opposite high timeliness for meeting streaming media service with this Property require.
In addition, being stored with number on computer readable storage medium the present invention also provides a kind of computer readable storage medium Program is obtained according to stream, data flow obtains program and can be executed by one or more processor, to realize as above-mentioned data flow obtains Take method.
Computer readable storage medium provided by the present invention, in visit of the response user terminal to destination multimedia data After asking request, access address is set by transcoding resource link, and then turning for destination multimedia data is obtained according to access address Code data flow, when obtain transcoded data stream process deposit when abnormal, then by the content modification of access address be source material chain It connects, and then links the original data stream for obtaining the multi-medium data according to source material, and be back to user terminal;Work as acquisition When the process of transcoded data stream is normal, then the transcoded data stream that will acquire is back to user terminal.As it can be seen that when passing through transcoding When the transcoded data stream that resource link obtains multi-medium data occurs abnormal, this computer readable storage medium is by by transcoding Resource link is revised as source material link, and the initial data for capableing of basic guarantee user terminal normal use is obtained with this Stream, and then it is back to user terminal, therefore, this computer readable storage medium can not provide a user transcoded data In the case where stream, original data stream is supplied to user in time, user's normally obtaining for multi-medium data is ensured with this It takes, and then the opposite high-timeliness requirement for meeting streaming media service.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
The computer program product includes one or more computer instructions.Described in loading and execute on computers When computer program instructions, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer It can be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be with Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer-readable storage Medium transmission, for example, the computer instruction can be from a web-site, computer, server or data center by having Line (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode are to another A web-site, computer, server or data center are transmitted.The computer readable storage medium can be calculating Any usable medium that machine can store either includes integrated server, the data center etc. of one or more usable mediums Data storage device.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, ) or semiconductor medium (such as solid state hard disk Solid State Disk (SSD)) etc. DVD.
It is apparent to those skilled in the art that for convenience and simplicity of description, foregoing description is System, the specific work process of device and unit can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or group Part can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown Or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, between device or unit Coupling or communication connection are connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, as unit The component of display may or may not be physical unit, it can and it is in one place, or may be distributed over more In a network unit.Some or all of unit therein can be selected to realize this embodiment scheme according to the actual needs Purpose.
It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution essence of the application On all or part of the part that contributes to existing technology or the technical solution can be with the shape of software product in other words Formula embodies, which is stored in a storage medium, including some instructions are used so that a calculating Machine equipment (can be personal computer, server or the network equipment etc.) executes each embodiment the method for the application All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store The medium of program code.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And And the terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that Process, device, article or method including a series of elements not only include those elements, but also including not arranging clearly Other element out, or further include for this process, device, article or the intrinsic element of method.Not more In the case where limitation, the element that is limited by sentence "including a ...", it is not excluded that include the element process, device, There is also other identical elements in article or method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content, it is relevant to be applied directly or indirectly in other Technical field is included within the scope of the present invention.

Claims (10)

1. a kind of data flow acquisition methods, which is characterized in that the described method includes:
User terminal is responded to the access request of destination multimedia data, sets access address, and root for transcoding resource link The transcoded data stream of the destination multimedia data is obtained according to the access address;
Judge the acquisition to the transcoded data stream with the presence or absence of abnormal;
If it is, being source material link by the content modification of the access address, and institute is obtained according to the access address State the original data stream of destination multimedia data;
The original data stream is back to the user terminal;
Otherwise, the transcoded data stream is back to the user terminal.
2. the method according to claim 1, wherein the content modification by the access address is original money Linking sources, and include: according to the original data stream that the access address obtains the destination multimedia data
Rewrite by calling Nginx service requests to be source material link by the content modification of the access address, And the original data stream of the destination multimedia data is obtained according to the access address.
3. according to the method described in claim 2, it is characterized in that, it is described by transcoding resource link be set as access address it Before, the method also includes:
Judge whether the destination multimedia data have the transcoded data stream;
If it is, execution is described to set access address for transcoding resource link, and according to access address acquisition The step of transcoded data stream of destination multimedia data;
Otherwise, the access address is set by source material link, and the target is obtained according to the access address The original data stream of multi-medium data;
Execute the described the step of original data stream is back to the user terminal.
4. according to the method described in claim 2, it is characterized in that, described by calling the rewrite of Nginx service to request Before being source material link by the content modification of the access address, the method also includes:
Judge whether there is the other transcoding resource links mutually compatible with the transcoding rate of the user terminal;
If it is, by calling the rewrite request to provide the content modification of the access address for other transcodings Linking sources, and obtain according to the access address other transcoded data streams of the destination multimedia data;
Other transcoded data streams are back to the user terminal;
Otherwise, it executes described by calling the rewrite of Nginx service to request the content modification of the access address to be described The step of source material links.
5. according to the method described in claim 2, it is characterized in that, described obtain the more matchmakers of target according to the access address The transcoded data stream of volume data includes:
The transcoded data stream is obtained in preset first multimedia server according to the access address;
Correspondingly, the original data stream for obtaining the destination multimedia data according to the access address includes:
The original data stream is obtained in preset second multimedia server according to the access address.
6. according to claim 1 to method described in 5 any one, which is characterized in that the destination multimedia data include view Frequency live data.
7. a kind of data flow acquisition device, which is characterized in that described device includes memory, processor and bus, described to deposit The data flow acquisition program that can be transmitted and run on the bus on the processor, the data flow are stored on reservoir It obtains when program is executed by the processor and realizes such as method as claimed in any one of claims 1 to 6.
8. device according to claim 7, which is characterized in that described device is composition CDN network or block chain network Node.
9. a kind of data flow obtains system, which is characterized in that the system comprises:
Response setting unit sets transcoding resource link for responding user terminal to the access request of destination multimedia data It is set to access address, and obtains the transcoded data stream of the destination multimedia data according to the access address;
Abnormal deciding means, for judging the acquisition to the transcoded data stream with the presence or absence of exception, if it is, successively executing Unit and initial data return unit are modified in address, otherwise, execute transcoded data return unit;
Unit is modified in the address, for being source material link by the content modification of the access address, and according to the visit Ask that address obtains the original data stream of the destination multimedia data;
The initial data return unit, for the original data stream to be back to the user terminal;
The transcoded data return unit, for the transcoded data stream to be back to the user terminal.
10. a kind of computer readable storage medium, which is characterized in that be stored with data flow on the computer readable storage medium Program is obtained, the data flow obtains program and can be executed by one or more processor, to realize as in claim 1 to 6 Described in any item data flow acquisition methods.
CN201811593075.XA 2018-12-25 2018-12-25 Data stream acquisition method, device, equipment and medium Active CN109756488B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811593075.XA CN109756488B (en) 2018-12-25 2018-12-25 Data stream acquisition method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811593075.XA CN109756488B (en) 2018-12-25 2018-12-25 Data stream acquisition method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN109756488A true CN109756488A (en) 2019-05-14
CN109756488B CN109756488B (en) 2021-09-24

Family

ID=66403284

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811593075.XA Active CN109756488B (en) 2018-12-25 2018-12-25 Data stream acquisition method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN109756488B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113473183A (en) * 2021-06-29 2021-10-01 华夏城视网络电视股份有限公司 Dynamic and static media stream batch processing method applied to fusion media
CN113596467A (en) * 2020-04-30 2021-11-02 北京达佳互联信息技术有限公司 Transcoding service detection method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060123126A1 (en) * 2004-12-07 2006-06-08 Samsung Electronics Co.; Ltd Optical network for bi-directional wireless communication
CN101778104A (en) * 2009-12-29 2010-07-14 常州中流电子科技有限公司 System and method for playing stream media by using self-adaption bandwidth
CN103379362A (en) * 2012-04-24 2013-10-30 腾讯科技(深圳)有限公司 Video-on-demand method and system
CA2804741A1 (en) * 2013-01-21 2014-07-21 Disternet Technology, Inc. Media server
CN105407381A (en) * 2015-10-30 2016-03-16 北京奇艺世纪科技有限公司 Video program play method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060123126A1 (en) * 2004-12-07 2006-06-08 Samsung Electronics Co.; Ltd Optical network for bi-directional wireless communication
CN101778104A (en) * 2009-12-29 2010-07-14 常州中流电子科技有限公司 System and method for playing stream media by using self-adaption bandwidth
CN103379362A (en) * 2012-04-24 2013-10-30 腾讯科技(深圳)有限公司 Video-on-demand method and system
CA2804741A1 (en) * 2013-01-21 2014-07-21 Disternet Technology, Inc. Media server
CN105407381A (en) * 2015-10-30 2016-03-16 北京奇艺世纪科技有限公司 Video program play method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张宁: ""互信息在MPEG2到JVT/AVC/H.264转码中的应用"", 《万方》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596467A (en) * 2020-04-30 2021-11-02 北京达佳互联信息技术有限公司 Transcoding service detection method and device, electronic equipment and storage medium
CN113596467B (en) * 2020-04-30 2024-03-12 北京达佳互联信息技术有限公司 Transcoding service detection method and device, electronic equipment and storage medium
CN113473183A (en) * 2021-06-29 2021-10-01 华夏城视网络电视股份有限公司 Dynamic and static media stream batch processing method applied to fusion media
CN113473183B (en) * 2021-06-29 2023-05-05 华夏城视网络电视股份有限公司 Dynamic and static media stream batch processing method applied to fusion media

Also Published As

Publication number Publication date
CN109756488B (en) 2021-09-24

Similar Documents

Publication Publication Date Title
JP7058654B2 (en) Resource sharing methods, equipment and systems
CN109933420A (en) Node tasks dispatching method, electronic equipment and system
CN102594697A (en) Load balancing method and device
CN110099078A (en) Communication between devices, message synchronization method, apparatus, equipment and storage medium
CN105681462A (en) Cluster system based on message router, and data communication transfer method
CN101304360A (en) System and method for virtualization of user digital terminal
CN110049059A (en) A kind of outer net equipment and Intranet communication between devices method and relevant apparatus
CN102595208A (en) Cloud terminal control networking video image processing streaming media service system and method
CN102164117A (en) Video transcoding using a proxy device
CN102325186A (en) Remote service calling method and system
CN109756488A (en) A kind of data flow acquisition methods, device, equipment and medium
CN110831039A (en) Data transmission method and transmission server in multi-path concurrent system
CN110278278A (en) A kind of data transmission method, system, device and computer media
CN109889521A (en) Memory, communication channel multiplexing implementation method, device and equipment
CN111491037A (en) Communication method with object storage server through SFTP data stream
GB2508403A (en) Request queue scheduler based on deadlines
CN102802041B (en) Implement method for intelligent streaming media server supporting a plurality of real-time dynamic data sources
CN108259605B (en) Data calling system and method based on multiple data centers
EP2892213B1 (en) Electronic device for communication within a network and method for operating an electronic device
CN110012107A (en) A kind of data communications method, unit, system and storage medium
CN110290009A (en) A kind of data dispatching method, device and computer readable storage medium
CN113382033B (en) Central control adaptation method, device, equipment and storage medium
CN102902593B (en) Agreement distributing and processing system based on caching mechanism
CN110430290A (en) Resource address update method, computer installation and storage medium
CN102238505B (en) Method and system for processing multi-user parallel signalling tracking at client

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
GR01 Patent grant
GR01 Patent grant