CN105808714B - Method and device for acquiring network file resources and electronic equipment - Google Patents

Method and device for acquiring network file resources and electronic equipment Download PDF

Info

Publication number
CN105808714B
CN105808714B CN201610126328.7A CN201610126328A CN105808714B CN 105808714 B CN105808714 B CN 105808714B CN 201610126328 A CN201610126328 A CN 201610126328A CN 105808714 B CN105808714 B CN 105808714B
Authority
CN
China
Prior art keywords
obtains
unit
network file
data flow
file resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610126328.7A
Other languages
Chinese (zh)
Other versions
CN105808714A (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software 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 Beijing Kingsoft Internet Security Software Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201610126328.7A priority Critical patent/CN105808714B/en
Publication of CN105808714A publication Critical patent/CN105808714A/en
Priority to PCT/CN2017/075064 priority patent/WO2017152792A1/en
Application granted granted Critical
Publication of CN105808714B publication Critical patent/CN105808714B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Abstract

The embodiment of the invention discloses a method and a device for acquiring network file resources and electronic equipment. The method comprises the following steps: sending a video data request, triggering and acquiring residual data traffic, and displaying the acquired residual data traffic; analyzing a video data request response returned according to the video data request, and acquiring and displaying the size of each network file resource obtained by analysis; and receiving a downloading instruction output by a webpage corresponding to the video data request, wherein the downloading instruction is generated after a user selects a network file resource to be downloaded according to the displayed residual data flow and the size of the network file resource, and downloading the network file resource to be downloaded. By applying the method and the device, the efficiency of acquiring the network file resources can be improved.

Description

A kind of method, apparatus and electronic equipment obtaining network file resource
Technical field
The present invention relates to computer network resources technology more particularly to a kind of method, apparatus for obtaining network file resource And electronic equipment.
Background technique
With computer communication and the continuous development of Internet technology, electronic equipment using more and more common, for example, Intelligent mobile phone, personal digital assistant, palm PC and desktop computer are more and more widely used, meanwhile, Installation network class application program (APP, Application) in the electronic device is also more and more, for example, QQ, wechat, The instant messagings such as Whatsapp, Facebook, Line (IM, Instant Messaging) application program.Since each network is answered The floating resources of user, especially user can all be consumed in operation with program and pass through web application downloading or online browse When the big network file resource of the data traffics such as video, picture or animation, need to consume more floating resources, and floating resources User is needed to obtain in a manner of pre-payment or post-paid, thus, in application network class application program, network cost is examined Amount is the topic that user compares concern.
Currently, monthly payment charging mode of the most users using flow packet, for example, the 10 yuan/20M/ month, 80 yuan/1G/ The moon, 120 yuan/2G/ etc., if user this month flow without departing from the flow packet of monthly payment (year), no longer need to additional payment, If flow of the user in the moon (year) exceeds the flow packet in monthly payment (year), the part exceeded will be according to higher than monthly payment charge on traffic Charging mode much carries out charging.
When being in payment networks scene for user, for example, under 3G or 4G network scenarios, currently, if user needs Network file resource is obtained, network server can be prompted the user whether to need to continue to obtain the network file resource, be selected in user It takes after being and obtaining the network file resource, if data traffic is more than pre-set moon set meal data traffic threshold values, to User's prompt exceeds the part of moon set meal data traffic threshold values.But the method for the acquisition network file resource, only in data flow After amount exceeds, the part that just user can be prompted to exceed increases the data traffic expense of user, improve the network of user at This.
In order to avoid increasing additional data traffic expense, improved method is that user is needing to obtain the biggish net of capacity When network file resource or before, remaining data flow is inquired editing short message or by way of making a phone call, then, based on acquisition Remaining data flow and network file resource size determine the need for obtaining the network file resource.For example, if looking into Asking obtained data redundancy flow is 10M, and current network file resource size is 60M, then can abandon obtaining network text Part resource, to avoid additionally increasing data traffic expense.But the improved method for obtaining network file resource, needs user Manual editing's short message dials inquiry phone, inquires remaining data flow according to voice prompting, adds additional acquisition network Time needed for file resource, and operation is relatively complicated, so that the efficiency for obtaining network file resource is lower, reduces user's Web experience.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method, apparatus and electronic equipment for obtaining network file resource, mention Rise the efficiency for obtaining network file resource.
In order to achieve the above objectives, the embodiment of the present invention adopts the following technical scheme that
In a first aspect, the embodiment of the present invention provides a kind of method for obtaining network file resource, comprising:
Video data request is sent, triggering obtains remaining data flow, shows the remaining data flow of acquisition;
It parses the video data returned according to video data request and requests response, obtain each network text that parsing obtains Part resource size is simultaneously shown;
The download instruction that the video data requests corresponding webpage output is received, the download instruction is user according to exhibition The remaining data flow and network file resource size shown is chosen and is generated after network file resource to be downloaded, described in downloading Network file resource to be downloaded.
Optionally, the identification information for being returned only to video data request head response is carried in the video data request.
Optionally, the network file resource is mp4 video, the view that the parsing is returned according to video data request The response of frequency request of data, obtaining each network file resource size that parsing obtains includes:
Video data request response is parsed, video data is obtained and requests response response head;
Judge in the video data request head response whether comprising Content-Length field, if so, extracting Information after Content-Length field obtains network file resource size.
Optionally, the network file resource is M3U8 video, and the parsing is returned according to video data request Video data request response, obtaining each network file resource size that parsing obtains includes:
Video data request response is parsed, the M3U8 file for including in video data request head response is obtained;
Judge in M3U8 file at pre-set position whether to include M3U8 video size information, if comprising obtaining Network file resource size;If do not included, M3U8 file is traversed, the duration information after obtaining EXTINF field;
Add up each duration information, obtains total duration;
The transport stream section of predetermined quantity in M3U8 file is chosen, HTTP request is initiated, according to the HTTP request response returned Obtain the sample total duration and sample total size of the transport stream section of the predetermined quantity;
Sample delivery rate is calculated according to the sample total size and sample total duration, according to the sample delivery rate And the total duration obtains network file resource size.
Optionally, the network file resource size is calculated using following formula:
In formula,
SUM_SIZE is network file resource size;
SUM_TIME is total duration;
SUB_SUM_SIZE is sample total size;
SUB_SUM_TIME is sample total duration.
Optionally, the triggering acquisition remaining data flow includes:
The set meal file of storage is inquired, set meal data traffic threshold values are obtained;
The system log message of electronic equipment record is extracted, obtains what electronic equipment consumed in set meal validity date section Data traffic;
The set meal data traffic threshold values are subtracted into the data that the electronic equipment consumes in set meal validity date section Flow obtains remaining data flow.
Optionally, the method also includes:
The data traffic information and temporal information that storage obtains are emptied and are deposited after section is arrived in the set meal validity date The data traffic information and temporal information of storage;
The system log message for extracting electronic equipment record obtains electronic equipment and disappears in set meal validity date section The data traffic of consumption includes:
The system log message of electronic equipment record is extracted, obtains electronic equipment in set meal validity date section, and The data traffic consumed in period after the temporal information of storage, adds up the data traffic information of the storage;
With the data traffic information and temporal information of accumulative data traffic information and time information renovation storage.
Optionally, the triggering acquisition remaining data flow includes:
Pre-set flow short message enquiry is called in triggering, sends to pre-set operating service business;
The short message for receiving the operating service business feedback, extracts remaining data flow therein.
Optionally, the triggering acquisition remaining data flow includes:
The set meal file of storage is inquired, set meal data traffic threshold values are obtained;
The system log message of electronic equipment record is extracted, obtains what electronic equipment consumed in set meal validity date section Data traffic;
The set meal data traffic threshold values are subtracted into the data that the electronic equipment consumes in set meal validity date section Flow obtains the first remaining data flow;
Pre-set flow short message enquiry is called in triggering, sends to pre-set operating service business;
The short message for receiving the operating service business feedback, extracts the second remaining data flow therein;
Using the second remaining data flow, according to pre-set Correction Strategies, to first remaining traffic Amount is corrected, and obtains remaining data flow.
Second aspect, the embodiment of the present invention provide a kind of device for obtaining network file resource, comprising: remaining data flow Obtain module, network file source obtaining module and network file resource downloading module, wherein
Remaining data flow obtains module, and for sending video data request, triggering obtains remaining data flow, and displaying obtains The remaining data flow taken;
Network file source obtaining module is rung for parsing the video data request returned according to video data request It answers, obtain each network file resource size that parsing obtains and shows;
Network file resource downloading module requests the downloading of corresponding webpage output to refer to for receiving the video data It enables, the download instruction is user according to the remaining data flow and network file resource size that show, chooses net to be downloaded It is generated after network file resource, downloads the network file resource to be downloaded.
Optionally, the identification information for being returned only to video data request head response is carried in the video data request.
Optionally, the network file resource is mp4 video, and the network file source obtaining module includes: the first solution Analyse unit and first information extraction unit, wherein
First resolution unit obtains video data and requests response response head for parsing video data request response;
First information extraction unit, for whether judging in the video data request head response comprising Content- Length field obtains network file resource size if so, extracting the information after Content-Length field.
Optionally, the network file resource is M3U8 video, and the network file source obtaining module includes: the second solution Analyse unit, judging unit, summing elements, the second information extraction unit and network file Resource Calculation unit, wherein
Second resolution unit is responded for parsing video data request, includes in acquisition video data request head response M3U8 file;
Judging unit, for judging in M3U8 file at pre-set position whether to include M3U8 video size information, If comprising obtaining network file resource size;If do not included, M3U8 file is traversed, the duration after obtaining EXTINF field Information;
Summing elements obtain total duration for each duration information that adds up;
Second information extraction unit initiates HTTP request for choosing the transport stream section of predetermined quantity in M3U8 file, according to The sample total duration and sample total size of the transport stream section of the predetermined quantity are obtained according to the HTTP request response of return;
Network file Resource Calculation unit, for calculating sample delivery according to the sample total size and sample total duration Rate obtains network file resource size according to the sample delivery rate and the total duration.
Optionally, the network file resource size is calculated using following formula:
In formula,
SUM_SIZE is network file resource size;
SUM_TIME is total duration;
SUB_SUM_SIZE is sample total size;
SUB_SUM_TIME is sample total duration.
Optionally, the remaining data flow obtains module and includes: request transmitting unit, query unit, extraction unit, remains Remaining data traffic acquiring unit and display unit, wherein
Request transmitting unit, for notifying query unit after sending video data request;
Query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
Extraction unit obtains electronic equipment in set meal effective day for extracting the system log message of electronic equipment record The data traffic consumed in phase section;
Remaining data flow acquiring unit, for the set meal data traffic threshold values to be subtracted the electronic equipment in set meal The data traffic consumed in validity date section, obtains remaining data flow;
Display unit, for showing the remaining data flow obtained.
Optionally, it includes: request transmitting unit, query unit, accumulated unit, more that the remaining data flow, which obtains module, New unit, storage unit, remaining data flow acquiring unit and display unit
Request transmitting unit, for notifying query unit after sending video data request;
Query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
Accumulated unit obtains electronic equipment in set meal effective day for extracting the system log message of electronic equipment record In phase section, and the data traffic consumed within the period after the temporal information of storage, add up the data flow of the storage Measure information;
Updating unit, for the data traffic of accumulative data traffic information and time information renovation storage unit storage Information and temporal information;
Storage unit, for storing the data traffic information and temporal information that obtain, in set meal validity date area Between arrive after, empty the data traffic information and temporal information of storage;
Remaining data flow acquiring unit, for the set meal data traffic threshold values to be subtracted the electronic equipment in set meal The data traffic consumed in validity date section, obtains remaining data flow;
Display unit, for showing the remaining data flow obtained.
Optionally, it includes: request transmitting unit, call unit and remaining data that the remaining data flow, which obtains module, Flow extraction unit, wherein
Request transmitting unit, for notifying call unit after sending video data request;
Call unit calls pre-set flow short message enquiry for triggering, sends out to pre-set operating service business It send;
Remaining data flow extraction unit extracts residue therein for receiving the short message of the operating service business feedback Data traffic.
Optionally, it includes: request transmitting unit, threshold query unit, log letter that the remaining data flow, which obtains module, Extraction unit, the first remaining data flow acquiring unit, message search unit, short message extraction unit and correction unit are ceased, In,
Request transmitting unit is used for after sending video data request, notification threshold query unit;
Threshold query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
Log information extraction unit obtains electronic equipment and is covering for extracting the system log message of electronic equipment record The data traffic consumed in meal validity date section;
First remaining data flow acquiring unit, exists for the set meal data traffic threshold values to be subtracted the electronic equipment The data traffic consumed in set meal validity date section, obtains the first remaining data flow;
Message search unit calls pre-set flow short message enquiry for triggering, to pre-set operating service Quotient sends;
Short message extraction unit extracts the second remaining data therein for receiving the short message of the operating service business feedback Flow;
Unit is corrected, for utilizing the second remaining data flow, according to pre-set Correction Strategies, to described the One remaining data flow is corrected, and obtains remaining data flow.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, and the electronic equipment includes: shell, processor, deposits Reservoir, circuit board and power circuit, wherein circuit board is placed in the space interior that shell surrounds, processor and memory setting On circuit boards;Power circuit, for each circuit or the device power supply for above-mentioned electronic equipment;Memory is for storing and can hold Line program code;Processor is run and executable program code pair by reading the executable program code stored in memory The program answered, the method for executing aforementioned any acquisition network file resource.
The method, apparatus and electronic equipment provided in an embodiment of the present invention for obtaining network file resource, sends video data Request, triggering obtain remaining data flow, show the remaining data flow of acquisition;Parsing is requested according to the video data The video data of return requests response, obtains each network file resource size that parsing obtains and shows;Receive the video counts According to the download instruction for requesting corresponding webpage output, the download instruction is user according to the remaining data flow and net shown Network file resource size is chosen and is generated after network file resource to be downloaded, downloads the network file resource to be downloaded.This Sample, by obtaining remaining data flow and network file resource size automatically and showing that user only need to be according to residue to user Network file resource needed for data traffic and network file resource size are chosen is downloaded, and effectively shortens acquisition network Time needed for file resource, operating process is simplified, improves the efficiency for obtaining network file resource.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the method flow schematic diagram that the embodiment of the present invention obtains network file resource;
Fig. 2 is the flow diagram that first embodiment of the invention triggering obtains remaining data flow;
Fig. 3 is the flow diagram that second embodiment of the invention triggering obtains remaining data flow;
Fig. 4 is the flow diagram that third embodiment of the invention triggering obtains remaining data flow;
Fig. 5 is that fourth embodiment of the invention parses the video data request response returned according to video data request, Obtain the flow diagram for each network file resource size that parsing obtains;
Fig. 6 is that fifth embodiment of the invention parses the video data request response returned according to video data request, Obtain the flow diagram for each network file resource size that parsing obtains;
Fig. 7 is the apparatus structure schematic diagram that the embodiment of the present invention obtains network file resource;
Fig. 8 is the structural schematic diagram of electronic equipment one embodiment of the present invention.
Specific embodiment
The embodiment of the present invention is described in detail with reference to the accompanying drawing.
It will be appreciated that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Base Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts it is all its Its embodiment, shall fall within the protection scope of the present invention.
Fig. 1 is the method flow schematic diagram that the embodiment of the present invention obtains network file resource.Referring to Fig. 1, this method comprises:
Step 11, video data request is sent, triggering obtains remaining data flow, shows the remaining traffic of acquisition Amount;
In this step, when user browses webpage, webpage information is inputted by accessing in column in the address of browser, for example, Hypertext transfer protocol (HTTP, HyperText Transfer Protocol) information or uniform resource locator (URL, Uniform Resource Locator) information or Internet protocol (IP, Internet Protocol) address information, to touch It is sent to browser output video data request, after browser receives video data request, requests corresponding webpage to video data (network server) is sent to carry out subsequent relevant treatment.For example, if user needs online viewing film, where to film Webpage send video data request, to obtain each film information for including in webpage, at the same trigger obtain remaining data flow.
As an alternative embodiment, after transmission video data request, before triggering obtains remaining data flow, This method can also include:
Judge that the video data requests in corresponding webpage whether to include more than the net of pre-set data threshold Network file resource, if so, executing the step of triggering obtains remaining data flow.
In this step, if the video data requests in corresponding webpage not including more than pre-set data threshold The network file resource of value will not flow user even if then showing that user directly acquires the network file resource in the webpage Amount generates great influence, therefore, it is possible to be handled according to prior art process.Wherein, the network file for including in webpage Resource can be one of them maximum network file resource, be also possible to the all-network file resource in the webpage included, The embodiment of the present invention is not construed as limiting this.
In the embodiment of the present invention, data threshold can be configured according to actual needs, for example, for the monthly payment set of user Meal or year set meal data threshold can be arranged higher if set meal data traffic threshold values are larger;If set meal data traffic Threshold value is smaller, and corresponding lesser data threshold can be set.
As an alternative embodiment, Fig. 2 is the process signal that first embodiment of the invention triggering obtains remaining data flow Figure.Referring to fig. 2, which includes:
Step 21, the set meal file of storage is inquired, set meal data traffic threshold values are obtained;
In this step, when user is provided with set after the meal by operator, by information relevant to set meal with set meal file Form is stored into local storage, and browser is by reading the set meal file, available set meal data traffic threshold values.
In the embodiment of the present invention, as an alternative embodiment, set meal file includes: set meal data traffic threshold values and set meal Validity date section.Wherein,
Set meal data traffic threshold values include but is not limited to: the moon set meal data traffic threshold values, season meal data traffic threshold values, half Year meal data traffic threshold values, year meal data traffic threshold values etc..Corresponding to moon set meal data traffic threshold values, set meal validity date section It can be (01-28/30/31).
Step 22, the system log message of electronic equipment record is extracted, obtains electronic equipment in set meal validity date section The data traffic of interior consumption;
In this step, in the operation of electronic equipment, operating system can record electronic equipment in system log message and exist The information of hardware, software in operation, the event occurred in monitoring system.For example, at the beginning of recording each application program operation, End time, data traffic consumption, electric quantity consumption, anomalous event etc..By counting each application program in set meal validity date area The data traffic of interior consumption, and add up, the data that available electronic equipment consumes in set meal validity date section Flow.
As an alternative embodiment, since the time interval of system log message record is limited, this method can also include:
The data traffic information and temporal information that storage obtains are emptied and are deposited after section is arrived in the set meal validity date The data traffic information and temporal information of storage.The then system log message for extracting electronic equipment record obtains electronics and sets Include: for the data traffic consumed in set meal validity date section
The system log message of electronic equipment record is extracted, obtains electronic equipment in set meal validity date section, and The data traffic consumed in period after the temporal information of storage, adds up the data traffic information of the storage;
With the data traffic information and temporal information of accumulative data traffic information and time information renovation storage.
Step 23, the set meal data traffic threshold values electronic equipment is subtracted in set meal validity date section to consume Data traffic, obtain remaining data flow.
As another alternative embodiment, Fig. 3 is that the process of second embodiment of the invention triggering acquisition remaining data flow is shown It is intended to.Referring to Fig. 3, which includes:
Step 31, pre-set flow short message enquiry is called in triggering, sends to pre-set operating service business;
In this step, since the code of flow short message enquiry is usually fixation, for each electronic equipment, network is corresponding Operating service business be also determining.Thus, in the embodiment of the present invention, by presetting flow short message enquiry, receiving After video data request, automatic trigger calls the flow short message enquiry of preediting, sends to operating service business, without user It requires to be manually entered flow short message enquiry, then the short message returned by browsing every time, and therefrom obtains remaining data flow, have Time needed for effect shortens acquisition network file resource, and to be automatically brought into operation, improve the efficiency for obtaining network file resource.
Step 32, the short message for receiving the operating service business feedback, extracts remaining data flow therein.
In the embodiment of the present invention, can also using message search to data traffic number that system log message is inquired It is corrected according to flow.Thus, as yet another alternative embodiment, Fig. 4 is that third embodiment of the invention triggering obtains remaining data The flow diagram of flow.Referring to fig. 4, which includes:
Step 41, the set meal file of storage is inquired, set meal data traffic threshold values are obtained;
Step 42, the system log message of electronic equipment record is extracted, obtains electronic equipment in set meal validity date section The data traffic of interior consumption;
Step 43, the set meal data traffic threshold values electronic equipment is subtracted in set meal validity date section to consume Data traffic, obtain the first remaining data flow;
Step 44, pre-set flow short message enquiry is called in triggering, sends to pre-set operating service business;
Step 45, the short message for receiving the operating service business feedback, extracts the second remaining data flow therein;
Step 46, remaining to described first according to pre-set Correction Strategies using the second remaining data flow Data traffic is corrected, and obtains remaining data flow.
In the embodiment of the present invention, Correction Strategies can be configured according to actual needs, for example, can be according to repeatedly counted One remaining data flow, the deviation between the second remaining data flow and finally data traffic when deducting fees are configured, this Inventive embodiments are not construed as limiting this.
In the embodiment of the present invention, as an alternative embodiment, remainder can be shown by modes such as suspended window, notification bars According to flow.
In the embodiment of the present invention, as an alternative embodiment, can by injecting pre-set script in a browser, The script triggers automatic obtaining remaining data flow for monitoring browser while sending video data request or later.
Step 12, it parses the video data returned according to video data request and requests response, obtain what parsing obtained Each network file resource size is simultaneously shown;
In this step, for the network file resource of live streaming, due to that cannot know the correlations such as its playing duration and size Information, process flow can be handled according to the prior art.
In the embodiment of the present invention, as an alternative embodiment, video data request is HTTP request.In practical application, it is Network flow is effectively reduced, the identification information for being returned only to http response head can be carried in HTTP request.Thus, It only include video data request response in the video data request response that video data requests corresponding webpage (server) to return Head, and do not have to return to video data request response body, wherein it include each network file money in video data request response body The webpage data information of source size.
As an alternative embodiment, network file resource includes: video, audio, picture or animation etc..Wherein, with video For, it may include: mp4 video and M3U8 video.
As an alternative embodiment, if network file resource is mp4 video, Fig. 5 is fourth embodiment of the invention parsing The video data returned according to video data request requests response, obtains each network file resource size that parsing obtains Flow diagram.Referring to Fig. 5, which includes:
Step 51, parsing video data request response obtains the head response of video data request response;
Step 52, whether judge in the video data request head response comprising Content-Length field, if so, Information after extracting Content-Length field, obtains network file resource size.
In this step, if not including Content-Length field, terminate process.Head response is requested in video data In, it may include one or more Content-Length fields, the corresponding network file of every Content-Length field Resource size.
In the embodiment of the present invention, if the corresponding link of webpage are as follows:
Http: // 220.181.91.20/vkp.tc.qq.com/z0019wmqx48.m1.mp4? vkey=FA5630D3 7EA5E4A2B71B24554AF6E5FEAF75007C471610085FC27730C4D76FB6ABF418F131CEC013B5E0 64ED01BE177B98983AB86BA7FDA64340FF674DF7AE3348C6EC3B06BBF76E4FC59672C4E438B1 19BF736BF41A9891&br=34&platform=2&fmt=auto&level=30&sdtf rom=v3010
When sending video data request (HTTP request) to webpage (network server), mark is returned only to http response head Information, webpage (network server) do not have to return to real mp4 video data, only when returning to video data request response Video data request head response (HTTP request head response) need to be returned.In this way, due to only including video data request response Head requests response body without transmitting video data, and the flow of consumption can be ignored.
For mp4 video, there is one for Content-Length, for example, such as in the video data request head response of return Fruit includes " Content-Length:24103302 " field information, wherein the information after Content-Length field indicates Mp4 video size, for 24103302 bytes (B), i.e., about 23MB.In this way, after by extracting each Content-Length field Information, available corresponding network file resource size, to get the size of mp4 video before playing video.
As another alternative embodiment, if network file resource is M3U8 video, Fig. 6 is fifth embodiment of the invention solution It analyses the video data returned according to video data request and requests response, obtain each network file resource size that parsing obtains Flow diagram.Referring to Fig. 6, which includes:
Step 61, parsing video data request response obtains the M3U8 file for including in video data request head response;
In this step, M3U8 is one kind of M3U, coded format UTF-8, M3U Latin-1 character set encoding, M3U8 File refers to the M3U file using UTF-8 coded format, is the index file of a text, general size is several KB, comprising playing Video link list, the video of each broadcasting is a TS section, and every a TS sections include time span description information: EXTINF, Unit is the second.
Step 62, judge in M3U8 file at pre-set position whether to include M3U8 video size information, if packet Contain, obtains network file resource size;If do not included, M3U8 file is traversed, the duration information after obtaining EXTINF field;
In this step, if including each M3U8 video size information in M3U8 file, each network can be directly acquired File resource size.In the embodiment of the present invention, every EXTINF field is corresponding a transport stream (TS, Transport Stream) Section, may include one or more EXTINF fields in M3U8 file.
Step 63, add up each duration information, obtains total duration;
In this step, M3U8 file is traversed, all TS sections of corresponding duration informations is counted, adds up, obtain total duration (SUM_TIME)。
Step 64, the transport stream section of predetermined quantity in M3U8 file is chosen, HTTP request is initiated, is asked according to the HTTP returned Response is asked to obtain the sample total duration and sample total size of the transport stream section of the predetermined quantity;
In this step, one or more (predetermined quantity) transport stream sections in M3U8 file is selected to initiate HTTP request, processing It is identical as mp4 file, it does not play, only obtains the transport stream section size, sum to multiple transport stream section sizes, obtain sample Total size (SUB_SUM_SIZE), while the sample total duration (SUB_SUM_TIME) for multiple transport stream section that adds up.
In the embodiment of the present invention, predetermined quantity can be arranged according to actual needs, less than or equal to including in M3U8 file TS sections of sums.
Step 65, sample delivery rate is calculated according to the sample total size and sample total duration, according to the sample Transmission rate and the total duration obtain network file resource size.
In this step, network file resource size is calculated using following formula:
In formula,
SUM_SIZE is network file resource size;
SUM_TIME is total duration;
SUB_SUM_SIZE is sample total size;
SUB_SUM_TIME is sample total duration.
In the embodiment of the present invention, according to the duration information after the sample delivery rate and EXTINF field, it can obtain To each network file resource size.
In the embodiment of the present invention, a M3U8 file example is as follows:
EXTM3U
#EXT-X-TARGETDURATION:12
#EXT-X-VERSION:2
#EXTINF:5,
http://61.160.198.72/677389B272A4082913C1632ACF/0300080600565E5D897E BE2BEEFCF91A840284-1194-2D02-96D6-028EA1F28D65.mp4.ts? ts_start=0&ts_end= 4.82&ts_seg_no=0&ts_keyframe=1
#EXTINF:5,
http://61.160.198.72/677389B272A4082913C1632ACF/0300080600565E5D897E BE2BEEFCF91A840284-1194-2D02-96D6-028EA1F28D65.mp4.ts? ts_start=4.82&ts_end= 9.74&ts_seg_no=1&ts_keyframe=1
... (being omitted ts sections several)
#EXTINF:12,
http://221.228.249.78/6977AA57FD048841353D906496/0300080605565E5D897 EBE2BEEFCF91A840284-1194-2D02-96D6-028EA1F28D65.mp4.ts? ts_start=274.46&ts_ End=286.46&ts_seg_no=209&ts_keyframe=1
#EXTINF:10,
http://221.228.249.78/6977AA57FD048841353D906496/0300080605565E5D897 EBE2BEEFCF91A840284-1194-2D02-96D6-028EA1F28D65.mp4.ts? ts_start=286.46&ts_ End=296.22&ts_seg_no=210&ts_keyframe=1
#EXT-X-ENDLIST
Step 13, the download instruction that the video data requests corresponding webpage output is received, the download instruction is to use Family is chosen and is generated after network file resource to be downloaded according to the remaining data flow and network file resource size shown, Download the network file resource to be downloaded.
In this step, by the way that residual flow size of data and current network file resource size to be played are supplied to simultaneously User, user can make a choice according to the size of the two data, and still cancellation plays for broadcasting.If necessary to play, then may be used With by clicking corresponding network file resource, triggering generates downloading network file resource instruction, downloads the network to be downloaded File resource.For example, remaining data flow is 500M, and user can select if video size needed for the user shown is 20M It selects and plays the video;If remaining data flow only has 10M, user, which can choose, does not watch the video.
In the embodiment of the present invention, by sending video data request, triggering obtains remaining data flow, shows the institute of acquisition State remaining data flow;It parses the video data returned according to video data request and requests response, obtain what parsing obtained Each network file resource size is simultaneously shown;The download instruction that the video data requests corresponding webpage output is received, under described Carrying instruction is user according to the remaining data flow and network file resource size that show, chooses network file resource to be downloaded It generates afterwards, downloads the network file resource to be downloaded.In this way, by obtaining remaining data flow and network file automatically Resource size simultaneously shows that user only need to choose required net according to remaining data flow and network file resource size to user Network file resource is downloaded, and is effectively shortened the time needed for obtaining network file resource, is simplified operating process, improve Obtain the efficiency of network file resource.
Fig. 7 is the apparatus structure schematic diagram that the embodiment of the present invention obtains network file resource.Referring to Fig. 7, which includes: Remaining data flow obtains module 71, network file source obtaining module 72 and network file resource downloading module 73, wherein
Remaining data flow obtains module 71, and for sending video data request, triggering obtains remaining data flow, shows The remaining data flow obtained;
In the embodiment of the present invention, as an alternative embodiment, is carried in the video data request and be returned only to video counts According to the identification information of request head response.
After transmission video data request, before triggering obtains remaining data flow, this method can also include:
Judge that the video data requests in corresponding webpage whether to include more than the net of pre-set data threshold Network file resource, if so, executing the step of triggering obtains remaining data flow.
In the embodiment of the present invention, as an alternative embodiment, can by injecting pre-set script in a browser, The script triggers automatic obtaining remaining data flow for monitoring browser while sending video data request or later.
In the embodiment of the present invention, as an alternative embodiment, it includes: that request sends list that remaining data flow, which obtains module 71, Member, query unit, extraction unit, remaining data flow acquiring unit and display unit (not shown), wherein
Request transmitting unit, for notifying query unit after sending video data request;
Query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
In the embodiment of the present invention, as an alternative embodiment, set meal file includes: set meal data traffic threshold values and set meal Validity date section.Wherein,
Set meal data traffic threshold values include but is not limited to: the moon set meal data traffic threshold values, season meal data traffic threshold values, half Year meal data traffic threshold values, year meal data traffic threshold values etc..
Extraction unit obtains electronic equipment in set meal effective day for extracting the system log message of electronic equipment record The data traffic consumed in phase section;
Remaining data flow acquiring unit, for the set meal data traffic threshold values to be subtracted the electronic equipment in set meal The data traffic consumed in validity date section, obtains remaining data flow;
Display unit, for showing the remaining data flow obtained.
In the embodiment of the present invention, as an alternative embodiment, remainder can be shown by modes such as suspended window, notification bars According to flow.
In the embodiment of the present invention, as another alternative embodiment, it includes: that request is sent that remaining data flow, which obtains module 71, Unit, query unit, accumulated unit, updating unit, storage unit, remaining data flow acquiring unit and display unit
Request transmitting unit, for notifying query unit after sending video data request;
Query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
Accumulated unit obtains electronic equipment in set meal effective day for extracting the system log message of electronic equipment record In phase section, and the data traffic consumed within the period after the temporal information of storage, add up the number of the storage According to flow information;
Updating unit, for the data traffic of accumulative data traffic information and time information renovation storage unit storage Information and temporal information;
Storage unit, for storing the data traffic information and temporal information that obtain, in set meal validity date area Between arrive after, empty the data traffic information and temporal information of storage;
Remaining data flow acquiring unit, for the set meal data traffic threshold values to be subtracted the electronic equipment in set meal The data traffic consumed in validity date section, obtains remaining data flow;
Display unit, for showing the remaining data flow obtained.
In the embodiment of the present invention, as yet another alternative embodiment, it includes: that request is sent that remaining data flow, which obtains module 71, Unit, call unit and remaining data flow extraction unit, wherein
Request transmitting unit, for notifying call unit after sending video data request;
Call unit calls pre-set flow short message enquiry for triggering, sends out to pre-set operating service business It send;
It is automatic to touch after receiving video data request by presetting flow short message enquiry in the embodiment of the present invention Hair calls the flow short message enquiry of preediting, sends to operating service business.
Remaining data flow extraction unit extracts residue therein for receiving the short message of the operating service business feedback Data traffic.
As yet another alternative embodiment, it includes: request transmitting unit, threshold query list that remaining data flow, which obtains module 71, Member, log information extraction unit, the first remaining data flow acquiring unit, message search unit, short message extraction unit and school Positive unit, wherein
Request transmitting unit is used for after sending video data request, notification threshold query unit;
Threshold query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
Log information extraction unit obtains electronic equipment and is covering for extracting the system log message of electronic equipment record The data traffic consumed in meal validity date section;
First remaining data flow acquiring unit, exists for the set meal data traffic threshold values to be subtracted the electronic equipment The data traffic consumed in set meal validity date section, obtains the first remaining data flow;
Message search unit calls pre-set flow short message enquiry for triggering, to pre-set operating service Quotient sends;
Short message extraction unit extracts the second remaining data therein for receiving the short message of the operating service business feedback Flow;
Unit is corrected, for utilizing the second remaining data flow, according to pre-set Correction Strategies, to described the One remaining data flow is corrected, and obtains remaining data flow.
Network file source obtaining module 72, for parsing the video data request returned according to video data request Response obtains each network file resource size that parsing obtains and shows;
As an alternative embodiment, network file resource includes: video, audio, picture or animation etc..Wherein, with video For, it may include: mp4 video and M3U8 video.
In the embodiment of the present invention, as an alternative embodiment, the network file resource is mp4 video, network file money It includes: the first resolution unit and first information extraction unit (not shown) that source, which obtains module 72, wherein
First resolution unit obtains video data and requests response response head for parsing video data request response;
First information extraction unit, for whether judging in the video data request head response comprising Content- Length field obtains network file resource size if so, extracting the information after Content-Length field.
In the embodiment of the present invention, if not including Content-Length field, terminate process.It is requested in video data In head response, one or more Content-Length fields, the corresponding net of every Content-Length field may include Network file resource size.
In the embodiment of the present invention, as another alternative embodiment, the network file resource is M3U8 video, network file Source obtaining module 72 includes: the second resolution unit, judging unit, summing elements, the second information extraction unit and network text Part Resource Calculation unit (not shown), wherein
Second resolution unit is responded for parsing video data request, includes in acquisition video data request head response M3U8 file;
Judging unit, for judging in M3U8 file at pre-set position whether to include M3U8 video size information, If comprising obtaining network file resource size;If do not included, M3U8 file is traversed, the duration after obtaining EXTINF field Information;
In the embodiment of the present invention, a corresponding transport stream (TS, the Transport Stream) section of every EXTINF field, It may include one or more EXTINF fields in M3U8 file.
Summing elements obtain total duration for each duration information that adds up;
Second information extraction unit initiates HTTP request for choosing the transport stream section of predetermined quantity in M3U8 file, according to The sample total duration and sample total size of the transport stream section of the predetermined quantity are obtained according to the HTTP request response of return;
Network file Resource Calculation unit, for calculating sample delivery according to the sample total size and sample total duration Rate obtains network file resource size according to the sample delivery rate and the total duration.
In the embodiment of the present invention, the network file resource size is calculated using following formula:
In formula,
SUM_SIZE is network file resource size;
SUM_TIME is total duration;
SUB_SUM_SIZE is sample total size;
SUB_SUM_TIME is sample total duration.
Network file resource downloading module 73 requests the downloading of corresponding webpage output to refer to for receiving the video data It enables, the download instruction is user according to the remaining data flow and network file resource size that show, chooses net to be downloaded It is generated after network file resource, downloads the network file resource to be downloaded.
The embodiment of the present invention also provides a kind of electronic equipment, and the electronic equipment includes dress described in aforementioned any embodiment It sets.
Fig. 8 is the structural schematic diagram of electronic equipment one embodiment of the present invention, may be implemented to implement shown in Fig. 1-7 of the present invention The process of example, as shown in figure 8, above-mentioned electronic equipment may include: shell 81, processor 82, memory 83, circuit board 84 and electricity Source circuit 85, wherein circuit board 84 is placed in the space interior that shell 81 surrounds, and processor 82 and memory 83 are arranged in circuit On plate 84;Power circuit 85, for each circuit or the device power supply for above-mentioned electronic equipment;Memory 83 is for storing and can hold Line program code;Processor 82 is run and executable program generation by reading the executable program code stored in memory 83 The corresponding program of code, for executing the method for obtaining network file resource described in aforementioned any embodiment.
Processor 82 to the specific implementation procedures of above-mentioned steps and processor 82 by operation executable program code come The step of further executing may refer to the description of Fig. 1-7 illustrated embodiment of the present invention, and details are not described herein.
The electronic equipment exists in a variety of forms, including but not limited to:
(1) mobile communication equipment: the characteristics of this kind of equipment is that have mobile communication function, and to provide speech, data Communication is main target.This Terminal Type includes: smart phone (such as iPhone), multimedia handset, functional mobile phone and low Hold mobile phone etc..
(2) super mobile personal computer equipment: this kind of equipment belongs to the scope of personal computer, there is calculating and processing function Can, generally also have mobile Internet access characteristic.This Terminal Type includes: PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device: this kind of equipment can show and play multimedia content.Such equipment include: audio, Video player (such as iPod), handheld device, e-book and intelligent toy and portable car-mounted navigation equipment.
(4) server: providing the equipment of the service of calculating, and the composition of server includes that processor, hard disk, memory, system are total Line etc., server is similar with general computer architecture, but due to needing to provide highly reliable service, in processing energy Power, stability, reliability, safety, scalability, manageability etc. are more demanding.
(5) other electronic equipments with data interaction function.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any In the technical scope disclosed by the present invention, any changes or substitutions that can be easily thought of by those familiar with the art, all answers It is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (19)

1. a kind of method for obtaining network file resource, which is characterized in that this method comprises:
Video data request is sent, triggering obtains remaining data flow, shows the remaining data flow of acquisition;
It parses the video data returned according to video data request and requests response, obtain each network file money that parsing obtains Source size is simultaneously shown;
The download instruction that the video data requests corresponding webpage output is received, the download instruction is user according to displaying Remaining data flow and network file resource size are chosen and are generated after network file resource to be downloaded, and downloading is described under Support grid network file resource.
2. being returned only to video counts the method according to claim 1, wherein carrying in video data request According to the identification information of request head response.
3. the method according to claim 1, wherein the network file resource be mp4 video, it is described parsing according to Response is requested according to the video data that video data request returns, obtains each network file resource size packet that parsing obtains It includes:
Video data request response is parsed, video data is obtained and requests response response head;
Judge in the video data request head response whether comprising Content-Length field, if so, extracting Information after Content-Length field obtains network file resource size.
4. the method according to claim 1, wherein the network file resource is M3U8 video, the parsing The video data returned according to video data request requests response, obtains each network file resource size packet that parsing obtains It includes:
Video data request response is parsed, the M3U8 file for including in video data request head response is obtained;
Judge in M3U8 file at pre-set position whether to include M3U8 video size information, if comprising obtaining network File resource size;If do not included, M3U8 file is traversed, the duration information after obtaining EXTINF field;
Add up each duration information, obtains total duration;
The transport stream section of predetermined quantity in M3U8 file is chosen, HTTP request is initiated, responds and obtains according to the HTTP request returned The sample total duration and sample total size of the transport stream section of the predetermined quantity;
Calculate sample delivery rate according to the sample total size and sample total duration, according to the sample delivery rate and The total duration obtains network file resource size.
5. according to the method described in claim 4, it is characterized in that, calculating the network file resource size using following formula:
In formula,
SUM_SIZE is network file resource size;
SUM_TIME is total duration;
SUB_SUM_SIZE is sample total size;
SUB_SUM_TIME is sample total duration.
6. method according to any one of claims 1 to 5, which is characterized in that the triggering obtains remaining data flow packet It includes:
The set meal file of storage is inquired, set meal data traffic threshold values are obtained;
The system log message of electronic equipment record is extracted, the data that electronic equipment consumes in set meal validity date section are obtained Flow;
The set meal data traffic threshold values are subtracted into the data traffic that the electronic equipment consumes in set meal validity date section, Obtain remaining data flow.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
The data traffic information and temporal information that storage obtains empty storage after section is arrived in the set meal validity date Data traffic information and temporal information;
The system log message for extracting electronic equipment record obtains what electronic equipment consumed in set meal validity date section Data traffic includes:
The system log message of electronic equipment record is extracted, obtains electronic equipment in set meal validity date section, and storing The temporal information after period in consume data traffic, add up the data traffic information of the storage;
With the data traffic information and temporal information of accumulative data traffic information and time information renovation storage.
8. method according to any one of claims 1 to 5, which is characterized in that the triggering obtains remaining data flow packet It includes:
Pre-set flow short message enquiry is called in triggering, sends to pre-set operating service business;
The short message for receiving the operating service business feedback, extracts remaining data flow therein.
9. method according to any one of claims 1 to 5, which is characterized in that the triggering obtains remaining data flow packet It includes:
The set meal file of storage is inquired, set meal data traffic threshold values are obtained;
The system log message of electronic equipment record is extracted, the data that electronic equipment consumes in set meal validity date section are obtained Flow;
The set meal data traffic threshold values are subtracted into the data traffic that the electronic equipment consumes in set meal validity date section, Obtain the first remaining data flow;
Pre-set flow short message enquiry is called in triggering, sends to pre-set operating service business;
The short message for receiving the operating service business feedback, extracts the second remaining data flow therein;
Using the second remaining data flow, according to pre-set Correction Strategies, to the first remaining data flow into Row correction, obtains remaining data flow.
10. it is a kind of obtain network file resource device, which is characterized in that the device include: remaining data flow obtain module, Network file source obtaining module and network file resource downloading module, wherein
Remaining data flow obtains module, and for sending video data request, triggering obtains remaining data flow, shows acquisition The remaining data flow;
Network file source obtaining module, for parsing the video data request response returned according to video data request, It obtains each network file resource size that parsing obtains and shows;
Network file resource downloading module requests the download instruction of corresponding webpage output, institute for receiving the video data Stating download instruction is user according to the remaining data flow and network file resource size that show, chooses network file to be downloaded It is generated after resource, downloads the network file resource to be downloaded.
11. device according to claim 10, which is characterized in that carried in the video data request and be returned only to video The identification information of request of data head response.
12. device according to claim 10, which is characterized in that the network file resource is mp4 video, the network It includes: the first resolution unit and first information extraction unit that file resource, which obtains module, wherein
First resolution unit obtains video data and requests response response head for parsing video data request response;
First information extraction unit, for whether judging in the video data request head response comprising Content-Length word Section obtains network file resource size if so, extracting the information after Content-Length field.
13. device according to claim 10, which is characterized in that the network file resource is M3U8 video, the net It includes: the second resolution unit, judging unit, summing elements, the second information extraction unit and net that network file resource, which obtains module, Network file resource computing unit, wherein
Second resolution unit obtains the M3U8 for including in video data request head response for parsing video data request response File;
Judging unit, for judging in M3U8 file at pre-set position whether to include M3U8 video size information, if It include to obtain network file resource size;If do not included, M3U8 file is traversed, the duration information after obtaining EXTINF field;
Summing elements obtain total duration for each duration information that adds up;
Second information extraction unit initiates HTTP request, foundation is returned for choosing the transport stream section of predetermined quantity in M3U8 file The HTTP request response returned obtains the sample total duration and sample total size of the transport stream section of the predetermined quantity;
Network file Resource Calculation unit, for calculating sample delivery speed according to the sample total size and sample total duration Rate obtains network file resource size according to the sample delivery rate and the total duration.
14. device according to claim 13, which is characterized in that calculate the network file resource size using following formula:
In formula,
SUM_SIZE is network file resource size;
SUM_TIME is total duration;
SUB_SUM_SIZE is sample total size;
SUB_SUM_TIME is sample total duration.
15. device according to any one of claims 10 to 14, which is characterized in that the remaining data flow obtains module It include: request transmitting unit, query unit, extraction unit, remaining data flow acquiring unit and display unit, wherein
Request transmitting unit, for notifying query unit after sending video data request;
Query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
Extraction unit obtains electronic equipment in set meal validity date area for extracting the system log message of electronic equipment record The data traffic of interior consumption;
Remaining data flow acquiring unit is effective in set meal for the set meal data traffic threshold values to be subtracted the electronic equipment The data traffic consumed in date section, obtains remaining data flow;
Display unit, for showing the remaining data flow obtained.
16. device according to any one of claims 10 to 14, which is characterized in that the remaining data flow obtains module Include: request transmitting unit, query unit, accumulated unit, updating unit, storage unit, remaining data flow acquiring unit with And display unit;
Request transmitting unit, for notifying query unit after sending video data request;
Query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
Accumulated unit obtains electronic equipment in set meal validity date area for extracting the system log message of electronic equipment record In, and the data traffic consumed within the period after the temporal information of storage, add up the data traffic letter of the storage Breath;
Updating unit, for the data traffic information of accumulative data traffic information and time information renovation storage unit storage And temporal information;
Storage unit is arrived for storing the data traffic information and temporal information that obtain in set meal validity date section Afterwards, the data traffic information and temporal information of storage are emptied;
Remaining data flow acquiring unit is effective in set meal for the set meal data traffic threshold values to be subtracted the electronic equipment The data traffic consumed in date section, obtains remaining data flow;
Display unit, for showing the remaining data flow obtained.
17. device according to any one of claims 10 to 14, which is characterized in that the remaining data flow obtains module It include: request transmitting unit, call unit and remaining data flow extraction unit, wherein
Request transmitting unit, for notifying call unit after sending video data request;
Call unit calls pre-set flow short message enquiry for triggering, sends to pre-set operating service business;
Remaining data flow extraction unit extracts remaining data therein for receiving the short message of the operating service business feedback Flow.
18. device according to any one of claims 10 to 14, which is characterized in that the remaining data flow obtains module It include: request transmitting unit, threshold query unit, log information extraction unit, the first remaining data flow acquiring unit, short message Query unit, short message extraction unit and correction unit, wherein
Request transmitting unit is used for after sending video data request, notification threshold query unit;
Threshold query unit obtains set meal data traffic threshold values for inquiring the set meal file of storage;
Log information extraction unit, for extracting the system log message of electronic equipment record, obtain electronic equipment has in set meal Imitate the data traffic consumed in date section;
First remaining data flow acquiring unit, for the set meal data traffic threshold values to be subtracted the electronic equipment in set meal The data traffic consumed in validity date section, obtains the first remaining data flow;
Message search unit calls pre-set flow short message enquiry for triggering, sends out to pre-set operating service business It send;
Short message extraction unit extracts the second remaining data flow therein for receiving the short message of the operating service business feedback;
Unit is corrected, it is surplus to described first according to pre-set Correction Strategies for utilizing the second remaining data flow Remaining data traffic is corrected, and obtains remaining data flow.
19. a kind of electronic equipment, which is characterized in that the electronic equipment includes: shell, processor, memory, circuit board and electricity Source circuit, wherein circuit board is placed in the space interior that shell surrounds, and processor and memory setting are on circuit boards;Power supply Circuit, for each circuit or the device power supply for above-mentioned electronic equipment;Memory is for storing executable program code;Processing Device runs program corresponding with executable program code by reading the executable program code stored in memory, for holding The method of network file resource is obtained described in the aforementioned any claim 1-9 of row.
CN201610126328.7A 2016-03-07 2016-03-07 Method and device for acquiring network file resources and electronic equipment Active CN105808714B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610126328.7A CN105808714B (en) 2016-03-07 2016-03-07 Method and device for acquiring network file resources and electronic equipment
PCT/CN2017/075064 WO2017152792A1 (en) 2016-03-07 2017-02-27 Method and device for acquiring network file resource and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610126328.7A CN105808714B (en) 2016-03-07 2016-03-07 Method and device for acquiring network file resources and electronic equipment

Publications (2)

Publication Number Publication Date
CN105808714A CN105808714A (en) 2016-07-27
CN105808714B true CN105808714B (en) 2019-05-17

Family

ID=56467754

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610126328.7A Active CN105808714B (en) 2016-03-07 2016-03-07 Method and device for acquiring network file resources and electronic equipment

Country Status (2)

Country Link
CN (1) CN105808714B (en)
WO (1) WO2017152792A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808714B (en) * 2016-03-07 2019-05-17 北京金山安全软件有限公司 Method and device for acquiring network file resources and electronic equipment
CN109151579B (en) * 2018-09-07 2021-02-26 杭州迪普科技股份有限公司 Method, device and equipment for testing whether web video traffic is correctly identified
CN109995863B (en) * 2019-03-29 2022-04-22 北京金山安全软件有限公司 Dynamic resource downloading method and device, electronic equipment and storage medium
CN111818219B (en) * 2019-04-11 2023-03-14 阿尔派株式会社 Electronic equipment and prompt information control method of electronic equipment
CN110379236A (en) * 2019-05-29 2019-10-25 昆明纯全教育信息咨询有限公司 Video broadcasting method, device, computer readable storage medium and server in micro- video teaching method
CN114640890A (en) * 2020-12-15 2022-06-17 武汉斗鱼鱼乐网络科技有限公司 Video data dynamic loading method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188647A (en) * 2011-12-29 2013-07-03 北京网秦天下科技有限公司 Method and system for statistically analyzing and warning Internet surfing flow of mobile terminal
CN103391504A (en) * 2013-07-24 2013-11-13 中国联合网络通信集团有限公司 Flow reminding method and device
CN103546829A (en) * 2013-10-23 2014-01-29 华为技术有限公司 Method and device for processing video service
CN103648019A (en) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 Video downloading method and device based on HLS protocol
CN104767809A (en) * 2015-04-02 2015-07-08 天脉聚源(北京)教育科技有限公司 Downloading control method and system
CN105142184A (en) * 2015-06-12 2015-12-09 联想(北京)有限公司 Flow control method and electronic device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140237081A1 (en) * 2013-02-15 2014-08-21 Zhongwen Zhu Method and multimedia content manager for managing multimedia content download
CN103260142A (en) * 2013-06-03 2013-08-21 亚信联创科技(中国)有限公司 Method and system for detecting network resource matching of user corresponding to mobile phone terminal
CN104009892A (en) * 2014-06-12 2014-08-27 北京奇虎科技有限公司 Monitoring method and device for traffic of mobile terminal and client side
CN104581671A (en) * 2015-01-21 2015-04-29 深圳市中兴移动通信有限公司 Prompting method and device for data traffic
CN105808714B (en) * 2016-03-07 2019-05-17 北京金山安全软件有限公司 Method and device for acquiring network file resources and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103188647A (en) * 2011-12-29 2013-07-03 北京网秦天下科技有限公司 Method and system for statistically analyzing and warning Internet surfing flow of mobile terminal
CN103391504A (en) * 2013-07-24 2013-11-13 中国联合网络通信集团有限公司 Flow reminding method and device
CN103546829A (en) * 2013-10-23 2014-01-29 华为技术有限公司 Method and device for processing video service
CN103648019A (en) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 Video downloading method and device based on HLS protocol
CN104767809A (en) * 2015-04-02 2015-07-08 天脉聚源(北京)教育科技有限公司 Downloading control method and system
CN105142184A (en) * 2015-06-12 2015-12-09 联想(北京)有限公司 Flow control method and electronic device

Also Published As

Publication number Publication date
CN105808714A (en) 2016-07-27
WO2017152792A1 (en) 2017-09-14

Similar Documents

Publication Publication Date Title
CN105808714B (en) Method and device for acquiring network file resources and electronic equipment
CN106561054B (en) Recommend method and system in a kind of live streaming room for webcast website
CN103686396B (en) Video sharing method and device
CN105052107B (en) Media content Adaptive Transmission is carried out using quality information
CN102929938B (en) A kind of sort method and device playing type Internet resources
CN104244079B (en) A kind of method for downloading video and device
CN106453559B (en) A kind of processing method of business object, server, terminal and system
US20140301218A1 (en) Statistical analysis and prompting method and system for mobile terminal internet traffic
CN102831537B (en) A kind of method and device obtaining network advertisement information
CN103391504B (en) The method and device that a kind of flow is reminded
CN103686375A (en) Video sharing method and device
CN109152094B (en) Wireless network connection method for terminal
WO2015161356A1 (en) Methods and systems relating to visual communications
US20130332585A1 (en) Method and system for downloading content
CN102651731A (en) Video display method and video display device
CN105490886A (en) Method and device for testing network speed and electronic equipment
CN110324680B (en) Video pushing method and device, server, client and storage medium
CN104333783A (en) Formulated task on demand method and system and related device
CN103220297B (en) Method for carrying out multi-screen interaction through social network
CN105872006A (en) Appointment reminding system and appointment reminding method
CN111090533A (en) Notice information sending method and device, electronic equipment and storage medium
CN109729376A (en) A kind of processing method of life cycle, device, equipment and storage medium
CN104918203A (en) Method and device for reminding residual internet traffic of mobile subscriber
CN114418648A (en) Advertisement putting method and device, storage medium and electronic equipment
CN107547626B (en) User portrait sharing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant