CN114205678A - Video access method, access device, terminal and computer readable storage medium - Google Patents

Video access method, access device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN114205678A
CN114205678A CN202111354353.8A CN202111354353A CN114205678A CN 114205678 A CN114205678 A CN 114205678A CN 202111354353 A CN202111354353 A CN 202111354353A CN 114205678 A CN114205678 A CN 114205678A
Authority
CN
China
Prior art keywords
video
terminal
address
accessed
storage space
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.)
Pending
Application number
CN202111354353.8A
Other languages
Chinese (zh)
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.)
Hunan New Cloudnet Technology Co ltd
Original Assignee
Hunan New Cloudnet Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan New Cloudnet Technology Co ltd filed Critical Hunan New Cloudnet Technology Co ltd
Priority to CN202111354353.8A priority Critical patent/CN114205678A/en
Publication of CN114205678A publication Critical patent/CN114205678A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4782Web browsing, e.g. WebTV
    • 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/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2517Translation of Internet protocol [IP] addresses using port numbers
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer

Abstract

The application is applicable to the technical field of communication, and provides a video access method, an access device, a terminal and a computer readable storage medium, which are applied to a terminal provided with a WebView control, wherein the method comprises the following steps: the terminal monitors a video access request of the WebView control, wherein the video access request comprises a first address; the terminal replaces the first address with a second address; the terminal displays the video to be accessed after acquiring the video to be accessed cached in the local storage space of the terminal according to the second address; by the method and the device, the problems of high traffic cost and poor user experience caused by the fact that the cached video in the local storage space of the terminal cannot be loaded and the video resource needs to be continuously requested from the server can be solved.

Description

Video access method, access device, terminal and computer readable storage medium
Technical Field
The application belongs to the technical field of communication, and particularly relates to a video access method, an access device, a terminal and a computer readable storage medium.
Background
At present, when a user opens an interested webpage video for watching through a browser, the user can select to download the interested webpage video into a local storage space of a terminal, so that the user can conveniently and directly watch the webpage video in the future; however, the video resources downloaded to the local storage space of the terminal by the user cannot be directly accessed through the web page. When the user opens the browser again to access the interested webpage video, although the corresponding webpage video is cached in the local storage space of the terminal, the webpage cannot directly open the cached webpage video in the local storage space of the terminal due to different protocols for loading the webpage video and loading the local video, and therefore the webpage video needs to be continuously requested to be loaded from the server, so that the user experience is reduced, and the traffic is wasted.
Disclosure of Invention
In view of this, the present application provides a video access method, an access apparatus, a terminal, and a computer-readable storage medium, which can solve the problems of high traffic cost and poor user experience caused by the fact that a cached video in a local storage space of the terminal cannot be loaded and a video resource needs to be continuously requested from a server.
A first aspect of an embodiment of the present application provides a video access method, including:
the terminal monitors a video access request of the WebView control, wherein the video access request comprises a first address, the first address is an address of a video to be accessed in a first server, and the first server is a server responding to the video access request;
the terminal replaces the first address with a second address, and the second address comprises an address of the video to be accessed in a local storage space of the terminal;
and the terminal displays the video to be accessed after acquiring the video to be accessed cached in the local storage space of the terminal according to the second address.
In another implementation manner of the first aspect, before the terminal replaces the first address with the second address, the method further includes:
the terminal judges whether the video to be accessed is cached in a local storage space of the terminal or not according to the first address;
correspondingly, the replacing, by the terminal, the first address with the second address includes:
and if the video to be accessed is cached in the local storage space video of the terminal, replacing the first address with the second address by the terminal.
In another implementation manner of the first aspect, after the terminal determines, according to the first address, whether the video to be accessed is cached in a local storage space of the terminal, the method further includes:
if the video to be accessed is not cached in the local storage space of the terminal, the terminal sends the video access request to the first server through the WebView control;
the terminal receives the video frame of the video to be accessed, which is returned by the first server according to the video access request, and caches the video frame of the video to be accessed;
the terminal plays the video frame of the video to be accessed in the cache of the terminal;
and under the condition that the playing progress of the video to be accessed is greater than a progress threshold, the terminal downloads the video to be accessed from the first server according to the video access request and stores the video to be accessed in a local storage space of the terminal.
In another implementation manner of the first aspect, the storing the video to be accessed in a local storage space of the terminal includes:
the terminal encodes the first address to obtain a first identifier;
storing the video to be accessed in a local storage space of the terminal by taking the first identification as the name of the video to be accessed;
correspondingly, the determining, by the terminal, whether the video to be accessed is cached in the local storage space of the terminal according to the first address includes:
the terminal encodes the first address to obtain a first identifier;
judging whether the video to be accessed named by the first identifier exists in a local storage space of the terminal;
and if the video to be accessed named by the first identifier exists in the local storage space of the terminal, judging that the video to be accessed is cached in the local storage space of the terminal.
In another implementation manner of the first aspect, the acquiring, by the terminal according to the second address, the video to be accessed cached in the local storage space of the terminal includes:
the terminal acquires the video to be accessed from a local storage space of the terminal through an http server based on the second address;
and the terminal sends the video to be accessed to the WebView control through the http server.
In another implementation manner of the first aspect, the second address further includes an IP address and a port number of the terminal.
In another implementation form of the first aspect, the method further comprises:
and when the residual storage space of the local storage space of the terminal is smaller than a first value, clearing the video to be accessed in the local storage space of the terminal.
A second aspect of an embodiment of the present application provides a video access apparatus, including:
the monitoring module is used for monitoring a video access request of the WebView control, wherein the video access request comprises a first address, the first address is an address of a video to be accessed in a first server, and the first server is a server responding to the video access request;
the processing module is used for replacing the first address with a second address, and the second address comprises an address of the video to be accessed in a local storage space of a terminal where the device is located;
and the obtaining module is used for obtaining the video to be accessed cached in the local storage space video of the terminal where the device is located according to the second address, and then the terminal where the device is located displays the video to be accessed.
A third aspect of embodiments of the present application provides a terminal, which includes a processor, and the processor is configured to execute a computer program stored in a memory, so as to implement the video access method according to the first aspect.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the video access method according to the first aspect.
In the method, in the process of accessing the cached video in the local storage space of the terminal through the WebView control, the terminal monitors a video access request of the WebView control, wherein the video access request carries a first address, the first address is the address of the video to be accessed in a first server, and the first server is a server responding to the video access request; secondly, the terminal replaces the first address with a second address, and the second address comprises the address of the video to be accessed in the local storage space of the terminal; and then, the terminal acquires the video to be accessed from the local storage space according to the second address and displays the acquired video to be accessed. According to the video access method, the local cache video of the terminal can be converted into the webpage video for the user to browse and view, so that the video access request is sent to the first server to obtain the video to be accessed without the condition that the cache video exists in the local storage space of the terminal, the user experience is improved, and the traffic consumed by frequently requesting the first server is saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without exceeding the protection scope of the present application.
Fig. 1 illustrates a flow diagram of a video access method provided by an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating a video access method according to another embodiment of the present application;
fig. 3 is a schematic flow chart illustrating a video access method according to another embodiment of the present application;
fig. 4 is a schematic flow chart illustrating a video access method according to another embodiment of the present application;
fig. 5 is a schematic flow chart illustrating a video access method according to another embodiment of the present application;
fig. 6 is a block diagram schematically illustrating a composition of a video access apparatus according to an embodiment of the present disclosure;
fig. 7 is a block diagram illustrating a terminal according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, etc. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The video access method is applied to the terminal provided with the WebView control.
The technical solution of the present application will be clearly and completely described below by specific examples, which are as follows:
referring to fig. 1, which is a schematic flowchart of a video access method provided in an embodiment of the present application, as shown in the figure, the video access method includes the following steps:
s11, the terminal monitors a video access request of the WebView control, the video access request comprises a first address, the first address is an address of a video to be accessed in a first server, and the first server is a server responding to the video access request.
In the embodiment of the application, the WebView control is installed on a client on a terminal, such as a browser. The video access request can be a request that a user inputs a search keyword of an interesting video to a browser in the terminal through the terminal and then triggers the WebView control to access the first server to acquire the video to be accessed.
Therefore, the first server is used for providing the video to be accessed according to the video access request.
The video access request carries a Uniform Resource Locator (URL) of the video to be accessed. The URL is address indication information of the first server, and the URL includes a storage address of the video to be accessed in the first server.
For convenience of description, the address of the video to be accessed in the URL at the first server is defined as a first address.
As an example, assume that the URL in the video access request is
http://y.cunwedu.com.cn/cunw-operation-h5/help/index.htmlcode=01000001&projectCode=SC002+http://cunw-edu-statics.oss-cn-hangzhou.aliyuncs.com/operation/familydesk/consulting/pic/1601361890404.mp4。
Then
http:// cunw-edu-statics. os-cn-hang zhhou. aliyuncs. com/operation/family desk/consumting/pic/1601361890404. mp4 is the first address.
And S12, the terminal replaces the first address with a second address, and the second address comprises the address of the video to be accessed in the local storage space of the terminal.
In another embodiment of the present application, before the terminal replaces the first address with the second address, the method further includes:
and the terminal judges whether the video to be accessed is cached in the local storage space of the terminal or not according to the first address.
Referring to fig. 2, in another embodiment of the present application, the determining, by the terminal, whether the video to be accessed is cached in the local storage space of the terminal according to the first address includes:
s21, the terminal codes the first address to obtain the first identification.
As an example, assume that the first address is:
http:// cunw-edu-statics. oss-cn-hang zhhou. aliyunncs. com/operation/family desk/meeting/pic/1601361890404. mp4, the terminal encodes the first address to obtain a video name 793 d978db47cb561f2146e3b30084. mp4, and the video name is the first identifier.
And S22, judging whether the video to be accessed named by the first identifier exists in the local storage space of the terminal.
For example, after obtaining the first identifier 793d 978db47cb561f2146e3b30084. mp4, the terminal may search, according to the first identifier, in a local storage space of the terminal, whether a cached video named by the first identifier exists.
And S23, if the video to be accessed named by the first identifier exists in the local storage space of the terminal, judging that the video to be accessed is cached in the local storage space of the terminal.
As an example, assuming that a video resource named as the first identifier 793d 978db47cb561f2146e3b30084. mp4 is stored in the local storage space of the terminal, the terminal may determine that the video to be accessed is stored in the local storage space of the terminal.
The terminal judges that the local storage space caches the video resource named by the first identifier, and then the terminal can send the first address
http:// cunw-edu-statics.os-cn-hang zhou. aliyuncs.com/operation/family desk/meeting/pic/1601361890404. mp4 is replaced by http:// localhost + port number + address of video to be accessed in SD card, that is, "http:// localhost + port number + address of video to be accessed in SD card" is the second address, wherein localhost is the local IP address of the terminal.
And the second address is the address of the video to be accessed in the local storage space of the terminal.
Referring to fig. 3, in another embodiment of the present application, after the terminal determines whether the video to be accessed is cached in the local storage space of the terminal according to the first address, the method further includes:
and S33, if the video to be accessed is not cached in the local storage space of the terminal, the terminal sends a video access request to the first server through the WebView control.
In the embodiment of the application, if the terminal encodes the first address, and after the first identifier is obtained, the terminal does not inquire the video resource named by the first identifier in the local storage space, the terminal will determine that the video to be accessed is not cached in the local storage space, and at this time, the terminal will send the video access request to the first server through the WebView control, wherein the video access request carries the address of the first server and the first address of the video to be accessed in the first server.
And S34, the terminal receives the video frame of the video to be accessed returned by the first server according to the video access request, and caches the video frame of the video to be accessed.
In the embodiment of the application, after the first server receives a video access request sent by the terminal through the WebWiew control, the first server responds to the video access request and returns a video frame of a video to be accessed to the terminal, and the terminal receives the video frame of the video to be accessed sent by the first server and simultaneously caches the video frame of the video to be accessed for a user to browse and view.
And S35, the terminal plays the video frame of the video to be accessed in the buffer memory of the terminal.
In the embodiment of the application, after the terminal receives the to-be-accessed video returned by the first server, the terminal caches the to-be-accessed video in the cache of the browser, and then plays the to-be-accessed video cached in the cache of the browser.
And S36, when the playing progress of the video to be accessed is larger than the progress threshold, the terminal downloads the video to be accessed from the first server according to the video access request, and stores the video to be accessed in the local storage space of the terminal.
In the embodiment of the application, in the process of playing the video to be accessed, the terminal monitors the playing progress of the video to be accessed. As an example, the first server returns a video to be accessed to a cache of a browser in the terminal according to the video access request, the user may click to play the video to be accessed returned to the cache of the browser by the first server, during the playing of the video to be accessed, the terminal may monitor whether the video to be accessed is played by 10%, and if the video to be accessed is played by 10%, the terminal may download the video to be accessed from the first server to a local storage space of the terminal according to the video access request. In the application, the progress threshold is set to download the video resource which is interested by the user to the local storage space of the terminal, so that the video resource which is not interested by the user is prevented from being downloaded and occupying the local storage space of the terminal.
It should be added that, because the buffering space of the WebView control is extremely small, it is basically infeasible to buffer all video frames of the video to be accessed, which are sent by the first server, through the WebView. Therefore, when the video playing progress reaches the progress threshold value, the terminal downloads the video to be accessed to the local storage space of the terminal from the first server directly according to the first server address in the video access request.
Referring to fig. 4, in another embodiment of the present application, storing a video to be accessed in a local storage space of a terminal includes:
s3601, the terminal encodes the first address to obtain a first identification.
The description of the embodiment of the present application may refer to the embodiment described in S21, and is not repeated here.
And S3602, storing the video to be accessed in a local storage space of the terminal by taking the first identification as the name of the video to be accessed.
In the embodiment of the application, the first identifier of the first address is obtained
793 d978db47cb561f2146e3b30084. mp4, the terminal will be marked with the first mark
793 d978db47cb561f2146e3b30084. mp4 is used as the name of the downloaded video to be accessed, names the downloaded video to be accessed, and stores the video to be accessed named by the first identifier in the local storage space of the terminal.
Referring to fig. 3, in another embodiment of the present application, the method further includes:
and S37, when the residual storage space of the local storage space of the terminal is smaller than the first value, clearing the video to be accessed in the local storage space of the terminal.
In the embodiment of the application, when the terminal detects that the local storage space is insufficient, namely, when the local storage space is smaller than the preset first value, the terminal performs a cleaning operation on the video to be accessed downloaded to the local storage space of the terminal so as to release the local storage space of the terminal.
And S13, the terminal acquires the video to be accessed cached in the local storage space of the terminal according to the second address, and then displays the video to be accessed.
Referring to fig. 5, in another embodiment of the present application, the acquiring, by the terminal according to the second address, a to-be-accessed video cached in a local storage space of the terminal includes:
and S1301, the terminal acquires the video to be accessed from the local storage space of the terminal through the http server based on the second address.
In the embodiment of the application, the http server is located at the terminal and can be understood as a server. As an example, the server is configured to receive the second address sent by the terminal: and the http:// localhost + port number + the address of the video to be accessed in the SD card, and the video to be accessed is acquired from the local storage space of the terminal according to the received second address.
S1302, the terminal sends the video to be accessed to the WebView control through the http server.
In the embodiment of the application, after the terminal acquires the video to be accessed in the local storage space of the terminal through the http server, the terminal sends the video to be accessed acquired from the local storage space to the WebView control through the http server for the WebView control to display.
Fig. 6 is a schematic block diagram of the data access device according to the embodiment of the present application, and only the portions related to the embodiment of the present application are shown for convenience of description. The data access device 6 includes:
the monitoring module 610 is configured to monitor a video access request of the WebView control, where the video access request includes a first address, the first address is an address of a video to be accessed in a first server, and the first server is a server responding to the video access request;
a processing module 620, configured to replace the first address with a second address, where the second address includes an address of the video to be accessed in a local storage space of a terminal where the apparatus is located;
an obtaining module 630, configured to obtain, according to the second address, a to-be-accessed video cached in a local storage space of a terminal where the apparatus is located, and then display the to-be-accessed video by the terminal where the apparatus is located.
In another embodiment of the present application, the processing module 620 is further configured to:
and judging whether the video to be accessed is cached in a local storage space of a terminal where the device is located according to the first address.
And if the video to be accessed is cached in the local storage space of the terminal where the device is located, replacing the first address with the second address, wherein the second address comprises an IP address and a port number of the terminal where the device is located.
In another embodiment of the present application, the processing module 620 is further configured to:
if the video to be accessed is not cached in a local storage space of a terminal where the device is located, sending the video access request to the first server through the WebView control;
receiving the video frame of the video to be accessed returned by the first server according to the video access request, and caching the video frame of the video to be accessed;
playing the video frame of the video to be accessed in the cache of the terminal where the device is located;
and downloading the video to be accessed from the first server according to the video access request under the condition that the playing progress of the video to be accessed is greater than a progress threshold value, and storing the video to be accessed in a local storage space of a terminal where the device is located.
In another embodiment of the present application, the processing module 620 is further configured to:
the first address is coded to obtain a first identifier;
and taking the first identification as the name of the video to be accessed, and storing the video to be accessed in a local storage space of a terminal where the device is located.
In another embodiment of the present application, the processing module 620 is further configured to:
coding the first address to obtain a first identifier;
judging whether a video to be accessed named by the first identifier exists in a local storage space of a terminal where the device is located;
if the video to be accessed named by the first identifier exists in the local storage space of the terminal where the device is located, it is determined that the video to be accessed is cached in the local storage space of the terminal where the device is located.
In another embodiment of the present application, the processing module 620 is further configured to:
and when the residual storage space of the local storage space of the terminal where the device is located is smaller than a first value, clearing the video to be accessed in the local storage space of the terminal where the device is located.
In another embodiment of the present application, the obtaining module 630 is further configured to:
acquiring the video to be accessed from a local storage space of a terminal where the device is located through an http server based on the second address;
and sending the video to be accessed to the WebView control through the http server.
It should be noted that the execution process and mutual information interaction between the above-mentioned devices/modules and the data access method provided in the embodiments of the present application are based on the same concept, and specific functions and technical effects thereof may be referred to in the method embodiments, and are not described herein again.
As shown in fig. 7, is a schematic block diagram of a terminal provided in an embodiment of the present application, where the terminal 7 of the embodiment includes:
one or more processors 710, a memory 720, and a computer program 730 stored in the memory 720 and executable on the processors 710. The processor 710, when executing the computer program 730, implements the steps in the various method embodiments described above, such as the steps S11-S13 shown in fig. 1.
Illustratively, the computer program 730 may be divided into one or more modules, which are stored in the memory 720 and executed by the processor 710 to perform the present application, and the one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 730 in the electronic device 7. For example, the computer program 730 may be divided into a listening module, an interface determination module, an annotation acquisition module, a search key determination module, and a cache data acquisition module, which are exemplary:
the monitoring module is used for monitoring a video access request of the WebView control by a terminal, wherein the video access request comprises a first address, the first address is an address of a video to be accessed in a first server, and the first server is a server responding to the video access request;
the processing module is used for replacing the first address with a second address by the terminal, wherein the second address comprises an address of the video to be accessed in a local storage space of the terminal;
and the acquisition module is used for displaying the video to be accessed by the terminal after the terminal acquires the video to be accessed cached in the local storage space video of the terminal according to the second address.
The terminal includes, but is not limited to, a processor 710, a memory 720. It will be appreciated by a person skilled in the art that fig. 7 is only one example of a terminal 7 and does not constitute a limitation of the terminal 7, and that it may comprise more or less components than shown, or some components may be combined, or different components, e.g. the terminal 7 may further comprise input devices, output devices, network access devices, buses, etc.
The Processor 710 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 720 may be an internal storage unit of the terminal 7, such as a hard disk or a memory of the terminal 7. The memory 720 may also be an external storage device of the terminal 7, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) and the like provided on the terminal 7. Further, the memory 720 may also include both an internal storage unit and an external storage device of the terminal 7. The memory 720 is used for storing the computer programs and other programs and data required by the terminal 7. The memory 720 may also be used to temporarily store data that has been output or is to be output.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative exception handling method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the description of the embodiments is only intended to facilitate the understanding of the methods and their core concepts of the present application. Meanwhile, a person skilled in the art should, according to the idea of the present application, change or modify the embodiments and applications of the present application based on the scope of the present application. In view of the above, the description should not be taken as limiting the application.

Claims (10)

1. A video access method is applied to a terminal provided with a WebView control, and comprises the following steps:
the terminal monitors a video access request of the WebView control, wherein the video access request comprises a first address, the first address is an address of a video to be accessed in a first server, and the first server is a server responding to the video access request;
the terminal replaces the first address with a second address, and the second address comprises an address of the video to be accessed in a local storage space of the terminal;
and the terminal displays the video to be accessed after acquiring the video to be accessed cached in the local storage space of the terminal according to the second address.
2. The method of claim 1, wherein the terminal replaces the first address with the second address prior, the method further comprising:
the terminal judges whether the video to be accessed is cached in a local storage space of the terminal or not according to the first address;
correspondingly, the replacing, by the terminal, the first address with the second address includes:
and if the video to be accessed is cached in the local storage space video of the terminal, replacing the first address with the second address by the terminal.
3. The method of claim 2, wherein after the terminal determines whether the video to be accessed is cached in the local storage space of the terminal according to the first address, the method further comprises:
if the video to be accessed is not cached in the local storage space of the terminal, the terminal sends the video access request to the first server through the WebView control;
the terminal receives the video frame of the video to be accessed, which is returned by the first server according to the video access request, and caches the video frame of the video to be accessed;
the terminal plays the video frame of the video to be accessed in the cache of the terminal;
and under the condition that the playing progress of the video to be accessed is greater than a progress threshold, the terminal downloads the video to be accessed from the first server according to the video access request and stores the video to be accessed in a local storage space of the terminal.
4. The method of claim 3, wherein the storing the video to be accessed in a local storage space of the terminal comprises:
the terminal encodes the first address to obtain a first identifier;
storing the video to be accessed in a local storage space of the terminal by taking the first identification as the name of the video to be accessed;
correspondingly, the determining, by the terminal, whether the video to be accessed is cached in the local storage space of the terminal according to the first address includes:
the terminal encodes the first address to obtain a first identifier;
judging whether the video to be accessed named by the first identifier exists in a local storage space of the terminal;
and if the video to be accessed named by the first identifier exists in the local storage space of the terminal, judging that the video to be accessed is cached in the local storage space of the terminal.
5. The method of claim 4, wherein the terminal acquires the video to be accessed cached in the local storage space of the terminal according to the second address, and the method comprises the following steps:
the terminal acquires the video to be accessed from a local storage space of the terminal through an http server based on the second address;
and the terminal sends the video to be accessed to the WebView control through the http server.
6. The method of claim 1, wherein the second address further comprises an IP address, a port number of the terminal.
7. The method of claim 3, wherein the method further comprises:
and when the residual storage space of the local storage space of the terminal is smaller than a first value, clearing the video to be accessed in the local storage space of the terminal.
8. A video access apparatus, characterized in that the apparatus comprises:
the monitoring module is used for monitoring a video access request of the WebView control, wherein the video access request comprises a first address, the first address is an address of a video to be accessed in a first server, and the first server is a server responding to the video access request;
the processing module is used for replacing the first address with a second address, and the second address comprises an address of the video to be accessed in a local storage space of a terminal where the device is located;
and the obtaining module is used for displaying the video to be accessed through the terminal where the device is located after obtaining the video to be accessed cached in the local storage space video of the terminal where the device is located according to the second address.
9. A terminal, characterized in that the terminal comprises a processor for executing a computer program stored in a memory for implementing the video access method according to any of claims 1 to 7.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the video access method according to any one of claims 1 to 7.
CN202111354353.8A 2021-11-16 2021-11-16 Video access method, access device, terminal and computer readable storage medium Pending CN114205678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111354353.8A CN114205678A (en) 2021-11-16 2021-11-16 Video access method, access device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111354353.8A CN114205678A (en) 2021-11-16 2021-11-16 Video access method, access device, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114205678A true CN114205678A (en) 2022-03-18

Family

ID=80647718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111354353.8A Pending CN114205678A (en) 2021-11-16 2021-11-16 Video access method, access device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114205678A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8234348B1 (en) * 2010-09-30 2012-07-31 Google Inc. Determining if an application is cached
CN103686198A (en) * 2013-12-30 2014-03-26 优视科技有限公司 Video data processing method, device and system
CN106528563A (en) * 2015-09-11 2017-03-22 腾讯科技(深圳)有限公司 Content access method and apparatus
CN111050217A (en) * 2019-12-18 2020-04-21 珠海格力电器股份有限公司 Video playing method and device
CN112073405A (en) * 2020-09-03 2020-12-11 中国平安财产保险股份有限公司 Webpage data loading method and device, computer equipment and storage medium
CN112422676A (en) * 2020-11-17 2021-02-26 京东数字科技控股股份有限公司 Video playing method, device, equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8234348B1 (en) * 2010-09-30 2012-07-31 Google Inc. Determining if an application is cached
CN103686198A (en) * 2013-12-30 2014-03-26 优视科技有限公司 Video data processing method, device and system
CN106528563A (en) * 2015-09-11 2017-03-22 腾讯科技(深圳)有限公司 Content access method and apparatus
CN111050217A (en) * 2019-12-18 2020-04-21 珠海格力电器股份有限公司 Video playing method and device
CN112073405A (en) * 2020-09-03 2020-12-11 中国平安财产保险股份有限公司 Webpage data loading method and device, computer equipment and storage medium
CN112422676A (en) * 2020-11-17 2021-02-26 京东数字科技控股股份有限公司 Video playing method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
US8943164B2 (en) Apparatus and methods for retrieving/ downloading content on a communication device
WO2020199751A1 (en) Method and apparatus for loading page picture, and electronic device
CN102099828A (en) Client device and associated methodology of accessing networked services
US9088462B2 (en) Common web accessible data store for client side page processing
US9495469B2 (en) System and method to identify machine-readable codes
US9262389B2 (en) Resource-adaptive content delivery on client devices
US9906626B2 (en) Resource demand-based network page generation
WO2010072884A1 (en) Method, apparatus and computer program product for providing unrestricted content on a user terminal
WO2014094644A1 (en) Methodfor managing cache data of a mobile terminal, a mobile terminal, and a server
CA2745981A1 (en) A computer-implemented method, a computer program product and an embedded system for increasing the speed of data retrieval by a client on the embedded system
CN108270807A (en) A kind of data transmission method and device
CN112115103B (en) File address display method and device, electronic equipment and readable storage medium
CN114205678A (en) Video access method, access device, terminal and computer readable storage medium
CN111783010A (en) Webpage blank page monitoring method, device, terminal and storage medium
CN110838969A (en) Picture transmission method, device, equipment and medium
US11122139B2 (en) Systems and methods for reducing download requirements
CN112203158B (en) Image display method, device, system, equipment and medium
RU2595763C2 (en) Method and apparatus for managing load on basis of android browser
CN113438313B (en) Video continuous playing processing method, related device and readable storage medium
CN113900830B (en) Resource processing method and device, electronic equipment and storage medium
JP2001005714A (en) Proxy server changing device
CN110278451B (en) Picture online transcoding method and device and electronic equipment
US9380118B2 (en) Analytics based scoping of HTML5 web storage attributes
CN114697317A (en) File access method and system
CN111078334A (en) Data processing 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