CN112714365A - Video playing method and system - Google Patents
Video playing method and system Download PDFInfo
- Publication number
- CN112714365A CN112714365A CN201911022147.XA CN201911022147A CN112714365A CN 112714365 A CN112714365 A CN 112714365A CN 201911022147 A CN201911022147 A CN 201911022147A CN 112714365 A CN112714365 A CN 112714365A
- Authority
- CN
- China
- Prior art keywords
- video
- html file
- video playing
- access request
- address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000009877 rendering Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/64—Addressing
- H04N21/6402—Address allocation for clients
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/858—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
- H04N21/8586—Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The embodiment of the application discloses a video playing method, which comprises the following steps: receiving a page access request sent by a client terminal; acquiring an HTML file and a video playing address for linking a video according to the page access request; adding the video playing address into the HTML file to obtain a target HTML file; and returning the target HTML file to the client terminal so that the client terminal can execute video playing operation according to the video playing address. The application also provides a video playing system, computer equipment and a computer readable storage medium. According to the embodiment of the application, the step of sending the play address request to the content server is executed by the computer equipment on the service side instead of the step of sending the play address request to the content server by the client terminal on the user side, so that the play speed of the user side under the condition of poor network condition is improved.
Description
Technical Field
Embodiments of the present application relate to the field of communications, and in particular, to a video playing method, a video playing system, a computer device, and a computer-readable storage medium.
Background
With the rapid popularization of network videos, users are gradually accustomed to playing various videos through terminal equipment.
Generally, a terminal device enters a video playing page according to a user instruction, and performs a video playing operation on the video playing page.
However, in the process of entering a video playing page, the playing delay may be caused by poor network environment.
Disclosure of Invention
In view of the above, an object of the embodiments of the present application is to provide a video playing method, a video playing system, a computer device and a computer readable storage medium, which are used to solve the technical problem of playing delay.
One aspect of an embodiment of the present application provides a video playing method, including: receiving a page access request sent by a client terminal; acquiring an HTML file and a video playing address for linking a video according to the page access request; adding the video playing address into the HTML file to obtain a target HTML file; and returning the target HTML file to the client terminal so that the client terminal can execute video playing operation according to the video playing address.
Optionally, acquiring an HTML file and a video playing address for linking a video according to the page access request includes: acquiring an HTML file according to the page access request; generating a playing address request according to the page access request; and sending the play address request to a content server so that the content server returns the video play address based on the play address request.
Optionally, obtaining an HTML file corresponding to the page access request includes: acquiring a page resource and a page template according to the page access request; and performing page rendering operation according to the page resources and the page template to obtain the rendered HTML file.
Optionally, obtaining an HTML file corresponding to the page access request includes: and acquiring a page template according to the page access request, wherein the page template is the HTML file sent to the client terminal.
Optionally, generating a play address request according to the page access request includes: and generating the playing address request according to a preset path address and a video identifier in the page access request.
Optionally, the method is used in a computer device, and the computer device and the content server are located in the same local area network.
An aspect of an embodiment of the present application further provides a video playing system, including: the receiving module is used for receiving a page access request sent by a client terminal; the acquisition module is used for acquiring an HTML file and a video playing address for linking a video according to the page access request; the adding module is used for adding the video playing address into the HTML file to obtain a target HTML file; and the return module is used for returning the target HTML file to the client terminal so that the client terminal can execute video playing operation according to the video playing address.
An aspect of the embodiments of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of the above video playing method.
An aspect of the embodiments of the present application further provides a computer-readable storage medium, in which a computer program is stored, where the computer program is executable by at least one processor, so as to cause the at least one processor to execute the steps of the above-mentioned video playing method.
One aspect of the embodiments of the present application further provides a video playing method, including: sending a page access request to a first server, wherein the page access request comprises a video identifier of a target video; receiving a target HTML file returned by the first server, wherein the target HTML file comprises a video playing address; and executing video playing operation based on the video playing address in the target HTML file.
Optionally, the video playing address is obtained by the first server requesting a second server based on the video identifier, where the first server and the second server are located in the same local area network.
According to the video playing method, the video playing system, the video playing device and the computer readable storage medium, after a page access request serving as a client terminal is received, an HTML file is obtained, a client terminal is replaced to ask for a video playing address from a content server, and the video playing address is added into the HTML file, so that after the client terminal receives a target HTML file returned by the computer device, video playing operation can be executed according to the video playing address in the target HTML file. According to the embodiment of the application, the step of sending the play address request to the content server is executed by the computer equipment on the service side instead of the step of sending the play address request to the content server by the client terminal on the user side, so that the play speed of the user side under the condition of poor network condition is improved.
Drawings
Fig. 1 schematically shows an application environment diagram of a video playing method according to a first embodiment of the present application;
fig. 2 schematically shows a flow chart of a video playing method according to a first embodiment of the present application;
FIG. 3 schematically shows a flowchart of step S202 in FIG. 2;
FIG. 4 schematically shows another flowchart of step S202 in FIG. 2;
FIG. 5 schematically shows another flowchart of step S202 in FIG. 2;
FIG. 6 schematically shows another flowchart of step S202 in FIG. 2;
fig. 7 schematically shows a transmission diagram of a video playback method;
fig. 8 schematically shows a block diagram of a communication system according to a second embodiment of the present application;
fig. 9 schematically shows a hardware architecture diagram of a computer device suitable for implementing a video playing method according to a third embodiment of the present application; and
fig. 10 schematically shows a flowchart of a video playing method according to a fifth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clearly understood, the embodiments of the present application are described in further detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of the application and are not intended to limit the embodiments of the application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
In the process of entering a video playing page, there may be several reasons for the playing delay, among which the inventor finds that: in the existing interaction between the server and the client, after receiving the HTML file of the server, the client needs to initiate an authority authentication (auth) operation to the server again, and after the authentication of the server is completed, a play address request is sent to the server. Whether the operation is the authentication operation or the play address request operation, the play delay of the video play is caused to a certain extent, especially under the condition that the network condition of the user side or the operation condition of the client side is not good.
The following description will provide a number of embodiments, and it will be appreciated that the various embodiments provided below may be used to address one or more of the technical problems described above.
Fig. 1 schematically shows an environment application diagram of a video playing method according to a first embodiment of the present application. In an exemplary embodiment, the content provider 2 may connect a plurality of client terminals 6 through a network 5 in an exemplary embodiment.
The content provider 2 may provide services over one or more networks 5. Network 5 may include various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and/or the like. The network 5 may include physical links, such as coaxial cable links, twisted pair cable links, fiber optic links, combinations thereof, and/or the like. The network 5 may include wireless links such as cellular links, satellite links, Wi-Fi links, and/or the like.
The content provider 2 may be composed of a plurality of computer devices (e.g., computer device 3, content server 4), wherein the computer device 3 may be a Web server for providing an online information browsing service; the content server 4 may be used to store video data. The plurality of computing devices may include virtualized compute instances. The virtualized computing instance may include a virtual machine, such as an emulation of a computer system, an operating system, a server, and so forth. The computing device may load the virtual machine based on a virtual image and/or other data that defines the particular software (e.g., operating system, dedicated application, server) used for emulation. As the demand for different types of processing services changes, different virtual machines may be loaded and/or terminated on one or more computing devices. A hypervisor may be implemented to manage the use of different virtual machines on the same computing device.
A plurality of client terminals 6 may be configured to access content and services of the content provider 2. The plurality of client terminals 6 may comprise any type of computing device, such as a mobile device, a tablet device, a laptop computer, a set-top box, a smart television, and the like.
A plurality of client terminals 6 may be associated with one or more users. A single user may access the content provider 2 using one or more of the plurality of client terminals 6. A plurality of client terminals 6 may access the content provider 2 using different networks.
In an exemplary embodiment, the client terminal 6 may include a browser 7. The browser 7 outputs (e.g., displays, presents) the content to the user. The content may be presented in pages that may include video, audio, commentary, textual data, and/or the like. The client terminal 6 may comprise a client terminal interface 8, which client terminal interface 8 may comprise an input element. For example, the input element may be configured to receive user instructions that may cause the client terminal 6 to perform various types of operations, such as sending a page access request to the computer device 3.
Example one
Fig. 2 schematically shows a flowchart of a video playing method according to a first embodiment of the present application. It is to be understood that the present method embodiment may be implemented in the computer device 3, and the flow chart of the present method embodiment is not intended to limit the order in which the steps are performed.
As shown in fig. 2, the video playing method may include steps S200 to S206, wherein:
step S200, receiving a page access request sent by a client terminal.
After receiving the page access request, the computer device 3 executes a corresponding response operation.
The page access request may be an HTTP request based on the HTTP(s) Protocol, e.g., HTTP:// bilibili.
Step S202, according to the page access request, obtaining an HTML (Hypertext Markup Language) file and a video playing address for linking a video.
The computer device 3 parses the page access request, and defines an HTTP response based on the parsing result, such as sending back an HTML file corresponding to the target page. The computer device 3 can also obtain the video playing address in the target page, and the video playing address is returned to the client terminal 6 along with the HTML file, so that the client terminal 6 can directly perform video playing operation according to the HTML file returned by the computer device 3.
In an exemplary embodiment, as shown in fig. 3, the step S202 may include steps S300 to S304, wherein: step S300, obtaining an HTML file according to the page access request; step S302, generating a play address request according to the page access request; step S304, sending the play address request to a content server, so that the content server returns the video play address based on the play address request.
The HTML file may be a file that has not been subjected to page rendering, or a file that has been subjected to page rendering. The page rendering is to run Javascript to request page data, and convert the requested page data into a complete page in combination with a preset page template, where the complete page can be displayed to a user through the browser 7.
In an exemplary embodiment, the computer device 3 performs a server rendering operation, as shown in fig. 4, the step S300 may include steps S400 to S402, where: step S400, acquiring page resources and a page template according to the page access request; step S502, performing page rendering operation according to the page resource and the page template to obtain the rendered HTML file.
In an exemplary embodiment, the computer device 3 does not provide a server rendering operation, and executes a client rendering operation through a client terminal, as shown in fig. 5, the step S300 may include the step S500: and acquiring a page template according to the page access request, wherein the page template is the HTML file sent to the client terminal.
The execution of the server rendering operation or the client rendering operation may be determined by the operating state of the computer device 3 and/or the client terminal 6, for example, in a high load situation of the computer device 3, the server rendering operation may be stopped to maintain the normal operation of the device.
In an exemplary embodiment, as shown in fig. 6, the step S302 may include the step S600: and generating the playing address request according to a preset path address and a video Identification (ID) in the page access request. For example: when the computer device 3 receives a page access request sent by the client terminal 6 and a URL (uniform resource locator) of the page access request is https:// www.bilibili.com/video/av70877592 and "av 70877592" is a video identifier in the page access request, the "av 70877592" is combined with a preset path address "bilili. com/playurrid ═" to obtain a play address request "bilili.
After obtaining the play address request "bilili. com/playurl ═ av 70877592", the computer device 3 sends the play address request to the content server 4, so that the content server returns the video play address (video url) based on the play address request.
It should be noted that, in different websites, the form and location of the video identifier in url may be different, such as the website of a certain video page in the love art: html, whose video identification might be 19rvi9ywfo or v _19rvi9 ywfo; a certain video page website of you and cool: https:// v.youku.com/v _ show/id _ xmzamdazzy 2MA ═ htmlspm ═ a2h0k.11417342. souresults ═ dtle ═ efbfbd4a1a38efbfbdef, and the video identifier thereof may be xmzamdazzy 2MA, which is not repeated herein.
And step S204, adding the video playing address into the HTML file to obtain a target HTML file.
And step S206, returning the target HTML file to the client terminal so that the client terminal can execute video playing operation according to the video playing address.
As described above, the video playing method according to the first embodiment:
the computer device 3 is used as a server, acquires an HTML file after receiving a page access request as a client terminal, and also replaces a client to ask for a video playing address from the content server 4, and adds the video playing address into the HTML file, so that the client terminal can execute video playing operation according to the video playing address in the target HTML file after receiving the target HTML file returned by the computer device 3.
In terms of conventional technology, taking client rendering as an example, the client terminal 6 needs to perform video playing operation through the following steps: firstly, sending a page access request to computer equipment 3; receiving an HTML file returned by the computer equipment; ③ request, download, initialize JS (e.g., loadvideo. JS), etc.; fourthly, performing authority authentication operation with the content server 4; fifthly, sending a play address request to the content server 4; sixthly, receiving the video playing address returned by the content server 4, and executing the video playing operation according to the video playing address. It is understood that the network conditions of the user side are involved in the step four and the step five, and in the case of poor network conditions of the user side, the time consumption of the two steps is catastrophic, and the video playing speed is seriously influenced.
For the embodiment, the step (iv) and the step (v) are executed in the computer device 3, so that the problem of playback delay caused by poor network conditions at the user side is avoided, and the video playback speed of the client terminal 6 is effectively increased. In addition, in some embodiments, the computer device 3 and the content server 4 are located in the same local area network, so that the computer device 3 does not need to perform permission authentication with the content server 4 before sending the play address request "bilili.com/playurrid ═ av 70877592", that is, step (r) is reduced, and efficiency of obtaining the video play address from the content server 4 is improved. Through a plurality of tests, the computer device 3 requests the content server in the same local area network for the video playing address, which can be basically maintained within 10 milliseconds, and the speed is much faster than that of the traditional video playing address requesting mode.
In order to make the invention more clear and understandable, an example is provided below as shown in fig. 7, and it should be noted that the example is not used to limit the invention.
In step S700, the client terminal sends a page access request, for example, "bilibilili.
Step S702, the computer equipment acquires an HTML file according to the page access request;
step S704, the computer device generates the play address request, for example, "bilibilili. com/playurrid ═ av 70877592", according to a preset path address and a video identifier in the page access request;
step S706, the computer equipment sends the play address request to a content server in the same local area network;
step S708, the content server returns the video play address based on the play address request;
step S710, the computer device adds the video playing address to the HTML file to obtain a target HTML file.
Step S712, the computer device returns the target HTML file to the client terminal;
step S714, the client terminal receives the target HTML file, first performs JS (e.g., load video.js) request, download, initialization, and the like, and performs page rendering or secondary page rendering and the like;
step S716, the client terminal executes the video playing operation according to the video playing address in the target HTML file.
Example two
Fig. 8 schematically shows a block diagram of a video playback system according to the second embodiment of the present application, which may be partitioned into one or more program modules, stored in a storage medium, and executed by one or more processors to implement the second embodiment of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments that can perform specific functions, and the following description will specifically describe the functions of the program modules in the embodiments.
As shown in fig. 8, the video playing system 800 may include a receiving module 810, an obtaining module 820, an adding module 830, and a returning module 840, wherein:
a receiving module 810, configured to receive a page access request sent by a client terminal;
an obtaining module 820, configured to obtain, according to the page access request, an HTML file and a video playing address for linking a video;
an adding module 830, configured to add the video playing address to the HTML file to obtain a target HTML file; and
a returning module 840, configured to return the target HTML file to the client terminal, so that the client terminal executes a video playing operation according to the video playing address.
In an exemplary embodiment, the obtaining module 820 is further configured to: acquiring an HTML file according to the page access request; generating a playing address request according to the page access request; and sending the play address request to a content server so that the content server returns the video play address based on the play address request.
In an exemplary embodiment, the obtaining module 820 is further configured to: acquiring a page resource and a page template according to the page access request; and performing page rendering operation according to the page resources and the page template to obtain the rendered HTML file.
In an exemplary embodiment, the obtaining module 820 is further configured to: and acquiring a page template according to the page access request, wherein the page template is the HTML file sent to the client terminal.
In an exemplary embodiment, the obtaining module 820 is further configured to: and generating the playing address request according to a preset path address and a video identifier in the page access request.
In an exemplary embodiment, the system operates in a computer device that is located in the same local area network as the content server.
As described above, the video playback system according to the second embodiment:
the video playing system acquires an HTML file after receiving a page access request serving as a client terminal, replaces a client terminal to ask a content server for a video playing address, and adds the video playing address to the HTML file, so that the client terminal can execute video playing operation according to the video playing address in a target HTML file after receiving the target HTML file returned by the computer equipment. The video playing system replaces a client terminal to execute a 'sending playing address request to a content server', and improves the playing speed under the condition of bad network conditions at a user side.
EXAMPLE III
Fig. 9 schematically shows a hardware architecture diagram of a computer device suitable for implementing a video playing method according to a third embodiment of the present application. In the present embodiment, the computer device 3 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set or stored in advance. For example, the server may be a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers). As shown in fig. 9, the computer device 3 includes at least, but is not limited to: the memory 910, processor 920, and network interface 930 may be communicatively linked to each other via a system bus. Wherein:
the memory 910 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 910 may be an internal storage module of the computer device 3, such as a hard disk or a memory of the computer device 3. In other embodiments, the memory 910 may also be an external storage device of the computer device 3, such as a plug-in hard disk provided on the computer device 3, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Of course, the memory 910 may also include both internal and external memory modules of the computer device 3. In this embodiment, the memory 910 is generally used for storing an operating system installed in the computer device 3 and various application software, such as program codes of a video playing method. In addition, the memory 910 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 920 may be, in some embodiments, a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor, or other data Processing chip. The processor 920 is generally configured to control the overall operation of the computer device 3, such as performing control and processing related to data interaction or communication with the computer device 3. In this embodiment, the processor 920 is configured to execute program codes stored in the memory 910 or process data.
Network interface 930 may include a wireless network interface or a wired network interface, with network interface 930 typically being used to establish communication links between computer device 3 and other computer devices. For example, the network interface 930 is used to connect the computer device 3 with an external terminal through a network, establish a data transmission channel and a communication link between the computer device 3 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It is noted that FIG. 9 only shows a computer device having components 910 and 930, but it is to be understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the video playing method stored in the memory 910 may be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 920) to complete the present invention.
Example four
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the video playback method in the embodiments.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, 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 computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in the computer device, for example, the program codes of the video playing method in the embodiment, and the like. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
EXAMPLE five
Fig. 10 schematically shows a flowchart of a video playing method according to a fifth embodiment of the present application. It is to be understood that the present method embodiment may be implemented in the client terminal 6, and the flow chart of the present method embodiment is not intended to limit the order in which the steps are executed.
Step S1000, a page access request is sent to a first server, and the page access request comprises a video identifier of a target video.
For example, a page access request: com/video/av70877592 ", the target video is identified as" av70877592 ".
Step S1002, receiving a target HTML file returned by the first server, where the target HTML file includes a video playing address.
The first server may be a Web server; the second server may be a content server for providing video data; the video playing address is obtained by the first server through requesting a second server based on the video identification, wherein the first server and the second server are located in the same local area network.
Step S1004, based on the video playing address in the target HTML file, executing a video playing operation.
After receiving the target HTML file, the client terminal 6 parses the target HTML file, requests and downloads the required JS, renders the JS into a page which can be displayed by the browser, requests video data from the second server according to the parsed video playing address, and plays the requested video data on the displayed page.
According to the embodiment of the application, the step of sending the playing address request to the content server is not required to be executed, and the first server on the service side executes the step, so that the playing delay caused by the situation that the network condition of the client terminal is poor is avoided.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (11)
1. A video playback method, comprising:
receiving a page access request sent by a client terminal;
acquiring an HTML file and a video playing address for linking a video according to the page access request;
adding the video playing address into the HTML file to obtain a target HTML file; and
and returning the target HTML file to the client terminal so that the client terminal can execute video playing operation according to the video playing address.
2. The video playback method of claim 1, wherein:
acquiring an HTML file and a video playing address for linking a video according to the page access request, wherein the method comprises the following steps:
acquiring an HTML file according to the page access request;
generating a playing address request according to the page access request; and
and sending the play address request to a content server so that the content server returns the video play address based on the play address request.
3. The video playing method according to claim 2, wherein obtaining the HTML file corresponding to the page access request includes:
acquiring a page resource and a page template according to the page access request; and
and performing page rendering operation according to the page resources and the page template to obtain the rendered HTML file.
4. The video playing method according to claim 2, wherein obtaining the HTML file corresponding to the page access request includes:
and acquiring a page template according to the page access request, wherein the page template is the HTML file sent to the client terminal.
5. The video playing method according to claim 2, wherein generating a playing address request according to the page access request comprises:
and generating the playing address request according to a preset path address and a video identifier in the page access request.
6. The video playback method of claim 2, wherein:
the method is used in a computer device, and the computer device and the content server are located in the same local area network.
7. A video playback system, comprising:
the receiving module is used for receiving a page access request sent by a client terminal;
the acquisition module is used for acquiring an HTML file and a video playing address for linking a video according to the page access request;
the adding module is used for adding the video playing address into the HTML file to obtain a target HTML file; and
and the return module is used for returning the target HTML file to the client terminal so that the client terminal can execute video playing operation according to the video playing address.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 6 are implemented by the processor when executing the computer program.
9. A computer-readable storage medium, having stored thereon a computer program, the computer program being executable by at least one processor to cause the at least one processor to perform the steps of the method according to any one of claims 1 to 6.
10. A video playback method, comprising:
sending a page access request to a first server, wherein the page access request comprises a video identifier of a target video;
receiving a target HTML file returned by the first server, wherein the target HTML file comprises a video playing address; and
and executing video playing operation based on the video playing address in the target HTML file.
11. The video playback method of claim 10, wherein:
the video playing address is obtained by the first server through requesting a second server based on the video identification, wherein the first server and the second server are located in the same local area network.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911022147.XA CN112714365B (en) | 2019-10-25 | 2019-10-25 | Video playing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911022147.XA CN112714365B (en) | 2019-10-25 | 2019-10-25 | Video playing method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112714365A true CN112714365A (en) | 2021-04-27 |
CN112714365B CN112714365B (en) | 2024-02-09 |
Family
ID=75541381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911022147.XA Active CN112714365B (en) | 2019-10-25 | 2019-10-25 | Video playing method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112714365B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113315982A (en) * | 2021-05-07 | 2021-08-27 | 广州虎牙科技有限公司 | Live broadcast method, computer storage medium and equipment |
CN114071192A (en) * | 2021-11-11 | 2022-02-18 | 北京百度网讯科技有限公司 | Information acquisition method, terminal, server, electronic device, and storage medium |
CN114422831A (en) * | 2022-01-20 | 2022-04-29 | 北京奇艺世纪科技有限公司 | Media playing method and device, electronic equipment and readable storage medium |
Citations (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002351864A (en) * | 2001-03-21 | 2002-12-06 | Hitachi Ltd | Providing method, browser system, and creation support system for hypermedia document |
CN101667182A (en) * | 2008-09-05 | 2010-03-10 | 华为技术有限公司 | Method, system and device for performing secondary operation on web pages |
CN101706796A (en) * | 2008-11-14 | 2010-05-12 | 北京搜狗科技发展有限公司 | Method and device for showing webpage resources |
CN101794298A (en) * | 2010-01-22 | 2010-08-04 | 中兴通讯股份有限公司 | Method for realizing page adaptation, page adaptation system and communication system |
CN102868938A (en) * | 2011-07-07 | 2013-01-09 | 上海聚力传媒技术有限公司 | Method and device for acquiring segmented video files in network |
CN103327411A (en) * | 2013-06-03 | 2013-09-25 | 贝壳网际(北京)安全技术有限公司 | Video playing method, device and system for mobile terminal browser |
CN103475931A (en) * | 2013-08-23 | 2013-12-25 | 四川长虹电器股份有限公司 | Method for playing network media at digital television terminal |
US20140082498A1 (en) * | 2012-08-02 | 2014-03-20 | Tencent Technology (Shenzhen) Company Limited | Method and mobile terminal device for independently playing a video |
CN103763638A (en) * | 2014-01-23 | 2014-04-30 | 中国联合网络通信集团有限公司 | Video resource obtaining method and device |
CN103942225A (en) * | 2013-01-23 | 2014-07-23 | 阿里巴巴集团控股有限公司 | Method and system for invoking resources of Hybrid App client and client |
WO2015003663A1 (en) * | 2013-07-12 | 2015-01-15 | 贝壳网际(北京)安全技术有限公司 | Method, device, server, and client device for video processing |
CN104572843A (en) * | 2014-12-12 | 2015-04-29 | 百度在线网络技术(北京)有限公司 | Page loading method and device |
CN104602034A (en) * | 2014-12-31 | 2015-05-06 | 北京奇艺世纪科技有限公司 | Mobile webpage playing method and system |
CN104881452A (en) * | 2015-05-18 | 2015-09-02 | 百度在线网络技术(北京)有限公司 | Resource locator sniffing method, device and system |
CN105792022A (en) * | 2016-03-15 | 2016-07-20 | 北京齐尔布莱特科技有限公司 | Adaptive video playing method and apparatus, and video playing system |
CN108234402A (en) * | 2016-12-15 | 2018-06-29 | 北京小度互娱科技有限公司 | In the method and apparatus that mobile client obtains the method and apparatus of video flowing and executable code is provided to mobile client |
CN108415963A (en) * | 2018-02-07 | 2018-08-17 | 阿里巴巴集团控股有限公司 | A kind of page generation method and device |
CN108965912A (en) * | 2017-12-29 | 2018-12-07 | 北京视联动力国际信息技术有限公司 | A kind of method, client and the server of video data processing |
CN109068153A (en) * | 2018-09-28 | 2018-12-21 | 华为技术有限公司 | Video broadcasting method, device and computer readable storage medium |
CN109714628A (en) * | 2018-12-29 | 2019-05-03 | 广州华多网络科技有限公司 | Method, apparatus, equipment, storage medium and the system of playing audio-video |
-
2019
- 2019-10-25 CN CN201911022147.XA patent/CN112714365B/en active Active
Patent Citations (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002351864A (en) * | 2001-03-21 | 2002-12-06 | Hitachi Ltd | Providing method, browser system, and creation support system for hypermedia document |
CN101667182A (en) * | 2008-09-05 | 2010-03-10 | 华为技术有限公司 | Method, system and device for performing secondary operation on web pages |
CN101706796A (en) * | 2008-11-14 | 2010-05-12 | 北京搜狗科技发展有限公司 | Method and device for showing webpage resources |
CN101794298A (en) * | 2010-01-22 | 2010-08-04 | 中兴通讯股份有限公司 | Method for realizing page adaptation, page adaptation system and communication system |
CN102868938A (en) * | 2011-07-07 | 2013-01-09 | 上海聚力传媒技术有限公司 | Method and device for acquiring segmented video files in network |
US20140082498A1 (en) * | 2012-08-02 | 2014-03-20 | Tencent Technology (Shenzhen) Company Limited | Method and mobile terminal device for independently playing a video |
CN103942225A (en) * | 2013-01-23 | 2014-07-23 | 阿里巴巴集团控股有限公司 | Method and system for invoking resources of Hybrid App client and client |
CN103327411A (en) * | 2013-06-03 | 2013-09-25 | 贝壳网际(北京)安全技术有限公司 | Video playing method, device and system for mobile terminal browser |
WO2015003663A1 (en) * | 2013-07-12 | 2015-01-15 | 贝壳网际(北京)安全技术有限公司 | Method, device, server, and client device for video processing |
CN103475931A (en) * | 2013-08-23 | 2013-12-25 | 四川长虹电器股份有限公司 | Method for playing network media at digital television terminal |
CN103763638A (en) * | 2014-01-23 | 2014-04-30 | 中国联合网络通信集团有限公司 | Video resource obtaining method and device |
CN104572843A (en) * | 2014-12-12 | 2015-04-29 | 百度在线网络技术(北京)有限公司 | Page loading method and device |
CN104602034A (en) * | 2014-12-31 | 2015-05-06 | 北京奇艺世纪科技有限公司 | Mobile webpage playing method and system |
CN104881452A (en) * | 2015-05-18 | 2015-09-02 | 百度在线网络技术(北京)有限公司 | Resource locator sniffing method, device and system |
CN105792022A (en) * | 2016-03-15 | 2016-07-20 | 北京齐尔布莱特科技有限公司 | Adaptive video playing method and apparatus, and video playing system |
CN108234402A (en) * | 2016-12-15 | 2018-06-29 | 北京小度互娱科技有限公司 | In the method and apparatus that mobile client obtains the method and apparatus of video flowing and executable code is provided to mobile client |
CN108965912A (en) * | 2017-12-29 | 2018-12-07 | 北京视联动力国际信息技术有限公司 | A kind of method, client and the server of video data processing |
CN108415963A (en) * | 2018-02-07 | 2018-08-17 | 阿里巴巴集团控股有限公司 | A kind of page generation method and device |
CN109068153A (en) * | 2018-09-28 | 2018-12-21 | 华为技术有限公司 | Video broadcasting method, device and computer readable storage medium |
CN109714628A (en) * | 2018-12-29 | 2019-05-03 | 广州华多网络科技有限公司 | Method, apparatus, equipment, storage medium and the system of playing audio-video |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113315982A (en) * | 2021-05-07 | 2021-08-27 | 广州虎牙科技有限公司 | Live broadcast method, computer storage medium and equipment |
CN114071192A (en) * | 2021-11-11 | 2022-02-18 | 北京百度网讯科技有限公司 | Information acquisition method, terminal, server, electronic device, and storage medium |
CN114422831A (en) * | 2022-01-20 | 2022-04-29 | 北京奇艺世纪科技有限公司 | Media playing method and device, electronic equipment and readable storage medium |
CN114422831B (en) * | 2022-01-20 | 2024-03-19 | 北京奇艺世纪科技有限公司 | Media playing method and device, electronic equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112714365B (en) | 2024-02-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112836152B (en) | Page rendering method, system, computer device and computer readable storage medium | |
CN111756674B (en) | Network communication method, system, device and computer readable storage medium | |
CN112714365B (en) | Video playing method and system | |
US11909812B2 (en) | Application control method and apparatus, electronic device, and storage medium | |
CN112416964A (en) | Data processing method, device and system, computer equipment and computer readable storage medium | |
CN112818270A (en) | Data cross-domain transfer method and device and computer equipment | |
US20160112492A1 (en) | Method and apparatus for providing network resources at intermediary server | |
CN110059278A (en) | Web page configuration method, server and computer readable storage medium | |
EP3125541A1 (en) | Data acquisition and interaction method, set top box, server and multimedia system | |
CN114157607A (en) | Media stream transmission method and system | |
US20220365959A1 (en) | Multimedia file storage and access method | |
CN113727189A (en) | Media playing method and system supporting multiple streaming media transmission protocols | |
CN111800511B (en) | Synchronous login state processing method, system, equipment and readable storage medium | |
CN115190338B (en) | Video preloading method and system | |
CN114915565B (en) | Network debugging method and system | |
CN115225950A (en) | Video playing control method and device | |
CN113746851B (en) | Proxy system and method supporting real-time analysis of GRPC request | |
CN115022278A (en) | CDN processing method and system | |
CN113037848B (en) | File uploading method and system | |
CN115795199A (en) | Page loading method and device, nonvolatile storage medium and electronic equipment | |
CN113347234A (en) | Network information acquisition method, device, system, computer equipment and storage medium | |
CN114610331A (en) | Software installation method and system | |
CN110474954A (en) | Sharing files method, apparatus, computer equipment and readable storage medium storing program for executing based on block chain | |
CN117909602A (en) | Page content recommendation method and device | |
EP3079312B1 (en) | Method of service synchronization and sharing and multi-device control in digital home |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |