Method and apparatus for online video playback
By obtaining and parsing the video information and local video frame information of the video to be played, and sending assistance cache requests to the target user equipment, the video playback interruption caused by instability in the network environment is solved, and the stable online playback of the video is achieved and the user experience is improved.
Patent Information
- Application Number
- CN202210573910.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-25
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-05-25
AI Technical Summary
In the case of unstable network environment, video playback is easily interrupted, affecting the user's online video viewing experience.
By obtaining the video information of the video to be played and the local video frame information pre-cache, the video frame information that needs to be cached is determined, and a assistance cache request is sent to the target user equipment that meets the preset conditions, obtain and parse the video frames, and realize online playback of the video.
When the network state is unstable, it can help cache video frames to ensure the stability of video playback and improve the user's viewing experience.
Smart Images

Figure CN114938471B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent terminals, and particularly to a method and device for online video playback. Background Art
[0002] With the development of mobile Internet technology, broadband and data traffic have entered people's daily lives, enabling people to watch videos online at any time through video software on mobile devices.
[0003] However, the video smoothness is easily affected by the network environment. In the case of an unstable network environment, videos often cannot be played normally, greatly affecting the stability of online video viewing.
[0004] Videos can be played in an unstable network environment by pre-downloading. However, this method not only occupies a large amount of memory on the mobile phone, but also the video viewing is easily restricted by the download volume and download time. Users cannot watch videos online in real time, greatly affecting the user experience. Summary of the Invention
[0005] In view of this, the present invention provides a method for online video playback. Through this method, video playback in a complex network can be achieved, ensuring the stability of users' online video viewing and effectively improving the user viewing experience.
[0006] The present invention also provides an apparatus for online video playback to ensure the implementation and application of the above method in practice.
[0007] A method for online video playback includes:
[0008] Obtaining video information of a video to be played, and obtaining each pre-cached local video frame corresponding to the video information and local video frame information of each local video frame;
[0009] Determining video frame information of each video frame to be assisted in caching according to the video information and each local video frame information, and generating an assisted caching request for obtaining video frames according to each video frame information;
[0010] Searching for user devices within a preset range to obtain each target user device that meets preset conditions;
[0011] Sending the assisted caching request to each target user device, so that each target user device returns each video frame corresponding to each video frame information with the consent of the user using the user device;
[0012] Determining each target video frame in each video frame, and parsing each target video frame and each local video frame to achieve online video playback.
[0013] In the above method, optionally, searching for user devices within a preset range and obtaining each target user device that meets the preset conditions includes:
[0014] Determining each user device within the distance where Bluetooth can stably transmit as a device to be detected;
[0015] Sending a network detection request to each of the devices to be detected, so that each device to be detected returns detection network authorization information indicating agreement or disagreement to detect the network status according to the network detection request;
[0016] When receiving the detection network authorization information indicating agreement to detect the network status from each of the devices to be detected, detecting whether the network status of each of the devices to be detected meets the preset network transmission conditions, and determining each user device that meets the network transmission conditions as a target device.
[0017] In the above method, optionally, determining each target video frame in each of the video frames includes:
[0018] Clearing each video frame that meets the preset damage conditions in each of the video frames, obtaining each preprocessed video frame, and performing a duplicate removal operation on each of the preprocessed video frames to obtain each target video frame.
[0019] In the above method, optionally, it further includes:
[0020] Detecting the playback progress of the video corresponding to each local video frame and the caching time of each video frame; if the video corresponding to the local video frame has been played to completion, or the caching time of the video frame exceeds the set threshold, then clearing the local video frame.
[0021] In the above method, optionally, it further includes:
[0022] Sending an authorization request to the user asking whether to agree to pre-cache the video;
[0023] If receiving the return information indicating that the user agrees to the authorization request, then obtaining the historical viewing record of the video;
[0024] According to the historical viewing record, using an intelligent recommendation algorithm to pre-cache each key frame of the video to obtain each local video frame of the video.
[0025] An online video playback device, including:
[0026] A first acquisition unit, configured to acquire video information of a video to be played, and acquire each pre-cached local video frame corresponding to the video information and local video frame information of each local video frame;
[0027] A first execution unit, configured to determine the video frame information of each video frame to be assisted in caching according to the video information and each piece of local video frame information, and generate an assisted caching request for obtaining video frames according to each piece of video frame information;
[0028] A second obtaining unit, configured to search for user devices within a preset range and obtain each target user device that meets the preset conditions;
[0029] A first sending unit, configured to send the assisted caching request to each target user device, so that each target user device returns each video frame corresponding to each piece of video frame information with the consent of the user using the device;
[0030] A second execution unit, configured to determine each target video frame in each video frame, and parse each target video frame and each local video frame to implement online playback of the video.
[0031] For the above device, optionally, the second obtaining unit includes:
[0032] A first determination subunit, configured to determine each user device within the distance where Bluetooth can stably transmit as a device to be detected;
[0033] A sending subunit, configured to send a network detection request to each device to be detected, so that each device to be detected returns detection network authorization information indicating consent or disagreement to detect the network status according to the network detection request;
[0034] A second determination subunit, configured to, when receiving the detection network authorization information indicating that each device to be detected agrees to detect the network status, detect whether the network status of each device to be detected meets the preset network transmission conditions, and determine each user device that meets the network transmission conditions as a target device.
[0035] For the above device, optionally, the second execution unit specifically includes:
[0036] Clear each video frame that meets the preset damage conditions in each video frame to obtain each preprocessed video frame, and perform a duplicate removal operation on each preprocessed video frame to obtain each target video frame.
[0037] For the above device, optionally, it further includes:
[0038] A cache cleaning unit, configured to detect the playback progress of the video corresponding to each local video frame and the cache time of each video frame; if the video corresponding to the local video frame has been played, or the cache time of the video frame exceeds the set threshold, then clear the local video frame.
[0039] Optionally, the above-mentioned device further includes:
[0040] A second sending unit, configured to send an authorization request to the user asking whether to agree to pre-cache the video;
[0041] A third obtaining unit, configured to obtain the historical viewing record of the video if the return information indicating that the user agrees to the authorization request is received;
[0042] A third execution unit, configured to pre-cache each key frame of the video according to the historical viewing record by using an intelligent recommendation algorithm, so as to obtain each local video frame of the video.
[0043] A storage medium, which includes stored instructions. When the instructions run, the device where the storage medium is located is controlled to execute the above-mentioned method for online video playback.
[0044] An electronic device includes a memory and one or more instructions. One or more instructions are stored in the memory and are configured to be executed by one or more processors to execute the above-mentioned method for online video playback.
[0045] Compared with the prior art, the present invention has the following advantages:
[0046] Based on the embodiments provided by the present invention, when performing online video playback, video information of the video to be played is obtained, and each pre-cached local video frame corresponding to the video information and local video frame information of each local video frame are obtained; according to the video information and local video frame information of each local video frame, video frame information of each video frame to be assisted in caching is determined, and according to the video frame information of each video frame, an assistance caching request for obtaining video frames is generated; user devices are searched within a preset range, and each target user device that meets the preset conditions is obtained; the assistance caching request is sent to each target user device, so that each target user device returns each video frame corresponding to the video frame information when the user using the user device agrees to authorize; each target video frame in each video frame is determined, and each target video frame and each local video frame are parsed to realize online playback of the video.
[0047] By applying the embodiments provided by the present invention, in the case of unstable network status, some video frames can be assisted to obtain from other user devices, and combined with the pre-cached local video frames for parsing, so as to realize video playback under complex networks, ensure the stability of the user's online video viewing, and effectively improve the user's viewing experience. Description of the Drawings
[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.
[0049] Figure 1 It is a flowchart of a method for online video playback provided by an embodiment of the present invention;
[0050] Figure 2 It is another flowchart of a method for online video playback provided by an embodiment of the present invention;
[0051] Figure 3 It is yet another flowchart of a method for online video playback provided by an embodiment of the present invention;
[0052] Figure 4 It is a pre-buffering flowchart of a method for online video playback provided by an embodiment of the present invention;
[0053] Figure 5 It is a data flowchart of a method for online video playback provided by an embodiment of the present invention;
[0054] Figure 6 It is another flowchart of a method for online video playback provided by an embodiment of the present invention;
[0055] Figure 7 It is a device structure diagram of a device for online video playback provided by an embodiment of the present invention;
[0056] Figure 8 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0057] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0058] In this application, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. The terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0059] The present invention can be used in numerous general-purpose or special-purpose computing device environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or equipment, and so on.
[0060] An embodiment of the present invention provides a method for online video playback. This method can be applied to a variety of system platforms, and its execution subject can be a computer terminal or a processor of various mobile devices. The method flow chart of the method is as Figure 1 shown and specifically includes:
[0061] S101: Obtain the video information of the video to be played, and obtain each pre-cached local video frame corresponding to the video information and the local video frame information of each local video frame.
[0062] In the embodiment provided by the present invention, when the network condition is relatively good, the user can smoothly watch videos online through the video APP. When the network condition is unstable, watching videos online will become stuck, affecting the user experience. If the user wants to watch videos online at this time, a certain amount of video frames need to be obtained from the devices of other users with better network conditions and played in combination with the local video frames. Therefore, the local device needs to first obtain the video information of the video that the user wants to play, as well as the local video frames that have been pre-cached in the local device memory, and the local video frame information of each local video frame.
[0063] S102: Determine the video frame information of each video frame to be assisted in caching according to the video information and each local video frame information, and generate an assisted caching request for obtaining video frames according to each video frame information.
[0064] In the embodiments provided by the present invention, according to the obtained video information and the information of each local video frame of the video that has been pre-cached, the information of each video frame that needs to request assistance for transmission from other user devices can be obtained. For example, if the video that the user wants to watch has frames 1, 2, 3, 4, and 5, and the local device of the user has pre-cached frames 1 and 3, then frames 2, 4, and 5 need to be requested from other user devices. Therefore, according to the obtained information of each video frame that needs to be requested from other user devices, an assistance caching request for obtaining video frames can be generated.
[0065] S103: Search for user devices within a preset range and obtain each target user device that meets the preset conditions.
[0066] In the embodiments provided by the present invention, the local device searches for user devices within a preset range. Here, the preset range can be a range capable of stably transmitting video frames, or user devices at a preset distance from the local device. One or more target user devices that can perform video frame transmission and meet the preset conditions are obtained within the preset range.
[0067] Specifically, as Figure 2 shown, the step of searching for user devices within a preset range and obtaining each target user device that meets the preset conditions includes:
[0068] S201: Determine each user device within the distance where Bluetooth can stably transmit as a device to be detected.
[0069] The local device and other user devices for assisting in transmission can transmit video frames through Bluetooth. When the user enters an environment with poor network or the user's current network fluctuates greatly and it is impossible to smoothly watch the video, the video application of the local device can initiate a search for users within a certain range around, and the range is locked within the distance where Bluetooth can stably transmit. Each user device within the distance where Bluetooth can stably transmit is determined as a device to be detected.
[0070] S202: Send a network detection request to each of the devices to be detected, so that each of the devices to be detected returns detection network authorization information indicating whether to agree or disagree to detect the network status according to the network detection request.
[0071] After detecting the devices to be detected with online users having the same video application within the range where Bluetooth can perform stable transmission, a network detection request is sent to each device to be detected. The search for other users and the judgment of the network status require the authorization of other users. The device to be detected returns detection network authorization information indicating agreement or disagreement to detect the network status according to the network detection request. The user device can indicate authorization or non-authorization to detect the network by turning on or off the authorization switch in the application background, or can also select to agree or disagree to authorize the detection network according to the authorization pop-up window.
[0072] S203: When receiving the detection network authorization information indicating that each of the devices to be detected agrees to detect the network status, detect whether the network status of each of the devices to be detected meets the preset network transmission conditions, and determine each user device that meets the network transmission conditions as the target device.
[0073] When the local device receives the detection network authorization information indicating that other user devices, i.e., the devices to be detected, agree to detect the network status, the local device starts to detect the network status of the device to be detected. If the network status of the device to be detected is good and can support the caching and transmission of video frames, then the network status of the device to be detected meets the preset network transmission conditions, and the device to be detected is determined as the target device.
[0074] Among them, meeting the network transmission conditions, that is, having a good network status, can specifically mean that the network reaches a certain download rate value, and this download rate value can be determined by the user according to the situation and is not specifically limited here.
[0075] Applying the embodiment provided by the present invention, in the case where other user devices agree to authorize the detection of the network, the user devices with good detected networks are the target user devices. The network is detected only when other user devices authorize the search and detection of the network, so that the user device is not randomly detected by other devices, ensuring the security of the device. Moreover, the user devices with good networks within the distance where Bluetooth can perform stable transmission are detected as the target devices, ensuring stable transmission between the local device of the video frame and the target device.
[0076] S104: Send the assistance caching request to each of the target user devices, so that each of the target user devices returns each video frame corresponding to each video frame information with the consent of the user using the device.
[0077] In the embodiments provided by the present invention, after detecting each target device that can assist in video frame caching, an assistance caching request is sent to the target video. After receiving the assistance caching request, the user of the target device authorizes whether to agree to assist in caching the video frames. In the case of agreeing to the authorization, the target device caches the video frames corresponding to each video frame information according to the assistance caching request.
[0078] It should be noted that for the user to assist in caching video frames, the user needs to have the same video player as the local device, that is, the same video application. After the user authorizes and agrees to cache the video frames, it can be cached in the foreground of the opened video application or in the background.
[0079] S105: Determine each target video frame in each of the video frames, and parse each target video frame and each local video frame to implement online playback of the video.
[0080] In the embodiments provided by the present invention, after the local device obtains the video frames returned by each user device according to each video frame information through Bluetooth transmission, it determines each target video frame for playback among the obtained video frames, combines each target video frame with each local video frame for parsing, and plays according to the normal process.
[0081] Based on the embodiments provided by the present invention, when performing online video playback, obtain the video information of the video to be played, and obtain each pre-cached local video frame corresponding to the video information and the local video frame information of each local video frame; according to the video information and each local video frame information, determine the video frame information of each video frame to be assisted in caching, and generate an assistance caching request for obtaining video frames according to each video frame information; search for user devices within a preset range, and obtain each target user device that meets the preset conditions; send an assistance caching request to each target user device, so that each target user device returns each video frame corresponding to each video frame information when the user of the user device agrees to authorize; determine each target video frame in each video frame, and parse each target video frame and each local video frame to implement online playback of the video.
[0082] Applying the embodiments provided by the present invention, in the case of unstable network status, it is possible to assist in obtaining some video frames from other user devices, combine and parse them with the locally pre-cached video frames, implement video playback under complex networks, ensure the stability of the user's online video viewing, and effectively improve the user's viewing experience.
[0083] Among them, the determination of each target video frame in each of the video frames includes:
[0084] Clear each video frame that meets the preset damage conditions among the various video frames, obtain the preprocessed video frames, and perform a deduplication operation on each of the preprocessed video frames to obtain each target video frame.
[0085] Specifically, after obtaining each of the returned video frames, some damaged video frames can be cleared first. The damage conditions of the video frames can be set according to the characteristics of the video frames. For example, the video frames cannot be displayed, there are display errors, etc. Then, a deduplication operation is performed on the remaining video frames. Since the local device simultaneously sends requests to obtain video frames to multiple other user devices, the video frames transmitted back by each target device may be repeated. Therefore, a deduplication operation needs to be performed on each of the transmitted-back video frames, and finally, each target video frame that can be used for video playback is obtained.
[0086] It should be noted that the local device receives in real time each video frame transmitted back by other user devices, performs a deduplication and cleaning operation on each video frame, and then combines the obtained target video frames with the local video frames for parsing and playback.
[0087] It also should be noted that the player in the video application needs to be modified. When there are frames 1, 2, 3, 4, 5 in a video, if the player integrates according to the video frames transmitted back by other devices and the local video frames and only obtains frames 1, 2, 4, 5, the player can play normally, and the connection between frame 42 and frame 4 can be correct, without any phenomenon of screen freeze or black screen, ensuring the correct display of the playback content.
[0088] Applying the embodiments provided by the present invention, damaged video frames and duplicate video frames are cleared among the video frames returned by multiple user devices, and each high-quality target video frame is obtained, thereby improving the quality of video playback.
[0089] As Figure 3 shown, in the embodiments provided by the present invention, optionally, it further includes:
[0090] S301: Send an authorization request to the user asking whether to agree to pre-cache the video.
[0091] The video application in the local device requires the user to perform an authorization operation in advance for the pre-caching process of the video. Only when the user authorizes the pre-caching process can the pre-caching operation be performed. If the user refuses the authorization, the pre-caching operation is not allowed.
[0092] S302: If the return information indicating that the user agrees to the authorization request is received, obtain the historical viewing record of the video.
[0093] S303: Pre-cache each key frame of the video using an intelligent recommendation algorithm according to the historical viewing record to obtain each local video frame of the video.
[0094] If the user agrees to pre-caching the video in advance and the network is good, the user enters the video application to watch the video. While watching the video, without affecting the user's online video viewing experience, based on the intelligent algorithm recommendation and the historical viewing history of the video, some key frames of the video are pre-cached for the user to obtain the local video frames of the video.
[0095] By applying the embodiment provided by the present invention, some video frames can be automatically cached when the network condition is good through user authorization, which can reduce the need to assist in caching video frames with other user devices when the network is unstable, and effectively improve the efficiency of video playback.
[0096] In the embodiment provided by the present invention, optionally, it also includes:
[0097] Detect the playback progress of the video corresponding to each of the local video frames and the cache time of each of the video frames; if the video corresponding to the local video frame has been completed, or the cache time of the video frame exceeds a set threshold, clear the local video frame.
[0098] Specifically, Figure 4 As shown, local video frames are pre-cached in the video application of the local device, and the local device detects in real time the playback progress of the video corresponding to each local video frame and the caching time of the video frame; if the user has finished playing the video content corresponding to the local video frame within a set time limit, the local video frame content pre-cached in the video application of the local device is directly cleared after the user finishes watching; if the corresponding video is still not played after the preset time limit, the application actively clears the pre-cached local video frame.
[0099] By applying the embodiment provided by the present invention, video frames that have been played or have not been played for a long time are cleaned up regularly to release device memory, which is beneficial to improving device performance and video playback experience.
[0100] like Figure 5A data flow diagram for online video playback is shown. When user A plays a certain video online and the network condition is unstable, a request for the required video is generated based on the video information and the information of each local video frame that has been pre-cached locally for this video, and the request for the required video is sent to the terminal applications of other users via the Bluetooth of user A. After the terminal applications of other users receive the request for the required video sent by the terminal application of user A via their own Bluetooth, they obtain the information of the video frames required by user A from the server according to the information of each required video frame corresponding to the request for the required video by user A. The server returns each video frame required by user A to the terminal applications of other users according to the received information of the video frames required by user A. After the terminal applications of other users receive each video frame required by user A, they send each video frame to the terminal application of user A via their own Bluetooth. The terminal application of user A receives each video frame returned by the terminal applications of other users via the Bluetooth of user A.
[0101] As Figure 6 A method flow diagram for online video playback is shown. When a user plays a video in the video application of a local device, the local device continuously judges its own network condition in real time. When the network is in a good condition, while playing the video normally in the video application, some key frames of the video are recommended to be pre-cached according to the video information of the currently played video and the historical viewing records through an intelligent algorithm; when the network is in a poor condition or the network fluctuates greatly and is unstable, a search for other user devices within a certain range around that have the same application and whose users are online is initiated in the video application. The search for other user devices can only be carried out when the users of the other user devices consent to the search. The network conditions of the other user devices with online users found are judged. Similarly, the network condition of the user device corresponding to the user can only be judged when the user of the other user device consents to the network detection. If the user devices found are also in an unstable network state, no request processing operation is performed. If the network condition of the user device is good, a request to assist in caching video frames is sent to the user device. Here, the user device can be a single user device or multiple user devices. When the user device receives the request to assist in caching video frames, an authorization confirmation operation is performed to judge whether the user of the user device authorizes to assist in caching video frames. If the user of the user device does not authorize, the user device does not perform subsequent processing operations for assisting in caching video frames. If the user of the user device authorizes, the user device pre-caches each video frame corresponding to the request to assist in caching video frames and returns each video frame to the local device. The video application of the local device performs internal parsing processing based on the returned video frames and the local video frames pre-cached in the local device and plays them in the video application of the local device.
[0102] The specific implementation processes and their derivative methods of the above-mentioned various embodiments are all within the protection scope of the present invention.
[0103] Corresponding to Figure 1 the method described above, an embodiment of the present invention further provides a device for online video playback, which is used for Figure 1 the specific implementation of the method in Figure 7 As shown in the figure, the device for online video playback provided by the embodiment of the present invention can be applied to a computer terminal or various mobile devices, and specifically includes:
[0104] A first acquisition unit 701, configured to acquire video information of a video to be played, and acquire each pre-cached local video frame corresponding to the video information and local video frame information of each local video frame;
[0105] A first execution unit 702, configured to determine video frame information of each video frame to be assisted in caching according to the video information and each local video frame information, and generate an assisted caching request for acquiring video frames according to each video frame information;
[0106] A second acquisition unit 703, configured to search for user devices within a preset range and acquire each target user device that meets the preset conditions;
[0107] A first sending unit 704, configured to send the assisted caching request to each target user device, so that each target user device returns each video frame corresponding to each video frame information with the consent and authorization of the user using the user device;
[0108] A second execution unit 705, configured to determine each target video frame in each video frame, and parse each target video frame and each local video frame to implement online playback of the video.
[0109] Based on the device provided by the embodiments of the present invention, when playing an online video, the first acquisition unit acquires the video information of the video to be played, and acquires each pre-cached local video frame corresponding to the video information and the local video frame information of each local video frame; then the first execution unit determines the video frame information of each video frame to be assisted in caching according to the video information and the local video frame information of each local video frame, and generates an assisted caching request for acquiring the video frames according to the video frame information of each video frame; the second acquisition unit searches for user devices within a preset range, and acquires each target user device that meets the preset conditions; then the first sending unit sends the assisted caching request to each target user device, so that each target user device returns each video frame corresponding to the video frame information with the consent of the user using the user device; finally, the second execution unit determines each target video frame in each video frame, and parses each target video frame and each local video frame to implement online video playback.
[0110] By applying the device provided by the embodiments of the present invention, in the case of unstable network status, it is possible to assist in acquiring some video frames from other user devices, combine and parse them with the locally pre-cached video frames, implement video playback under complex networks, ensure the stability of users' online video viewing, and effectively improve the user viewing experience.
[0111] For the above device, optionally, the second acquisition unit 703 includes:
[0112] The first determination subunit is configured to determine each user device within the distance where Bluetooth can stably transmit as a device to be detected;
[0113] The sending subunit is configured to send a network detection request to each of the devices to be detected, so that each of the devices to be detected returns detection network authorization information indicating consent or disagreement to detect the network status according to the network detection request;
[0114] The second determination subunit is configured to, when receiving the detection network authorization information of each of the devices to be detected indicating consent to detect the network status, detect whether the network status of each of the devices to be detected meets the preset network transmission conditions, and determine each user device that meets the network transmission conditions as a target device.
[0115] For the above device, optionally, the second execution unit 705 specifically includes:
[0116] Clear each video frame that meets the preset damage conditions in each of the video frames, obtain each preprocessed video frame, and perform a duplicate removal operation on each of the preprocessed video frames to obtain each target video frame.
[0117] For the above device, optionally, it further includes:
[0118] A cache cleaning unit for detecting the playback progress of the video corresponding to each of the local video frames and the cache time of each of the video frames; if the video corresponding to the local video frame has been played to completion or the cache time of the video frame exceeds a set threshold, then the local video frame is cleared.
[0119] The above-mentioned device, optionally, further includes:
[0120] A second sending unit for sending an authorization request to the user asking whether to agree to pre-cache the video;
[0121] A third obtaining unit for obtaining the historical viewing record of the video if a return message agreeing to the authorization request is received from the user;
[0122] A third execution unit for pre-caching each key frame of the video according to the historical viewing record by using an intelligent recommendation algorithm to obtain each local video frame of the video.
[0123] For the specific working processes of each unit and sub-unit in the online video playback device disclosed in the above embodiments of the present invention, reference may be made to the corresponding content in the online video playback method disclosed in the above embodiments of the present invention, which will not be elaborated here.
[0124] An embodiment of the present invention further provides a storage medium, the storage medium includes stored instructions, wherein when the instructions run, they control the device where the storage medium is located to execute the above-mentioned online video playback method.
[0125] An embodiment of the present invention further provides an electronic device, the schematic structural diagram of which is as Figure 8 shown, specifically including a memory 801, and one or more instructions 802, wherein one or more instructions 802 are stored in the memory 801 and are configured to be executed by one or more processors 803 to perform the following operations:
[0126] Obtain the video information of the video to be played, and obtain each pre-cached local video frame corresponding to the video information and the local video frame information of each of the local video frames;
[0127] Determine the video frame information of each video frame to be assisted in caching according to the video information and each of the local video frame information, and generate an assisted caching request for obtaining video frames according to each of the video frame information;
[0128] Search for user devices within a preset range, and obtain each target user device that meets the preset conditions;
[0129] Send the assistance caching request to each of the target user devices, so that each of the target user devices returns each video frame corresponding to each video frame information with the consent of the user using the user device;
[0130] Determine each target video frame in each of the video frames, and parse each target video frame and each of the local video frames to achieve online playback of the video.
[0131] Each embodiment in this specification is described in a progressive manner. For the same or similar parts between each embodiment, reference can be made to each other. The key point of each embodiment is to illustrate the differences from other embodiments. In particular, for a system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiment. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.
[0132] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two.
[0133] To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0134] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to these embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for online video playback, characterized in that, it is applicable to local devices and includes: When the network status is unstable, obtain the video information of the video to be played, and obtain each local video frame corresponding to the video information and the local video frame information of each local video frame; the local video frame is a video frame that has been pre-cached to the local device memory in the video to be played; According to the video information and each local video frame information, determine the video frame information of each video frame to be assisted in caching, and generate an assisted caching request for obtaining video frames according to each video frame information; wherein, each video frame to be assisted in caching is other video frames in the video frames corresponding to the video information of the video to be played except the local video frames; Search for user devices within a preset range, and obtain each target user device that meets the preset conditions; the target user device is a device with a better network status within the preset range; Send the assisted caching request to each target user device, so that each target user device returns each video frame corresponding to each video frame information with the consent and authorization of the user using the user device; wherein, each video frame returned by the target user device is the video frame corresponding to each video frame information requested and cached by the target user device based on the assisted caching request corresponding to each video frame information; Determine each target video frame in each video frame, and parse each target video frame and each local video frame to realize online video playback.
2. The method according to claim 1, characterized in that, the searching for user devices within a preset range and obtaining each target user device that meets the preset conditions includes: Determine each user device within the distance where Bluetooth can stably transmit as a device to be detected; Send a network detection request to each device to be detected, so that each device to be detected returns detection network authorization information indicating consent or disagreement to detect the network status according to the network detection request; When receiving the detection network authorization information of each device to be detected consenting to detect the network status, detect whether the network status of each device to be detected meets the preset network transmission conditions, and determine each user device that meets the network transmission conditions as the target user device.
3. The method according to claim 1, characterized in that, the determining each target video frame in each video frame includes: Clear each video frame that meets the preset damage conditions in each video frame, obtain each preprocessed video frame, and perform a duplicate removal operation on each preprocessed video frame to obtain each target video frame.
4. The method according to claim 1, characterized in that, further includes: Detect the playback progress of the video corresponding to each local video frame and the caching time of each video frame; if the video corresponding to the local video frame has been played, or the caching time of the video frame exceeds the set threshold, then clear the local video frame.
5. The method according to claim 1, characterized in that, further includes: Send an authorization request to the user asking whether to agree to pre-cache the video; If the return message indicating that the user agrees to the authorization request is received, obtain the historical viewing record of the video; According to the historical viewing record, use an intelligent recommendation algorithm to pre-cache each key frame of the video to obtain each local video frame of the video.
6. An online video playback device, characterized in that it is applicable to a local device and includes: A first acquisition unit, configured to, when the network status is unstable, acquire video information of a video to be played, and acquire each local video frame corresponding to the video information and local video frame information of each local video frame; the local video frame is a video frame that has been pre-cached to the local device memory in the video to be played; A first execution unit, configured to determine video frame information of each video frame to be assisted in caching according to the video information and each local video frame information, and generate an assisted caching request for acquiring video frames according to each video frame information; wherein, each video frame to be assisted in caching is other video frames in the video frames corresponding to the video information of the video to be played except the local video frames; A second acquisition unit, configured to search for user devices within a preset range and acquire each target user device that meets a preset condition; the target user device is a device with a better network status within the preset range; A first sending unit, configured to send the assisted caching request to each target user device, so that each target user device returns each video frame corresponding to each video frame information when the user of the user device agrees to authorize; wherein, each video frame returned by the target user device is the video frame corresponding to each video frame information that the target user device requests to cache and returns based on the assisted caching request corresponding to each video frame information; A second execution unit, configured to determine each target video frame in each video frame, and parse each target video frame and each local video frame to implement online playback of the video.
7. The device according to claim 6, characterized in that the second acquisition unit includes: A first determination subunit, configured to determine each user device within the distance where Bluetooth can stably transmit as a device to be detected; A sending subunit, configured to send a network detection request to each device to be detected, so that each device to be detected returns detection network authorization information indicating agreement or disagreement to detect the network status according to the network detection request; A second determination subunit, configured to, when receiving the detection network authorization information indicating that each device to be detected agrees to detect the network status, detect whether the network status of each device to be detected meets a preset network transmission condition, and determine each user device that meets the network transmission condition as the target user device.
8. The device according to claim 6, characterized in that the second execution unit specifically includes: Clear each video frame that meets the preset damage condition among the video frames, obtain each preprocessed video frame, and perform a duplicate removal operation on each of the preprocessed video frames to obtain each target video frame.
9. The device according to claim 6, wherein, it further includes: a cache cleaning unit, configured to detect the playback progress of the video corresponding to each local video frame and the cache time of each video frame; if the video corresponding to the local video frame has been played to completion, or the cache time of the video frame exceeds a set threshold, then clear the local video frame.
10. The device according to claim 6, wherein, it further includes: a second sending unit, configured to send an authorization request to the user asking whether to agree to pre-cache the video; a third obtaining unit, configured to obtain the historical viewing record of the video if a return message indicating that the user agrees to the authorization request is received; a third execution unit, configured to pre-cache each key frame of the video according to the historical viewing record by using an intelligent recommendation algorithm to obtain each local video frame of the video.
Citation Information
Patent Citations
Video transmission method, device and system
CN104918077A