CN114650438A - Video playing data processing method and device and electronic equipment - Google Patents

Video playing data processing method and device and electronic equipment Download PDF

Info

Publication number
CN114650438A
CN114650438A CN202011504258.7A CN202011504258A CN114650438A CN 114650438 A CN114650438 A CN 114650438A CN 202011504258 A CN202011504258 A CN 202011504258A CN 114650438 A CN114650438 A CN 114650438A
Authority
CN
China
Prior art keywords
data
read
network connection
current
video
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
CN202011504258.7A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN202011504258.7A priority Critical patent/CN114650438A/en
Publication of CN114650438A publication Critical patent/CN114650438A/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/236Assembling of a multiplex stream, e.g. transport stream, by combining a video stream with other content or additional data, e.g. inserting a URL [Uniform Resource Locator] into a video stream, multiplexing software data into a video stream; Remultiplexing of multiplex streams; Insertion of stuffing bits into the multiplex stream, e.g. to obtain a constant bit-rate; Assembling of a packetised elementary stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • H04N21/64738Monitoring network characteristics, e.g. bandwidth, congestion level

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The embodiment of the invention provides a method and a device for processing video playing data and electronic equipment, wherein the method comprises the following steps: in response to a data reading request aiming at a data position to be read except a current data reading position, searching a network connection corresponding to the data position to be read in a connection pool, wherein the network connection in the connection pool is in a state of suspending data reading but not being disconnected; and if the network connection corresponding to the position of the data to be read exists, acquiring the video playing data of the position of the data to be read by using the network connection. The embodiment of the invention provides a connection pool mechanism, when the position of the read data jumps, the network connection which is not disconnected but is read by pause data stored in the connection pool before is multiplexed, thereby reducing the video playing pause phenomenon caused by frequent disconnection and new network connection and improving the response speed of video playing.

Description

