CN107911712A - Data buffering method and electronic equipment - Google Patents

Data buffering method and electronic equipment Download PDF

Info

Publication number
CN107911712A
CN107911712A CN201711243831.1A CN201711243831A CN107911712A CN 107911712 A CN107911712 A CN 107911712A CN 201711243831 A CN201711243831 A CN 201711243831A CN 107911712 A CN107911712 A CN 107911712A
Authority
CN
China
Prior art keywords
buffer
data
index
culture
request
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
CN201711243831.1A
Other languages
Chinese (zh)
Other versions
CN107911712B (en
Inventor
尹左水
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201711243831.1A priority Critical patent/CN107911712B/en
Publication of CN107911712A publication Critical patent/CN107911712A/en
Application granted granted Critical
Publication of CN107911712B publication Critical patent/CN107911712B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/64Addressing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Abstract

An embodiment of the present invention provides a kind of data buffering method and electronic equipment, the described method includes:The request of data that player is sent is received, the request of data includes the network address for treating request data and request position;The the first buffer culture index entry that whether there is with the network address and the request position correspondence is inquired about in buffer DB;If there are the first buffer culture index entry, buffer culture is obtained according to the first buffer culture index entry;The buffer culture is fed back into the player, so that player plays buffered data wherein included.By implementing the embodiment of this programme, the problem of repetition being overcome to buffer.

Description

Data buffering method and electronic equipment
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of data buffering method and electronic equipment.
Background technology
When carrying out stream medium data broadcasting, viewing end generally stream medium data can be buffered to local, by player from Data are read in buffer to play out.But current player is generally adopted by single buffer buffering, easily goes out Now repeat buffering phenomenon.
So-called single buffer buffering, is exactly in simple terms, it is assumed that preceding 500MB is video data in stream medium data Stream, subsequent 100MB is voice data stream, it is assumed that starting buffer position is the starting position of the stream medium data, then singly slow Rush under device buffering, in sequence buffer the stream medium data, i.e., delay again after 500MB data before first buffering 100MB data after punching.But when player plays, influenced by streaming media playing rule, may exist such Situation:Assuming that the buffered video data stream of preceding 50MB of buffer, before player is read from buffer 20MB videos After data flow, voice data stream corresponding with the 20MB video data streams is assumed positioned at the position of 500-510MB, due to this When buffer in do not buffer the voice data stream also, then at this time buffer go immediately buffering positioned at 500-510MB audio Data flow, 30MB video data streams after buffer before then needing first to empty at this time, so as to by the voice data under buffering Stream is deposited into the memory space after following preceding 20MB video data streams closely, so that player can read the voice data of the 10MB Flow to synchronize broadcasting with this 20MB video data stream.But after the 10MB voice data streams play, buffer also needs Again that 30MB video data stream being cleared is buffered again, the phenomenon for repeating buffering so just occur.It is this heavy On the one hand the phenomenon buffered again is easy to cause picture and interim card situation occurs, be on the one hand also the waste to buffered resource.
The content of the invention
In view of this, the embodiment of the present invention provides a kind of data buffering method and electronic equipment, to overcome repetition to buffer The problem of.
In a first aspect, the embodiment of the present invention provides a kind of data buffering method, including:
The request of data that player is sent is received, the request of data includes network address and the request for treating request data Position;
The the first buffering text that whether there is with the network address and the request position correspondence is inquired about in buffer DB Part index entry;
If there are the first buffer culture index entry, buffering text is obtained according to the first buffer culture index entry Part;
The buffer culture is fed back into the player, so that player plays buffer number wherein included According to.
Second aspect, the embodiment of the present invention provide a kind of electronic equipment, including:
Including memory and processor;
The memory is used to store one or more computer instruction, wherein, one or more computer instruction The data buffering method that first aspect present invention provides is realized when being performed by the processor.
The third aspect, the embodiment of the present invention provide a kind of computer-readable recording medium for being stored with computer program, institute Stating computer program makes computer realize the data buffering method that first aspect present invention provides when performing.
A kind of data buffering method and electronic equipment that the embodiment of the present invention is provided, when player initiates request of data When, the first buffer culture index entry whether being stored with request position correspondence is inquired about in buffer DB, when it is present basis First buffer culture index entry obtains buffer culture and feeds back to player and plays out.It follows that in the embodiment of the present invention Using data Caching Mechanism be database combination file storage in the form of realize, wherein, buffer the data got off with file Form is stored, and the storage index information of buffer culture is then stored with database.Based on this, once data are buffered Inquiry is obtained and used when being then deposited into some buffer culture for needing, identical without repeating to buffer Data the problem of.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is attached drawing needed in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs Some bright embodiments, for those of ordinary skill in the art, without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
The system framework figure that Fig. 1 is suitable for by data buffering method provided in an embodiment of the present invention;
Fig. 2 is the flow chart of data buffering method embodiment one provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic diagram of optional implementation of buffer DB;
Fig. 4 is the schematic diagram of another optional implementation of buffer DB;
Fig. 5 is the flow chart of data buffering method embodiment two provided in an embodiment of the present invention;
Fig. 6-Figure 13 is the buffer DB content change schematic diagram in embodiment illustrated in fig. 5 implementation procedure;
Figure 14 is the structure diagram of data buffer device provided in an embodiment of the present invention;
Figure 15 is the structure diagram of electronic equipment provided in an embodiment of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art All other embodiments obtained without creative efforts, belong to the scope of protection of the invention.
The term used in embodiments of the present invention is only merely for the purpose of description specific embodiment, and is not intended to be limiting The present invention.In the embodiment of the present invention and " one kind " of singulative used in the attached claims, " described " and "the" It is also intended to including most forms, unless context clearly shows that other implications, " a variety of " generally comprise at least two, but not Exclusion includes at least one situation.
It should be appreciated that term "and/or" used herein is only a kind of incidence relation for describing affiliated partner, represent There may be three kinds of relations, for example, A and/or B, can represent:Individualism A, while there are A and B, individualism B these three Situation.In addition, character "/" herein, it is a kind of relation of "or" to typically represent forward-backward correlation object.
It will be appreciated that though XXX may be described using term first, second, third, etc. in embodiments of the present invention, but These XXX should not necessarily be limited by these terms.These terms are only used for distinguishing XXX.For example, model of the embodiment of the present invention is not being departed from In the case of enclosing, the first XXX can also be referred to as the 2nd XXX, and similarly, the 2nd XXX can also be referred to as the first XXX.
Depending on linguistic context, word as used in this " if ", " if " can be construed to " ... when " or " when ... " or " in response to determining " or " in response to detection ".Similarly, depending on linguistic context, phrase " if it is determined that " or " such as Fruit detects (condition or event of statement) " " when definite " or " in response to determining " can be construed to or " when detection (is stated Condition or event) when " or " in response to detect (condition or event of statement) ".
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability Comprising, so that commodity or system including a series of elements not only include those key elements, but also including without clear and definite The other element listed, or further include as this commodity or the intrinsic key element of system.In the feelings not limited more Under condition, the key element that is limited by sentence "including a ...", it is not excluded that in the commodity including the key element or system also There are other identical element.
Further what deserves to be explained is, the order in various embodiments of the present invention between each step is adjustable, and is not It must be performed according to the order of following citing.
As shown in Figure 1, obtaining certain in server request of the terminal device to network side treats request data such as certain audio and video Under the scene of data, terminal device includes being used to show that this treats the player of request data and agent application journey for user Sequence, the agent application can be installed in the form of plug-in unit in terminal device.The effect of the agent application is: It with the addition of a layer proxy between player and the server of network side so that player can be read from agent application The data to be buffered got off play out, and agent application then loads simultaneously buffered data from server.In this way, player Agent application can be directly read and be buffered in local data, existing single buffer mechanism is based on without player Buffered data, is used for Caton phenomenon caused by repetition buffers so as to reduce.
Above-mentioned terminal device can be smart mobile phone, desktop computer, tablet computer, the Streaming Media projection with data communication function Machine etc..
As shown in Fig. 2, with the angle of agent application, the embodiment of data buffering method provided in an embodiment of the present invention One, it may include steps of:
S101:The request of data that player is sent is received, request of data includes the network address for treating request data and please Ask position.
When user is needed by resource in player browse network, operation is interacted to player, so that broadcasting Put device and send request of data.For example, if user needs to watch a certain collection TV play, the collection TV can be clicked on a player Acute corresponding control, and then trigger player and send request of data.
It should be noted that request of data can be that (HyperText Transfer Protocol, hypertext pass HTTP Defeated agreement) request or FTP (File Transfer Protocol, File Transfer Protocol) request.
Network address in request of data can be universal resource locator (URL), indicate and treat request data in network The corresponding address in side.Above-mentioned request position refers to position that player requests play relative to treating the phase of request data generally speaking To position, such as, it is 500MB sizes to treat request data, and the position that it is 100MB which, which is such as, that is, ask to treat from this Commenced play out at the 100MB positions of request data.
S102:Inquire about in buffer DB whether there is and delay with the first of above-mentioned network address and above-mentioned request position correspondence File index item is rushed, if performing step S103-S104 in the presence of if, if being not present, performs step S105-S106.
S103:Buffer culture is obtained according to the first buffer culture index entry.
S104:Above-mentioned buffer culture is fed back into player, so that player plays buffered data wherein included.
S105:Data since treating to be obtained from request position in the corresponding server of request data, with generation buffering text Part simultaneously updates buffer DB, wherein, the data of preset data amount size are included in each buffer culture.
S106:The buffer culture of generation is fed back into player, so that player plays buffered data wherein included.
In the embodiment of the present invention, realize and treated at the buffering of request data by the way of database and file are combined Reason, wherein, which is the buffer DB that the embodiment of the present invention refers to, file is to be referred in the embodiment of the present invention Buffer culture.In short, can be by the number of certain data volume size after the data of certain data volume size are buffered Buffer culture being formed according in one file of deposit, so that, with the increase of the data buffered, can be formed more and more Buffer culture, the data of certain data volume size, and the data stored in different buffer cultures are stored in each buffer culture Difference, all to treat the part of request data.And the storage index information of each buffer culture is then stored with buffer DB.
Under an optional situation, by treat request data be some audio, video data exemplified by, when user is opened by player The network linking address of the audio, video data and when entering broadcasting pictures, under default situations, agent application can automatically from Head starts to buffer audio, video data, i.e. agent application can read the audio, video data from the beginning to server, so that, often When reading the audio, video data of certain data volume size such as 10MB, a buffer culture can be generated immediately and is used to store this The audio, video data of 10MB, and the buffer culture is stored in local memory space, and then formed in buffer DB One buffer culture index entry.It is understood that it can deposited in the buffer culture index entry including corresponding buffer culture Store up which section the storage location in space and the audio, video data in the buffer culture are for whole audio, video data The index informations such as the corresponding network address of data and audio, video data of position.Wherein, which can be that terminal is set In standby memory or other memories.
Based on this, it is assumed that each buffer culture index entry included in traversal buffer DB is found:Wrapped in buffer DB There is the network address in being asked with current data in each buffer culture index entry contained and ask the first buffering of position correspondence File index item, then illustrate the local buffered data having existed for needed for current request, at this time, based on the first buffer culture rope Draw item and obtain corresponding buffer culture, the buffer culture of acquisition is fed back into player so that player can play it is therein Buffered data.
Wherein, a buffer culture index entry corresponds to a buffer culture, includes in the buffer culture index entry pair The data buffering initial position of buffered data in the buffer culture answered and data buffering end position, the i.e. buffered data Relative to the position section for treating request data, so that, if request position is located at the corresponding data of certain buffer culture index entry Buffer between initial position and data buffering end position, it may be considered that this buffer culture index entry is with asking position Corresponding first buffer culture index entry.So as to store position according to the buffer culture included in the first buffer culture index entry Put and obtain corresponding buffer culture.
On the contrary, each buffer culture index entry for assuming to include in traversal buffer DB is found:Wrapped in buffer DB First that the network address in being asked with current data and request position correspondence are not present in each buffer culture index entry contained is slow File index item is rushed, then illustrates that the requested data of user are not got off also by buffering at this time.At this time, agent application can be with The data that request position starts are obtained from server, and generates one after the data of certain data volume size are often got and delays Rush file to be stored in local storage space, and update buffer DB, i.e., increase corresponding one in buffer DB and delay File index item is rushed, the buffer culture of generation can be fed back player afterwards plays out.
It follows that the data Caching Mechanism used in the embodiment of the present invention is the form reality of database combination file storage Existing, wherein, buffer the data got off and stored with document form, the storage index of buffer culture is then stored with database Information.Based on this, inquire about and obtain when can be deposited into some buffer culture if data are buffered for needing And the problem of being used, identical data are buffered without repetition.In addition, by the mechanism, can be accessed in player Into row buffering when optional position, it will not repeat to buffer, caused by reducing repetition buffering the occurrence of interim card, improve User experience.
The storage index information that buffer culture is stored with buffer DB is referred in previous embodiment, in an optional implementation In example, as shown in figure 3, a tables of data can be only included in the buffer DB, any bar buffer culture in the tables of data Index entry can include the following storage index information anticipated shown in Fig. 3:Index entry mark (ID), network address, data buffering Initial position, data buffering end position, buffer culture storage location.
In another alternative embodiment, as shown in figure 4, three tables of data can be included in the buffer DB:Network Location concordance list, buffer index table, File Index Table, can be associated by index entry ID between these three tables of data.
Wherein, network address concordance list is used to store network address index entry, can be wrapped in each network address index entry Include:Network address index entry identifies such as ID1, and network address, alternatively, can also be wrapped in each network address index entry Include:Data total size, that is, treat the total amount of data of request data.
Wherein, buffer index table is used to store buffer index item, can include in each buffer index item:Corresponding network Allocation index item identifies such as ID1, buffer index item mark such as ID2, and data buffering initial position and data buffering knot Beam position, alternatively, can also include in each buffer index item:Buffer culture number.Each buffer index item corresponds to one Secondary buffering course, that is, describe buffered in a buffering course treat request data where (data buffering initial position) To where the data of (data buffering end position), and how many buffering texts are this time generated in buffering course altogether Part.
Wherein, File Index Table is used to store buffer culture index entry, and a buffer culture index entry corresponds to one and delays Rush file.It can include in each buffer culture index entry:Corresponding buffer index item identifies such as ID2, file index item mark Knowledge such as ID3, ID4, data buffering initial position and data buffering end position corresponding to corresponding buffer culture, and accordingly The storage location of buffer culture, alternatively, can also include in each file index item:Buffer culture size, i.e., each buffering The buffered data of how many data volume is stored in file.
The form of above-mentioned tertiary storage, can more quickness and high efficiency inquiry buffer DB in whether include with it is current Ask the buffered data of position correspondence.
Specifically, first inquire about network address concordance list, if it find that wherein do not include with current request of data The corresponding index entry of network address, then both can determine whether buffered data not corresponding with the request of data;Further, such as There is index entry corresponding with the network address in fruit network address concordance list, then can with so that inquire about buffer index table whether deposit In the index entry with asking position correspondence, if it is present explanation certainly exists required buffered data, if it does not exist, then Illustrate required buffered data is not present, without file index table again.A buffering being additionally, since in buffer index table Data buffering initial position and data buffering end position in index entry correspond to a buffering course and buffer what is got off Whole buffered datas, would correspond to multiple buffer cultures, and therefore, the index entry number in the buffer index table is much smaller than text Index entry number in part concordance list, it is thus possible to can determine that by a small amount of index entry number inquired about in buffer index table It whether there is required buffered data in buffer DB, agility is preferable.
With reference to the organizational form of the buffer DB shown in Fig. 4, data buffering provided in an embodiment of the present invention is introduced A kind of specific implementation process of method, as shown in figure 5, embodiment two includes the following steps:
S201:The request of data that player is sent is received, request of data includes the network address for treating request data and please Ask position.
S202:It whether there is network address index entry corresponding with network address in inquiry network address concordance list, if depositing Step S203 is then being performed, if being not present, is performing step S208.
S203:Determine in buffer index table to whether there is in buffer index item corresponding with network address index entry mark with The buffer index item of position correspondence is asked, if in the presence of, step S204-S207 is performed, if being not present, execution step S209.
Wherein, the buffer index item with asking position correspondence includes buffer index item mark, the first data buffering originates Position and the first data buffering end position, request position are located at the first data buffering initial position and the first data buffering knot Between beam position.
S204:The first buffering text of position correspondence is obtained with buffer index item mark and asked from File Index Table Part index entry, the first buffer culture index entry include the second data buffering initial position, the second data buffering end position and The storage location of first buffer culture, request position are located at the second data buffering initial position and the second data buffering end position Between.
S205:According to the storage location of the first buffer culture obtain the first buffer culture, if in File Index Table exist with At least one second buffer culture index entry of first buffer culture index entry continuity index, then according at least one second buffering The storage location of the second buffer culture in file index item, obtains corresponding at least one second buffer culture, the first buffering File and at least one second buffer culture composition buffer culture.
Wherein, the continuity index refers to that the data buffering initial position of the latter buffer culture index entry is delayed with previous The data buffering end position for rushing file index item is adjacent.
S206:The buffer culture of acquisition is fed back into the player, has been buffered so that player plays are wherein included Data.
S207:If the first data buffering end position is not up to the data final position for treating request data, and the first number It is not present according to buffering end position in other buffer index items in buffer index table, then from treating the corresponding service of request data The data that the first data buffering end position starts are obtained from device, with continue generate buffer culture and update File Index Table and Buffer index table.
S208:Increase new network address index entry in network address concordance list, new network address index entry includes institute State network address and new network address index mark.
S209:Increase new buffer index item in buffer index table, new buffer index item includes the new network address Index mark, new buffer index item mark, the 3rd data buffering initial position and the 3rd data buffering end position, the 3rd data Buffering initial position is assigned a value of the request position.
S210:Since the data treating to be obtained from request position in the corresponding server of request data, iteration perform as follows Process, until meeting iteration cut-off condition:If the current data that obtained reach preset data amount size, generation includes currently The new buffer culture of data is obtained, new buffer culture is stored in default memory space;Increase the 3rd is slow in File Index Table File index item is rushed, the 3rd buffer culture index entry includes new buffer index item mark, new file index entry mark, the 4th number According to the storage location of buffering initial position, the 4th data buffering end position and new buffer culture in default memory space;More New 3rd data buffering end position is the 4th data buffering end position.
Wherein, the iteration cut-off condition includes:4th data buffering end position has reached the number for treating request data According to final position, alternatively, receiving new request of data.
S211:The buffer culture of generation is fed back into player, so that player plays buffered data wherein included.
For ease of understanding, below with a for example bright above-mentioned implementation procedure.Assuming that treat that request data is audio and video number According to the conceptual data amount size of the audio, video data is 500MB, and network address ###, request position is 100MB, and is assumed Buffer culture data volume size is 10MB.
The first is assumed:Assuming that the content stored in current buffer DB in each concordance list is as shown in fig. 6, according to number Network address concordance list is inquired about first according to request, finds wherein there is one corresponding with the network address ### in request of data Network address index entry, the index entry of the network address are identified as ID1.And then inquire about corresponding with the ID1 in buffer index table Buffer index item, it is assumed that corresponding buffer index item is identified as ID2, and the first data in the buffer index item are delayed Rush initial position and the first data buffering end position be respectively 80MB and 120MB, due to request position 100MB be located at 80MB with Between 120MB, illustrate that there is the buffered data met needed for request of data.And then inquire about and be somebody's turn to do in File Index Table ID2 and the corresponding first buffer culture index entries of request position 100MB, the first buffer culture index entry is ID5 correspondences in Fig. 6 Index entry because including ID2 in the buffer culture index entry, and ask position 100MB to be located at the buffer culture index entry In the second data buffering initial position 100MB and the second data buffering end position 110MB between so that, corresponded to according to ID5 Buffer culture index entry in the first buffer culture storage location L3, obtain the first buffer culture.Further, since file rope Draw at least one second buffer culture index entry ID6 existed in table with the first buffer culture index entry ID5 continuity indexes, then root According to the storage location L4 of the second buffer culture at least one second buffer culture index entry, corresponding at least one the is obtained Two buffer cultures, broadcast so as to which the buffer culture being made of the first buffer culture and at least one second buffer culture is fed back to Put device.Wherein, the data buffering initial position 110MB of the corresponding buffer culture index entries of ID6 is indexed with previous buffer culture The data buffering end position 110MB of item ID5 is adjacent.
Wherein, why by the buffered data after the data in the first buffer culture, i.e. in the second buffer culture It is because in practical applications, user is during audio and video watchs, when indicating from some position that data, which are also fed back to player, Put after starting viewing, generally require the continuous audio and video data streams provided to the user from after the position.
Further, since according to the storage content in Current buffer database, currently buffered data only buffer To the position of 120MB, the data after 120MB do not buffer also, because being not present and the number after 120MB in buffer index table It is to ensure user in the case where not triggering new request of data therefore according to corresponding buffer index item, can be after smooth viewing Continuous data, then also need since the 120MB positions, continues from the follow-up data of server buffers.Specifically, often it is buffered to A buffer culture is generated after 10MB data, which is deposited into certain position of memory space, it is assumed that be L5, and update File Index Table and buffering concordance list.Specifically, as shown in fig. 7, adding a buffer culture index entry in File Index Table: The buffer culture index entry is identified as ID7, and corresponding buffer index item is identified as ID2, data buffering initial position and data It is respectively 120MB and 130MB to buffer end position, and buffer culture storage location is L5;Also, update ID2 in buffer index table The data buffering end position of corresponding buffer index item is 130MB, and buffer culture number is 5.
Second of hypothesis:Assuming that the content stored in current buffer DB in each concordance list is as shown in figure 8, according to number Network address concordance list is inquired about first according to request, finds wherein there is one corresponding with the network address ### in request of data Network address index entry, the index entry of the network address are identified as ID1.And then inquire about corresponding with the ID1 in buffer index table Buffer index item, it is assumed that corresponding buffer index item is identified as ID2, and the first data in the buffer index item are delayed Rush initial position and the first data buffering end position be respectively 0MB and 30MB, due to request position 100MB positioned at 0MB and Between 30MB, illustrate at present also without the buffered data met needed for request of data.At this time, increase in buffer index table new Buffer index item, as shown in figure 9, new buffer index item includes new network address index mark ID1, new buffer index item mark ID6, the 3rd data buffering initial position and the 3rd data buffering end position, at this time, the 3rd data buffering initial position assignment To ask position 100MB, under initial situation, the 3rd data buffering end position also be 100MB, and buffer culture number is 0.It Afterwards, the data request position 100MB are obtained from since server, whenever the data of 10MB are obtained, generation is comprising current The new buffer culture of acquired 10MB data, new buffer culture is stored in default memory space, is increased in File Index Table Add the 3rd buffer culture index entry, as shown in Figure 10, the 3rd buffer culture index entry include new buffer index item mark ID6, New file index entry identifies ID7, the 4th data buffering initial position 100MB, the 4th data buffering end position 110MB and newly delays Storage location L4 of the file in default memory space is rushed, at this time, then updates the 3rd data buffering stop bits in buffer index table The 4th data buffering end position 110MB is set to, buffer culture number is updated to 1, and such iteration performs, until receiving Untill to another request of data so as to triggering new one query process, or until the 3rd data buffering in buffer index table End position has been updated to the data final position 500MB of audio, video data.
The third is assumed:Assuming that the content stored in current buffer DB in each concordance list is as shown in figure 11, according to Request of data inquires about network address concordance list first, it is found that wherein there is no corresponding with the network address ### in request of data One network address index entry, then increase new network address index entry in network address concordance list, the new network address index Item includes network address ### and new network address index mark, as shown in figure 12, it is assumed that be ID8.And then such as Figure 12 institutes Show, increase new buffer index item in buffer index table, new buffer index item includes new network address index mark ID8, new Buffer index item mark ID6, the 3rd data buffering initial position and the 3rd data buffering end position, at this time, the 3rd data are delayed Rush initial position and be assigned a value of request position 100MB, under initial situation, the 3rd data buffering end position also be 100MB, and buffering is literary Part number is 0.Afterwards, the data request position 100MB are obtained from since server, whenever the data of 10MB are obtained, Generation includes the new buffer culture of current acquired 10MB data, new buffer culture is stored in default memory space, in text Increase by the 3rd buffer culture index entry in part concordance list, as shown in figure 13, the 3rd buffer culture index entry includes newly buffering rope Draw item mark ID6, new file index entry mark ID7, the 4th data buffering initial position 100MB, the 4th data buffering stop bits The storage location L4 of 110MB and new buffer culture in default memory space is put, at this time, then updates the 3rd number in buffer index table It is the 4th data buffering end position 110MB according to buffering end position, buffer culture number is updated to 1, and such iteration performs Go down, untill receiving another request of data so as to trigger new one query process, or until buffer index table In the 3rd data buffering end position be updated to the data final position 500MB of audio, video data.
On the basis of above-described embodiment, alternatively, in order to ensure the effective use of memory space, redundant data pair is avoided The occupancy of memory space, if the buffer culture for monitoring to have fed back has reached preset data amount, can delete what is fed back Buffer culture, and update File Index Table and/or buffer index table.Such as by the buffer culture of deletion in File Index Table Corresponding buffer culture indexes entry deletion, and updates the buffer culture number in corresponding buffer index table and data buffering Beginning position, data buffering end position.
Based on above-mentioned data buffering processing procedure, while player frame is not changed, new buffer is added System --- the buffering of database combination file storage, by the mechanism, can access arbitrary data position in player requests When putting, inquired about into row buffering, if data needed for buffered, will not repeat to buffer.Meanwhile data carry out piecemeal guarantor The data that i.e. each buffer culture only preserves certain data volume size are deposited, can timely recycle memory space.
Corresponding to above method embodiment, as shown in figure 14, the embodiment of the present invention also provides a kind of data buffer device, bag Include:Receiving module 610, enquiry module 620, the first acquisition module 630, feedback module 640.
Receiving module 610, for receiving the request of data of player transmission, the request of data includes treating request data Network address and request position.
Enquiry module 620, whether there is and the network address and the request position for inquiring about in buffer DB Corresponding first buffer culture index entry.
First acquisition module 630, if for there are the first buffer culture index entry, text to be buffered according to described first Part index entry obtains buffer culture.
Feedback module 640, for the buffer culture to be fed back to the player, so that the player plays are wherein Comprising buffered data.
In a kind of optional embodiment, the enquiry module 620, including:Inquire about submodule 621, first and obtain submodule Block 622, judging submodule 623, the second acquisition submodule 624.
Submodule 621 is inquired about, whether there is net corresponding with the network address in network address concordance list for inquiring about Network allocation index item, if triggering acquisition submodule in the presence of if.
Judging submodule 622, it is corresponding with the mark of the network address index entry slow in buffer index table for determining The buffer index item that whether there is with the request position correspondence is rushed in index entry, and the buffer index item includes buffer index Item mark, the first data buffering initial position and the first data buffering end position, the request position is positioned at the described first number According to buffering between initial position and the first data buffering end position, if the triggering acquisition submodule 623 in the presence of if.
First acquisition submodule 623, for from File Index Table obtain with the buffer index item mark and it is described ask The first buffer culture index entry of position correspondence is sought, the first buffer culture index entry includes the second data buffering start bit Put and be located at the second data buffering initial position and second number with the second data buffering end position, the request position According between buffering end position.
The buffer DB includes the network address concordance list, the buffer index table and the file index Table.
In a kind of optional embodiment, the storage of the first buffer culture is further included in the first buffer culture index entry Position.
First acquisition module 630, including:3rd acquisition submodule 631, the 4th acquisition submodule 632.
Second acquisition submodule 631, for obtaining first buffering according to the storage location of first buffer culture File.
3rd acquisition submodule 632, if for existing and the first buffer culture index entry in the File Index Table At least one second buffer culture index entry of continuity index, then according at least one second buffer culture index entry The storage location of second buffer culture, obtains corresponding at least one second buffer culture, wherein, after the continuity index refers to The data buffering initial position of one buffer culture index entry and the data buffering end position of previous buffer culture index entry It is adjacent.
The buffer culture includes first buffer culture and at least one second buffer culture.
In a kind of optional embodiment, described device further includes the second acquisition module 650, is specifically used for:
If the first data buffering end position is not up to the data final position for treating request data, and described First data buffering end position is not present in other buffer index items in the buffer index table, then waits to ask from described The data that the first data buffering end position starts are obtained from the corresponding server of data, to continue to generate buffer culture And the File Index Table and the buffer index table are updated, wherein, comprising preset data amount size in each buffer culture Data.
In a kind of optional embodiment, described device further includes removing module 660, is used for:
If the buffer culture for monitoring to have fed back has reached preset data amount, the buffering fed back described in deletion is literary Part, and update the File Index Table and/or the buffer index table.
In a kind of optional embodiment, described device further includes request module 670, is used for:
If the first buffer culture index entry is not present, treat to be obtained from the corresponding server of request data from described The data that the request position starts, to generate buffer culture and update the buffer DB, wherein, in each buffer culture Include the data of preset data amount size.
In a kind of optional embodiment, the request module 670, including:The first increase increase of submodule 671, second Submodule 672, iteration submodule 673.
First increase submodule 671, if for the network address index entry to be not present, indexes in the network address Increase new network address index entry in table, the new network address index entry includes the network address and new network address rope Tendering is known.
Second increase submodule 672, if for the buffer index item to be not present, increases in the buffer index table New buffer index item, the new buffer index item includes the new network address index mark, new buffer index item identifies, the Three data buffering initial positions and the 3rd data buffering end position, the 3rd data buffering initial position are assigned a value of described ask Ask position.
Iteration submodule 673, for treating that the request position is obtained from the corresponding server of request data opens from described The data of beginning, perform iterative step, until meeting iteration cut-off condition.
In a kind of optional embodiment, iteration submodule 673 includes:Generating submodule the 6731, the 3rd increases submodule 6732nd, submodule 6733 is updated.
Submodule 6731 is generated, if the current data that obtained reach the preset data amount size, generation is comprising described The current new buffer culture for having obtained data, by the new default memory space of buffer culture deposit.
3rd increase submodule 6732, it is described for increasing by the 3rd buffer culture index entry in the File Index Table 3rd buffer culture index entry, which includes the new buffer index item mark, new file index entry mark, the 4th data buffering, to be risen Beginning position, the storage location of the 4th data buffering end position and the new buffer culture in the default memory space.
Submodule 6733 is updated, is terminated for updating the 3rd data buffering end position for the 4th data buffering Position.
The iteration cut-off condition includes:4th data buffering end position has reached the data for treating request data Final position, alternatively, receiving new request of data.
It should be noted that for device embodiment, since it is substantially similar to embodiment of the method, so describing Relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
As shown in figure 15, the embodiment of the present invention also provides a kind of electronic equipment, including memory 710 and processor 720.
The memory 710 is used to store one or more computer instruction, wherein, one or more computer refers to Order realizes the corresponding data buffering method of the method for the present invention embodiment when being performed by the processor 720.
Optionally, in the present embodiment, electronic equipment can also include communication interface 730, be set for electronic equipment and other Standby and/or internet communication.
In addition, the embodiment of the present invention also provides a kind of computer-readable recording medium for being stored with computer program, it is described Computer program makes computer realize the method for the present invention embodiment corresponding data buffering method when performing.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that:It still may be used To modify to the technical solution described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic; And these modification or replace, do not make appropriate technical solution essence depart from various embodiments of the present invention technical solution spirit and Scope.

Claims (9)

  1. A kind of 1. data buffering method, it is characterised in that including:
    The request of data that player is sent is received, the request of data includes the network address for treating request data and request position Put;
    The the first buffer culture rope that whether there is with the network address and the request position correspondence is inquired about in buffer DB Draw item;
    If there are the first buffer culture index entry, buffer culture is obtained according to the first buffer culture index entry;
    The buffer culture is fed back into the player, so that player plays buffered data wherein included.
  2. 2. according to the method described in claim 1, it is characterized in that, it whether there is and the net in the inquiry buffer DB Network address and the first buffer culture index entry of the request position correspondence, including:
    It whether there is network address index entry corresponding with the network address in inquiry network address concordance list;
    If there are the network address index entry, it is determined that corresponding with the mark of the network address index entry in buffer index table Buffer index item in whether there is with it is described request position correspondence buffer index item, the buffer index item include buffer Index entry mark, the first data buffering initial position and the first data buffering end position, the request position is positioned at described the Between one data buffering initial position and the first data buffering end position;
    If in the presence of the buffer index item with the request position correspondence, obtained and the buffer index item from File Index Table First buffer culture index entry of mark and the request position correspondence, the first buffer culture index entry include the second number According to buffering initial position and the second data buffering end position, the request position is located at the second data buffering initial position Between the second data buffering end position;
    The buffer DB includes the network address concordance list, the buffer index table and the File Index Table.
  3. 3. according to the method described in claim 2, delay it is characterized in that, further including first in the first buffer culture index entry Rush the storage location of file;
    It is described that buffer culture is obtained according to the first buffer culture index entry, including:
    First buffer culture is obtained according to the storage location of first buffer culture;
    If there is at least one second buffering with the first buffer culture index entry continuity index in the File Index Table The storage location of file index item, then the second buffer culture at least one second buffer culture index entry, is obtained Corresponding at least one second buffer culture is taken, wherein, the continuity index refers to the data of the latter buffer culture index entry It is adjacent with the data buffering end position of previous buffer culture index entry to buffer initial position;
    The buffer culture includes first buffer culture and at least one second buffer culture.
  4. 4. according to the method described in claim 2, it is characterized in that, the method further includes:
    If the first data buffering end position is not up to the data final position for treating request data, and described first Data buffering end position is not present in other buffer index items in the buffer index table, then treats request data from described The data that the first data buffering end position starts are obtained from corresponding server, to continue to generate buffer culture and more The new File Index Table and the buffer index table, wherein, the data of preset data amount size are included in each buffer culture.
  5. 5. according to the method described in claim 2, it is characterized in that, the method further includes:
    If the buffer culture for monitoring to have fed back has reached preset data amount, delete described in the buffer culture that has fed back, and Update the File Index Table and/or the buffer index table.
  6. 6. the method according to any one of claim 2 to 5, it is characterised in that the method further includes:
    If the first buffer culture index entry is not present, from it is described treat to be obtained from the corresponding server of request data it is described The data that request position starts, to generate buffer culture and update the buffer DB, wherein, included in each buffer culture The data of preset data amount size.
  7. 7. according to the method described in claim 6, it is characterized in that, if described be not present the first buffer culture index entry, Then since it is described treat to be obtained from the request position in the corresponding server of request data data, to generate buffer culture simultaneously The database is updated, including:
    If the network address index entry is not present, increase new network address index entry in the network address concordance list, The new network address index entry includes the network address and new network address index mark;
    If the buffer index item is not present, increase new buffer index item, the new buffering rope in the buffer index table Drawing item includes the new network address index mark, new buffer index item mark, the 3rd data buffering initial position and the 3rd Data buffering end position, the 3rd data buffering initial position are assigned a value of the request position;
    Since it is described treat to be obtained from the request position in the corresponding server of request data data, iteration performs following mistake Journey, until meeting iteration cut-off condition:
    If the current data that obtained reach the preset data amount size, generation has currently obtained the new slow of data comprising described File is rushed, by the new default memory space of buffer culture deposit;
    Increase by the 3rd buffer culture index entry in the File Index Table, the 3rd buffer culture index entry includes described New buffer index item mark, new file index entry mark, the 4th data buffering initial position, the 4th data buffering end position and Storage location of the new buffer culture in the default memory space;
    It is the 4th data buffering end position to update the 3rd data buffering end position;
    The iteration cut-off condition includes:4th data buffering end position has reached the data for treating request data and terminates Position, alternatively, receiving new request of data.
  8. 8. a kind of electronic equipment, it is characterised in that including memory and processor;
    The memory is used to store one or more computer instruction, wherein, one or more computer instruction is by institute State the data buffering method realized when processor performs as any one of claim 1 to 7.
  9. 9. a kind of computer-readable recording medium for being stored with computer program, it is characterised in that the computer program makes meter The data buffering method as any one of claim 1 to 7 is realized when calculation machine performs.
CN201711243831.1A 2017-11-30 2017-11-30 Data buffering method and electronic equipment Active CN107911712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711243831.1A CN107911712B (en) 2017-11-30 2017-11-30 Data buffering method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711243831.1A CN107911712B (en) 2017-11-30 2017-11-30 Data buffering method and electronic equipment

Publications (2)

Publication Number Publication Date
CN107911712A true CN107911712A (en) 2018-04-13
CN107911712B CN107911712B (en) 2020-10-09

Family

ID=61849479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711243831.1A Active CN107911712B (en) 2017-11-30 2017-11-30 Data buffering method and electronic equipment

Country Status (1)

Country Link
CN (1) CN107911712B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109511008A (en) * 2018-11-27 2019-03-22 成都索贝数码科技股份有限公司 A method of it is stored based on object and supports that video and audio file content is additional
CN111698466A (en) * 2020-05-07 2020-09-22 浙江大华技术股份有限公司 Method, device, equipment and medium for monitoring breakpoint download of video
CN113163226A (en) * 2021-03-26 2021-07-23 维沃移动通信有限公司 Media file playing method and device, electronic equipment, server and medium
CN115134420A (en) * 2021-03-24 2022-09-30 华为技术有限公司 Media playing method and device and electronic equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120030212A1 (en) * 2010-07-30 2012-02-02 Frederick Koopmans Systems and Methods for Video Cache Indexing
CN102497542A (en) * 2011-12-27 2012-06-13 前卫视讯(北京)科技发展有限公司 Video positioning playback system and method thereof
CN103051977A (en) * 2013-01-11 2013-04-17 乐视网信息技术(北京)股份有限公司 Method for processing p2p (peer-to-peer) cache data
CN103945259A (en) * 2014-03-31 2014-07-23 Tcl集团股份有限公司 Online video playing method and device
CN104301743A (en) * 2014-09-11 2015-01-21 华为技术有限公司 Method for transmitting video, gateway device and video transmitting system
CN104601535A (en) * 2014-05-08 2015-05-06 腾讯科技(深圳)有限公司 Video processing method and system
CN105451098A (en) * 2014-08-15 2016-03-30 北京风行在线技术有限公司 Method and device for providing multimedia file
CN105828096A (en) * 2016-05-19 2016-08-03 网宿科技股份有限公司 Media stream file processing method and device
CN106550263A (en) * 2015-09-16 2017-03-29 深圳市腾讯计算机系统有限公司 Media playing method and device
CN106559677A (en) * 2015-09-30 2017-04-05 华为技术有限公司 The method and device of terminal, caching server and acquisition video slicing
CN107231568A (en) * 2017-08-01 2017-10-03 腾讯科技(深圳)有限公司 A kind of media playing method, server and terminal device

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120030212A1 (en) * 2010-07-30 2012-02-02 Frederick Koopmans Systems and Methods for Video Cache Indexing
CN102497542A (en) * 2011-12-27 2012-06-13 前卫视讯(北京)科技发展有限公司 Video positioning playback system and method thereof
CN103051977A (en) * 2013-01-11 2013-04-17 乐视网信息技术(北京)股份有限公司 Method for processing p2p (peer-to-peer) cache data
CN103945259A (en) * 2014-03-31 2014-07-23 Tcl集团股份有限公司 Online video playing method and device
CN104601535A (en) * 2014-05-08 2015-05-06 腾讯科技(深圳)有限公司 Video processing method and system
CN105451098A (en) * 2014-08-15 2016-03-30 北京风行在线技术有限公司 Method and device for providing multimedia file
CN104301743A (en) * 2014-09-11 2015-01-21 华为技术有限公司 Method for transmitting video, gateway device and video transmitting system
CN106550263A (en) * 2015-09-16 2017-03-29 深圳市腾讯计算机系统有限公司 Media playing method and device
CN106559677A (en) * 2015-09-30 2017-04-05 华为技术有限公司 The method and device of terminal, caching server and acquisition video slicing
CN105828096A (en) * 2016-05-19 2016-08-03 网宿科技股份有限公司 Media stream file processing method and device
CN107231568A (en) * 2017-08-01 2017-10-03 腾讯科技(深圳)有限公司 A kind of media playing method, server and terminal device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109511008A (en) * 2018-11-27 2019-03-22 成都索贝数码科技股份有限公司 A method of it is stored based on object and supports that video and audio file content is additional
CN109511008B (en) * 2018-11-27 2021-07-13 成都索贝数码科技股份有限公司 Method for supporting video and audio file content addition based on object storage
CN111698466A (en) * 2020-05-07 2020-09-22 浙江大华技术股份有限公司 Method, device, equipment and medium for monitoring breakpoint download of video
CN115134420A (en) * 2021-03-24 2022-09-30 华为技术有限公司 Media playing method and device and electronic equipment
CN113163226A (en) * 2021-03-26 2021-07-23 维沃移动通信有限公司 Media file playing method and device, electronic equipment, server and medium

Also Published As

Publication number Publication date
CN107911712B (en) 2020-10-09

Similar Documents

Publication Publication Date Title
US11792276B2 (en) Content distribution network supporting popularity-based caching
US11853342B2 (en) Efficient data distribution to multiple devices
CN107911712A (en) Data buffering method and electronic equipment
US11394796B2 (en) Dynamic and static data of metadata objects
US7610187B2 (en) Lingual translation of syndicated content feeds
US9673998B2 (en) Differential cache for representational state transfer (REST) API
US20100268694A1 (en) System and method for sharing web applications
CN107197359B (en) Video file caching method and device
US8516041B1 (en) Pre-fetching asynchronously requested content
US20100010965A1 (en) Query Management Systems
CN105898380A (en) Rapid network video play starting method and device
CN107801051B (en) Virtual sliced sheet information transferring method and device, video server
CN107105336A (en) Data processing method and data processing equipment
CN103686409B (en) The method and system that desktop background synchronously plays with live interface
CN107888941B (en) Video segment transmission method, device and system
CN106131142A (en) multimedia data storage method and device
CN108885621B (en) Content caching for accelerated load time
CN113139377A (en) Method, device, equipment and computer readable medium for pushing information
CN117032870A (en) Page jump processing method and device
CN112243136A (en) Content playing method, video storage method and equipment
CN101958934A (en) Electronic program guide incremental content synchronization method, device and system
CN102546457B (en) Character message processing method and character message processor
CN104866563A (en) Album searching method and apparatus
CN105138549B (en) A kind of keyword processing method and processing device
CN113378000B (en) Video title generation method and device

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201021

Address after: 261031 north of Yuqing street, east of Dongming Road, high tech Zone, Weifang City, Shandong Province (Room 502, Geer electronic office building)

Patentee after: GoerTek Optical Technology Co.,Ltd.

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

Patentee before: GOERTEK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221216

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

Patentee after: GOERTEK TECHNOLOGY Co.,Ltd.

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

Patentee before: GoerTek Optical Technology Co.,Ltd.