Video playing data processing method and device and electronic equipment
Technical Field
The application relates to a method and a device for processing video playing data and electronic equipment, and belongs to the technical field of computers.
Background
In the scene of online video playing, the client needs to continuously obtain video playing data from the server and then play the video through the local player. In some cases, due to the video file format, for example, the interleaving distance of the audio and video data is too large, the video metadata is post-positioned, and the like, the reading position of the video playing data is jumped. For such a situation, in the prior art, network connection with the server needs to be disconnected and newly established for many times, and due to the time consumption of disconnecting and newly establishing the network connection, frequent switching can result in long play start time and a pause phenomenon in the play process.
Disclosure of Invention
The embodiment of the invention provides a method and a device for processing video playing data and electronic equipment, which aim to improve the response speed of online video playing.
In order to achieve the above object, an embodiment of the present invention provides a method for processing video playing data, including:
in response to a data reading request aiming at a data position to be read except a current data reading position, searching a network connection corresponding to the data position to be read in a connection pool, wherein the network connection in the connection pool is in a state of suspending data reading but not being disconnected;
and if the network connection corresponding to the position of the data to be read exists, acquiring the video playing data of the position of the data to be read by using the network connection.
An embodiment of the present invention further provides a device for processing video playing data, including:
the network connection searching module is used for responding to a data reading request aiming at a data position to be read except the current data reading position, searching a network connection corresponding to the data position to be read in a connection pool, wherein the network connection in the connection pool is in a state of suspending data reading but not being disconnected;
and the network connection multiplexing module is used for acquiring the video playing data of the position of the data to be read by using the network connection under the condition that the network connection corresponding to the position of the data to be read exists in the connection pool.
An embodiment of the present invention further provides an electronic device, including:
a memory for storing a program;
and the processor is used for operating the program stored in the memory so as to execute the processing method of the video playing data.
According to the method and the device for processing video playing data and the electronic equipment, provided by the embodiment of the invention, when the position of the read data jumps, the network connection which is not disconnected but is read by pause data stored in the connection pool before is reused through a connection pool mechanism, so that the video playing pause phenomenon caused by frequent disconnection and new network connection is reduced, and the response speed of video playing is increased.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Fig. 1 is a schematic view of an application scenario of a method for processing video playing data according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an application scenario of a moov data post-situation according to an embodiment of the present invention;
fig. 3 is a schematic view of an application scenario of an audio/video interleaving scenario according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for processing video playing data according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for processing video playback data according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides a method for processing video playing data, which is used for reducing the pause phenomenon caused by frequent disconnection from a server and new network connection in the online video playing process. Fig. 1 is a schematic view of an application scenario of a method for processing video playing data according to an embodiment of the present invention. As shown in the figure, in the process of online video playing, based on the playing requirement of the player on the client, video playing data needs to be continuously requested from the server, generally, the sequence of the video playing data requested by the player is consistent with the storage sequence of the video playing data in the video file on the server, in this case, only one network connection needs to be used, and the client continuously obtains the video playing data from the server according to the sequence and plays the video data through the player.
However, due to the data format of the video file, a jump may occur in the position of the read data, and sometimes a jump back to the previous position of the read data may occur after the subsequent video playback data is read. In the prior art, in view of the situation of the position jump, the current network connection is disconnected, and then the network connection corresponding to the position of the data to be read is reestablished, and then the data is read. Because the disconnection and establishment of the network connection both need to communicate with the server, for example, in order to establish the HTTP network connection, message interaction processes such as three times of TCP handshake and ssl handshake and HTTP header request need to be performed, when the network connection is disconnected, a message needs to be sent to the server to inform that the connection is disconnected, and a local socket file is deleted. If such a position jump occurs relatively frequently, the process of establishing and disconnecting the network connection will be time consuming, resulting in a video playback stuck.
The embodiment of the invention adopts a mechanism of a connection pool, wherein the connection pool is used for storing network connection which is suspended from data reading but not disconnected, when the position of data to be read jumps, the position of the data to be read is firstly searched in the connection pool to find whether the network connection corresponding to the position of the data to be read exists, if so, the existing network connection is reused to continuously read the data, and the existing network connection is in an un-disconnected state, so that the data reading processing can be directly carried out between the existing network connection and the server, and the network connection corresponding to the position of the currently read data can be firstly and continuously disconnected, but the data transmission between the existing network connection and the server is suspended on an application layer, namely, the data reading is suspended and is put into the connection pool to be stored for subsequent possible data reading. In addition, for the network connection corresponding to the current read data position, whether the network connection needs to be put into the connection pool or not can be determined according to the subsequent multiplexing possibility, and if the multiplexing possibility is judged to be low, the network connection can be directly disconnected. As shown in fig. 1, unbroken network connections from (i) to (iv) are stored in the connection pool, the unbroken network connections are represented by dotted lines in the figure but are not in use, the currently used network connection is a network connection (v), when a position jump occurs, the network connection (v) corresponding to the position of the currently read data is placed in the connection pool, the network connection (iii) corresponding to the position of the data to be read is taken out from the connection pool, and the network connection (iii) is used for data reading processing with the server. In addition, if the network connection corresponding to the position of the data to be read does not exist in the connection pool, network connection is newly established, and the newly established network connection is used for data reading.
The jump of the read data position may be caused by the video file format, such as too large interleaving distance of the audio and video data, post-positioned video metadata, etc., or may be caused by the dragging (seek) behavior of the user, which may multiplex the network connections in the connection pool.
Fig. 2 is a schematic diagram illustrating an application scenario of a moov data (a kind of metadata in MP4 format) post-situation according to an embodiment of the present invention. In the embodiment of the present invention, the video playing data refers to data stored in a video file, and includes not only video content data but also information type data used for playing the video content data in the video file, such as metadata, format fields, and the like. The moov data stores metadata (metadata) required by media playing, such as video duration, frame rate, index of video data, and the like, and for a video playing scene, the moov data needs to be read and then the playing can be started. Generally, for some video resources of a private domain player, such as a platform providing online movie and television services, a video packaging format is good, and the overall sequence of data in a video file is type field-moov data-video data, so that the video file can be read according to the data sequence of the video file and can be played normally. However, for some public domain players, the format of the encapsulated video file may be such that moov data is set back (as in the case shown in fig. 2), for example, some short video files or video files produced by the user himself.
As shown in fig. 2, after the type field is read, the video file needs to jump to a position corresponding to moov data behind the video file to read the data, and after the moov data is read, the video file returns to a position behind the type field, that is, a start position of video content data, and starts to read the video content data. For such a situation, after the type field is read, the network connection 1 corresponding to the current data reading position is placed in the connection pool, and then the connection pool jumps to the data position to be read, because at this time, the connection pool does not have a network connection corresponding to the data position to be read yet, the network connection 2 needs to be created to read the moov data, and after the moov data is read, the network connection needs to jump to the back of the type field (the data position to be read in the lower view of fig. 2) to start reading the video content data. Since the moov data is stored in the client after being read, and generally does not need to be read again, the network connection 2 is extremely low in multiplexing possibility, and the network connection 2 can be directly disconnected to release the network resource.
As can be seen from the application of the scenario shown in fig. 2, in the case of reading position jump for moov data, the process of disconnecting and reestablishing the network connection 1 is reduced at least once, so that the speed of starting playing video can be increased.
As shown in fig. 3, it is an application scenario diagram of an audio and video interleaving situation according to an embodiment of the present invention. The video content data includes video data and audio data, and in the video packaging process, the video data and the audio data which are encoded and compressed are stored in a video file in an interleaving mode according to a certain format. For example, 5 seconds of video data a to 5 seconds of audio data a to 5 seconds of video data b to 5 seconds of audio data b are stored in an interleaved manner, where reference numerals a and b represent the correspondence between video and audio. Normally, the client acquires a segment of video data (e.g., video data a) and corresponding audio data (e.g., audio data a) from the server at a relatively high speed, so as to perform video playing. However, there are some situations that the video data and audio data are not well interleaved, for example, the time span of interleaving is too large, 15 seconds of video data c-15 seconds of audio data c-15 seconds of video data d-15 seconds of audio data d, for the client, it is not possible to obtain the corresponding audio data c when the player plays the video data c, in this case, it may be necessary to change the reading strategy of the video data and audio data, that is, read the 5 seconds of video data c first, then jump to the position of the audio data c to read the 5 seconds of audio data c, then jump back to the part of the video data c to continue to read the 5 seconds of video data c, so as to repeat the jump reading, in the prior art, at each jump, the process of disconnecting and newly building the network connection is performed, so that during the process of playing a complete video, tens of even hundreds of network connections may be generated, resulting in video jamming.
In the embodiment of the invention, a connection pool mode is adopted to solve the problem caused by improper audio and video interleaving. As shown in fig. 3, each block represents a data block of audio data or video data (each data block corresponds to a preset time duration), the interleaving manner shown in the figure is that every four video data blocks and every four audio databases are stored in an interleaved manner, and the data blocks that have been read are represented by a pattern filled with oblique lines. In the data reading mode, when one video data block is read, jumping to the corresponding interleaving part, reading one audio data block, and then returning to read the next video data block, and so on. As shown in the top view of fig. 3, when the current data reading position is at the end of the first video data block reading, the network connection 3 at that time is put into the connection pool, and then jumps to the beginning of the first audio data block, i.e. the data position to be read, at that time, the connection pool has no existing network connection corresponding to that position, and therefore, a network connection 4 is created to start the audio data block reading. Then, as shown in the middle view of fig. 3, after the first audio data block is read, a jump is needed to read the second video data block, at this time, the network connection 4 is put into the connection pool, and the network connection 3 is taken out to continue reading the video data block. Then, as shown in the lower view of fig. 3, after the second video data block is read, it is necessary to jump to the start position of the second audio data block, at this time, the network connection 3 is put into the connection pool, the network connection 4 is taken out, and the second audio data block is continuously read from the data position to be read in the figure. As shown in fig. 3, the entire video file can be read only by alternately using the network connection 3 and the network connection 4, so that the number of times of disconnecting and newly creating the network connection is reduced, and the video pause phenomenon is effectively reduced.
In addition, a user dragging (seek) behavior is also a reason for generating jump of the position of the read data, and for the user dragging behavior, when the user drags each time, whether a network connection corresponding to the dragged position of the data to be read exists or not can be searched from a connection pool, if so, reading can be continued based on the network connection, and if not, a new network connection is established for data reading. And the network connection corresponding to the position of the read data before dragging can be put into a connection pool for later multiplexing if the user drags back again. Of course, the dragging behavior of the user may also be determined according to the video playing habit of the user, and it is determined whether a network connection corresponding to the position of the read data before dragging, that is, a network connection corresponding to the position of the currently read data, needs to be placed into the connection pool, for example, some users prefer to frequently skip back and forth when watching a video, and for such users, the network connection before skipping may be placed into the connection pool for later use, and conversely, for some users, the user is accustomed to dragging back, for example, fast forward for 10 seconds or skip from the position of 5 minutes of the video to the position of 20 minutes, and these users generally do not skip back to see the previous video, and therefore, for such users, the network connection before skipping may be disconnected to release network resources.
The processing mechanism of the embodiment of the present invention is described above by taking moov data post-position, audio and video interleaving situation, user dragging situation, and the like as examples. In addition, for the situation that the data reading position jumps, the jumping amplitude can be judged firstly, and for some small jumps, the current network connection can be continuously used for data reading, namely, the position jumps are not carried out substantially, thereby reducing the switching or new establishment times of the network connection. For example, if the user drags from a location of 2 minutes 30 seconds to a location of 2 minutes 33 seconds, the reading may be completed instantaneously for the video content of 3 seconds, so that the switching of the network connection or the new establishment may not be performed any more. Specifically, the jump amplitude threshold used for judging the size of the jump amplitude may be determined according to the current network speed, that is, under the condition of a high network speed, the jump amplitude threshold may correspond to a larger jump amplitude threshold, and under the condition of a low network speed, the jump amplitude threshold may correspond to a smaller jump amplitude threshold.
In addition, when selecting a network connection corresponding to a data location to be read from the connection pool, it is not necessary to select a network connection whose data location is completely matched, and a network connection whose data reading location is closer may be selected. For example, the user drags from the position of 1 minute 30 seconds (the network connection corresponding to the position is put into the connection pool) to the position of 6 minutes 10 seconds, and then drags to the position of 1 minute 35 seconds, at this time, the network connection corresponding to the position of 1 minute 30 seconds can be directly used, and since the data from 1 minute 30 seconds to 1 minute 35 seconds can be read out quickly, the playing process is not affected.
In addition, in order to more effectively utilize the resources of the network connection, the time of the network connection in the non-multiplexing state stored in the connection pool can be recorded, and if the time in the non-multiplexing state is greater than a preset time threshold value, the network connection is disconnected, and the network resources are released.
According to the method for processing the video playing data, when the position of the read data jumps, the network connection which is not disconnected but is read by the pause data stored in the connection pool before is reused through the connection pool mechanism, so that the video playing pause phenomenon caused by frequent disconnection and new network connection is reduced, and the response speed of video playing is improved.
The technical solution of the present invention is further illustrated by some specific examples.
Example one
As shown in fig. 4, which is a flowchart illustrating a method for processing video playing data according to an embodiment of the present invention, the method may be applied to a client, and is used to obtain the video playing data from a server and play the video playing data, and the method may include:
s101: and responding to a data reading request aiming at a data position to be read except the current data reading position, and searching network connection corresponding to the data position to be read in the connection pool. The connection pool is used to store the network connection that is not disconnected but data reading is suspended, that is, the network connection put into the connection pool is equivalent to being suspended, and the function of data transmission is suspended, but resources are not released between the server and the client, and the network connection can still be enabled at any time.
In the online video playing scene, a player on a client sends a data reading request according to the video playing progress, the data reading request includes the position of video playing data requested to be read, namely the position of data to be read, and the client needs to read the video playing data from a server through network connection established before the client is connected with the server, and then the video playing data is provided for the player to play. The process of creating a network connection requires multiple interactions between the client and the server, for example, in order to establish the HTTP network connection, three times of TCP handshake and message interaction such as ssl handshake and HTTP header request are required between the client and the server, after the network connection is established, the video playing data will be transmitted between the server and the client via the data packet, and the video playing data transmitted by the data packet will be numbered in sequence according to the position of the video playing data in the video file, that is, for a certain network connection, in the process of data transmission, data is continuously read backwards from the data position requested to be read when the network connection is established according to the sequence of video playing data in a video file, and information such as the data reading position and the number of a data packet is recorded between a server and a client. For example, under a communication model based on a TCP/IP protocol, a server and a client both establish a Socket object, and then transmit data through the Socket object, and record packet information and a data reading position.
S102: and if the network connection corresponding to the position of the data to be read exists, acquiring the video playing data of the position of the data to be read by using the network connection. As described above, the network connection in the connection pool can be enabled at any time without performing the creation process of three TCP handshakes. In addition, the network connection corresponding to the position of the data to be read may be a network connection with a data reading position closer to the position of the data to be read, for example, in the first two seconds of the position of the data to be read, the position of the data to be read may be instantly read under the condition of a fast network speed, and a user does not perceive the position.
S103: and if the network connection corresponding to the position of the data to be read does not exist, establishing network connection, and acquiring the video playing data of the position of the data to be read by using the established network connection. The network connection may include an HTTP network connection, and the video playing data is data stored in a video file, and includes not only video content data but also information data used for playing the video content data in the video file, and specifically, the video playing data may include audio/video interleaving data and/or video playing metadata.
In addition, for the network connection corresponding to the current read data position, the network connection corresponding to the current read data position may be firstly disconnected, and the data transmission may be suspended and put into the connection pool for storage, so as to be used for possible data reading. Further, for the network connection corresponding to the current read data position, it may be determined whether the network connection corresponding to the current read data position may be multiplexed according to the situation of triggering the data read request, and if the network connection corresponding to the current read data position may be multiplexed, the network connection corresponding to the current read data position is stored in the request connection pool, otherwise, the network connection corresponding to the current read data position is disconnected. Specifically, a determination may be made as to whether to place the network connection into the connection pool for the several aforementioned situations:
1) and if the data reading request is triggered by the dragging action of the user, determining whether the network connection corresponding to the current data reading position is possibly multiplexed or not according to the use habit of the user. Because the user dragging behavior is relatively large in randomness, the possibility that the user returns to the original position to play after dragging is generally considered to be relatively low, and the current network connection cannot be reused by default. However, for some users, there may be situations where skip-and-skip viewing is preferred, for which the user's usage habits may be identified by historical user behavior, thereby determining the likelihood that the current network connection is reused.
2) And if the data reading request is triggered by the action of reading the audio and video interleaved data, determining that the network connection corresponding to the current reading data position is possibly multiplexed. As in the aforementioned application scenario, when a jump in reading position occurs for audio-video interleaved data, the jump reading is generally performed repeatedly.
3) If the data read request is triggered by the act of reading video metadata, it is determined that the network connection corresponding to the current read data location may be multiplexed. As in the aforementioned application scenario, after reading the moov data, the reading of the video content data is started by returning to the start position of the video content data.
Furthermore, when a jump occurs in a read data position, that is, when a data read request occurs in a data position to be read other than the current read data position, the jump amplitude of the data position to be read relative to the current read data position may be determined, if the jump amplitude is greater than the jump amplitude threshold, a network connection corresponding to the data position to be read is searched in the connection pool, that is, another network connection is needed to read the data, and if the jump amplitude is less than or equal to the jump amplitude threshold, the current network connection is continuously used to acquire video playback data, because if the jump amplitude is small, the read data position may be changed from the read data position before the jump (i.e., the aforementioned current read data position) to the data position to be read in a short time, in which case, if the network connection is still switched to perform data reading, no matter multiplexing or newly establishing network connection, the computing resources are wasted, so that the data can be read by using the current network connection. The jump amplitude threshold value may be determined according to the current network speed, that is, a larger jump amplitude threshold value may be used in the case of a high network speed, and a smaller jump amplitude threshold value may be used in the case of a low network speed.
In addition, before searching the network connection corresponding to the position of the data to be read in the connection pool, the method may further include: and detecting whether the video playing data corresponding to the position of the data to be read is downloaded, and if so, reading the video playing data corresponding to the position of the data to be read from the downloaded data storage area. For example, in a user dragging behavior, a user may jump to video playing data that has been read before, and for this situation, the user may directly read the video playing data locally at the client, and the video playing data does not need to be acquired from the server through a network connection.
In addition, in order to more effectively utilize the resources of the network connection, the time of the network connection in the non-multiplexed state saved in the connection pool can be recorded, and if the time in the non-multiplexed state is greater than a preset time threshold value, the network connection is disconnected, and the network resources are released.
According to the method for processing the video playing data, when the position of the read data jumps, the network connection which is not disconnected but is read by the pause data stored in the connection pool before is reused through the connection pool mechanism, so that the video playing pause phenomenon caused by frequent disconnection and new network connection is reduced, and the response speed of video playing is improved.
Example two
As shown in fig. 5, which is a schematic structural diagram of a device for processing video playing data according to an embodiment of the present invention, the device may be applied to a client, and is configured to obtain the video playing data from a server and play the video playing data, and the device may include:
and the network connection searching module 11 is configured to search, in response to a data reading request for a data position to be read other than the current data reading position, a network connection corresponding to the data position to be read in a connection pool, where the network connection in the connection pool is in a state where data reading is suspended but not disconnected. The connection pool is used to store the network connection that is suspended from data reading but not disconnected, that is, the network connection put into the connection pool is equivalent to being suspended, the function of data transmission is suspended, but the resource between the server and the client is not released, and can still be enabled at any time.
When a jump occurs in a read data position, that is, when a data read request occurs in a data position to be read other than the current read data position, the jump amplitude of the data position to be read relative to the current read data position can be determined, if the jump amplitude is greater than the jump amplitude threshold, a network connection corresponding to the data position to be read is searched in the connection pool, that is, data needs to be read by using another network connection, and if the jump amplitude is less than or equal to the jump amplitude threshold, video playing data is continuously acquired by using the current network connection, because if the jump amplitude is small, the read data position may be changed from the read data position before the jump (i.e., the current read data position) to the data position to be read in a short time, in this case, if the network connection is still switched to perform data reading, no matter multiplexing or newly establishing network connection, the computing resources are wasted, so that the data can be read by using the current network connection. The jump amplitude threshold may be determined according to the current network speed, that is, a larger jump amplitude threshold may be used in the case of a high network speed, and a smaller jump amplitude threshold may be used in the case of a low network speed.
In addition, before searching for the network connection corresponding to the position of the data to be read in the connection pool, the method may further include: and detecting whether the video playing data corresponding to the position of the data to be read is downloaded, and if so, reading the video playing data corresponding to the position of the data to be read from the downloaded data storage area. For example, in a user dragging behavior, a user may jump to video playing data that has been read before, and for this situation, the user only needs to read the video playing data locally at the client directly, and does not need to obtain the video playing data from the server through a network connection.
And a network connection multiplexing module 12, configured to, in the case that a network connection corresponding to the position of the data to be read exists in the connection pool, obtain, by using the network connection, video playing data at the position of the data to be read. The network connection corresponding to the position of the data to be read may be a network connection with a data reading position closer to the position of the data to be read, for example, in the first two seconds of the position of the data to be read, the position of the data to be read may be instantly read under the condition of a fast network speed, and a user does not perceive the position.
And a network connection creating module 13, configured to, in a case that there is no network connection corresponding to the position of the data to be read in the connection pool, create a new network connection and use the new network connection to obtain video playing data at the position of the data to be read. The network connection may include an HTTP network connection, and the video playing data is data stored in a video file, and includes not only video content data but also information data used for playing the video content data in the video file, and specifically, the video playing data may include audio/video interleaving data and/or video playing metadata.
Furthermore, the apparatus may further include:
and a network connection saving module 14, configured to save the network connection corresponding to the current read data location in the request connection pool. Further, for the network connection corresponding to the current read data position, it may be determined whether the network connection corresponding to the current read data position may be multiplexed according to the situation of triggering the data read request, and if the network connection corresponding to the current read data position may be multiplexed, the network connection corresponding to the current read data position is stored in the request connection pool, otherwise, the network connection corresponding to the current read data position is disconnected. The specific situation determination and the corresponding processing may be performed with reference to the contents described in the first embodiment. In addition, in order to more effectively utilize the resources of the network connection, the network connection saving module 14 may further record the time when the network connection saved in the connection pool is in the non-multiplexed state, and if the time in the non-multiplexed state is greater than a preset time threshold, disconnect the network connection and release the network resources.
The detailed description of the above processing procedure, the detailed description of the technical principle, and the detailed analysis of the technical effect are described in the foregoing embodiments, and are not repeated herein.
According to the processing device of the video playing data, when the position of the read data jumps, the network connection which is not disconnected but is read by the pause data stored in the connection pool before is reused through the connection pool mechanism, so that the video playing pause phenomenon caused by frequent disconnection and new network connection is reduced, and the response speed of video playing is improved.
EXAMPLE III
The foregoing embodiment describes a flow process and a device structure of a method for processing video playing data, and the functions of the method and the device can be implemented by an electronic device, as shown in fig. 6, which is a schematic structural diagram of the electronic device according to an embodiment of the present invention, and specifically includes: a memory 110 and a processor 120.
The memory 110 is used for storing programs.
In addition to the programs described above, the memory 110 may also be configured to store other various data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phonebook data, messages, pictures, videos, and so forth.
The memory 110 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The processor 120, coupled to the memory 110, is used for executing the program in the memory 110 to perform the operation steps of the processing method of video playing data described in the foregoing embodiments.
Further, the processor 120 may also include various modules described in the foregoing embodiments to perform processing of video playback data, and the memory 110 may be used, for example, to store data required by the modules to perform operations and/or output data.
The detailed description of the above processing procedure, the detailed description of the technical principle, and the detailed analysis of the technical effect are described in the foregoing embodiments, and are not repeated herein.
Further, as shown, the electronic device may further include: communication components 130, power components 140, audio components 150, display 160, and other components. Only some of the components are schematically shown in the figure and it is not meant that the electronic device comprises only the components shown in the figure.
The communication component 130 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device may access a wireless network based on a communication standard, such as WiFi, a mobile communication network, such as 2G, 3G, 4G/LTE, 5G, or a combination thereof. In an exemplary embodiment, the communication component 130 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 130 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
The power supply component 140 provides power to the various components of the electronic device. The power components 140 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for an electronic device.
The audio component 150 is configured to output and/or input audio signals. For example, the audio component 150 includes a Microphone (MIC) configured to receive external audio signals when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 110 or transmitted via the communication component 130. In some embodiments, audio assembly 150 also includes a speaker for outputting audio signals.
The display 160 includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The aforementioned program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (16)

1. A method for processing video playing data comprises the following steps:
in response to a data reading request aiming at a data position to be read except a current data reading position, searching a network connection corresponding to the data position to be read in a connection pool, wherein the network connection in the connection pool is in a state of suspending data reading but not being disconnected;
and if the network connection corresponding to the position of the data to be read exists, acquiring the video playing data of the position of the data to be read by using the network connection.
2. The method of claim 1, further comprising:
and if the network connection corresponding to the position of the data to be read does not exist, establishing network connection, and acquiring the video playing data of the position of the data to be read by using the newly established network connection.
3. The method of claim 1, further comprising:
and storing the network connection corresponding to the current read data position into the request connection pool.
4. The method of claim 3, wherein the saving the network connection corresponding to the current read data location into the request connection pool comprises:
determining whether the network connection corresponding to the current read data position is possibly multiplexed according to the situation of triggering the data read request;
if the data can be multiplexed, the network connection corresponding to the current read data position is stored in the request connection pool, otherwise, the network connection corresponding to the current read data position is disconnected.
5. The method of claim 4, wherein determining whether a network connection corresponding to a current read data location may be multiplexed based on a situation in which the data read request is triggered comprises:
if the data reading request is triggered by the dragging action of the user, determining whether the network connection corresponding to the current data reading position is possibly multiplexed or not according to the use habit of the user;
if the data reading request is triggered by the behavior of reading the audio/video interleaved data, determining that the network connection corresponding to the current data reading position is possibly multiplexed;
determining that a network connection corresponding to a current read data location may be multiplexed if the data read request is triggered by an act of reading video metadata.
6. The method of claim 1, wherein in response to a data read request for a data location to be read other than a current read data location, finding a network connection in a connection pool corresponding to the data location to be read comprises:
responding to a data reading request aiming at a data position to be read except the current data reading position, and acquiring the jump amplitude of the data position to be read relative to the current data reading position;
if the jump amplitude is smaller than or equal to the jump amplitude threshold value, continuing to use the current network connection to obtain video playing data;
and if the jump amplitude is larger than the jump amplitude threshold value, searching the network connection corresponding to the position of the data to be read in a connection pool.
7. The method of claim 6, wherein the hop amplitude threshold is determined based on a current wire speed.
8. The method of claim 1, wherein before searching for the network connection corresponding to the location of the data to be read in the connection pool, the method further comprises:
and detecting whether the video playing data corresponding to the position of the data to be read is downloaded, and if so, reading the video playing data corresponding to the position of the data to be read from the downloaded data storage area.
9. The method of claim 1, further comprising:
recording the time of the un-disconnected network connection in the un-multiplexed state saved in the connection pool;
and if the time in the non-multiplexing state is greater than a preset time threshold, disconnecting the network connection.
10. The method of claim 1, wherein the video playback data comprises: audio video interleave data and/or video playback metadata.
11. The method of claim 1, wherein the network connection comprises an HTTP network connection.
12. A device for processing video playback data, comprising:
the network connection searching module is used for responding to a data reading request aiming at a data position to be read except the current data reading position, searching a network connection corresponding to the data position to be read in a connection pool, wherein the network connection in the connection pool is in a state of suspending data reading but not being disconnected;
and the network connection multiplexing module is used for acquiring the video playing data of the position of the data to be read by using the network connection under the condition that the network connection corresponding to the position of the data to be read exists in the connection pool.
13. The apparatus of claim 12, further comprising:
and the network connection establishing module is used for establishing a new network connection and acquiring the video playing data of the position of the data to be read by using the newly established network connection under the condition that the network connection corresponding to the position of the data to be read does not exist in the connection pool.
14. The apparatus of claim 12, further comprising:
and the network connection storage module is used for storing the network connection corresponding to the current read data position into the request connection pool.
15. The apparatus of claim 12, wherein in response to a data read request for a data location to be read other than a current read data location, finding a network connection in a connection pool that corresponds to the data location to be read comprises:
responding to a data reading request aiming at a data position to be read except the current data reading position, and acquiring the jump amplitude of the data position to be read relative to the current data reading position;
if the jump amplitude is smaller than or equal to the jump amplitude threshold value, continuing to use the current network connection to obtain video playing data;
and if the jump amplitude is larger than the jump amplitude threshold value, searching the network connection corresponding to the position of the data to be read in a connection pool.
16. An electronic device, comprising:
a memory for storing a program;
a processor for executing the program stored in the memory to execute the processing method of video playback data according to any one of claims 1 to 11.
CN202011504258.7A 2020-12-17 2020-12-17 Video playing data processing method and device and electronic equipment Pending CN114650438A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011504258.7A CN114650438A (en) 2020-12-17 2020-12-17 Video playing data processing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011504258.7A CN114650438A (en) 2020-12-17 2020-12-17 Video playing data processing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114650438A true CN114650438A (en) 2022-06-21

Family

ID=81990107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011504258.7A Pending CN114650438A (en) 2020-12-17 2020-12-17 Video playing data processing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114650438A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101416558A (en) * 2006-04-07 2009-04-22 诺基亚公司 Managing connections in a mobile telecommunications network
US20090254948A1 (en) * 2008-04-03 2009-10-08 Justin Middleton System And Method For Streaming Video Over A Wireless Network
CN105306609A (en) * 2014-06-26 2016-02-03 优视科技有限公司 Network loading processing method and device
CN106331840A (en) * 2016-08-31 2017-01-11 青岛海信宽带多媒体技术有限公司 Http live stream (HLS) protocol-based audio and video jump play method and apparatus
CN107820100A (en) * 2017-10-30 2018-03-20 北京四达时代软件技术股份有限公司 internet audio and video playing method and device
CN109413453A (en) * 2018-10-19 2019-03-01 广州酷狗计算机科技有限公司 Video broadcasting method, device, terminal and storage medium
CN109729176A (en) * 2019-01-22 2019-05-07 厦门美图之家科技有限公司 Network request method and device
CN110430238A (en) * 2019-07-05 2019-11-08 中国平安财产保险股份有限公司 Long connection management method, apparatus, equipment and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101416558A (en) * 2006-04-07 2009-04-22 诺基亚公司 Managing connections in a mobile telecommunications network
US20090254948A1 (en) * 2008-04-03 2009-10-08 Justin Middleton System And Method For Streaming Video Over A Wireless Network
CN105306609A (en) * 2014-06-26 2016-02-03 优视科技有限公司 Network loading processing method and device
CN106331840A (en) * 2016-08-31 2017-01-11 青岛海信宽带多媒体技术有限公司 Http live stream (HLS) protocol-based audio and video jump play method and apparatus
CN107820100A (en) * 2017-10-30 2018-03-20 北京四达时代软件技术股份有限公司 internet audio and video playing method and device
CN109413453A (en) * 2018-10-19 2019-03-01 广州酷狗计算机科技有限公司 Video broadcasting method, device, terminal and storage medium
CN109729176A (en) * 2019-01-22 2019-05-07 厦门美图之家科技有限公司 Network request method and device
CN110430238A (en) * 2019-07-05 2019-11-08 中国平安财产保险股份有限公司 Long connection management method, apparatus, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
KR102089196B1 (en) Video recording method and device for mobile terminal
EP2744169B1 (en) Method and apparatus for playing streaming media files
US7802006B2 (en) Multi-location buffering of streaming media data
JP5917508B2 (en) Method and apparatus for synchronizing paused playback across platforms
KR100621784B1 (en) Method and system for multimedia consumption based on user terminal characteristic
CN106464965B (en) Method and apparatus for displaying application data in wireless communication system
WO2015096648A1 (en) Video sharing method and system in smart tv
US20130124664A1 (en) Coordinating media presentations among peer devices
CN107547940A (en) Video playback processing method, equipment and computer-readable recording medium
KR20150082949A (en) Method for screen mirroring and apparatus thereof
CN112399190B (en) Audio and video data acquisition method and device
US20130326569A1 (en) Method and system for playing video streams
CN106686446B (en) Content projection method and mobile terminal
WO2015058590A1 (en) Control method, device and system for live broadcast of video, and storage medium
EP2997737A1 (en) System for universal remote media control in a multi-user, multi-platform, multi-device environment
US8886765B2 (en) System and method for predicitive trick play using adaptive video streaming
JP2014007603A (en) Content reproducing device, content reproducing system and content reproducing method
JPWO2013145936A1 (en) Control device, control method, program, and control system
CN108667871B (en) Transmission method and device based on P2P
CN107040825B (en) Terminal, television, multi-screen interaction system and screen capture parameter setting method
CN114189696A (en) Video playing method and device
CN105338401A (en) Playing method and system of multimedia file
KR101555792B1 (en) Communication apparatus for receiving multimedia chunk, control method thereof, and recording medium for recording program for executing the control method
CN114650438A (en) Video playing data processing method and device and electronic equipment
CN112532719B (en) Information stream pushing method, device, equipment and computer readable storage medium

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